diff --git a/README.md b/README.md index 3ca6c6c..49eb7d4 100644 --- a/README.md +++ b/README.md @@ -17,52 +17,35 @@ I started from scratch... I don't know if I will have time to maintain this, but I first made a simple *Proof of Concept*, take a look at [Test1.vue](/src/components/Test1.vue) : ```html - - - - - - - - - - -``` - -## InstancedMesh - -Take a look at [Test3.vue](/src/components/Test3.vue). - -### Template - -```html - + - - - - - - - + + + + ``` -### Script : init instanceMatrix +## InstancedMesh -```js -const { randFloat: rnd, randFloatSpread: rndFS } = MathUtils; -const imesh = this.$refs.imesh.mesh; -const dummy = new Object3D(); -for (let i = 0; i < 1000; i++) { - dummy.position.set(rndFS(100), rndFS(100), rndFS(100)); - const scale = rnd(0.2, 1); - dummy.scale.set(scale, scale, scale); - dummy.updateMatrix(); - imesh.setMatrixAt(i, dummy.matrix); -} -imesh.instanceMatrix.needsUpdate = true; +Take a look at [Test2.vue](/src/components/Test2.vue). + +### Template + +```html + + + + + + + + + + + + ``` ## GLTF @@ -75,7 +58,7 @@ Take a look at [TestGLTF.vue](/src/components/TestGLTF.vue). ``` -## Test +## Dev git clone https://github.com/troisjs/trois cd trois