I have two questions; the behavior surprised me:
1 ) Taking code directly from the documentation, the PLAYGROUND does not like
It draws a line through CreateBox (although it seems to run it).
What is the “correct” way to make a box? A? B? or other?
const box = BABYLON.MeshBuilder.CreateBox(“box”, options, scene);
const box = BABYLON.Mesh.CreateBox(“box”, size, scene);
- When the position of a box is (a,b,c)
and there is a
var D = ;
D.position = box.position;
then if D.position changes, box.position changes. The “=” sign is not an assignment, it identifies the position of the box with the position of D.
Is that how it is supposed to work?
Here’s a playground showing (1) and (2):