Example Camera

This commit is contained in:
2026-06-01 23:04:55 -05:00
parent b14196ff0d
commit d73edb403f
11 changed files with 436 additions and 22 deletions
+8 -4
View File
@@ -1,4 +1,8 @@
const e = Entity.create();
const pos = e.add(Component.POSITION);
pos.localPosition = new Vec3(-1, 0, 1);
Console.print('Entity ID: ' + e.toString());
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());