The meshes loaded from a .gltf file use the rotationQuaternion
property instead of rotation
.
If you want to switch to using rotation
instead, use:
scene.getMeshByName("Cube").rotationQuaternion = null;
By default, your camera is far from your object, that’s why it appears small on the screen.
You can use scene.createDefaultCamera(true, true, true);
in the ImportMesh
callback to set a camera that will display your mesh with a good size on the screen.