renderer.createBitmapSkin()
Creates a new bitmap skin from image data.
Syntax
renderer.createBitmapSkin(bitmapData, costumeResolution, rotationCenter)
Parameters
bitmapData
Type: ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
The source image data for the skin.
costumeResolution
Type: number (optional, default: 1)
Resolution multiplier for the bitmap. Higher values indicate higher resolution costumes.
rotationCenter
Type: Array<number> (optional)
The [x, y] rotation center point. If not provided, the center of the image is used.
Returns
Type: number
The ID of the newly created skin.