Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(texture, verticesX, verticesY)
{
const planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);
const meshMaterial = new MeshMaterial(Texture.WHITE);
super(planeGeometry, meshMaterial);
// lets call the setter to ensure all necessary updates are performed
this.texture = texture;
}
constructor(texture = Texture.EMPTY, vertices, uvs, indices, drawMode)
{
const geometry = new MeshGeometry(vertices, uvs, indices);
geometry.getBuffer('aVertexPosition').static = false;
const meshMaterial = new MeshMaterial(texture);
super(geometry, meshMaterial, null, drawMode);
/**
* upload vertices buffer each frame
* @member {boolean}
*/
this.autoUpdate = true;
}
constructor(texture, points)
{
const ropeGeometry = new RopeGeometry(texture.height, points);
const meshMaterial = new MeshMaterial(texture);
super(ropeGeometry, meshMaterial);
/**
* re-calculate vertices by rope points each frame
*
* @member {boolean}
*/
this.autoUpdate = true;
}