From 6267ed01f1732533e3942fe0f2be17c188faba6b Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Thu, 25 Jul 2024 16:56:43 +0300 Subject: [PATCH] fix atlas pos cursor --- web-demo/src/pages/AtlasExplorer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-demo/src/pages/AtlasExplorer.tsx b/web-demo/src/pages/AtlasExplorer.tsx index fcfcfbbe..8bac2c8b 100644 --- a/web-demo/src/pages/AtlasExplorer.tsx +++ b/web-demo/src/pages/AtlasExplorer.tsx @@ -165,8 +165,8 @@ export default function AtlasExplorer() { if (!currentAtlas) return const atlasTextures = currentAtlas.textures for (const [name, texture] of Object.entries(atlasTextures)) { - const { u, v } = texture - if (currentU >= u && currentU <= u + currentAtlas.suSv && currentV >= v && currentV <= v + currentAtlas.suSv) { + const { u, v, su, sv } = texture + if (currentU >= u && currentU <= u + (su ?? currentAtlas.suSv) && currentV >= v && currentV <= v + (sv ?? currentAtlas.suSv)) { setCursorName(name) return }