From f6ed7bac92b4df6afbf8baa9d907e32b3b623cad Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Mon, 5 Apr 2021 01:14:06 +0200 Subject: [PATCH] add userData to Object3D --- src/core/Object3D.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/Object3D.js b/src/core/Object3D.js index c049583..2663fdc 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -11,6 +11,7 @@ export default defineComponent({ scale: { type: Object, default: { x: 1, y: 1, z: 1 } }, lookAt: { type: Object, default: null }, autoRemove: { type: Boolean, default: true }, + userData: { type: Object, default: () => ({}) }, }, // can't use setup because it will not be used in sub components // setup() {}, @@ -20,6 +21,7 @@ export default defineComponent({ methods: { initObject3D(o3d) { this.o3d = o3d; + this.o3d.userData = this.userData; this.$emit('created', this.o3d); bindProp(this, 'position', this.o3d);