PIXI.SimpleRope
class SimpleRope extends PIXI.Mesh
The rope allows you to draw a texture across several points and then manipulate these points
for (let i = 0; i < 20; i++) {
points.push(new PIXI.Point(i * 50, 0));
};
let rope = new PIXI.SimpleRope(PIXI.Texture.from("snake.png"), points);
Constructor
new PIXI.SimpleRope(texture: PIXI.Texture, points: IPoint[], textureScale: number) → {}
Name | Type | Default | Description |
---|---|---|---|
texture | PIXI.Texture |
The texture to use on the rope. |
|
points | IPoint[] |
An array of PIXI.Point objects to construct this rope. |
|
textureScale | number | 0 |
Optional. Positive values scale rope texture keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture and downsampling here. If set to zero, texture will be stretched instead. |
Summary
Properties from SimpleRope
boolean |
|
Properties inherited from Mesh
PIXI.BLEND_MODES |
|
PIXI.DRAW_MODES |
The way the Mesh should be drawn, can be any of the PIXI.DRAW_MODES constants. |
PIXI.Geometry |
|
T |
Alias for PIXI.Mesh#shader. |
boolean |
|
PIXI.Shader | PIXI.MeshMaterial |
|
number |
|
number |
|
PIXI.State |
|
PIXI.Texture |
The texture that the Mesh uses. Null for non-MeshMaterial shaders |
number |
|
PIXI.Buffer |
|
PIXI.Buffer |
|
PIXI.Texture |
|
number |
|
HTMLCanvasElement |
|
Properties inherited from Container
T[] |
|
number |
The height of the Container, setting this will actually modify the scale to achieve the value set. |
boolean |
|
boolean |
|
boolean |
Should children be sorted by zIndex at the next updateTransform call. |
number |
The width of the Container, setting this will actually modify the scale to achieve the value set. |
Properties inherited from DisplayObject
Methods inherited from Mesh
void |
Updates uv field based on from geometry uv's or batchUvs. |
void |
Updates vertexData field based on transform and vertices. |
boolean |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from Container
Methods inherited from DisplayObject
Inherited Events from Container
Inherited Events from DisplayObject
|
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
Fired when the mouse pointer is moved over a DisplayObject and its descendant's hit testing boundaries. |
|
Capture phase equivalent of |
|
Fired when the mouse pointer exits a DisplayObject and its descendants. |
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
Fired when the pointer is moved over a DisplayObject and its descendant's hit testing boundaries. |
|
Capture phase equivalent of |
|
Fired when the pointer leaves the hit testing boundaries of a DisplayObject and its descendants. |
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
|
|
Capture phase equivalent of |
|
PIXI.FederatedWheelEvent |
Fired when a the user scrolls with the mouse cursor over a DisplayObject. |
PIXI.FederatedWheelEvent |
Capture phase equivalent of |
Public Properties
autoUpdate: boolean = true
re-calculate vertices by rope points each frame