Skip to content

Commit

Permalink
fix atlas pos cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Jul 25, 2024
1 parent 307cc7f commit 6267ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web-demo/src/pages/AtlasExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6267ed0

Please sign in to comment.