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();