Module Container-PIXI.Impl

let create: unit => t;
let createDestroyOptions: ?⁠children:bool => ?⁠texture:bool => ?⁠baseTexture:bool => unit => Js.t({. children: Js.undefined(bool), texture: Js.undefined(bool), baseTexture: Js.undefined(bool), });
let getChildren: Js.t(PIXI.C.#container) => array(Js.t(PIXI.C.displayObject));

The array of children of this container.

let getHeight: Js.t(PIXI.C.#container) => float;

The height of the Container, setting this will actually modify the scale to achieve the value set

let setHeight: Js.t(PIXI.C.#container) => float => unit;

The height of the Container, setting this will actually modify the scale to achieve the value set

let getInteractiveChildren: Js.t(PIXI.C.#container) => bool;

Determines if the children to the displayObject can be clicked/touched Setting this to false allows PixiJS to bypass a recursive hitTest function

let setInteractiveChildren: Js.t(PIXI.C.#container) => bool => unit;

Determines if the children to the displayObject can be clicked/touched Setting this to false allows PixiJS to bypass a recursive hitTest function

let getSortableChildren: Js.t(PIXI.C.#container) => bool;

If set to true, the container will sort its children by zIndex value when updateTransform() is called, or manually if sortChildren() is called. This actually changes the order of elements in the array, so should be treated as a basic solution that is not performant compared to other solutions, such as @link https://github.com/pixijs/pixi-display

Also be aware of that this may not work nicely with the addChildAt() function, as the zIndex sorting may cause the child to automatically sorted to another position.

let setSortableChildren: Js.t(PIXI.C.#container) => bool => unit;

If set to true, the container will sort its children by zIndex value when updateTransform() is called, or manually if sortChildren() is called. This actually changes the order of elements in the array, so should be treated as a basic solution that is not performant compared to other solutions, such as @link https://github.com/pixijs/pixi-display

Also be aware of that this may not work nicely with the addChildAt() function, as the zIndex sorting may cause the child to automatically sorted to another position.

let getSortDirty: Js.t(PIXI.C.#container) => bool;

Should children be sorted by zIndex at the next updateTransform call. Will get automatically set to true if a new child is added, or if a child's zIndex changes.

let setSortDirty: Js.t(PIXI.C.#container) => bool => unit;

Should children be sorted by zIndex at the next updateTransform call. Will get automatically set to true if a new child is added, or if a child's zIndex changes.

let getWidth: Js.t(PIXI.C.#container) => float;

The width of the Container, setting this will actually modify the scale to achieve the value set

let setWidth: Js.t(PIXI.C.#container) => float => unit;

The width of the Container, setting this will actually modify the scale to achieve the value set

let addChild: Js.t(PIXI.C.#container) => Js.t(PIXI.C.#displayObject as 'a) => Js.t('a);

Adds one or more children to the container. Multiple items can be added like so: myContainer.addChild(thingOne, thingTwo, thingThree)

let addChildAt: Js.t(PIXI.C.#container) => Js.t(PIXI.C.#displayObject as 'a) => index:int => Js.t('a);

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

let calculateBounds: Js.t(PIXI.C.#container) => unit;

Recalculates the bounds of the container.

let _destroy: Js.t(PIXI.C.#container) => ?⁠options:'a => unit => unit;

Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

let destroy: Js.t(PIXI.C.container) => ?⁠options:Js.t({. baseTexture: Js.undefined(bool), children: Js.undefined(bool), texture: Js.undefined(bool), }) => unit => unit;
let getChildAt: Js.t(PIXI.C.#container) => int => Js.t(PIXI.C.#displayObject);

Returns the child at the specified index

let getChildByName: Js.t(PIXI.C.#container) => string => Js.t(PIXI.C.#displayObject);

Returns the display object in the container.

let getChildIndex: Js.t(PIXI.C.#container) => Js.t(PIXI.C.#displayObject) => int;

Returns the index position of a child DisplayObject instance

let removeChild: Js.t(PIXI.C.#container) => Js.t(PIXI.C.#displayObject as 'a) => Js.t('a);

Removes one or more children from the container.

let removeChildAt: Js.t(PIXI.C.#container) => int => Js.t(PIXI.C.#displayObject);

Removes a child from the specified index position.

let removeChildren: Js.t(PIXI.C.#container) => ?⁠beginIndex:int => ?⁠endIndex:int => unit => array(Js.t(PIXI.C.#displayObject));

Removes all children from this container that are within the begin and end indexes.

let renderCanvas: Js.t(PIXI.C.#container) => Js.t(PIXI.AbstractRenderer.#_t) => unit;

Renders the object using the Canvas renderer

let setChildIndex: Js.t(PIXI.C.#container) => int => unit;

Changes the position of an existing child in the display object container

let sortChildren: Js.t(PIXI.C.#container) => unit;

Sorts children by zIndex. Previous order is mantained for 2 children with the same zIndex.

let swapChildren: Js.t(PIXI.C.#container) => Js.t(PIXI.C.#displayObject) => Js.t(PIXI.C.#displayObject) => unit;

Swaps the position of 2 Display Objects within this container.