Constructor options used for MeshRope instances. Allows configuration of a rope-like mesh that follows a series of points with a texture applied.
MeshRope
// Create a basic rope with two pointsconst rope = new MeshRope({ texture: Texture.from('snake.png'), points: [ new Point(0, 0), new Point(100, 0) ]});// Create a rope with high-quality texture scalingconst highQualityRope = new MeshRope({ texture: Texture.from('rope-hd.png'), points: [ new Point(0, 0), new Point(50, 25), new Point(100, 0) ], textureScale: 0.5 // Downscale HD texture for better quality}); Copy
// Create a basic rope with two pointsconst rope = new MeshRope({ texture: Texture.from('snake.png'), points: [ new Point(0, 0), new Point(100, 0) ]});// Create a rope with high-quality texture scalingconst highQualityRope = new MeshRope({ texture: Texture.from('rope-hd.png'), points: [ new Point(0, 0), new Point(50, 25), new Point(100, 0) ], textureScale: 0.5 // Downscale HD texture for better quality});
An array of points that determine the rope's shape and path
The texture to use on the rope
Optional
Controls how the texture is scaled along the rope.
0 Copy
0
Constructor options used for
MeshRope
instances. Allows configuration of a rope-like mesh that follows a series of points with a texture applied.Example
See