From bfc9edba0f88525e36988707824c9f948539469e Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Sat, 3 Oct 2020 13:11:20 +0200 Subject: [PATCH] wip --- README.md | 8 ++++---- src/meshes/InstancedMesh.js | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 63cd520..5b35a01 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,12 @@ I first made a simple *Proof of Concept*, take a look at [Example1.vue](/src/com ```html @@ -116,7 +117,6 @@ export default { mounted() { const renderer = this.$refs.renderer; const box = this.$refs.box.mesh; - renderer.onBeforeRender(() => { box.rotation.x += 0.01; }); diff --git a/src/meshes/InstancedMesh.js b/src/meshes/InstancedMesh.js index d5f0497..541dd53 100644 --- a/src/meshes/InstancedMesh.js +++ b/src/meshes/InstancedMesh.js @@ -54,6 +54,10 @@ export default { this.geometry = geometry; if (this.mesh) this.mesh.geometry = geometry; }, + setMaterial(material) { + this.material = material; + if (this.mesh) this.mesh.material = material; + }, }, render() { return this.$slots.default();