1681-engine / index / Group
Class: Group ​
Defined in: src/core/Group.ts:5
A container of world objects, drawn in list order (children do not sort by depth).
Extends ​
Container<ContainerChild,this> &GameObjectMembers<this>
Constructors ​
Constructor ​
new Group(options?): Group;Defined in: node_modules/pixi.js/lib/scene/container/Container.d.ts:843
Parameters ​
| Parameter | Type |
|---|---|
options? | ContainerOptions<ContainerChild> |
Returns ​
Group
Inherited from ​
GameObject(Container).constructorProperties ​
active ​
readonly active: boolean;Defined in: src/core/gameObject.ts:42
False once destroyed.
Inherited from ​
GameObject(Container).activedepth ​
depth: number;Defined in: src/core/gameObject.ts:44
The draw order in the world layer (zIndex): bigger is in front.
Inherited from ​
GameObject(Container).depthflipX ​
flipX: boolean;Defined in: src/core/gameObject.ts:48
Inherited from ​
GameObject(Container).flipXflipY ​
flipY: boolean;Defined in: src/core/gameObject.ts:49
Inherited from ​
GameObject(Container).flipYscaleX ​
scaleX: number;Defined in: src/core/gameObject.ts:46
Scale without the flip: stays positive on a mirrored sprite.
Inherited from ​
GameObject(Container).scaleXscaleY ​
scaleY: number;Defined in: src/core/gameObject.ts:47
Inherited from ​
GameObject(Container).scaleYscene ​
scene: Stage;Defined in: src/core/gameObject.ts:40
Inherited from ​
GameObject(Container).sceneAccessors ​
list ​
Get Signature ​
get list(): Container<ContainerChild>[];Defined in: src/core/Group.ts:6
Returns ​
Container<ContainerChild>[]
Methods ​
add() ​
add(child): this;Defined in: src/core/Group.ts:10
Parameters ​
| Parameter | Type |
|---|---|
child | Container<ContainerChild> | Container<ContainerChild>[] |
Returns ​
this
addAt() ​
addAt(child, index): this;Defined in: src/core/Group.ts:15
Parameters ​
| Parameter | Type |
|---|---|
child | Container |
index | number |
Returns ​
this
clearTint() ​
clearTint(): this;Defined in: src/core/gameObject.ts:64
Returns ​
this
Inherited from ​
GameObject(Container).clearTintdestroy() ​
Call Signature ​
destroy(options?): void;Defined in: node_modules/pixi.js/lib/scene/container/Container.d.ts:1343
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 ​
container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });Inherited from ​
GameObject(Container).destroyCall Signature ​
destroy(): void;Defined in: src/core/gameObject.ts:67
Returns ​
void
Inherited from ​
GameObject(Container).destroykeepAbove() ​
keepAbove(child, other): this;Defined in: src/core/Group.ts:44
Keeps child drawn above other, anywhere above it: moved (directly above) only when it is below. What a weapon held over its body asks for. moveAbove from two pieces each wanting to sit directly above the same body (two blades, a fist on a hilt, a load) pushed the other out every frame, and every push rebuilt Pixi's instructions.
Parameters ​
| Parameter | Type |
|---|---|
child | Container |
other | Container |
Returns ​
this
keepBelow() ​
keepBelow(child, other): this;Defined in: src/core/Group.ts:51
Keeps child drawn below other, anywhere below it: moved (directly below) only when it is above (keepAbove).
Parameters ​
| Parameter | Type |
|---|---|
child | Container |
other | Container |
Returns ​
this
moveAbove() ​
moveAbove(child, other): this;Defined in: src/core/Group.ts:58
Puts child directly above other in the draw order; already there, it does nothing (see moveBelow).
Parameters ​
| Parameter | Type |
|---|---|
child | Container |
other | Container |
Returns ​
this
moveBelow() ​
moveBelow(child, other): this;Defined in: src/core/Group.ts:31
Puts child directly below other in the draw order. Already there, it does nothing: taking a child out and putting it back marks the render group's structure changed, and Pixi rebuilds its draw instructions for that frame — a held weapon ordered against its body every frame did it every frame.
Parameters ​
| Parameter | Type |
|---|---|
child | Container |
other | Container |
Returns ​
this
remove() ​
remove(child, destroy?): this;Defined in: src/core/Group.ts:20
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
child | Container | undefined |
destroy | boolean | false |
Returns ​
this
setAlpha() ​
setAlpha(a?): this;Defined in: src/core/gameObject.ts:55
Parameters ​
| Parameter | Type |
|---|---|
a? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setAlphasetAngle() ​
setAngle(a?): this;Defined in: src/core/gameObject.ts:59
Parameters ​
| Parameter | Type |
|---|---|
a? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setAnglesetBlendMode() ​
setBlendMode(mode): this;Defined in: src/core/gameObject.ts:60
Parameters ​
| Parameter | Type |
|---|---|
mode | BLEND_MODES |
Returns ​
this
Inherited from ​
GameObject(Container).setBlendModesetDepth() ​
setDepth(d): this;Defined in: src/core/gameObject.ts:54
Parameters ​
| Parameter | Type |
|---|---|
d | number |
Returns ​
this
Inherited from ​
GameObject(Container).setDepthsetFlip() ​
setFlip(x, y): this;Defined in: src/core/gameObject.ts:53
Parameters ​
| Parameter | Type |
|---|---|
x | boolean |
y | boolean |
Returns ​
this
Inherited from ​
GameObject(Container).setFlipsetFlipX() ​
setFlipX(v): this;Defined in: src/core/gameObject.ts:51
Parameters ​
| Parameter | Type |
|---|---|
v | boolean |
Returns ​
this
Inherited from ​
GameObject(Container).setFlipXsetFlipY() ​
setFlipY(v): this;Defined in: src/core/gameObject.ts:52
Parameters ​
| Parameter | Type |
|---|---|
v | boolean |
Returns ​
this
Inherited from ​
GameObject(Container).setFlipYsetPosition() ​
setPosition(x?, y?): this;Defined in: src/core/gameObject.ts:57
Parameters ​
| Parameter | Type |
|---|---|
x? | number |
y? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setPositionsetRotation() ​
setRotation(r?): this;Defined in: src/core/gameObject.ts:58
Parameters ​
| Parameter | Type |
|---|---|
r? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setRotationsetScale() ​
setScale(x, y?): this;Defined in: src/core/gameObject.ts:50
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setScalesetScrollFactor() ​
setScrollFactor(f): this;Defined in: src/core/gameObject.ts:66
0 pins the object to the screen instead of the world.
Parameters ​
| Parameter | Type |
|---|---|
f | number |
Returns ​
this
Inherited from ​
GameObject(Container).setScrollFactorsetTint() ​
setTint(color?): this;Defined in: src/core/gameObject.ts:61
Parameters ​
| Parameter | Type |
|---|---|
color? | number |
Returns ​
this
Inherited from ​
GameObject(Container).setTintsetTintFill() ​
setTintFill(color): this;Defined in: src/core/gameObject.ts:63
Paints every opaque pixel in one solid colour (hit flash, silhouettes).
Parameters ​
| Parameter | Type |
|---|---|
color | number |
Returns ​
this
Inherited from ​
GameObject(Container).setTintFillsetVisible() ​
setVisible(v): this;Defined in: src/core/gameObject.ts:56
Parameters ​
| Parameter | Type |
|---|---|
v | boolean |
Returns ​
this
Inherited from ​
GameObject(Container).setVisible