Global

Members

__SilhouetteUpdateCanvas :CanvasElement

element used to update Silhouette data from skin bitmap data.

Type:
  • CanvasElement

(constant) CENTER_X :number

A texture coordinate is between 0 and 1. 0.5 is the center position.

Type:
  • number

(constant) CENTER_Y :number

A texture coordinate is between 0 and 1. 0.5 is the center position.

Type:
  • number

(constant) FENCE_WIDTH :number

Sprite Fencing - The number of pixels a sprite is required to leave remaining onscreen around the edge of the staging area.

Type:
  • number

(constant) toFloat32

Truncate a number into what could be stored in a 32 bit floating point value.

Type Definitions

ColorExtraction

Properties:
Name Type Description
data Uint8Array

Raw pixel data for the drawable

width int

Drawable bounding box width

height int

Drawable bounding box height

color object

Color object with RGBA properties at picked location

DrawableExtraction

Properties:
Name Type Description
data Uint8Array

Raw pixel data for the drawable

width int

Drawable bounding box width

height int

Drawable bounding box height

scratchOffset Array.<number>

[x, y] offset in Scratch coordinates from the drawable position to the client x, y coordinate

x int

The x coordinate relative to drawable bounding box

y int

The y coordinate relative to drawable bounding box

MeasurementProvider

Properties:
Name Type Description
beginMeasurementSession function

this will be called before a batch of measurements are made. Optionally, this function may return an object to be provided to the endMeasurementSession function.

measureText function

this will be called each time a piece of text must be measured.

endMeasurementSession function

this will be called after a batch of measurements is finished. It will be passed whatever value beginMeasurementSession returned, if any.

Tell this text wrapper to use a specific measurement provider.

Type:
  • object