From 047dd1543f84f9b9615aab5cdb3024c9fd901fad Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Wed, 16 Sep 2020 21:20:34 +0200 Subject: [PATCH] update readme --- README.md | 65 ++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 41 deletions(-) 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