Creates an instance of a Flippable.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
items |
Array.<PIXI.DisplayObject> |
An array of PIXI.DisplayObjects. |
||||||||||||||||||||||||||||||||||||
opts |
object |
optional
An options object which can contain the following properties.
|
- See:
Example
const elephant1 = PIXI.Sprite.from('./assets/elephant-1.jpg')
const elephant2 = PIXI.Sprite.from('./assets/elephant-2.jpg')
// Create the list
const list = new List([elephant1, elephant2])
app.scene.addChild(list)
Extends
- PIXI.Container
Members
Methods
-
Captures an event to inform InteractionMapper about processed events.
Name Type Description event
event | PIXI.InteractionEvent The PIXI event to capture.
-
layout ()List
-
Should be called to refresh the layout of the list (the width or the height).
Returns:
Type Description List A reference to the list for chaining. -
Resizes the list.
Name Type Description widthOrHeight
number The new width (if orientation is horizontal) or height (if orientation is vertical) of the list.
-
setItems (items)List
-
Replaces the existing items and relayouts the list.
Name Type Description items
Array.<PIXI.DisplayObject> An array of PIXI.DisplayObjects.
Returns:
Type Description List A reference to the list for chaining.