From 5134ff91e6fa0f7cea185a416f0b88d7a40a2152 Mon Sep 17 00:00:00 2001 From: Sander Moolin Date: Fri, 19 Mar 2021 23:56:21 -0400 Subject: [PATCH] ready event added to object3d --- src/core/Object3D.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/Object3D.js b/src/core/Object3D.js index 1355204..f720d65 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -4,6 +4,7 @@ import { bindProp } from '../tools.js'; export default { name: 'Object3D', inject: ['three', 'scene', 'rendererComponent'], + emits: ['ready'], props: { position: { type: Object, default: { x: 0, y: 0, z: 0 } }, rotation: { type: Object, default: { x: 0, y: 0, z: 0 } }, @@ -37,6 +38,8 @@ export default { parent = parent.$parent; } if (!this._parent) console.error('Missing parent (Scene, Group...)'); + + this.$emit('ready', this); }, add(o) { this.o3d.add(o); }, remove(o) { this.o3d.remove(o); },