Appearance
pixi-hm05 (player) / pixi-hm05 / ClassicNode
Class: ClassicNode
A node of Classic vector art (see the file comment). artKey names what art holds (equal keys = equal art); ownScale = how much the node's own matrix scales lengths, for its boundsArea when lines are measured in the parent.
Extends
Container
Constructors
Constructor
ts
new ClassicNode(
art,
artKey,
ownScale?
): ClassicNode;Parameters
| Parameter | Type | Default value |
|---|---|---|
art | readonly ClassicItem[] | undefined |
artKey | string | undefined |
ownScale? | number | 1 |
Returns
ClassicNode
Overrides
Container.constructor
Properties
| Property | Modifier | Type |
|---|---|---|
art | public | readonly ClassicItem[] |
artKey | public | string |
Methods
clearPicture()
ts
clearPicture(): void;no picture (nothing to draw, off screen, or drawn by the run's first node)
Returns
void
destroy()
ts
destroy(options?): void;Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | DestroyOptions | Options parameter. A boolean will act as if all options have been set to that value |
Returns
void
Example
ts
container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });Overrides
Container.destroy
has()
ts
has(
key,
x0,
y0,
x1,
y1
): boolean;the picture key describes covers this area already
Parameters
| Parameter | Type |
|---|---|
key | string |
x0 | number |
y0 | number |
x1 | number |
y1 | number |
Returns
boolean
place()
ts
place(
device,
ox,
oy
): void;puts the picture's pixels on the device pixels: device = this node's own space → device pixels, (ox, oy) = the run's origin there
Parameters
| Parameter | Type |
|---|---|
device | Matrix |
ox | number |
oy | number |
Returns
void
setArt()
ts
setArt(
art,
artKey,
ownScale?
): void;new art (a vector file that arrived later)
Parameters
| Parameter | Type | Default value |
|---|---|---|
art | readonly ClassicItem[] | undefined |
artKey | string | undefined |
ownScale? | number | 1 |
Returns
void
setPicture()
ts
setPicture(
key,
x,
y,
width,
height,
rgba
): void;Parameters
| Parameter | Type |
|---|---|
key | string |
x | number |
y | number |
width | number |
height | number |
rgba | Uint8Array<ArrayBuffer> |
Returns
void