Beta build showcase: ebbesand123.github.io
vue-d
is a client application which shows a controllable 3D scene.
It is heavily inspired by 'Discover Three.js'.
The project consists of 3 main parts:
src/client
: Vue 3 application- Single file component format. (SFC)
- Script setup with TypeScript
<script setup lang="ts">
- State management with Pinia
- Naive UI for UI components
src/world
: World class which implementsThree.js
functionalitysrc/server
: Simple server
> npm run build # build client
> npm run serve # serve local build
> npm run dev # run client dev server
> npm run test:unit # run unit tests
> npm run test:coverage # show test coverage
> npm run lint run # linter with auto fix
> npm run format # prettier code
> npm run typecheck # check typing
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
Add following options to your VSCode settings.json
to enable on save formatting.
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
- Render scene with platonic shapes
- Basic scene, camera and shape controls
- optimize mobile UX
- Save and import scene
- Light controls
- Add shapes UI
- Add missing tests
- Internationalization