Skip to content

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 ​

ParameterTypeDefault value
artreadonly ClassicItem[]undefined
artKeystringundefined
ownScale?number1

Returns ​

ClassicNode

Overrides ​

Container.constructor

Properties ​

PropertyModifierType
artpublicreadonly ClassicItem[]
artKeypublicstring

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 ​

ParameterTypeDescription
options?DestroyOptionsOptions 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 ​

ParameterType
keystring
x0number
y0number
x1number
y1number

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 ​

ParameterType
deviceMatrix
oxnumber
oynumber

Returns ​

void


setArt() ​

ts
setArt(
   art, 
   artKey, 
   ownScale?
): void;

new art (a vector file that arrived later)

Parameters ​

ParameterTypeDefault value
artreadonly ClassicItem[]undefined
artKeystringundefined
ownScale?number1

Returns ​

void


setPicture() ​

ts
setPicture(
   key, 
   x, 
   y, 
   width, 
   height, 
   rgba
): void;

Parameters ​

ParameterType
keystring
xnumber
ynumber
widthnumber
heightnumber
rgbaUint8Array<ArrayBuffer>

Returns ​

void

HereSplash — 2D animation for the web