Create both local and world 3D transform components. World transform is initialized to match local transform.
Optional
ecs.spawn({ ...createTransform3D(10, 5, -20), mesh: myMesh,});// With rotation and scaleecs.spawn({ ...createTransform3D(10, 5, -20, { rotation: { y: Math.PI / 4 }, scale: 2, }), mesh: myMesh,}); Copy
ecs.spawn({ ...createTransform3D(10, 5, -20), mesh: myMesh,});// With rotation and scaleecs.spawn({ ...createTransform3D(10, 5, -20, { rotation: { y: Math.PI / 4 }, scale: 2, }), mesh: myMesh,});
Create both local and world 3D transform components. World transform is initialized to match local transform.