diff --git a/package.json b/package.json index ace29af..0e6d5ef 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "lodash": "^4.17.21", "lz-string": "^1.4.4", "mutate-animate": "^1.0.2", + "three": "^0.149.0", "vue": "^3.2.45" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32cca95..0c6e5aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,6 +22,7 @@ specifiers: lz-string: ^1.4.4 mutate-animate: ^1.0.2 terser: ^5.16.1 + three: ^0.149.0 ts-node: ^10.9.1 typescript: ^4.9.4 unplugin-vue-components: ^0.22.12 @@ -37,6 +38,7 @@ dependencies: lodash: 4.17.21 lz-string: 1.4.4 mutate-animate: 1.0.2 + three: 0.149.0 vue: 3.2.45 devDependencies: @@ -3164,6 +3166,10 @@ packages: source-map-support: 0.5.21 dev: true + /three/0.149.0: + resolution: {integrity: sha512-tohpUxPDht0qExRLDTM8sjRLc5d9STURNrdnK3w9A+V4pxaTBfKWWT/IqtiLfg23Vfc3Z+ImNfvRw1/0CtxrkQ==} + dev: false + /through/2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true diff --git a/src/ui/start.vue b/src/ui/start.vue index 63f9327..09cb983 100644 --- a/src/ui/start.vue +++ b/src/ui/start.vue @@ -4,6 +4,18 @@
人类:开天辟地
+
+
+ + +
+
+
@@ -15,28 +27,40 @@ :selected="selected === v" :showed="showed" @click="clickStartButton(v)" + @mouseenter=" + movein( + $event.target as HTMLElement, + toshow.length - i - 1 + ) + " >{{ text[i] }}
+
@@ -214,12 +293,13 @@ onUnmounted(() => { justify-content: center; align-items: center; opacity: 0; - transition: opacity 1.2s ease-out; + transition: opacity 0.6s ease-out; background-color: black; } #start-div { position: relative; + overflow: hidden; } #background { @@ -228,6 +308,30 @@ onUnmounted(() => { height: 100%; pointer-events: none; filter: sepia(30%) contrast(115%); + transform: scale(120%); +} + +#background-gradient { + z-index: 2; + position: absolute; + width: 200%; + height: 100%; + left: -100%; + background-image: linear-gradient( + 45deg, + transparent 0%, + transparent 30%, + #000 60%, + #000 100% + ); + animation: gradient 4s ease-out 0.5s 1 normal forwards; +} + +#listen { + position: absolute; + width: 100%; + height: 100%; + pointer-events: auto; } #start-main { @@ -270,6 +374,7 @@ onUnmounted(() => { left: 18%; bottom: 10%; filter: brightness(120%) contrast(110%); + z-index: 1; #cursor { text-shadow: 2px 2px 3px black; @@ -357,6 +462,44 @@ onUnmounted(() => { margin-bottom: 16%; } } + + #settings { + position: absolute; + display: flex; + flex-direction: row-reverse; + right: 5%; + bottom: 10%; + font-size: 1.3em; + z-index: 1; + + .setting-buttons { + margin-left: 40%; + color: white; + transition: color 0.2s linear; + cursor: pointer; + } + + #sound[checked='false'] { + color: rgb(255, 43, 43); + } + + #sound:hover { + color: aqua; + } + + #sound[checked='false']:hover { + color: rgb(253, 139, 139); + } + + #sound-del { + left: 0; + position: absolute; + width: 100%; + height: 100%; + border-bottom: 2px solid #aaa; + transform: translate(-85%, -50%) rotate(-45deg) scale(1.5); + } + } } .start-button { @@ -365,6 +508,7 @@ onUnmounted(() => { .start-button[selected='true'] { color: transparent; + transform: scale(115%) translate(7.5%); } @keyframes cursor { @@ -376,6 +520,15 @@ onUnmounted(() => { } } +@keyframes gradient { + from { + left: -100%; + } + to { + left: 100%; + } +} + .start-enter-active { transition: all 1.2s ease-out; } diff --git a/vite.config.ts b/vite.config.ts index 5ad46f0..69c9934 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ output: { manualChunks: { antdv: ['ant-design-vue', '@ant-design/icons-vue'], - common: ['lodash', 'axios', 'lz-string', 'chart.js', 'mutate-animate'] + common: ['lodash', 'axios', 'lz-string', 'chart.js', 'mutate-animate', 'three.js'] } } }