pixi-jsFunctions
Function: getPo2TextureFromSource()
> getPo2TextureFromSource(image, width, height, resolution, autoGenerateMipmaps?): Texture
Defined in: node_modules/pixi.js/lib/scene/text/utils/getPo2TextureFromSource.d.ts:15
Internal
Takes an image and creates a texture from it, using a power of 2 texture from the texture pool. Remember to return the texture when you don't need it any more!
Parameters
image
HTMLCanvasElement | ICanvas | ImageLike
The image to create a texture from
width
number
the frame width of the texture
height
number
the frame height of the texture
resolution
number
The resolution of the texture
autoGenerateMipmaps?
boolean
Whether to generate mipmaps for the texture
Returns
- The texture