Skip to content

Commit

Permalink
updatable vertexData
Browse files Browse the repository at this point in the history
Former-commit-id: 202515d9327b5367af57c89b6026cf3671b61e25
  • Loading branch information
avin committed Jan 6, 2021
1 parent de12791 commit 3548ebc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/Meshes/Builders/capsuleBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ export interface ICreateCapsuleOptions{

/** Overwrite for the bottom capSubdivisions. */
bottomCapSubdivisions?: number;

/** Internal geometry is supposed to change once created. */
updatable?: boolean;
}

/**
Expand All @@ -271,18 +274,22 @@ export class CapsuleBuilder {
* @param scene The scene the mesh is scoped to.
* @returns Capsule Mesh
*/
public static CreateCapsule(name: string, options: ICreateCapsuleOptions = {
public static CreateCapsule(
name: string,
options: ICreateCapsuleOptions = {
orientation : Vector3.Up(),
subdivisions: 2,
tessellation: 16,
height: 1,
radius: 0.25,
capSubdivisions: 6
}, scene: any): Mesh {

capSubdivisions: 6,
updatable: false,
},
scene: any
): Mesh {
var capsule = new Mesh(name, scene);
var vertexData = VertexData.CreateCapsule(options);
vertexData.applyToMesh(capsule);
vertexData.applyToMesh(capsule, options.updatable);
return capsule;
}
}
}

0 comments on commit 3548ebc

Please sign in to comment.