1
0
mirror of https://github.com/robonen/canvas-3d.git synced 2026-03-20 02:44:40 +00:00

Merge branch 'master' into docker

This commit is contained in:
2022-11-17 16:11:14 +07:00
committed by GitHub
25 changed files with 723 additions and 160 deletions

4
.husky/pre-commit Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run typecheck

View File

@@ -5,9 +5,10 @@ import {resolve} from 'path';
const SRC = resolve(__dirname, 'src');
export default defineNuxtConfig({
rootDir: SRC,
srcDir: SRC,
app: {
head: {
title: 'Canvas 3D',
link: [{rel: 'icon', href: '/favicon.svg'}],
},
},

413
package-lock.json generated
View File

@@ -9,6 +9,7 @@
"@vueuse/core": "^9.3.1",
"@vueuse/nuxt": "^9.3.1",
"nuxt": "^3.0.0",
"husky": "^8.0.2",
"sass": "^1.55.0"
}
},
@@ -826,6 +827,7 @@
"dev": true
},
"node_modules/@nuxt/kit": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0.tgz",
"integrity": "sha512-7ZsOLt5s9a0ZleAIzmoD70JwkZf5ti6bDdxl6f8ew7Huxz+ni/oRfTPTX9TrORXsgW5CvDt6Q9M7IJNPkAN/Iw==",
@@ -961,6 +963,94 @@
"vue": "^3.2.45"
}
},
"node_modules/@nuxt/vite-builder/node_modules/@nuxt/kit": {
"version": "3.0.0-rc.11",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0-rc.11.tgz",
"integrity": "sha512-o0E/k635Lzcxp4K5t0ToHC6WwQ1wyN0EIqMAQEzgiUexoAhzdURr21QI0D6e6U461u4KP7x92wYM87VxhMFXmQ==",
"dev": true,
"dependencies": {
"@nuxt/schema": "3.0.0-rc.11",
"c12": "^0.2.13",
"consola": "^2.15.3",
"defu": "^6.1.0",
"globby": "^13.1.2",
"hash-sum": "^2.0.0",
"ignore": "^5.2.0",
"jiti": "^1.16.0",
"knitwork": "^0.1.2",
"lodash.template": "^4.5.0",
"mlly": "^0.5.16",
"pathe": "^0.3.8",
"pkg-types": "^0.3.5",
"scule": "^0.3.2",
"semver": "^7.3.7",
"unctx": "^2.0.2",
"unimport": "^0.6.7",
"untyped": "^0.5.0"
},
"engines": {
"node": "^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@nuxt/vite-builder/node_modules/@nuxt/schema": {
"version": "3.0.0-rc.11",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0-rc.11.tgz",
"integrity": "sha512-EIBYQeBxJ+JZ8RjPRGaXM9+vtWMHQ4HsqZIw5a+p6hqRLGf53fHANT4vjMQZA4fAYBnJZJI7dB/OXkfyb/kikA==",
"dev": true,
"dependencies": {
"c12": "^0.2.13",
"create-require": "^1.1.1",
"defu": "^6.1.0",
"jiti": "^1.16.0",
"pathe": "^0.3.8",
"pkg-types": "^0.3.5",
"postcss-import-resolver": "^2.0.0",
"scule": "^0.3.2",
"std-env": "^3.2.1",
"ufo": "^0.8.5",
"unimport": "^0.6.7"
},
"engines": {
"node": "^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@nuxt/vite-builder/node_modules/@rollup/pluginutils": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
"integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
"dev": true,
"dependencies": {
"estree-walker": "^2.0.1",
"picomatch": "^2.2.2"
},
"engines": {
"node": ">= 8.0.0"
}
},
"node_modules/@nuxt/vite-builder/node_modules/@rollup/pluginutils/node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true
},
"node_modules/@nuxt/vite-builder/node_modules/unimport": {
"version": "0.6.8",
"resolved": "https://registry.npmjs.org/unimport/-/unimport-0.6.8.tgz",
"integrity": "sha512-MWkaPYvN0j+6jfEuiVFhfmy+aOtgAP11CozSbu/I3Cx+8ybjXIueB7GVlKofHabtjzSlPeAvWKJSFjHWsG2JaA==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^4.2.1",
"escape-string-regexp": "^5.0.0",
"fast-glob": "^3.2.12",
"local-pkg": "^0.4.2",
"magic-string": "^0.26.4",
"mlly": "^0.5.16",
"pathe": "^0.3.8",
"scule": "^0.3.2",
"strip-literal": "^0.4.2",
"unplugin": "^0.9.6"
}
},
"node_modules/@rollup/plugin-alias": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-4.0.2.tgz",
@@ -1534,46 +1624,20 @@
"dev": true
},
"node_modules/@vueuse/core": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.3.1.tgz",
"integrity": "sha512-xriyD+v3D2ObH/UtnkEl+1sbcLBVHNaZaLi/rqoNEe/B92hggDEFQIGXoQUjdRzYOjASHSezf9uCDtmd7LeWyA==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.4.0.tgz",
"integrity": "sha512-JzgenGj1ZF2BHOen5rsFiAyyI9sXAv7aKhNLlm9b7SwYQeKTcxTWdhudonURCSP3Egl9NQaRBzes2lv/1JUt/Q==",
"dev": true,
"dependencies": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.3.1",
"@vueuse/shared": "9.3.1",
"@vueuse/metadata": "9.4.0",
"@vueuse/shared": "9.4.0",
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/head": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/@vueuse/head/-/head-1.0.16.tgz",
@@ -1590,23 +1654,23 @@
}
},
"node_modules/@vueuse/metadata": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.3.1.tgz",
"integrity": "sha512-G1BPhtx3OHaL/y4OZBofh6Xt02G1VA9PuOO8nac9sTKMkMqfyez5VfkF3D9GUjSRNO7cVWyH4rceeGXfr2wdMg==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.4.0.tgz",
"integrity": "sha512-7GKMdGAsJyQJl35MYOz/RDpP0FxuiZBRDSN79QIPbdqYx4Sd0sVTnIC68KJ6Oln0t0SouvSUMvRHuno216Ud2Q==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/nuxt": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/nuxt/-/nuxt-9.3.1.tgz",
"integrity": "sha512-qj6xTaAhfCT21qfRGu57vafH0baB1n7si9J2iVGWRB8Tju7XunAPb7iCsQECWSaJRCLAvLV7dQ9W2ifHIcK5kw==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/nuxt/-/nuxt-9.4.0.tgz",
"integrity": "sha512-R2XGbDAQ1kCEqnUHv+sTISOCuu7tfSpEFdYZxiIaEH+D8o2vxZx4itAoAoe1LxmyBsd9fakyQ6qpvkUeQVAfoQ==",
"dev": true,
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.11",
"@vueuse/core": "9.3.1",
"@vueuse/metadata": "9.3.1",
"@vueuse/core": "9.4.0",
"@vueuse/metadata": "9.4.0",
"local-pkg": "^0.4.2",
"vue-demi": "*"
},
@@ -1617,36 +1681,10 @@
"nuxt": "^3.0.0-rc.9"
}
},
"node_modules/@vueuse/nuxt/node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@vueuse/shared": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.3.1.tgz",
"integrity": "sha512-YFu3qcnVeu0S2L4XdQJtBpDcjz6xwqHZtTv/XRhu66/yge1XVhxskUcc7VZbX52xF9A34V6KCfwncP9YDqYFiw==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.4.0.tgz",
"integrity": "sha512-fTuem51KwMCnqUKkI8B57qAIMcFovtGgsCtAeqxIzH3i6nE9VYge+gVfneNHAAy7lj8twbkNfqQSygOPJTm4tQ==",
"dev": true,
"dependencies": {
"vue-demi": "*"
@@ -1655,32 +1693,6 @@
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared/node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/@zhead/schema": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.1.tgz",
@@ -4055,6 +4067,21 @@
"node": ">=10.17.0"
}
},
"node_modules/husky": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz",
"integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==",
"dev": true,
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -5220,6 +5247,94 @@
"node": "^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/nuxt/node_modules/@nuxt/kit": {
"version": "3.0.0-rc.11",
"resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.0.0-rc.11.tgz",
"integrity": "sha512-o0E/k635Lzcxp4K5t0ToHC6WwQ1wyN0EIqMAQEzgiUexoAhzdURr21QI0D6e6U461u4KP7x92wYM87VxhMFXmQ==",
"dev": true,
"dependencies": {
"@nuxt/schema": "3.0.0-rc.11",
"c12": "^0.2.13",
"consola": "^2.15.3",
"defu": "^6.1.0",
"globby": "^13.1.2",
"hash-sum": "^2.0.0",
"ignore": "^5.2.0",
"jiti": "^1.16.0",
"knitwork": "^0.1.2",
"lodash.template": "^4.5.0",
"mlly": "^0.5.16",
"pathe": "^0.3.8",
"pkg-types": "^0.3.5",
"scule": "^0.3.2",
"semver": "^7.3.7",
"unctx": "^2.0.2",
"unimport": "^0.6.7",
"untyped": "^0.5.0"
},
"engines": {
"node": "^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/nuxt/node_modules/@nuxt/schema": {
"version": "3.0.0-rc.11",
"resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.0.0-rc.11.tgz",
"integrity": "sha512-EIBYQeBxJ+JZ8RjPRGaXM9+vtWMHQ4HsqZIw5a+p6hqRLGf53fHANT4vjMQZA4fAYBnJZJI7dB/OXkfyb/kikA==",
"dev": true,
"dependencies": {
"c12": "^0.2.13",
"create-require": "^1.1.1",
"defu": "^6.1.0",
"jiti": "^1.16.0",
"pathe": "^0.3.8",
"pkg-types": "^0.3.5",
"postcss-import-resolver": "^2.0.0",
"scule": "^0.3.2",
"std-env": "^3.2.1",
"ufo": "^0.8.5",
"unimport": "^0.6.7"
},
"engines": {
"node": "^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/nuxt/node_modules/@rollup/pluginutils": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
"integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
"dev": true,
"dependencies": {
"estree-walker": "^2.0.1",
"picomatch": "^2.2.2"
},
"engines": {
"node": ">= 8.0.0"
}
},
"node_modules/nuxt/node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true
},
"node_modules/nuxt/node_modules/unimport": {
"version": "0.6.8",
"resolved": "https://registry.npmjs.org/unimport/-/unimport-0.6.8.tgz",
"integrity": "sha512-MWkaPYvN0j+6jfEuiVFhfmy+aOtgAP11CozSbu/I3Cx+8ybjXIueB7GVlKofHabtjzSlPeAvWKJSFjHWsG2JaA==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^4.2.1",
"escape-string-regexp": "^5.0.0",
"fast-glob": "^3.2.12",
"local-pkg": "^0.4.2",
"magic-string": "^0.26.4",
"mlly": "^0.5.16",
"pathe": "^0.3.8",
"scule": "^0.3.2",
"strip-literal": "^0.4.2",
"unplugin": "^0.9.6"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -6466,9 +6581,9 @@
"dev": true
},
"node_modules/sass": {
"version": "1.55.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz",
"integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==",
"version": "1.56.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.56.0.tgz",
"integrity": "sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw==",
"dev": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -7569,6 +7684,32 @@
"ufo": "^1.0.0"
}
},
"node_modules/vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/vue-devtools-stub": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/vue-devtools-stub/-/vue-devtools-stub-0.1.0.tgz",
@@ -9040,24 +9181,15 @@
"dev": true
},
"@vueuse/core": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.3.1.tgz",
"integrity": "sha512-xriyD+v3D2ObH/UtnkEl+1sbcLBVHNaZaLi/rqoNEe/B92hggDEFQIGXoQUjdRzYOjASHSezf9uCDtmd7LeWyA==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.4.0.tgz",
"integrity": "sha512-JzgenGj1ZF2BHOen5rsFiAyyI9sXAv7aKhNLlm9b7SwYQeKTcxTWdhudonURCSP3Egl9NQaRBzes2lv/1JUt/Q==",
"dev": true,
"requires": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.3.1",
"@vueuse/shared": "9.3.1",
"@vueuse/metadata": "9.4.0",
"@vueuse/shared": "9.4.0",
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"requires": {}
}
}
},
"@vueuse/head": {
@@ -9073,49 +9205,31 @@
}
},
"@vueuse/metadata": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.3.1.tgz",
"integrity": "sha512-G1BPhtx3OHaL/y4OZBofh6Xt02G1VA9PuOO8nac9sTKMkMqfyez5VfkF3D9GUjSRNO7cVWyH4rceeGXfr2wdMg==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.4.0.tgz",
"integrity": "sha512-7GKMdGAsJyQJl35MYOz/RDpP0FxuiZBRDSN79QIPbdqYx4Sd0sVTnIC68KJ6Oln0t0SouvSUMvRHuno216Ud2Q==",
"dev": true
},
"@vueuse/nuxt": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/nuxt/-/nuxt-9.3.1.tgz",
"integrity": "sha512-qj6xTaAhfCT21qfRGu57vafH0baB1n7si9J2iVGWRB8Tju7XunAPb7iCsQECWSaJRCLAvLV7dQ9W2ifHIcK5kw==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/nuxt/-/nuxt-9.4.0.tgz",
"integrity": "sha512-R2XGbDAQ1kCEqnUHv+sTISOCuu7tfSpEFdYZxiIaEH+D8o2vxZx4itAoAoe1LxmyBsd9fakyQ6qpvkUeQVAfoQ==",
"dev": true,
"requires": {
"@nuxt/kit": "^3.0.0-rc.11",
"@vueuse/core": "9.3.1",
"@vueuse/metadata": "9.3.1",
"@vueuse/core": "9.4.0",
"@vueuse/metadata": "9.4.0",
"local-pkg": "^0.4.2",
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"requires": {}
}
}
},
"@vueuse/shared": {
"version": "9.3.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.3.1.tgz",
"integrity": "sha512-YFu3qcnVeu0S2L4XdQJtBpDcjz6xwqHZtTv/XRhu66/yge1XVhxskUcc7VZbX52xF9A34V6KCfwncP9YDqYFiw==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.4.0.tgz",
"integrity": "sha512-fTuem51KwMCnqUKkI8B57qAIMcFovtGgsCtAeqxIzH3i6nE9VYge+gVfneNHAAy7lj8twbkNfqQSygOPJTm4tQ==",
"dev": true,
"requires": {
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"requires": {}
}
}
},
"@zhead/schema": {
@@ -10759,6 +10873,12 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true
},
"husky": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz",
"integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -12536,9 +12656,9 @@
"dev": true
},
"sass": {
"version": "1.55.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.55.0.tgz",
"integrity": "sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==",
"version": "1.56.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.56.0.tgz",
"integrity": "sha512-WFJ9XrpkcnqZcYuLRJh5qiV6ibQOR4AezleeEjTjMsCocYW59dEG19U3fwTTXxzi2Ed3yjPBp727hbbj53pHFw==",
"dev": true,
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -13376,6 +13496,13 @@
"ufo": "^1.0.0"
}
},
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
"dev": true,
"requires": {}
},
"vue-devtools-stub": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/vue-devtools-stub/-/vue-devtools-stub-0.1.0.tgz",

View File

@@ -10,14 +10,19 @@
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"typecheck": "nuxt typecheck",
"info": "nuxt info",
"analyze": "nuxt analyze",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
"postinstall": "nuxt prepare",
"prepare": "husky install"
},
"devDependencies": {
"@vueuse/core": "^9.3.1",
"@vueuse/nuxt": "^9.3.1",
"nuxt": "^3.0.0",
"husky": "^8.0.2",
"sass": "^1.55.0"
}
}

View File

@@ -1,3 +1,5 @@
<template>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</template>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
.slide-leave-active,
.slide-enter-active {
transition: 1s;
}
.slide-enter {
transform: translate(100%, 0);
}
.slide-leave-to {
transform: translate(-100%, 0);
}

View File

@@ -39,3 +39,13 @@ $fonts: (
);
@include MakeFont('Formular', $fonts, '@/assets/fonts/formular');
@font-face {
font-family: 'Computer Modern Serif';
src: url('@/assets/fonts/computer-modern/cmunrm.eot');
src: url('@/assets/fonts/computer-modern/cmunrm.eot?#iefix') format('embedded-opentype'),
url('@/assets/fonts/computer-modern/cmunrm.woff') format('woff'),
url('@/assets/fonts/computer-modern/cmunrm.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

View File

@@ -1,3 +1,7 @@
body {
* {
margin: 0;
padding: 0;
border: 0;
background: none;
box-sizing: border-box;
}

View File

@@ -0,0 +1,12 @@
::-webkit-scrollbar {
width: 3px;
}
::-webkit-scrollbar-track {
background-color: transparent;
}
::-webkit-scrollbar-thumb {
background-color: var(--scroll-color);
transition: background-color 0.1s;
}

View File

@@ -1,4 +1,11 @@
:root {
--background-color-primary: #f3f3f3;
--font-color-primary: #3d3d3d;
--border-color: #e4e1e1;
--icon-color: #5e5f60;
--seconary-color: #8d8d8d;
--scroll-color: #d4d3d4;
--shadow-color: rgba(163, 167, 174, 0.2);
--border: 1px solid var(--border-color);
--shadow: 0 0 9px 0 var(--shadow-color);
}

View File

@@ -1,6 +1,8 @@
@import 'reset';
@import 'variables';
@import 'fonts';
@import 'scroll';
@import 'animations';
html, body, #__nuxt {
width: 100%;
@@ -12,3 +14,18 @@ body {
color: var(--font-color-primary);
font-family: Formular, Helvetica, Arial, sans-serif;
}
button {
width: 20px;
height: 20px;
cursor: pointer;
}
h1, h2 {
font-size: 20px;
font-weight: 600;
}
h2 {
font-weight: 500;
}

View File

@@ -0,0 +1,48 @@
<script setup lang="ts">
const {title} = defineProps<{ title: string }>();
const showForm = ref<boolean>(false);
</script>
<template>
<section class="block">
<div class="header" @click="showForm = !showForm">
<h2>{{ title }}</h2>
<button class="button">
<IconClose v-if="showForm"/>
<IconOpen v-else/>
</button>
</div>
<div class="content" v-if="showForm">
<slot/>
</div>
</section>
</template>
<style scoped lang="scss">
.block {
display: flex;
flex-direction: column;
row-gap: 12px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
column-gap: 12px;
user-select: none;
cursor: pointer;
padding: 8px 0;
}
.button {
color: var(--icon-color);
}
.content {
display: flex;
flex-direction: column;
row-gap: 16px;
padding: 0 4px;
}
</style>

View File

@@ -0,0 +1,105 @@
<script setup lang="ts">
const {
label,
min,
max,
defaultValue,
step = 0.1
} = defineProps<{ label: string, min: number, max: number, defaultValue: number, step?: number }>();
const emit = defineEmits<{
(event: 'change', value: number): void
}>();
const value = ref<number>(defaultValue);
const onChange = (event: Event) => {
value.value = (event.target as HTMLInputElement).valueAsNumber;
emit('change', value.value);
};
</script>
<template>
<div class="block">
<label class="label">
{{ label }}
<input :max="max" :min="min" :value="value" class="input" type="number" @input="onChange"/>
</label>
<div class="range">
<div class="range__border">{{ min }}</div>
<input :max="max" :min="min" :step="step" :value="value" class="range__input" type="range" @input="onChange"
@dblclick="value = defaultValue"/>
<div class="range__border">{{ max }}</div>
</div>
</div>
</template>
<style scoped lang="scss">
.block {
display: flex;
justify-content: space-between;
column-gap: 12px;
}
.label {
display: flex;
column-gap: 4px;
font-size: 18px;
font-family: 'Computer Modern Serif', serif;
}
.input {
flex: 1;
font-family: 'Computer Modern Serif', serif;
font-size: inherit;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
&[type=number] {
-moz-appearance: textfield;
}
}
.range {
display: flex;
align-items: center;
column-gap: 14px;
flex: 1;
}
.range__border {
font-size: 12px;
color: var(--seconary-color);
}
.range__input {
-webkit-appearance: none;
flex: 1;
height: 6px;
border-radius: 4px;
margin: 10px 0;
background: #e2e4e6;
transition: opacity .2s;
&:hover, &:focus {
opacity: 1;
}
&::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background-color: #ff5c8e;
cursor: pointer;
}
}
</style>

View File

@@ -0,0 +1,14 @@
<template>
<div class="grid">
<slot/>
</div>
</template>
<style scoped lang="scss">
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
}
</style>

View File

@@ -0,0 +1,61 @@
<script setup lang="ts">
const {title, isActive = false} = defineProps<{ title?: string, isActive?: boolean }>();
</script>
<template>
<button class="block" :class="{'block_active': isActive}">
<div class="picture"></div>
<div v-if="title" class="title">{{ title }}</div>
</button>
</template>
<style scoped lang="scss">
.block {
font-family: 'Formular', sans-serif;
font-weight: 400;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
row-gap: 8px;
width: 100%;
height: 200px;
position: relative;
cursor: pointer;
box-sizing: border-box;
border-radius: 8px;
background-color: #fae9ef;
color: #67122c;
padding: 16px;
font-size: 17px;
transition: background-color 0.2s, transform 0.2s;
&_active {
background-color: #fdd2e2;
}
&:hover {
background-color: #fdd2e2;
}
&:active {
transform: scale(0.98);
}
}
.picture {
width: 48px;
height: 48px;
margin: 8px;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
.title {
margin-top: 8px;
width: 100%;
text-align: left;
}
</style>

View File

@@ -0,0 +1,6 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 15.75l7.5-7.5 7.5 7.5"/>
</svg>
</template>

View File

@@ -0,0 +1,6 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5"/>
</svg>
</template>

View File

@@ -0,0 +1,7 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"/>
</svg>
</template>

View File

@@ -0,0 +1,6 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/>
</svg>
</template>

71
src/layouts/default.vue Normal file
View File

@@ -0,0 +1,71 @@
<script setup lang="ts">
const showMenu = ref<boolean>(true);
</script>
<template>
<div class="wrapper">
<div class="content">
<button v-if="!showMenu" class="button" @click="showMenu = true">
<IconMenu/>
</button>
<template v-else>
<div class="controls">
<slot/>
</div>
<button class="button" @click="showMenu = false">
<IconHide/>
</button>
</template>
</div>
<canvas class="canvas"/>
</div>
</template>
<style scoped lang="scss">
.wrapper {
width: 100%;
height: 100%;
position: relative;
display: flex;
}
.content {
position: relative;
height: max-content;
padding: 20px;
display: flex;
column-gap: 16px;
max-height: 100%;
}
.controls {
position: relative;
box-sizing: border-box;
padding: 28px 24px;
background-color: white;
border-radius: 8px;
width: 480px;
max-height: calc(100% - 40px);
overflow: auto;
border: var(--border);
box-shadow: var(--shadow);
z-index: 2;
display: flex;
flex-direction: column;
row-gap: 24px;
}
.button {
margin-top: 8px;
z-index: 3;
}
.canvas {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
</style>

42
src/pages/figure.vue Normal file
View File

@@ -0,0 +1,42 @@
<script setup lang="ts">
const axes = ['x', 'y', 'z'];
const projections = [
'Без проекции',
'Изометрическая',
'Диметрическая',
'Триметрическая',
'Одноточечная перспективная',
'Двухточечная перспективная',
];
const activeProjection = ref<number>(0);
</script>
<template>
<div class="container">
<Accordion title="Перемещение">
<FormRange v-for="axis in axes" :label="`${axis} =`" :min="-10" :max="10" :step="0.1" :defaultValue="0"/>
</Accordion>
<Accordion title="Вращение">
<FormRange v-for="axis in axes" :label="`${axis} =`" :min="0" :max="359" :step="1" :defaultValue="0"/>
</Accordion>
<Accordion title="Масштабирование">
<FormRange v-for="axis in axes" :key="axis" :label="`${axis} =`" :min="0.1" :max="5" :step="0.1"
:defaultValue="1"/>
</Accordion>
<Accordion title="Проекции">
<GridContainer>
<GridElement v-for="(projection, i) in projections" :is-active="activeProjection === i" :key="projection"
:title="projection" @click="activeProjection = i"/>
</GridContainer>
</Accordion>
</div>
</template>
<style scoped lang="scss">
.container {
display: flex;
flex-direction: column;
row-gap: 16px;
}
</style>

View File

@@ -1,17 +1,13 @@
<script setup lang="ts">
const figures = ['Тетраэдр', 'Гексаэдр', 'Октаэдр', 'Додекаэдр', 'Икосаэдр'];
</script>
<template>
<div>
<Head>
<Title>Главная</Title>
</Head>
<h1>Hello, Nuxt </h1>
</div>
<h1>Выберете фигуру</h1>
<GridContainer>
<GridElement v-for="figure in figures" :key="figure" :title="figure"/>
</GridContainer>
</template>
<style scoped>
div {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
<style scoped lang="scss">
</style>