Module Container-PIXI
type t= Js.t(PIXI.C.container);A Container represents a collection of display objects. It is the base class of all display objects that act as a container for other objects (like Sprites).
module Impl: { ... };include PIXI.EventEmitter.Impl;
let create: unit => PIXI.EventEmitter.t;let eventNames: Js.t(PIXI.EventEmitter._t) => array(string);let listeners: Js.t(PIXI.EventEmitter._t) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => array((Js.t({.. }) => unit));let listenerCount: Js.t(PIXI.EventEmitter._t) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => int;let emit: Js.t(PIXI.EventEmitter._t) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => bool;let on: Js.t(PIXI.EventEmitter._t as 'd) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => fn:('b => unit) => ?context:'c => unit => Js.t('d);let addListener: Js.t(PIXI.EventEmitter._t as 'd) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => fn:('b => unit) => ?context:'c => unit => Js.t('d);let once: Js.t(PIXI.EventEmitter._t as 'd) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => fn:('b => unit) => ?context:'c => unit => Js.t('d);let removeListener: Js.t(PIXI.EventEmitter._t as 'b) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => ?fn:(Js.t({.. }) => unit) => ?context:Js.t({.. }) => ?once:bool => unit => Js.t('b);let off: Js.t(PIXI.EventEmitter._t as 'b) => event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => ?fn:(Js.t({.. }) => unit) => ?context:Js.t({.. }) => ?once:bool => unit => Js.t('b);let removeAllListeners: Js.t(PIXI.EventEmitter._t as 'b) => ?event:[ `String(string) | `Symbol(PIXI.Symbol.t) ] => unit => Js.t('b);
include PIXI.DisplayObject.Impl;
let create: unit => PIXI.DisplayObject.t;let getAccessible: Js.t(PIXI.C.displayObject) => bool;let setAccessible: Js.t(PIXI.C.displayObject) => bool => unit;let getAccessibleChildren: Js.t(PIXI.C.displayObject) => bool;let setAccessibleChildren: Js.t(PIXI.C.displayObject) => bool => unit;let getAccessibleHint: Js.t(PIXI.C.displayObject) => string;let setAccessibleHint: Js.t(PIXI.C.displayObject) => string => unit;let getAccessibleTitle: Js.t(PIXI.C.displayObject) => Js.Nullable.t(string);let setAccessibleTitle: Js.t(PIXI.C.displayObject) => Js.Nullable.t(string) => unit;let getAccessibleType: Js.t(PIXI.C.displayObject) => string;let setAccessibleType: Js.t(PIXI.C.displayObject) => string => unit;let getAlpha: Js.t(PIXI.C.displayObject) => float;let setAlpha: Js.t(PIXI.C.displayObject) => float => unit;let getAngle: Js.t(PIXI.C.displayObject) => float;let setAngle: Js.t(PIXI.C.displayObject) => float => unit;let getButtonMode: Js.t(PIXI.C.displayObject) => bool;let setButtonMode: Js.t(PIXI.C.displayObject) => bool => unit;let getCacheAsBitmap: Js.t(PIXI.C.displayObject) => bool;let setCacheAsBitmap: Js.t(PIXI.C.displayObject) => bool => unit;let getCursor: Js.t(PIXI.C.displayObject) => string;let setCursor: Js.t(PIXI.C.displayObject) => string => unit;let getFilterArea: Js.t(PIXI.C.displayObject) => Js.Nullable.t(Js.t(PIXI.Rectangle._t));let setFilterArea: Js.t(PIXI.C.displayObject) => Js.Nullable.t(Js.t(PIXI.Rectangle._t)) => unit;let getFilters: Js.t(PIXI.C.displayObject) => Js.Nullable.t(array(PIXI.Filter.t));let setFilters: Js.t(PIXI.C.displayObject) => Js.Nullable.t(array(PIXI.Filter.t)) => unit;let getHitArea: Js.t(PIXI.C.displayObject) => 'hitArea;let setHitArea: Js.t(PIXI.C.displayObject) => 'hitArea => unit;let getInteractive: Js.t(PIXI.C.displayObject) => bool;let setInteractive: Js.t(PIXI.C.displayObject) => bool => unit;let getIsMask: Js.t(PIXI.C.displayObject) => bool;let getIsSprite: Js.t(PIXI.C.displayObject) => bool;let getLocalTransform: Js.t(PIXI.C.displayObject) => Js.t(PIXI.Matrix._t);let getMask: Js.t(PIXI.C.displayObject) => 'mask;let setMask: Js.t(PIXI.C.displayObject) => 'mask => unit;let getName: Js.t(PIXI.C.displayObject) => Js.Nullable.t(string);let setName: Js.t(PIXI.C.displayObject) => Js.Nullable.t(string) => unit;let getParent: Js.t(PIXI.C.displayObject) => Js.Nullable.t(PIXI.C.container);let getPivot: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t);let setPivot: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t) => unit;let getPosition: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t);let setPosition: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t) => unit;let getRenderable: Js.t(PIXI.C.displayObject) => bool;let setRenderable: Js.t(PIXI.C.displayObject) => bool => unit;let getRotation: Js.t(PIXI.C.displayObject) => float;let setRotation: Js.t(PIXI.C.displayObject) => float => unit;let getScale: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t);let setScale: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t) => unit;let getSkew: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t);let setSkew: Js.t(PIXI.C.displayObject) => Js.t(PIXI.ObservablePoint._t) => unit;let getTransform: Js.t(PIXI.C.displayObject) => Js.t(PIXI.Transform._t);let getVisible: Js.t(PIXI.C.displayObject) => bool;let setVisible: Js.t(PIXI.C.displayObject) => bool => unit;let getWorldAlpha: Js.t(PIXI.C.displayObject) => float;let getWorldTransform: Js.t(PIXI.C.displayObject) => Js.t(PIXI.Matrix._t);let getWorldVisible: Js.t(PIXI.C.displayObject) => bool;let getX: Js.t(PIXI.C.displayObject) => float;let setX: Js.t(PIXI.C.displayObject) => float => unit;let getY: Js.t(PIXI.C.displayObject) => float;let setY: Js.t(PIXI.C.displayObject) => float => unit;let getZIndex: Js.t(PIXI.C.displayObject) => float;let setZIndex: Js.t(PIXI.C.displayObject) => float => unit;let _recursivePostUpdateTransform: Js.t(PIXI.C.displayObject) => unit;let destroy: Js.t(PIXI.C.displayObject) => unit;let getBounds: Js.t(PIXI.C.displayObject) => ?skipUpdate:bool => ?rect:Js.t(PIXI.Rectangle._t) => unit => Js.t(PIXI.Rectangle._t);let getGlobalPosition: Js.t(PIXI.C.displayObject) => ?point:Js.t(PIXI.Point._t) => ?skipUpdate:bool => unit => Js.t(PIXI.Point._t);let getLocalBounds: Js.t(PIXI.C.displayObject) => ?rectangle:Js.t(PIXI.Rectangle._t) => unit => Js.t(PIXI.Rectangle._t);let setContainer: Js.t(PIXI.C.displayObject) => Js.t(PIXI.C.container as 'b) => Js.t('b);let setTransform: Js.t(PIXI.C.displayObject) => ?x:float => ?y:float => ?scaleX:float => ?scaleY:float => ?rotation:float => ?skewX:float => ?skewY:float => ?pivotX:float => ?pivotY:float => unit => PIXI.DisplayObject.t;let toGlobal: Js.t(PIXI.C.displayObject) => position:[ `ObservablePoint(PIXI.ObservablePoint.t) | `Point(PIXI.Point.t) ] => ?point:PIXI.Point.t => ?skipUpdate:bool => unit => PIXI.Point.t;let toLocal: Js.t(PIXI.C.displayObject) => position:[ `ObservablePoint(PIXI.ObservablePoint.t) | `Point(PIXI.Point.t) ] => ?from:PIXI.DisplayObject.t => ?point:PIXI.Point.t => ?skipUpdate:bool => unit => PIXI.Point.t;let updateTransform: Js.t(PIXI.C.displayObject) => unit;
include 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.