Chapter 02BJS Mesh API
Mesh Classes
AbstractMesh Mesh extends AbstractMesh LinesMesh extends Mesh TrailMesh extends Mesh GroundMesh extends Mesh InstancedMesh extends AbstractMesh InstancedLinesMesh??
Builder Classes and the Mesh Class
All of the builder files export a builder class containing a create method. Most of the create methods create a Mesh
object or a , then create a VertexData
object and call VertexData.
.
All builders except TiledBoxBuilder
and TiledPlaneBuilder
also define a create method for the Mesh
class. Each of the create methods call builder class’ create method, so it is inefficient to call the Mesh methods; just use the builder methods.
MeshBuilder API
-
CreateBox(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateCylinder(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateDashedLines(name: string, options: object, scene?: Nullable<Scene>): LinesMesh
-
CreateDecal(name: string, sourceMesh: AbstractMesh, options: object): Mesh
-
CreateDisc(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateGround(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateGroundFromHeightMap(name: string, url: string, options: object, scene?: Nullable<Scene>): GroundMesh
-
CreateIcoSphere(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateLathe(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateLines(name: string, options: object, scene?: Nullable<Scene>): LinesMesh
-
CreateLineSystem(name: string, options: object, scene: Nullable<Scene>): LinesMesh
-
CreatePlane(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreatePolygon(name: string, options: object, scene?: Nullable<Scene>, earcutInjection?: any): Mesh
-
CreatePolyhedron(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateRibbon(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateSphere(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTiledBox(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTiledGround(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTiledPlane(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTorus(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTorusKnot(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
CreateTube(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
ExtrudePolygon(name: string, options: object, scene?: Nullable<Scene>, earcutInjection?: any): Mesh
-
ExtrudeShape(name: string, options: object, scene?: Nullable<Scene>): Mesh
-
ExtrudeShapeCustom(name: string, options: object, scene?: Nullable<cene>): Mesh