1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

object3d userData

This commit is contained in:
Kevin Levron 2021-04-19 01:28:09 +02:00
parent 457b7fb58b
commit b073f738b2

View File

@ -29,12 +29,12 @@ export default defineComponent({
initObject3D(o3d: Object3D) { initObject3D(o3d: Object3D) {
this.o3d = o3d this.o3d = o3d
o3d.userData = this.userData
this.$emit('created', o3d) this.$emit('created', o3d)
bindProp(this, 'position', o3d) bindProp(this, 'position', o3d)
bindProp(this, 'rotation', o3d) bindProp(this, 'rotation', o3d)
bindProp(this, 'scale', o3d) bindProp(this, 'scale', o3d)
bindProp(this, 'userData', o3d.userData)
// TODO : fix lookat.x // TODO : fix lookat.x
if (this.lookAt) o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z) if (this.lookAt) o3d.lookAt(this.lookAt.x, this.lookAt.y, this.lookAt.z)