Skip to content

Commit

Permalink
Deploying to gh-pages from @ a5d49c0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
stasm committed Mar 6, 2024
1 parent 7efa902 commit 2bf9ed6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 39 deletions.
29 changes: 12 additions & 17 deletions game.esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -3043,10 +3043,10 @@
}

// ../lib/projection.ts
function perspective(fov_y, near, far) {
function orthographic(radius, near, far) {
return {
Kind: 0 /* Perspective */,
FovY: fov_y,
Kind: 1 /* Orthographic */,
Radius: radius,
Near: near,
Far: far,
Projection: mat4_create(),
Expand Down Expand Up @@ -3454,8 +3454,12 @@
transform(),
mimic(first_named(game2.World, "camera anchor")),
children([
transform([0, 1, -6], [0, 1, 0, 0]),
camera_canvas(perspective(1, 0.1, 1e3), [0.1, 0.5, 0.8, 1])
transform(
[50, 50, 50],
// Isometric projection: Y 45°, X -35.264°, Z 0°
[-0.28, 0.364, 0.116, 0.88]
),
camera_canvas(orthographic([7, 7], 1, 200), [0.1, 0.5, 0.8, 1])
])
];
}
Expand Down Expand Up @@ -3793,12 +3797,7 @@
})
],
// Camera rig anchor.
[
transform(),
named("camera anchor"),
move(0, 3),
control_player(false, 0, 0.2, -10, 80)
],
[transform(void 0, void 0, void 0, true), named("camera anchor")],
// Overhead light.
[transform([0, 2, 0]), light_point([1, 1, 1], 5)]
)
Expand Down Expand Up @@ -3833,12 +3832,8 @@
}
}
instantiate(game2, [transform(), set_rotation(-30, 30, 0), light_directional([1, 1, 1], 0.1)]);
instantiate(game2, [...blueprint_player(game2), set_position(0, 1, 0), set_rotation(0, 180, 0)]);
instantiate(game2, [
...blueprint_camera_follow(game2),
set_position(0, 1e3, 1e3),
set_rotation(0, 180, 0)
]);
instantiate(game2, [...blueprint_player(game2), set_position(0, 1, 0)]);
instantiate(game2, [...blueprint_camera_follow(game2), set_position(-100, 0, -100)]);
instantiate(game2, [
transform([0, 15, 0]),
control_always(null, [0, 1, 0, 0]),
Expand Down
2 changes: 1 addition & 1 deletion game.roadroller.js

Large diffs are not rendered by default.

29 changes: 12 additions & 17 deletions game.sed.js
Original file line number Diff line number Diff line change
Expand Up @@ -3043,10 +3043,10 @@ break;
}


function perspective(fov_y, near, far) {
function orthographic(radius, near, far) {
return {
Kind: 0 /* Perspective */,
FovY: fov_y,
Kind: 1 /* Orthographic */,
Radius: radius,
Near: near,
Far: far,
Projection: mat4_create(),
Expand Down Expand Up @@ -3454,8 +3454,12 @@ return [
transform(),
mimic(first_named(game2.World, "camera anchor")),
children([
transform([0, 1, -6], [0, 1, 0, 0]),
camera_canvas(perspective(1, 0.1, 1e3), [0.1, 0.5, 0.8, 1])
transform(
[50, 50, 50],

[-0.28, 0.364, 0.116, 0.88]
),
camera_canvas(orthographic([7, 7], 1, 200), [0.1, 0.5, 0.8, 1])
])
];
}
Expand Down Expand Up @@ -3793,12 +3797,7 @@ Flags: 0 /* None */
})
],

[
transform(),
named("camera anchor"),
move(0, 3),
control_player(false, 0, 0.2, -10, 80)
],
[transform(void 0, void 0, void 0, true), named("camera anchor")],

[transform([0, 2, 0]), light_point([1, 1, 1], 5)]
)
Expand Down Expand Up @@ -3833,12 +3832,8 @@ set_scale(tile_size, 1, tile_size)
}
}
instantiate(game2, [transform(), set_rotation(-30, 30, 0), light_directional([1, 1, 1], 0.1)]);
instantiate(game2, [...blueprint_player(game2), set_position(0, 1, 0), set_rotation(0, 180, 0)]);
instantiate(game2, [
...blueprint_camera_follow(game2),
set_position(0, 1e3, 1e3),
set_rotation(0, 180, 0)
]);
instantiate(game2, [...blueprint_player(game2), set_position(0, 1, 0)]);
instantiate(game2, [...blueprint_camera_follow(game2), set_position(-100, 0, -100)]);
instantiate(game2, [
transform([0, 15, 0]),
control_always(null, [0, 1, 0, 0]),
Expand Down
6 changes: 3 additions & 3 deletions game.terser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html

Large diffs are not rendered by default.

0 comments on commit 2bf9ed6

Please sign in to comment.