class Container extends Object with DisplayObject
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.
- Annotations
- @RawJSType() @native() @JSName( "Container" )
- Alphabetic
- By Inheritance
- Container
- DisplayObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Container()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addChild(child: DisplayObject): DisplayObject
Adds a child to the container.
Adds a child to the container.
- child
The DisplayObject to add to the container.
- returns
The child that was added.
-
def
addChildAt(child: DisplayObject, index: Int): DisplayObject
Adds a child to the container at a specified index.
Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
- child
The DisplayObject to add to the container.
- index
The index to place the child in
- returns
The child that was added.
-
val
alpha: Alpha
The alpha value of the group container.
The alpha value of the group container.
- Definition Classes
- DisplayObject
-
var
alphanumber: Double
The opacity of the object.
-
val
anchor: Point
- Definition Classes
- DisplayObject
-
def
angle: Double
The angle of rotation of the group container, in degrees.
The angle of rotation of the group container, in degrees. This adjusts the group itself by modifying its local rotation transform. This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.
- Definition Classes
- DisplayObject
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
cacheAsBitmap: Boolean
Set if this display object is cached as a bitmap.
Set if this display object is 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 'null'
- Definition Classes
- DisplayObject
-
def
children: Array[DisplayObject]
The array of children of this container.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
destroy(destroyChildren: Boolean): Unit
Destroys the container
Destroys the container
- destroyChildren
optional: if set to true, all the children will have their destroy method called as well
-
def
destroy(): Unit
Base destroy method for generic display objects.
Base destroy method for generic display objects.
- Definition Classes
- DisplayObject
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
var
filterArea: Rectangle
The area the filter is applied to.
The area the filter is applied to. This is used as more of an optimisation rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.
-
var
filters: Array[AbstractFilter]
Sets the filters for the displayObject.
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'
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
var
height: Double
The height of the Container, setting this will actually modify the scale to achieve the value set.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
var
mask: |[Graphics, Sprite]
Sets a mask for the displayObject.
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 PIXI a regular mask must be a PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it utilises shape clipping. To remove a mask, set this property to null.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
parent: Container
The display object container that contains this display object.
-
var
pivot: Point
The pivot point of the displayObject that it rotates around
-
var
position: Point
The coordinate of the object relative to the local coordinates of the parent.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
var
renderable: Boolean
Can this object be rendered, if false the object will not be drawn but the updateTransform methods will still be called.
-
var
rotation: Double
The rotation of the object in radians.
-
var
scale: Point
The scale factor of the object.
-
def
setParent(container: Container): Container
Set the parent Container of this DisplayObject.
Set the parent Container of this DisplayObject.
- container
The Container to add this DisplayObject to.
- returns
The Container that this DisplayObject was added to.
- Definition Classes
- DisplayObject
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toGlobal(position: Point): Point
Calculates the global position of the display object.
Calculates the global position of the display object.
- position
The world origin to calculate from.
- returns
A point object representing the position of this object.
- Definition Classes
- DisplayObject
-
def
toLocal(position: Point, from: DisplayObject = null): Point
Calculates the local position of the display object relative to another point.
Calculates the local position of the display object relative to another point.
- position
The world origin to calculate from.
- from
The DisplayObject to calculate the global position from.
- returns
A point object representing the position of this object.
- Definition Classes
- DisplayObject
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
val
visible: Boolean
- Definition Classes
- DisplayObject
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
var
width: Double
The width of the Container, setting this will actually modify the scale to achieve the value set.
-
def
worldAlpha: Alpha
The multiplied alpha of the displayObject.
-
def
worldTransform: Matrix
Current transform of the object based on world (parent) factors
Current transform of the object based on world (parent) factors
- Definition Classes
- DisplayObject
-
def
worldVisible: Boolean
Indicates if the sprite is globally visible.
Indicates if the sprite is globally visible.
- Definition Classes
- DisplayObject
-
def
x: Double
The position of the displayObject on the x axis relative to the local coordinates of the parent.
The position of the displayObject on the x axis relative to the local coordinates of the parent.
- Definition Classes
- DisplayObject
-
def
x_=(x: Double): Unit
- Definition Classes
- DisplayObject
-
def
y: Double
The position of the displayObject on the y axis relative to the local coordinates of the parent.
The position of the displayObject on the y axis relative to the local coordinates of the parent.
- Definition Classes
- DisplayObject
-
def
y_=(y: Double): Unit
- Definition Classes
- DisplayObject