littlektframework / littlekt

A multiplatform WebGPU 2D game framework written in Kotlin. Build your own game engine on top.
https://littlekt.com
Apache License 2.0
321 stars 12 forks source link

Render issue when specify width and height of a `TextureSlice` doesn't render correct size and position #99

Closed LeHaine closed 2 years ago

LeHaine commented 2 years ago

image

The white bar is at position 605, 195 with a width of 36f. The red box is at position 641, 195 with a width of 5f. The box is 36 pixels wide and the red box is 36 pixels from the origin of the white bar. The white bar does not reach the position of the red box when it should.

There is an issue when specifying width/height where the positioning of the sprite is offset from where it was.