Construct a new texture from an image file.
SphereFS path of the image file to load.
Construct a new texture from the contents of a Surface
.
A surface whose contents will be used for the new texture.
Construct a new texture of a given size and initial contents.
The width of the new texture, in pixels.
The height of the new texture, in pixels.
Either a Color
to fill the texture with or a buffer of RGBA pixels.
The SphereFS path of the image file used to create the texture, or null
for non-file-based
textures.
Height of the texture image, in pixels.
Width of the texture image, in pixels.
Get the raw RGBA pixel data from this texture. May be slow!
Upload new RGBA pixel data to this texture.
A buffer with the new RGBA pixel values.
Create a texture from an image file in the background. The promise resolves with a new
Texture
once it's ready to use.
SphereFS path of the image file to load.
Generated using TypeDoc
Represents an image used for texturing
Shape
primitives.