entity.addComponent(Mesh); entity.addComponent(Mesh, { type: MeshTypes.Ground, options: { width: 2, height: 2 } }); entity.addComponent(Mesh, { type: MeshTypes.Sphere, options: { diameter: 2 } }); entity.addComponent(Mesh, { type: MeshTypes.Url, url: "PATH_TO_MESH" });
{}
Box, Plane, Sphere, Ground
"Box"
Url
Generated using TypeDoc
entity.addComponent(Mesh); entity.addComponent(Mesh, { type: MeshTypes.Ground, options: { width: 2, height: 2 } }); entity.addComponent(Mesh, { type: MeshTypes.Sphere, options: { diameter: 2 } }); entity.addComponent(Mesh, { type: MeshTypes.Url, url: "PATH_TO_MESH" });