This commit is contained in:
luboslenco
2025-03-11 19:49:42 +01:00
parent 34fdc9a0d0
commit 974926c04d
84 changed files with 687 additions and 763 deletions
+4 -4
View File
@@ -13,8 +13,8 @@ function main() {
vsync: true
};
sys_start(ops);
app_init();
app_ready();
sys_init();
ready();
}
function render_commands() {
@@ -23,7 +23,7 @@ function render_commands() {
render_path_draw_meshes("mesh");
}
function app_ready() {
function ready() {
render_path_commands = render_commands;
let scene: scene_t = {
@@ -124,7 +124,7 @@ function scene_ready() {
transform_build_matrix(t);
// Rotate cube
app_notify_on_update(spin_cube);
sys_notify_on_update(spin_cube);
}
function spin_cube() {
+1 -1
View File
@@ -35,7 +35,7 @@ function camera_update() {
}
}
let d: f32 = time_delta() * speed * fast;
let d: f32 = sys_delta() * speed * fast;
if (d > 0.0) {
transform_move(camera.base.transform, dir, d);
}
+4 -4
View File
@@ -16,8 +16,8 @@ function main() {
use_depth: true
};
sys_start(ops);
app_init();
app_ready();
sys_init();
ready();
}
function render_commands() {
@@ -26,7 +26,7 @@ function render_commands() {
render_path_draw_meshes("mesh");
}
function app_ready() {
function ready() {
render_path_commands = render_commands;
let scene: scene_t = {
@@ -138,7 +138,7 @@ function scene_ready() {
t.rot = quat_from_to(vec4_create(0, 0, 1), vec4_create(0, -1, 0));
transform_build_matrix(t);
app_notify_on_update(scene_update);
sys_notify_on_update(scene_update);
let cube: object_t = scene_get_child("Cube");
let mesh: mesh_object_t = cube.ext;