so without the annotation THREE wonât be able to access the parent, or the object in this case?
by user 367081956959322114
so without the annotation THREE wonât be able to access the parent, or the object in this case?
by user 367081956959322114
Without the annotation you wouldnt get the reference to your object.
For example this is without the annotation


and this is the same with the annotation - we resolve that using a gltf Extension during the loading process


we find the node 36 (or better yet the object that is created from that node 36) and assign it to your script instance
wow I see, nice!
by user 367081956959322114
Alert.ts:27 Uncaught ReferenceError: allCubes is not defined
by user 367081956959322114
at the time when I do onPointerClick, allCubes shouldnât be undefined
by user 367081956959322114
the error is in line 27 tho - what is in line 27?
(you would also have to access it using this.allCubes)
line 27 is acutally allCubes.add(cube); // I rearanged the code for the screenshotâŠ
by user 367081956959322114
oh yeah⊠sure⊠it should be THIS.allCubes
by user 367081956959322114
Marcel⊠thank you⊠and sorry for this.
by user 367081956959322114
Donât be sorry for this ![]()
all good ![]()
haha
by user 367081956959322114
xD
by user 367081956959322114