Members
(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
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