diff --git a/README.md b/README.md index 6a46cde..45c62b0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ 「中V档案馆」是一个旨在收录与展示「中文歌声合成作品」及有关信息的网站。 +## 新闻 - 测试版本上线 + +目前,中V档案馆上线了用于测试的前端网页和API接口,它们分别位于[projectcvsa.com](https://projectcvsa.com)和[api.projectcvsa.com](https://api.projectcvsa.com)。 +API调用方法请参见[接口文档](https://docs.projectcvsa.com/api-doc/)。 + ## 创建背景与关联工作 纵观整个互联网,对于「中文歌声合成」或「中文虚拟歌手」(常简称为中V或VC)相关信息进行较为系统、全面地整理收集的主要有以下几个网站: @@ -31,7 +36,7 @@ ## 技术架构 -参见[CVSA文档](https://cvsa.gitbook.io/)。 +参见[CVSA文档](https://docs.projectcvsa.com/)。 ## 开放许可 diff --git a/packages/frontend/astro.config.mjs b/packages/frontend/astro.config.mjs index 79ca8e0..2c35862 100644 --- a/packages/frontend/astro.config.mjs +++ b/packages/frontend/astro.config.mjs @@ -19,6 +19,6 @@ export default defineConfig({ allow: [".", "../../"], }, }, - plugins: [tsconfigPaths()], + plugins: [tsconfigPaths()] }, }); diff --git a/packages/frontend/main.ts b/packages/frontend/main.ts index 3f50c75..88db725 100644 --- a/packages/frontend/main.ts +++ b/packages/frontend/main.ts @@ -1 +1 @@ -export const VERSION = "1.2.6"; +export const VERSION = "1.2.7"; diff --git a/packages/frontend/package.json b/packages/frontend/package.json index d94c869..0a2c111 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -1,23 +1,25 @@ { - "name": "frontend", - "type": "module", - "version": "0.0.1", - "scripts": { - "dev": "astro dev", - "build": "astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "@astrojs/tailwind": "^6.0.2", - "astro": "^5.5.5", - "autoprefixer": "^10.4.21", - "pg": "^8.11.11", - "postcss": "^8.5.3", - "tailwindcss": "^3.0.24", - "vite-tsconfig-paths": "^5.1.4" - }, - "devDependencies": { - "@types/pg": "^8.11.11" - } + "name": "frontend", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/tailwind": "^6.0.2", + "argon2id": "^1.0.1", + "astro": "^5.5.5", + "autoprefixer": "^10.4.21", + "pg": "^8.11.11", + "postcss": "^8.5.3", + "tailwindcss": "^3.0.24", + "vite-tsconfig-paths": "^5.1.4" + }, + "devDependencies": { + "@rollup/plugin-wasm": "^6.2.2", + "@types/pg": "^8.11.11" + } } diff --git a/packages/frontend/public/no-simd.wasm b/packages/frontend/public/no-simd.wasm new file mode 100755 index 0000000..46aaf6d Binary files /dev/null and b/packages/frontend/public/no-simd.wasm differ diff --git a/packages/frontend/public/simd.wasm b/packages/frontend/public/simd.wasm new file mode 100755 index 0000000..fe5effa Binary files /dev/null and b/packages/frontend/public/simd.wasm differ diff --git a/packages/frontend/src/components/VDFtester.svelte b/packages/frontend/src/components/VDFtester.svelte new file mode 100644 index 0000000..e6bca8a --- /dev/null +++ b/packages/frontend/src/components/VDFtester.svelte @@ -0,0 +1,219 @@ + + +
+

VDF Benchmark

+ + {#if !isBenchmarking} + + {/if} + + {#if isBenchmarking} +

+ Benchmarking in progress... ({currentTestIndex + 1}/{testCombinations.length}) +

+ {#if currentN !== null && currentDifficulty !== null} +

N Bits: {currentN.toString(2).length}

+

Difficulty: {currentDifficulty}

+
+
+
+ {/if} + {/if} + + {#if benchmarkResults.length > 0 && !isBenchmarking} +

Benchmark Results

+

+ Summary: + {getAccumulatedDifficulty()} + calculations done in {getAccumulatedTime().toFixed(1)}ms, + speed: {getSpeed().toFixed(2)} op/s +

+ + + + + + + + + + {#each benchmarkResults as result} + + + + + + {/each} + +
Time (ms)N (bits)T (log10)
{result.time.toFixed(2)}{result.N.toString(2).length}{Math.log10(Number(result.difficulty)).toFixed(2)}
+ {/if} +
diff --git a/packages/frontend/src/const.ts b/packages/frontend/src/const.ts new file mode 100644 index 0000000..d478815 --- /dev/null +++ b/packages/frontend/src/const.ts @@ -0,0 +1,13 @@ +const N_1024 = BigInt("129023318876534346704360951712586568674758913224876821534686030409476129469193481910786173836188085930974906857867802234113909470848523288588793477904039083513378341278558405407018889387577114155572311708428733260891448259786041525189132461448841652472631435226032063278124857443496954605482776113964107326943") + +const N_2048 = BigInt("23987552118069940970878653610463005981599204778388399885550631951871084945075866571231062435627294546200946516668493107358732376187241747090707087544153108117326163500579370560400058549184722138636116585329496684877258304519458316233517215780035360354808658620079068489084797380781488445517430961701007542207001544091884001098497324624368085682074645221148086075871342544591022944384890014176612259729018968864426602901247715051556212559854689574013699665035317257438297910516976812428036717668766321871780963854649899276251822244719887233041422346429752896925499321431273560130952088238625622570366815755926694833109") + +const N_1792 = BigInt("23987552118069940970878653610463005981599204778388399885550631951871084945075866571231062435627294546200946516668493107358732376187241747090707087544153108117326163500579370560400058549184722138636116585329496684877258304519458316233517215780035360354808658620079068489084797380781488445517430961701007542207001544091884001098497324624368085682074645221148086075871342544591022944384890014176612259729018968864426602901247715051556212559854689574013699665035317257438297910516976812428036717668766321871780963854649899276251822244719887233041422346429752896925499321431273560130952088238625622570366815755926694833109") + +const N_1536 = BigInt("1694330250214463438908848400950857073137355630337290254958754184668036770489801447652464038218330711288158361242955860326168191830448553710492926795708495297280933502917598985378231124113971732841791156356676046934277122699383776036675381503510992810963611269045078440132744168908318454891211962146563551929591147663448816841024591820348784855441153716551049843185172472891407933214238000452095646085222944171689449292644270516031799660928056315886939284985905227") + +const N_3072 = BigInt("4432919939296042464443862503456460073874727648022810391370558006281079088795179408238989283371442564716849343712703672836423961818025813387453469700639513190304802553045342607888612037304066433501317127429264242784608682213025490491212489901736408833027611579294436675682774458141490718959615677971745638214649336218217578937534746160749039668886450447773018369168258067682196337978245372237157696236362344796867228581553446331915147012787367438751646936429739232247148712001806846526947508445039707404287951727838234648917450736371192435665040644040487427986702098273581288935278964444790007953559851323281510927332862225214878776790605026472021669614552481167977412450477230442015077669503312683966631454347169703030544483487968842349634064181183599641180349414682042575010303056241481622837185325228233789954078775053744988023738762706404546546146837242590884760044438874357295029411988267287001033032827035809135092270843") + +const N_4096 = BigInt("703671044356805218391078271512201582198770553281951369783674142891088501340774249238173262580562112786670043634665390581120113644316651934154746357220932310140476300088580654571796404198410555061275065442553506658401183560336140989074165998202690496991174269748740565700402715364422506782445179963440819952745241176450402011121226863984008975377353558155910994380700267903933205531681076494639818328879475919332604951949178075254600102192323286738973253864238076198710173840170988339024438220034106150475640983877458155141500313471699516670799821379238743709125064098477109094533426340852518505385314780319279862586851512004686798362431227795743253799490998475141728082088984359237540124375439664236138519644100625154580910233437864328111620708697941949936338367445851449766581651338876219676721272448769082914348242483068204896479076062102236087066428603930888978596966798402915747531679758905013008059396214343112694563043918465373870648649652122703709658068801764236979191262744515840224548957285182453209028157886219424802426566456408109642062498413592155064289314088837031184200671561102160059065729282902863248815224399131391716503171191977463328439766546574118092303414702384104112719959325482439604572518549918705623086363111") + +export const N_ARRAY = [N_1024, N_1536, N_1792, N_2048, N_3072, N_4096]; \ No newline at end of file diff --git a/packages/frontend/src/content/about.md b/packages/frontend/src/content/about.md index 8c2506a..221879b 100644 --- a/packages/frontend/src/content/about.md +++ b/packages/frontend/src/content/about.md @@ -31,7 +31,8 @@ ## 技术架构 -参见[CVSA文档](https://cvsa.gitbook.io/)。 +参见[CVSA文档](https://docs.projectcvsa.com/)。 + ## 开放许可 diff --git a/packages/frontend/src/layouts/Layout.astro b/packages/frontend/src/layouts/Layout.astro index e33cf4b..c654353 100644 --- a/packages/frontend/src/layouts/Layout.astro +++ b/packages/frontend/src/layouts/Layout.astro @@ -7,7 +7,7 @@ import "../styles/global.css"; - CVSA 前端 + 中V档案馆 diff --git a/packages/frontend/src/pages/test-vdf.astro b/packages/frontend/src/pages/test-vdf.astro new file mode 100644 index 0000000..2970f88 --- /dev/null +++ b/packages/frontend/src/pages/test-vdf.astro @@ -0,0 +1,8 @@ +--- +import VDFtester from "@components/VDFtester.svelte"; +import Layout from "@layouts/Layout.astro"; +--- + + + +