tilemap render
This commit is contained in:
@@ -867,8 +867,11 @@ JSC_CCALL(geometry_tilemap_to_data,
|
||||
JSValue tile = JS_GetPropertyUint32(js, col, y);
|
||||
if (!JS_IsNull(tile) && !JS_IsNull(tile)) {
|
||||
// Calculate world position
|
||||
float world_x = (x + offset_x) * size_x;
|
||||
float world_y = (y + offset_y) * size_y;
|
||||
// x and y are array indices, need to convert to logical coordinates
|
||||
float logical_x = x + offset_x;
|
||||
float logical_y = y + offset_y;
|
||||
float world_x = logical_x * size_x;
|
||||
float world_y = logical_y * size_y;
|
||||
|
||||
// Set vertex positions (4 corners of the tile)
|
||||
int base = vertex_idx * 2;
|
||||
|
||||
Reference in New Issue
Block a user