Skip to content

Container<T>

Unofficial

Container for display objects.

Import:

import type { Container } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export class Container<T extends DisplayObject = DisplayObject> extends DisplayObject

Extends: DisplayObject

Properties

PropertyTypeDescription
alphanumberAlpha (opacity).
(Inherited from DisplayObject)
anglenumberRotation angle in degrees.
(Inherited from DisplayObject)
childrenT[]Children of this container (read-only).
cursornull | stringCursor style when hovering.
(Inherited from DisplayObject)
eventModePixiEventModeHow the object takes part in the federated event system.
(Inherited from DisplayObject)
hitAreaIHitArea | nullHit area shape.
(Inherited from DisplayObject)
interactivebooleanWhether the object is interactive.
(Inherited from DisplayObject)
namenull | stringDisplay name.
(Inherited from DisplayObject)
parentContainerParent container.
renderablebooleanWhether the object is renderable.
(Inherited from DisplayObject)
rotationnumberRotation in radians.
(Inherited from DisplayObject)
sortableChildrenbooleanWhether children should be sorted by zIndex.
sortDirtybooleanWhether the children need sorting.
transformTransformTransform data.
(Inherited from DisplayObject)
visiblebooleanWhether the object is visible.
(Inherited from DisplayObject)
worldAlphanumberAlpha relative to the scene.
(Inherited from DisplayObject)
worldTransformMatrixWorld transform matrix (read-only).
(Inherited from DisplayObject)
worldVisiblebooleanWhether the object is visible in the scene (read-only).
(Inherited from DisplayObject)
xnumberX position.
(Inherited from DisplayObject)
ynumberY position.
(Inherited from DisplayObject)
zIndexnumberZ-index for sorting.
(Inherited from DisplayObject)

Methods

MethodReturnsDescription
addChild(children?)U[0]Adds one or more children to the container.
addChildAt(child, index)UAdds a child at a specific index.
destroy(options?)voidDestroys this container.
emit(event, args?)booleanEmits an event.
(Inherited from DisplayObject)
getBounds(skipUpdate?, rect?)PixiRectangleReturns the bounds of the object.
(Inherited from DisplayObject)
getChildAt(index)TReturns the child at the given index.
getChildIndex(child)numberReturns the index of a child.
getLocalBounds(rect?)PixiRectangleReturns the local bounds of the object.
(Inherited from DisplayObject)
off(event, fn?, context?)thisRemoves an event listener.
(Inherited from DisplayObject)
on(event, fn, context?)thisAdds an event listener.
(Inherited from DisplayObject)
once(event, fn, context?)thisAdds a one-time event listener.
(Inherited from DisplayObject)
removeAllListeners(event?)thisRemoves all listeners for the given event.
(Inherited from DisplayObject)
removeChild(children?)U[0]Removes one or more children from the container.
removeChildAt(index)TRemoves the child at a specific index.
removeChildren(beginIndex?, endIndex?)T[]Removes children from the container.
setChildIndex(child, index)voidSets the index of a child.
sortChildren()voidSorts the children by zIndex.
toGlobal(position, point?, skipUpdate?)PConverts a point to global (screen) coordinates.
(Inherited from DisplayObject)
toLocal(position, from?, point?, skipUpdate?)PConverts a point to local coordinates.
(Inherited from DisplayObject)