diff --git a/.clinerules_MD b/.clinerules_MD deleted file mode 100644 index bceabfc..0000000 --- a/.clinerules_MD +++ /dev/null @@ -1,4 +0,0 @@ -```bash -ln -s .github/copilot-instructions.md .clinerules -ln -s .github/copilot-instructions.md .clinerules-code -``` \ No newline at end of file diff --git a/.github/copilot-instructions_MD b/.github/copilot-instructions_MD new file mode 100644 index 0000000..f9f1d6d --- /dev/null +++ b/.github/copilot-instructions_MD @@ -0,0 +1,3 @@ +```bash +ln -s .github/copilot-instructions.md .roorules +``` \ No newline at end of file diff --git a/.clinerules b/.roorules similarity index 100% rename from .clinerules rename to .roorules diff --git a/.vscode/settings.json b/.vscode/settings.json index 4566de2..148ec73 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,7 +30,8 @@ "source.fixAll.eslint": "never", "source.fixAll.stylelint": "never", "source.fixAll.oxc": "never", - "source.organizeImports": "never" + "source.organizeImports": "never", + "source.fixAll": "never" }, "editor.formatOnSave": false } diff --git a/package.json b/package.json index 5194796..5fbdc4c 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@pinia/colada": "^0.14.2", "@primeuix/themes": "^1.0.1", "@splinetool/runtime": "^1.9.82", + "@types/p5": "^1.7.6", "@unhead/vue": "^2.0.2", "@vant/use": "^1.6.0", "@vueuse/core": "^13.0.0", @@ -66,6 +67,7 @@ "lucide-vue-next": "^0.485.0", "mitt": "^3.0.1", "nprogress": "^0.2.0", + "p5": "^1.11.3", "page-stack-vue3": "^2.5.6", "pinia": "^3.0.1", "pinia-plugin-persistedstate": "^4.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50c9809..cbe71a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,9 @@ importers: '@splinetool/runtime': specifier: ^1.9.82 version: 1.9.82 + '@types/p5': + specifier: ^1.7.6 + version: 1.7.6 '@unhead/vue': specifier: ^2.0.2 version: 2.0.2(vue@3.5.13(typescript@5.8.3)) @@ -79,6 +82,9 @@ importers: nprogress: specifier: ^0.2.0 version: 0.2.0 + p5: + specifier: ^1.11.3 + version: 1.11.3 page-stack-vue3: specifier: ^2.5.6 version: 2.5.6(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) @@ -1431,6 +1437,9 @@ packages: '@types/nprogress@0.2.3': resolution: {integrity: sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==} + '@types/p5@1.7.6': + resolution: {integrity: sha512-6pLTOo0V3N5jZb5nTwjiv3lPHLK3Z/TjbhQUj8CTWXocUk1Z/f6OHTp3Pcwi1BhWnf5gqKUcyEb1gP0KIJuQgw==} + '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -3587,6 +3596,9 @@ packages: resolution: {integrity: sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==} engines: {node: '>=18'} + p5@1.11.3: + resolution: {integrity: sha512-5eiyuZ3Pvo6ucr3nr8AzD+qwpoleiIEF2a2HmiO6PJM1tnbD0LmLlckZyYGJATs0tdmRjc37Muh6KPS4d1FHHg==} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -5852,6 +5864,8 @@ snapshots: '@types/nprogress@0.2.3': {} + '@types/p5@1.7.6': {} + '@types/parse-json@4.0.2': {} '@types/readdir-glob@1.1.5': @@ -8305,6 +8319,8 @@ snapshots: p-map@7.0.3: {} + p5@1.11.3: {} + package-json-from-dist@1.0.1: {} package-manager-detector@0.2.11: diff --git a/src/pages/Page/p5_js/index.page.vue b/src/pages/Page/p5_js/index.page.vue new file mode 100644 index 0000000..62b1a68 --- /dev/null +++ b/src/pages/Page/p5_js/index.page.vue @@ -0,0 +1,122 @@ + + + + + p5.js 粒子效果演示 + + + 粒子系统 + + 这是一个使用 p5.js 创建的简单粒子系统演示。粒子会从鼠标指针的位置生成,并向上漂浮然后逐渐消失。 p5.js + 使得创建这类动态和交互式的视觉效果变得相对容易。 + + + + 演示区域 + 在下面的深灰色区域移动鼠标,观察粒子效果: + + + + diff --git a/typed-router.d.ts b/typed-router.d.ts index ee7b778..fd8d53b 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -30,6 +30,7 @@ declare module 'vue-router/auto-routes' { 'PageIcons': RouteRecordInfo<'PageIcons', '/Page/Icons', Record, Record>, 'PageJSPage': RouteRecordInfo<'PageJSPage', '/Page/JSPage', Record, Record>, 'PageMDPage': RouteRecordInfo<'PageMDPage', '/Page/MDPage', Record, Record>, + 'PageP5Js': RouteRecordInfo<'PageP5Js', '/Page/p5_js', Record, Record>, 'PageStyle': RouteRecordInfo<'PageStyle', '/Page/Style', Record, Record>, 'PkgsUsageI18n': RouteRecordInfo<'PkgsUsageI18n', '/PkgsUsage/I18n', Record, Record>, 'PkgsUsageTsEnumUtil': RouteRecordInfo<'PkgsUsageTsEnumUtil', '/PkgsUsage/ts-enum-util', Record, Record>, diff --git a/unocss.config.ts b/unocss.config.ts index 110e120..a096300 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -3,7 +3,6 @@ import { defineConfig, presetAttributify, presetWind3, transformerDirectives, transformerVariantGroup } from 'unocss'; import { presetAnimations } from 'unocss-preset-animations'; // import presetChinese, { chineseTypography } from 'unocss-preset-chinese'; - import { presetShadcn } from 'unocss-preset-shadcn'; // @unocss/preset-rem-to-px diff --git a/vite.config.plugins.ts b/vite.config.plugins.ts index ef96829..6ab9207 100644 --- a/vite.config.plugins.ts +++ b/vite.config.plugins.ts @@ -11,7 +11,7 @@ import Vue from '@vitejs/plugin-vue'; import VueJsx from '@vitejs/plugin-vue-jsx'; import path from 'node:path'; import UnoCSS from 'unocss/vite'; -import AutoImport from 'unplugin-auto-import/vite'; +import UnpluginAutoImport from 'unplugin-auto-import/vite'; import { FileSystemIconLoader } from 'unplugin-icons/loaders'; import IconsResolver from 'unplugin-icons/resolver'; import Icons from 'unplugin-icons/vite'; @@ -79,7 +79,7 @@ export function Plugins() { }), // https://github.com/antfu/unplugin-auto-import - AutoImport({ + UnpluginAutoImport({ dirs: [ // 'src/composables', 'src/stores',
+ 这是一个使用 p5.js 创建的简单粒子系统演示。粒子会从鼠标指针的位置生成,并向上漂浮然后逐渐消失。 p5.js + 使得创建这类动态和交互式的视觉效果变得相对容易。 +
在下面的深灰色区域移动鼠标,观察粒子效果: