This commit is contained in:
2025-12-14 13:30:00 -06:00
parent 828db06c74
commit 9e2ba03dec
3 changed files with 7 additions and 9 deletions

View File

@@ -707,9 +707,6 @@ return {
// System / Style
set_style: set_style,
get_style: get_style,
get_style_config: get_style_config,
switch_style: switch_style,
set_resolution: set_resolution,
time: time,
dt: dt,
stat: stat,

View File

@@ -89,7 +89,7 @@ function _init() {
}
function _update(dt) {
if (lance3d._state.keys_held['escape']) {
if (lance3d.key('escape')) {
$_.stop()
return
}
@@ -97,10 +97,10 @@ function _update(dt) {
// Movement input
var forward = 0
var right = 0
if (lance3d._state.keys_held['w']) forward += 1
if (lance3d._state.keys_held['s']) forward -= 1
if (lance3d._state.keys_held['d']) right -= 1
if (lance3d._state.keys_held['a']) right += 1
if (lance3d.key('w')) forward += 1
if (lance3d.key('s')) forward -= 1
if (lance3d.key('d')) right -= 1
if (lance3d.key('a')) right += 1
if (forward != 0 || right != 0) {
// Update yaw based on movement direction

3
sdl.cm
View File

@@ -372,5 +372,6 @@ return {
create_texture: create_texture,
create_vertex_buffer: create_vertex_buffer,
create_index_buffer: create_index_buffer,
submit_frame: submit_frame
submit_frame: submit_frame,
get_white_texture
}