From f90cb8d6f8e69ee9f2c69fd12b24a335e44fc3c7 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Sat, 20 Mar 2021 21:05:27 +0100 Subject: [PATCH] add created event (wip) --- src/core/Object3D.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Object3D.js b/src/core/Object3D.js index 1959ca2..a5506c8 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -4,7 +4,7 @@ import { bindProp } from '../tools.js'; export default { name: 'Object3D', inject: ['three', 'scene', 'rendererComponent'], - emits: ['ready'], + emits: ['created', 'ready'], props: { position: { type: Object, default: { x: 0, y: 0, z: 0 } }, rotation: { type: Object, default: { x: 0, y: 0, z: 0 } }, @@ -19,6 +19,7 @@ export default { methods: { initObject3D(o3d) { this.o3d = o3d; + this.$emit('created', this.o3d); bindProp(this, 'position', this.o3d); bindProp(this, 'rotation', this.o3d);