|
1 | 1 | # Vue Three.js
|
2 | 2 |
|
3 |
| -/!\ This module is still in development and not usable yet as a library. |
| 3 | +/!\ This module is still in development. |
4 | 4 |
|
5 | 5 | Contains Vuejs bindings for creating and interacting with Threejs scenes and objects in a easy and reactive way.
|
6 | 6 |
|
7 | 7 | **Features:**
|
8 | 8 |
|
9 |
| -- Only core features will be present in this package |
10 |
| -- Asset manager with preload possibility (loading events not done yet) |
11 |
| -- Scene manager with scene switching / loading |
12 |
| -- Reactive meshes, cameras and lights |
13 |
| -- Asynchronous asset and mesh loading |
14 |
| -- Custom factory functions to load (asynchronously) custom geometries, materials and textures |
15 |
| -- Input manager |
16 |
| -- Behaviour components for data manipulation |
| 9 | +Only core features will be present in this package: You will be able to extend this libraries classes and components to easily add your own required features. |
| 10 | + |
| 11 | +However, for now, there are still some shipped in features. Some features are bound to change as the library evolves. |
| 12 | + |
| 13 | +- Asset manager to automatically load and unload your assets. |
| 14 | +- Custom asset factory functions to load (asynchronously) custom geometries, materials and textures. |
| 15 | + |
| 16 | +- Scene manager able to handle multiple scenes. Only once scene at a time may be active however |
| 17 | +- Meshes, cameras and lights and groups with reactive property bindings |
| 18 | +- Behaviour components for data manipulation: Can be placed in the object, scene or application scope, depending on the seeked result. |
| 19 | + |
| 20 | +- Other default components such as fog. |
| 21 | + |
| 22 | +- First version of a input manager based on [pinput](https://github.com/ichub/pinput) |
17 | 23 |
|
18 | 24 | **Todo:**
|
19 | 25 |
|
20 |
| -- Add delta time ( for now it is equals to 0 all time ) |
21 |
| -- Change project to library and add samples |
22 |
| -- Publish first pre-release on npm |
| 26 | +- Add delta time ( for now it is not set and is always equals to 0 ) |
| 27 | + |
| 28 | +- Add scene loading events for tracking loading progress |
| 29 | +- Remove scene active prop (can be done with an v-if attribute) |
| 30 | +- Add scene preload nested assets handling |
| 31 | +- Add cube texture component |
| 32 | + |
| 33 | +- Add default materials and geometries |
23 | 34 |
|
24 | 35 | ## Usage
|
25 | 36 |
|
26 |
| -####Define your scenes |
| 37 | +###Installation |
| 38 | + |
| 39 | +1. Install THREE.js: |
| 40 | + |
| 41 | +`npm install three --save` |
| 42 | + |
| 43 | +2. Optionally, install THREE.js typings: |
| 44 | + |
| 45 | +`npm install @types/three --save-dev` |
| 46 | + |
| 47 | +3. Install this package: |
| 48 | + |
| 49 | +`npm install vue-threejs-composer --save` |
| 50 | + |
| 51 | +###Samples |
| 52 | + |
| 53 | +If you want to test out our samples, you can clone our repository and launch our samples with the following commands: |
| 54 | + |
| 55 | +1. Install dependencies |
| 56 | + |
| 57 | +`npm install` |
| 58 | + |
| 59 | +2. Launch development server |
| 60 | + |
| 61 | +`npm run serve` |
| 62 | + |
| 63 | +3. Play around with the files in */samples*. The demo scene is situated at */samples/views/Demo.vue* |
| 64 | + |
| 65 | +###Define your scenes |
27 | 66 |
|
28 | 67 | ```html
|
29 | 68 | <div>
|
@@ -72,7 +111,7 @@ Contains Vuejs bindings for creating and interacting with Threejs scenes and obj
|
72 | 111 | </div>
|
73 | 112 | ```
|
74 | 113 |
|
75 |
| -####Define custom behaviours |
| 114 | +###Define custom behaviours |
76 | 115 |
|
77 | 116 | ```ts
|
78 | 117 | import { Component, Mixins, Prop } from "vue-property-decorator";
|
|
0 commit comments