From: Brendan Hansen Date: Sun, 9 May 2021 17:17:58 +0000 (-0500) Subject: switch 'quad' to 'rect'. windows build.bat X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=15c9c8add8a3871ad830ad9cbe912ee01324d9e0;p=sand-toy.git switch 'quad' to 'rect'. windows build.bat --- diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..ce6c778 --- /dev/null +++ b/build.bat @@ -0,0 +1,10 @@ +@echo off + +set TARGET=site\sand_toy.wasm +set ONYX_INSTALLATION_FOLDER=\dev\onyx + +copy "%ONYX_INSTALLATION_FOLDER%\bin\onyx-loader.js" .\site\js\onyx-loader.js >NUL +copy "%ONYX_INSTALLATION_FOLDER%\modules\webgl2\webgl2.js" .\site\js\webgl2.js >NUL +copy "%ONYX_INSTALLATION_FOLDER%\modules\js_events\js_events.js" .\site\js\js_events.js >NUL + +\dev\onyx\onyx -r js --use-post-mvp-features -V -o %TARGET% src\build.onyx -I %ONYX_INSTALLATION_FOLDER% diff --git a/site/sand_toy.wasm b/site/sand_toy.wasm index 802890f..7f687fa 100644 Binary files a/site/sand_toy.wasm and b/site/sand_toy.wasm differ diff --git a/src/sand_toy.onyx b/src/sand_toy.onyx index 7fdd8c8..aebc1c4 100644 --- a/src/sand_toy.onyx +++ b/src/sand_toy.onyx @@ -161,7 +161,7 @@ draw :: () { gfx.set_texture(0); gfx.use_ortho_projection(0, ~~window_width, 0, ~~window_height); - gfx.textured_quad(.{ 0, BAR_HEIGHT }, .{ ~~window_width, ~~window_height - BAR_HEIGHT }, .{ 0, 0 }, .{ 1, 1 }); + gfx.textured_rect(.{ 0, BAR_HEIGHT }, .{ ~~window_width, ~~window_height - BAR_HEIGHT }, .{ 0, 0 }, .{ 1, 1 }); gfx.flush(); @@ -169,16 +169,16 @@ draw :: () { draw_selection_bar :: () { - gfx.quad(.{ 0, 0 }, .{ ~~window_width, BAR_HEIGHT }, color=.{.2,.2,.2}); + gfx.rect(.{ 0, 0 }, .{ ~~window_width, BAR_HEIGHT }, color=.{.2,.2,.2}); x_off := 4.0f; for type: Particle.types { if type == selected_particle { - gfx.quad(.{ x_off - 4, 0 }, .{ BAR_HEIGHT, BAR_HEIGHT }, color=.{1,1,0}); + gfx.rect(.{ x_off - 4, 0 }, .{ BAR_HEIGHT, BAR_HEIGHT }, color=.{1,1,0}); } color := particle_type_to_color(type) |> convert_color(); - gfx.quad(.{ x_off, 4 }, .{ BAR_HEIGHT - 8, BAR_HEIGHT - 8 }, color=color); + gfx.rect(.{ x_off, 4 }, .{ BAR_HEIGHT - 8, BAR_HEIGHT - 8 }, color=color); x_off += BAR_HEIGHT; }