Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
(6 edits)

Right... Thanks. Now I just have to figure out how to debug to discern what type of structure I'm dealing with here.

Edit: Ah... It seems I am dealing with a THREE.Vector2 ... Which is a type that TypeScript won't even let me create myself? But that means that I'm just looking to modify uniforms["textureSize"].value.x and y. Okay, I can live with that.

And in the next version it'll be more in line with the rest of the API and less raw direct access? Sounds good to me. :)

Edit2: Buuut now it looks like I've just moved from having to make a new copy of the shader for every texture, to having to make a new copy of the behavior script for every texture, because I can't find a way to get the sprite width and height...

Oh wait, isn't that more or less what the "Grid Size" is? Right, right, I guess that will have to do, as long as I stick to single-sprite textures for this shader it'll be fine...

Edit11: Actually I think it may be thrown off a bit by THREE.js automatically resizing the texture to be a power of two anyway... Gah. So many little troubles.