Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

usePixelTexture

usePixelTexture(texture): PixelTextureMaps

A pixel texture’s maps, for a material that lays them on its mesh’s UVs: <meshLambertMaterial {...usePixelTexture(grass)} />. A painted texture paints on first use, from the game’s texture seed, and image files suspend while they load. Each is shared by every view that names the same texture and freed when the last of them unmounts. A view’s hook: a room mounts no view, so it paints nothing.

Parameter Type
texture PixelTexture

PixelTextureMaps