Files
dusk/assets/testentity.js
T
2026-06-01 23:04:55 -05:00

9 lines
223 B
JavaScript

const cam = Entity.create();
const pos = cam.add(Component.POSITION);
cam.add(Component.CAMERA);
pos.localPosition = new Vec3(3, 3, 3);
pos.lookAt(new Vec3(0, 0, 0));
Console.print('Camera entity ID: ' + cam.toString());