Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mivik committed Sep 4, 2023
0 parents commit ac2ae0d
Show file tree
Hide file tree
Showing 125 changed files with 11,756 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
],
parserOptions: {
ecmaVersion: "latest",
},
};
77 changes: 77 additions & 0 deletions .github/workflows/tauri.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev libssl-dev pkg-config
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-x86_64-gnu

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: Sync node version and setup cache
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # Change this to npm, yarn or pnpm.

- name: Download static-lib
uses: suisei-cn/[email protected]
id: downlod-static-lib
with:
url: "https://files-cf.phira.cn/prpr-avc-static-lib.tar.gz"
target: ./

- name: Mkdir static-lib
run: mkdir static-lib

- name: Extract static-lib
uses: a7ul/[email protected]
id: extract-static-lib
with:
command: x
cwd: ./static-lib
files: prpr-avc-static-lib.tar.gz

- name: Build the app
uses: tauri-apps/tauri-action@v0

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRPR_AVC_LIBS: ${{ github.workspace }}/static-lib
with:
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
releaseName: 'phira-render v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
releaseBody: 'From GitHub Action'
releaseDraft: true
prerelease: false
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

/deploy.sh

/static-lib
/.cargo

target/
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gitignore
*.md
*.json
*.js
*.cjs
*.yml
*.yaml
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
singleQuote: true
bracketSameLine: true
printWidth: 180
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# phira-render

Dev

```bash
cargo tauri dev
```

Build

```bash
cargo tauri build
```
38 changes: 38 additions & 0 deletions conf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 以下配置是 yaml 格式,基本是“配置项名字: 配置项内容”
# true 代表开启,false 代表关闭
#
# 如果配置项内容包含特殊字符,你可能需要用英文引号("")将其包裹起来;如果仍然有问题,请使用 字符串转义
# 例如:playerName: "我是谁?不告诉你"
#
# ===== 下面是具体的配置内容 ======

# 使用激进优化加快渲染速度;在某些极端情况下可能会造成渲染问题
aggressive: true

# 玩家名字
playerName: Mivik
# 玩家 RKS
playerRks: 15.00
# 课题模式颜色;可选有:white(白色)、green(绿色)、blue(蓝色)、red(红色)、golden(金色)、rainbow(彩色)
challengeColor: rainbow
# 课题模式等级
challengeRank: 3

# 是否开启多押提示
multipleHint: true
# 音符缩放
noteScale: 1
# 全局偏移
offset: 0
# 是否启用粒子效果
particle: true

# 音乐音量,1 为标准,0 为静音,大于 1 为增幅
volumeMusic: 1.0
# 音效音量,1 为标准,0 为静音,大于 1 为增幅
volumeSfx: 1.0

# 重采样数,越高渲染时间越长,但抗锯齿效果越好。建议设置为 2 的 n 次幂
sampleCount: 4
# 是否启用快速近似抗锯齿(FXAA)
fxaa: false
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>phira-render</title>
</head>
<body>
<div id="app" />
<script type="module" src="/src/main.ts"></script>
</body>
</html>
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "phira-render",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"prettier": "prettier --write ."
},
"dependencies": {
"@mdi/font": "^7.2.96",
"@tauri-apps/api": "^1.4.0",
"moment": "^2.29.4",
"phira-render": "link:",
"vue": "^3.3.4",
"vue-i18n": "9.3.0-beta.14-77e850b",
"vue-router": "^4.2.4",
"vuetify": "^3.3.14",
"vuetify-sonner": "^0.3.2"
},
"devDependencies": {
"@intlify/unplugin-vue-i18n": "^0.12.3",
"@rushstack/eslint-patch": "^1.3.3",
"@tsconfig/node18": "^18.2.1",
"@types/node": "^18.17.11",
"@vitejs/plugin-vue": "^4.3.3",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.48.0",
"eslint-plugin-vue": "^9.17.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.2",
"typescript": "~5.1.6",
"vite": "^4.4.9",
"vue-tsc": "^1.8.8"
}
}
Loading

0 comments on commit ac2ae0d

Please sign in to comment.