Class type C-PIXI.displayObject

Contains declaration of co-dependent class types.

inherit PIXI.EventEmitter._t
method accessible#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Flag for if the object is accessible. If true AccessibilityManager will overlay a shadow div with attributes set

method accessible: bool

Flag for if the object is accessible. If true AccessibilityManager will overlay a shadow div with attributes set

method accessibleChildren#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Setting to false will prevent any children inside this container to be accessible. Defaults to true

method accessibleChildren: bool

Setting to false will prevent any children inside this container to be accessible. Defaults to true

method accessibleHint#=: Js.Internal.meth([ `Arity_1(string) ], unit)

Sets the aria-label attribute of the shadow div

method accessibleHint: string

Sets the aria-label attribute of the shadow div

method accessibleTitle#=: Js.Internal.meth([ `Arity_1(Js.Nullable.t(string)) ], unit)

Sets the title attribute of the shadow div If accessibleTitle AND accessibleHint has not been this will default to 'displayObject tabIndex'

method accessibleTitle: Js.Nullable.t(string)

Sets the title attribute of the shadow div If accessibleTitle AND accessibleHint has not been this will default to 'displayObject tabIndex'

method accessibleType#=: Js.Internal.meth([ `Arity_1(string) ], unit)

Specify the type of div the accessible layer is. Screen readers treat the element differently depending on this type. Defaults to button.

method accessibleType: string

Specify the type of div the accessible layer is. Screen readers treat the element differently depending on this type. Defaults to button.

method alpha#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The opacity of the object.

method alpha: float

The opacity of the object.

method angle#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The angle of the object in degrees. 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees

method angle: float

The angle of the object in degrees. 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees

method buttonMode#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive Setting this changes the 'cursor' property to 'pointer'.

method buttonMode: bool

If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive Setting this changes the 'cursor' property to 'pointer'.

method cacheAsBitmap#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Set this to true if you want this display object to be cached as a bitmap. This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects. To remove simply set this property to false

IMPORTANT GOTCHA - Make sure that all your textures are preloaded BEFORE setting this property to true as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear.

method cacheAsBitmap: bool

Set this to true if you want this display object to be cached as a bitmap. This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects. To remove simply set this property to false

IMPORTANT GOTCHA - Make sure that all your textures are preloaded BEFORE setting this property to true as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear.

method cursor#=: Js.Internal.meth([ `Arity_1(string) ], unit)

This defines what cursor mode is used when the mouse cursor is hovered over the displayObject.

method cursor: string

This defines what cursor mode is used when the mouse cursor is hovered over the displayObject.

method filterArea#=: Js.Internal.meth([ `Arity_1(Js.Nullable.t(PIXI.Rectangle.t)) ], unit)

The area the filter is applied to. This is used as more of an optimization rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.

Also works as an interaction mask.

method filterArea: Js.Nullable.t(PIXI.Rectangle.t)

The area the filter is applied to. This is used as more of an optimization rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.

Also works as an interaction mask.

method filters#=: Js.Internal.meth([ `Arity_1(Js.Nullable.t(array(PIXI.Filter.t))) ], unit)

Sets the filters for the displayObject.

IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. To remove filters simply set this property to 'null'.

method filters: Js.Nullable.t(array(PIXI.Filter.t))

Sets the filters for the displayObject.

IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. To remove filters simply set this property to 'null'.

method hitArea#=: Js.Internal.meth([ `Arity_1(Js.t({.. })) ], unit)

Interaction shape. Children will be hit first, then this shape will be checked. Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.

method hitArea: Js.t({.. })

Interaction shape. Children will be hit first, then this shape will be checked. Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds.

method interactive#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Enable interaction events for the DisplayObject. Touch, pointer and mouse events will not be emitted unless interactive is set to true.

method interactive: bool

Enable interaction events for the DisplayObject. Touch, pointer and mouse events will not be emitted unless interactive is set to true.

method isMask: bool

Does any other displayObject use this object as a mask?

method isSprite: bool

used to fast check if a sprite is.. a sprite!

method localTransform: PIXI.Matrix.t

Current transform of the object based on local factors: position, scale, other stuff.

method mask#=: Js.Internal.meth([ `Arity_1(Js.t({.. })) ], unit)

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. In PixiJS a regular mask must be a PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it utilities shape clipping. To remove a mask, set this property to null.

For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.

deprecated

consider using PIXI.DisplayObject.getMask for PIXI.Graphics | PIXI.Sprite | null support

see /bs-pixi/PIXI/DisplayObject-PIXI/#val-getMask

DisplayObject.getMask

method mask: Js.t({.. })

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. In PixiJS a regular mask must be a PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it utilities shape clipping. To remove a mask, set this property to null.

For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask.

deprecated

consider using PIXI.DisplayObject.getMask for PIXI.Graphics | PIXI.Sprite | null support

see /bs-pixi/PIXI/DisplayObject-PIXI/#val-getMask

DisplayObject.getMask

method name#=: Js.Internal.meth([ `Arity_1(string) ], unit)

The instance name of the object.

method name: Js.null_undefined(string)

The instance name of the object.

method parent: Js.Nullable.t(Js.t(container))

The display object container that contains this display object.

method pivot#=: Js.Internal.meth([ `Arity_1(PIXI.ObservablePoint.t) ], unit)

The pivot point of the displayObject that it rotates around. Assignment by value since pixi-v4.

method pivot: PIXI.ObservablePoint.t

The pivot point of the displayObject that it rotates around. Assignment by value since pixi-v4.

method position#=: Js.Internal.meth([ `Arity_1(PIXI.Point.t) ], unit)

The coordinate of the object relative to the local coordinates of the parent. Assignment by value since pixi-v4.

method position: PIXI.Point.t

The coordinate of the object relative to the local coordinates of the parent. Assignment by value since pixi-v4.

method renderable#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Can this object be rendered, if false the object will not be drawn but the updateTransform methods will still be called. Only affects recursive calls from parent. You can ask for bounds manually.

method renderable: bool

Can this object be rendered, if false the object will not be drawn but the updateTransform methods will still be called. Only affects recursive calls from parent. You can ask for bounds manually.

method rotation#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The rotation of the object in radians. 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.

method rotation: float

The rotation of the object in radians. 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees.

method scale#=: Js.Internal.meth([ `Arity_1(PIXI.ObservablePoint.t) ], unit)

The scale factor of the object. Assignment by value since pixi-v4.

method scale: PIXI.ObservablePoint.t

The scale factor of the object. Assignment by value since pixi-v4.

method skew#=: Js.Internal.meth([ `Arity_1(PIXI.ObservablePoint.t) ], unit)

The skew factor for the object in radians. Assignment by value since pixi-v4.

method skew: PIXI.ObservablePoint.t

The skew factor for the object in radians. Assignment by value since pixi-v4.

method transform#=: Js.Internal.meth([ `Arity_1(PIXI.Transform.t) ], unit)

World transform and local transform of this object. This will become read-only later, please do not assign anything there unless you know what are you doing.

method transform: PIXI.Transform.t

World transform and local transform of this object. This will become read-only later, please do not assign anything there unless you know what are you doing.

method visible#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

The visibility of the object. If false the object will not be drawn, and the updateTransform function will not be called. Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.

method visible: bool

The visibility of the object. If false the object will not be drawn, and the updateTransform function will not be called. Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually.

method worldAlpha: float

The multiplied alpha of the displayObject.

method worldTransform: PIXI.Matrix.t

Current transform of the object based on world (parent) factors.

method worldVisible: bool

Indicates if the object is globally visible.

method x#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The position of the displayObject on the x axis relative to the local coordinates of the parent. An alias to position.x

method x: float

The position of the displayObject on the x axis relative to the local coordinates of the parent. An alias to position.x

method y#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The position of the displayObject on the y axis relative to the local coordinates of the parent. An alias to position.y

method y: float

The position of the displayObject on the y axis relative to the local coordinates of the parent. An alias to position.y

method zIndex#=: Js.Internal.meth([ `Arity_1(int) ], unit)

The zIndex of the displayObject. If a container has the sortableChildren property set to true, children will be automatically sorted by zIndex value; a higher value will mean it will be moved towards the end of the array, and thus rendered on top of other displayObjects within the same container.

method zIndex: int

The zIndex of the displayObject. If a container has the sortableChildren property set to true, children will be automatically sorted by zIndex value; a higher value will mean it will be moved towards the end of the array, and thus rendered on top of other displayObjects within the same container.

method _recursivePostUpdateTransform: Js.Internal.meth([ `Arity_0 ], unit)

Recursively updates transform of all objects from the root to this one internal function for toLocal()

method destroy: Js.Internal.meth([ `Arity_0 ], unit)

Base destroy method for generic display objects. This will automatically remove the display object from its parent Container as well as remove all current event listeners and internal references. Do not use a DisplayObject after calling destroy().

method getBounds: Js.Internal.meth([ `Arity_2((bool, Js.Undefined.t(PIXI.Rectangle.t))) ]PIXI.Rectangle.t)

Retrieves the bounds of the displayObject as a rectangle object.

parameter skipUpdate

Setting to true will stop the transforms of the scene graph from being updated. This means the calculation returned MAY be out of date BUT will give you a nice performance boost.

parameter rect

Optional rectangle to store the result of the bounds calculation.

method getGlobalPosition: Js.Internal.meth([ `Arity_2((PIXI.Point.t, bool)) ]PIXI.Point.t)

Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot.

method getLocalBounds: Js.Internal.meth([ `Arity_1(Js.Undefined.t(PIXI.Rectangle.t)) ]PIXI.Rectangle.t)

Retrieves the local bounds of the displayObject as a rectangle object

method setParent: Js.Internal.meth([ `Arity_1(container) ]container)

Set the parent Container of this DisplayObject.

method setTransform: Js.Internal.meth([ `Arity_9((float, float, float, float, float, float, float, float, float)) ], Js.t(displayObject))

Convenience function to set the position, scale, skew and pivot at once.

parameter x

Position on the x axis

parameter y

Position on the y axis

parameter pivotX

Pivot on the x axis

parameter pivotY

Pivot on the y axis

parameter scaleX

Scale on the x axis

parameter scaleY

Scale on the y axis

parameter rotation

rotation in radians

parameter skewX

Skew on the x axis

parameter skewY

Skew on the y axis

parameter pivotX

The X pivot value

parameter pivotY

The Y pivot value

returns

This display object

method toGlobal: Js.Internal.meth([ `Arity_3((PIXI.Point.t, Js.Undefined.t(PIXI.Point.t), bool)) ]PIXI.Point.t)

Calculates the global position of the display object

parameter position

The world origin to calculate from

parameter from

(optional) The DisplayObject to calculate the global position from

parameter point

(optional) A Point object in which to store the value, optional (otherwise will create a new Point)

parameter skipUpdate

Should we skip the update transform

returns

A point object representing the position of this object

method toLocal: Js.Internal.meth([ `Arity_4((PIXI.Point.t, Js.Undefined.t(Js.t(displayObject)), Js.Undefined.t(PIXI.Point.t), bool)) ]PIXI.Point.t)

Calculates the local position of the display object relative to another point

parameter position

The world origin to calculate from

parameter from

(optional) The DisplayObject to calculate the global position from

parameter point

(optional) A Point object in which to store the value, optional (otherwise will create a new Point)

parameter skipUpdate

Should we skip the update transform

returns

A point object representing the position of this object

method updateTransform: Js.Internal.meth([ `Arity_0 ], unit)

Updates the object transform for rendering