|
@@ -301,11 +301,11 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `size` sets the size (float) of each box side (default 1)
|
|
* * The parameter `size` sets the size (float) of each box side (default 1)
|
|
* * You can set some different box dimensions by using the parameters `width`, `height` and `depth` (all by default have the same value of `size`)
|
|
* * You can set some different box dimensions by using the parameters `width`, `height` and `depth` (all by default have the same value of `size`)
|
|
* * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of 6 Color3 elements) and `faceUV` (an array of 6 Vector4 elements)
|
|
* * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of 6 Color3 elements) and `faceUV` (an array of 6 Vector4 elements)
|
|
- * * Please read this tutorial : http://doc.babylonjs.com/tutorials/CreateBox_Per_Face_Textures_And_Colors
|
|
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * Please read this tutorial : https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#box
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#box
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
@@ -331,14 +331,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `segments` sets the sphere number of horizontal stripes (positive integer, default 32)
|
|
* * The parameter `segments` sets the sphere number of horizontal stripes (positive integer, default 32)
|
|
* * You can create an unclosed sphere with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference (latitude) : 2 x PI x ratio
|
|
* * You can create an unclosed sphere with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference (latitude) : 2 x PI x ratio
|
|
* * You can create an unclosed sphere on its height with the parameter `slice` (positive float, default1), valued between 0 and 1, what is the height ratio (longitude)
|
|
* * You can create an unclosed sphere on its height with the parameter `slice` (positive float, default1), valued between 0 and 1, what is the height ratio (longitude)
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the sphere mesh
|
|
* @returns the sphere mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#sphere
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#sphere
|
|
*/
|
|
*/
|
|
public static CreateSphere(name: string, options: { segments?: number, diameter?: number, diameterX?: number, diameterY?: number, diameterZ?: number, arc?: number, slice?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean }, scene: any): Mesh {
|
|
public static CreateSphere(name: string, options: { segments?: number, diameter?: number, diameterX?: number, diameterY?: number, diameterZ?: number, arc?: number, slice?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean }, scene: any): Mesh {
|
|
var sphere = new Mesh(name, scene);
|
|
var sphere = new Mesh(name, scene);
|
|
@@ -358,14 +358,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `radius` sets the radius size (float) of the polygon (default 0.5)
|
|
* * The parameter `radius` sets the radius size (float) of the polygon (default 0.5)
|
|
* * The parameter `tessellation` sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc
|
|
* * The parameter `tessellation` sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc
|
|
* * You can create an unclosed polygon with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference : 2 x PI x ratio
|
|
* * You can create an unclosed polygon with the parameter `arc` (positive float, default 1), valued between 0 and 1, what is the ratio of the circumference : 2 x PI x ratio
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the plane polygonal mesh
|
|
* @returns the plane polygonal mesh
|
|
- * @see http://doc.babylonjs.com/how_to/set_shapes#disc-or-regular-polygon
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#disc-or-regular-polygon
|
|
*/
|
|
*/
|
|
public static CreateDisc(name: string, options: { radius?: number, tessellation?: number, arc?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Nullable<Scene> = null): Mesh {
|
|
public static CreateDisc(name: string, options: { radius?: number, tessellation?: number, arc?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Nullable<Scene> = null): Mesh {
|
|
var disc = new Mesh(name, scene);
|
|
var disc = new Mesh(name, scene);
|
|
@@ -386,14 +386,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters `radiusX`, `radiusY` and `radiusZ` (all by default have the same value of `radius`)
|
|
* * You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters `radiusX`, `radiusY` and `radiusZ` (all by default have the same value of `radius`)
|
|
* * The parameter `subdivisions` sets the number of subdivisions (postive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size
|
|
* * The parameter `subdivisions` sets the number of subdivisions (postive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size
|
|
* * The parameter `flat` (boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface
|
|
* * The parameter `flat` (boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the icosahedron mesh
|
|
* @returns the icosahedron mesh
|
|
- * @see http://doc.babylonjs.com/how_to/polyhedra_shapes#icosphere
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/polyhedra_shapes#icosphere
|
|
*/
|
|
*/
|
|
public static CreateIcoSphere(name: string, options: { radius?: number, radiusX?: number, radiusY?: number, radiusZ?: number, flat?: boolean, subdivisions?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean }, scene: Scene): Mesh {
|
|
public static CreateIcoSphere(name: string, options: { radius?: number, radiusX?: number, radiusY?: number, radiusZ?: number, flat?: boolean, subdivisions?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean }, scene: Scene): Mesh {
|
|
var sphere = new Mesh(name, scene);
|
|
var sphere = new Mesh(name, scene);
|
|
@@ -415,9 +415,9 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
* * The parameter `closePath` (boolean, default false) creates a seam between the first and the last points of each path of the path array
|
|
* * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
* * The parameter `offset` (positive integer, default : rounded half size of the pathArray length), is taken in account only if the `pathArray` is containing a single path
|
|
* * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
* * It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
|
|
- * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#ribbon
|
|
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#ribbon
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
* * The parameter `uvs` is an optional flat array of `Vector2` to update/set each ribbon vertex with its own custom UV values instead of the computed ones
|
|
* * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
* * The parameters `colors` is an optional flat array of `Color4` to set/update each ribbon vertex with its own custom color values
|
|
@@ -428,8 +428,8 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the ribbon mesh
|
|
* @returns the ribbon mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Ribbon_Tutorial
|
|
|
|
- * @see http://doc.babylonjs.com/tutorials/Parametric_Shapes
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/ribbon_tutorial
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
*/
|
|
*/
|
|
public static CreateRibbon(name: string, options: { pathArray: Vector3[][], closeArray?: boolean, closePath?: boolean, offset?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean, uvs?: Vector2[], colors?: Color4[] }, scene: Nullable<Scene> = null): Mesh {
|
|
public static CreateRibbon(name: string, options: { pathArray: Vector3[][], closeArray?: boolean, closePath?: boolean, offset?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean, uvs?: Vector2[], colors?: Color4[] }, scene: Nullable<Scene> = null): Mesh {
|
|
var pathArray = options.pathArray;
|
|
var pathArray = options.pathArray;
|
|
@@ -569,15 +569,15 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * Each array (color or UVs) is always ordered the same way : the first element is the bottom cap, the last element is the top cap. The other elements are each a ring surface.
|
|
* * Each array (color or UVs) is always ordered the same way : the first element is the bottom cap, the last element is the top cap. The other elements are each a ring surface.
|
|
* * If `enclose` is false, a ring surface is one element.
|
|
* * If `enclose` is false, a ring surface is one element.
|
|
* * If `enclose` is true, a ring surface is 3 successive elements in the array : the tubular surface, then the two closing faces.
|
|
* * If `enclose` is true, a ring surface is 3 successive elements in the array : the tubular surface, then the two closing faces.
|
|
- * * Example how to set colors and textures on a sliced cylinder : http://www.html5gamedevs.com/topic/17945-creating-a-closed-slice-of-a-cylinder/#comment-106379
|
|
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * Example how to set colors and textures on a sliced cylinder : https://www.html5gamedevs.com/topic/17945-creating-a-closed-slice-of-a-cylinder/#comment-106379
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the cylinder mesh
|
|
* @returns the cylinder mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#cylinder-or-cone
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#cylinder-or-cone
|
|
*/
|
|
*/
|
|
public static CreateCylinder(name: string, options: { height?: number, diameterTop?: number, diameterBottom?: number, diameter?: number, tessellation?: number, subdivisions?: number, arc?: number, faceColors?: Color4[], faceUV?: Vector4[], updatable?: boolean, hasRings?: boolean, enclose?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
public static CreateCylinder(name: string, options: { height?: number, diameterTop?: number, diameterBottom?: number, diameter?: number, tessellation?: number, subdivisions?: number, arc?: number, faceColors?: Color4[], faceUV?: Vector4[], updatable?: boolean, hasRings?: boolean, enclose?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
var cylinder = new Mesh(name, scene);
|
|
var cylinder = new Mesh(name, scene);
|
|
@@ -597,14 +597,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `diameter` sets the diameter size (float) of the torus (default 1)
|
|
* * The parameter `diameter` sets the diameter size (float) of the torus (default 1)
|
|
* * The parameter `thickness` sets the diameter size of the tube of the torus (float, default 0.5)
|
|
* * The parameter `thickness` sets the diameter size of the tube of the torus (float, default 0.5)
|
|
* * The parameter `tessellation` sets the number of torus sides (postive integer, default 16)
|
|
* * The parameter `tessellation` sets the number of torus sides (postive integer, default 16)
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the torus mesh
|
|
* @returns the torus mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#torus
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#torus
|
|
*/
|
|
*/
|
|
public static CreateTorus(name: string, options: { diameter?: number, thickness?: number, tessellation?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
public static CreateTorus(name: string, options: { diameter?: number, thickness?: number, tessellation?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
var torus = new Mesh(name, scene);
|
|
var torus = new Mesh(name, scene);
|
|
@@ -625,14 +625,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `radialSegments` sets the number of sides on each tube segments (positive integer, default 32)
|
|
* * The parameter `radialSegments` sets the number of sides on each tube segments (positive integer, default 32)
|
|
* * The parameter `tubularSegments` sets the number of tubes to decompose the knot into (positive integer, default 32)
|
|
* * The parameter `tubularSegments` sets the number of tubes to decompose the knot into (positive integer, default 32)
|
|
* * The parameters `p` and `q` are the number of windings on each axis (positive integers, default 2 and 3)
|
|
* * The parameters `p` and `q` are the number of windings on each axis (positive integers, default 2 and 3)
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the torus knot mesh
|
|
* @returns the torus knot mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#torus-knot
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#torus-knot
|
|
*/
|
|
*/
|
|
public static CreateTorusKnot(name: string, options: { radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, p?: number, q?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
public static CreateTorusKnot(name: string, options: { radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, p?: number, q?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: any): Mesh {
|
|
var torusKnot = new Mesh(name, scene);
|
|
var torusKnot = new Mesh(name, scene);
|
|
@@ -655,10 +655,10 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter
|
|
* * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter
|
|
* * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point
|
|
* * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point
|
|
* * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)
|
|
* * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)
|
|
- * * Updating a simple Line mesh, you just need to update every line in the `lines` array : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
|
|
|
+ * * Updating a simple Line mesh, you just need to update every line in the `lines` array : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
* * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines
|
|
* * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#line-system
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#line-system
|
|
* @param name defines the name of the new line system
|
|
* @param name defines the name of the new line system
|
|
* @param options defines the options used to create the line system
|
|
* @param options defines the options used to create the line system
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
@@ -715,12 +715,12 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
* A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
* * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
* * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
* * The parameter `points` is an array successive Vector3
|
|
* * The parameter `points` is an array successive Vector3
|
|
- * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
* * The optional parameter `colors` is an array of successive Color4, one per line point
|
|
* * The optional parameter `colors` is an array of successive Color4, one per line point
|
|
* * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need alpha blending (faster)
|
|
* * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need alpha blending (faster)
|
|
* * When updating an instance, remember that only point positions can change, not the number of points
|
|
* * When updating an instance, remember that only point positions can change, not the number of points
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#lines
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#lines
|
|
* @param name defines the name of the new line system
|
|
* @param name defines the name of the new line system
|
|
* @param options defines the options used to create the line system
|
|
* @param options defines the options used to create the line system
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
@@ -740,14 +740,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `dashNb` is the intended total number of dashes (positive integer, default 200)
|
|
* * The parameter `dashNb` is the intended total number of dashes (positive integer, default 200)
|
|
* * The parameter `dashSize` is the size of the dashes relatively the dash number (positive float, default 3)
|
|
* * The parameter `dashSize` is the size of the dashes relatively the dash number (positive float, default 3)
|
|
* * The parameter `gapSize` is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)
|
|
* * The parameter `gapSize` is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)
|
|
- * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
* * When updating an instance, remember that only point positions can change, not the number of points
|
|
* * When updating an instance, remember that only point positions can change, not the number of points
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the dashed line mesh
|
|
* @returns the dashed line mesh
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#dashed-lines
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#dashed-lines
|
|
*/
|
|
*/
|
|
public static CreateDashedLines(name: string, options: { points: Vector3[], dashSize?: number, gapSize?: number, dashNb?: number, updatable?: boolean, instance?: LinesMesh }, scene: Nullable<Scene> = null): LinesMesh {
|
|
public static CreateDashedLines(name: string, options: { points: Vector3[], dashSize?: number, gapSize?: number, dashNb?: number, updatable?: boolean, instance?: LinesMesh }, scene: Nullable<Scene> = null): LinesMesh {
|
|
var points = options.points;
|
|
var points = options.points;
|
|
@@ -819,20 +819,19 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
* * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.
|
|
* * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
* * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.
|
|
* * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
* * The parameter `scale` (float, default 1) is the value to scale the shape.
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
* * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
* * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the extruded shape mesh
|
|
* @returns the extruded shape mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Parametric_Shapes
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
*/
|
|
*/
|
|
public static ExtrudeShape(name: string, options: { shape: Vector3[], path: Vector3[], scale?: number, rotation?: number, cap?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Nullable<Scene> = null): Mesh {
|
|
public static ExtrudeShape(name: string, options: { shape: Vector3[], path: Vector3[], scale?: number, rotation?: number, cap?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Nullable<Scene> = null): Mesh {
|
|
var path = options.path;
|
|
var path = options.path;
|
|
@@ -859,20 +858,20 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
* * It must returns a float value that will be the scale value applied to the shape on each path point
|
|
* * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
* * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
* * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
* * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray`
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
|
|
- * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#extruded-shape
|
|
|
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape
|
|
* * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
* * Remember you can only change the shape or path point positions, not their number when updating an extruded shape
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the custom extruded shape mesh
|
|
* @returns the custom extruded shape mesh
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
|
- * @see http://doc.babylonjs.com/tutorials/Parametric_Shapes
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#custom-extruded-shapes
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes
|
|
*/
|
|
*/
|
|
public static ExtrudeShapeCustom(name: string, options: { shape: Vector3[], path: Vector3[], scaleFunction?: any, rotationFunction?: any, ribbonCloseArray?: boolean, ribbonClosePath?: boolean, cap?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Scene): Mesh {
|
|
public static ExtrudeShapeCustom(name: string, options: { shape: Vector3[], path: Vector3[], scaleFunction?: any, rotationFunction?: any, ribbonCloseArray?: boolean, ribbonClosePath?: boolean, cap?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Scene): Mesh {
|
|
var path = options.path;
|
|
var path = options.path;
|
|
@@ -898,16 +897,16 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `clip` (positive integer, default 0) is the number of sides to not create without effecting the general shape of the sides
|
|
* * The parameter `clip` (positive integer, default 0) is the number of sides to not create without effecting the general shape of the sides
|
|
* * The parameter `arc` (positive float, default 1) is the ratio of the lathe. 0.5 builds for instance half a lathe, so an opened shape
|
|
* * The parameter `arc` (positive float, default 1) is the ratio of the lathe. 0.5 builds for instance half a lathe, so an opened shape
|
|
* * The parameter `closed` (boolean, default true) opens/closes the lathe circumference. This should be set to false when used with the parameter "arc"
|
|
* * The parameter `closed` (boolean, default true) opens/closes the lathe circumference. This should be set to false when used with the parameter "arc"
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the lathe mesh
|
|
* @returns the lathe mesh
|
|
- * @see http://doc.babylonjs.com/how_to/parametric_shapes#lathe
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#lathe
|
|
*/
|
|
*/
|
|
public static CreateLathe(name: string, options: { shape: Vector3[], radius?: number, tessellation?: number, clip?: number, arc?: number, closed?: boolean, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, cap?: number, invertUV?: boolean }, scene: Scene): Mesh {
|
|
public static CreateLathe(name: string, options: { shape: Vector3[], radius?: number, tessellation?: number, clip?: number, arc?: number, closed?: boolean, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, cap?: number, invertUV?: boolean }, scene: Scene): Mesh {
|
|
var arc: number = options.arc ? ((options.arc <= 0 || options.arc > 1) ? 1.0 : options.arc) : 1.0;
|
|
var arc: number = options.arc ? ((options.arc <= 0 || options.arc > 1) ? 1.0 : options.arc) : 1.0;
|
|
@@ -955,14 +954,14 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `size` sets the size (float) of both sides of the plane at once (default 1)
|
|
* * The parameter `size` sets the size (float) of both sides of the plane at once (default 1)
|
|
* * You can set some different plane dimensions by using the parameters `width` and `height` (both by default have the same value of `size`)
|
|
* * You can set some different plane dimensions by using the parameters `width` and `height` (both by default have the same value of `size`)
|
|
* * The parameter `sourcePlane` is a Plane instance. It builds a mesh plane from a Math plane
|
|
* * The parameter `sourcePlane` is a Plane instance. It builds a mesh plane from a Math plane
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the plane mesh
|
|
* @returns the plane mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#plane
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#plane
|
|
*/
|
|
*/
|
|
public static CreatePlane(name: string, options: { size?: number, width?: number, height?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean, sourcePlane?: Plane }, scene: Scene): Mesh {
|
|
public static CreatePlane(name: string, options: { size?: number, width?: number, height?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, updatable?: boolean, sourcePlane?: Plane }, scene: Scene): Mesh {
|
|
var plane = new Mesh(name, scene);
|
|
var plane = new Mesh(name, scene);
|
|
@@ -997,7 +996,7 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the ground mesh
|
|
* @returns the ground mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#plane
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#ground
|
|
*/
|
|
*/
|
|
public static CreateGround(name: string, options: { width?: number, height?: number, subdivisions?: number, subdivisionsX?: number, subdivisionsY?: number, updatable?: boolean }, scene: any): Mesh {
|
|
public static CreateGround(name: string, options: { width?: number, height?: number, subdivisions?: number, subdivisionsX?: number, subdivisionsY?: number, updatable?: boolean }, scene: any): Mesh {
|
|
var ground = new GroundMesh(name, scene);
|
|
var ground = new GroundMesh(name, scene);
|
|
@@ -1031,7 +1030,7 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the tiled ground mesh
|
|
* @returns the tiled ground mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#tiled-ground
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#tiled-ground
|
|
*/
|
|
*/
|
|
public static CreateTiledGround(name: string, options: { xmin: number, zmin: number, xmax: number, zmax: number, subdivisions?: { w: number; h: number; }, precision?: { w: number; h: number; }, updatable?: boolean }, scene: Scene): Mesh {
|
|
public static CreateTiledGround(name: string, options: { xmin: number, zmin: number, xmax: number, zmax: number, subdivisions?: { w: number; h: number; }, precision?: { w: number; h: number; }, updatable?: boolean }, scene: Scene): Mesh {
|
|
var tiledGround = new Mesh(name, scene);
|
|
var tiledGround = new Mesh(name, scene);
|
|
@@ -1059,8 +1058,8 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the ground mesh
|
|
* @returns the ground mesh
|
|
- * @see http://doc.babylonjs.com/babylon101/height_map
|
|
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#ground-from-a-height-map
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/babylon101/height_map
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#ground-from-a-height-map
|
|
*/
|
|
*/
|
|
public static CreateGroundFromHeightMap(name: string, url: string, options: { width?: number, height?: number, subdivisions?: number, minHeight?: number, maxHeight?: number, colorFilter?: Color3, alphaFilter?: number, updatable?: boolean, onReady?: (mesh: GroundMesh) => void }, scene: Scene): GroundMesh {
|
|
public static CreateGroundFromHeightMap(name: string, url: string, options: { width?: number, height?: number, subdivisions?: number, minHeight?: number, maxHeight?: number, colorFilter?: Color3, alphaFilter?: number, updatable?: boolean, onReady?: (mesh: GroundMesh) => void }, scene: Scene): GroundMesh {
|
|
var width = options.width || 10.0;
|
|
var width = options.width || 10.0;
|
|
@@ -1179,12 +1178,12 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
/**
|
|
/**
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
- * @see http://doc.babylonjs.com/tutorials/CreateBox_Per_Face_Textures_And_Colors
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the polygon mesh
|
|
* @returns the polygon mesh
|
|
- */
|
|
|
|
|
|
+ */
|
|
public static ExtrudePolygon(name: string, options: { shape: Vector3[], holes?: Vector3[][], depth?: number, faceUV?: Vector4[], faceColors?: Color4[], updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Scene): Mesh {
|
|
public static ExtrudePolygon(name: string, options: { shape: Vector3[], holes?: Vector3[][], depth?: number, faceUV?: Vector4[], faceColors?: Color4[], updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Scene): Mesh {
|
|
return MeshBuilder.CreatePolygon(name, options, scene);
|
|
return MeshBuilder.CreatePolygon(name, options, scene);
|
|
}
|
|
}
|
|
@@ -1198,18 +1197,18 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * The parameter `radiusFunction` (javascript function, default null) is a vanilla javascript function. If it is not null, it overwrittes the parameter `radius`
|
|
* * The parameter `radiusFunction` (javascript function, default null) is a vanilla javascript function. If it is not null, it overwrittes the parameter `radius`
|
|
* * This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path. It must return a radius value (positive float)
|
|
* * This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path. It must return a radius value (positive float)
|
|
* * The parameter `arc` (positive float, maximum 1, default 1) is the ratio to apply to the tube circumference : 2 x PI x arc
|
|
* * The parameter `arc` (positive float, maximum 1, default 1) is the ratio to apply to the tube circumference : 2 x PI x arc
|
|
- * * The parameter `cap` sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
|
|
- * * The optional parameter `instance` is an instance of an existing Tube object to be updated with the passed `pathArray` parameter : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#tube
|
|
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL
|
|
|
|
+ * * The optional parameter `instance` is an instance of an existing Tube object to be updated with the passed `pathArray` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#tube
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the tube mesh
|
|
* @returns the tube mesh
|
|
- * @see http://doc.babylonjs.com/tutorials/Parametric_Shapes
|
|
|
|
- * @see http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#tube
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/set_shapes#tube
|
|
*/
|
|
*/
|
|
public static CreateTube(name: string, options: { path: Vector3[], radius?: number, tessellation?: number, radiusFunction?: { (i: number, distance: number): number; }, cap?: number, arc?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Scene): Mesh {
|
|
public static CreateTube(name: string, options: { path: Vector3[], radius?: number, tessellation?: number, radiusFunction?: { (i: number, distance: number): number; }, cap?: number, arc?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4, instance?: Mesh, invertUV?: boolean }, scene: Scene): Mesh {
|
|
var path = options.path;
|
|
var path = options.path;
|
|
@@ -1333,16 +1332,16 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overwrittes the parameter `type`
|
|
* * You can build other polyhedron types than the 15 embbeded ones by setting the parameter `custom` (`polyhedronObject`, default null). If you set the parameter `custom`, this overwrittes the parameter `type`
|
|
* * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron
|
|
* * A `polyhedronObject` is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron
|
|
* * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`)
|
|
* * You can set the color and the UV of each side of the polyhedron with the parameters `faceColors` (Color4, default `(1, 1, 1, 1)`) and faceUV (Vector4, default `(0, 0, 1, 1)`)
|
|
- * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : http://doc.babylonjs.com/tutorials/CreateBox_Per_Face_Textures_And_Colors
|
|
|
|
|
|
+ * * To understand how to set `faceUV` or `faceColors`, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors
|
|
* * The parameter `flat` (boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case, `faceColors` and `faceUV` are ignored
|
|
* * The parameter `flat` (boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case, `faceColors` and `faceUV` are ignored
|
|
- * * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
|
|
- * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : http://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
|
|
|
|
+ * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
|
|
|
|
+ * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
* @param name defines the name of the mesh
|
|
* @param name defines the name of the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the polyhedron mesh
|
|
* @returns the polyhedron mesh
|
|
- * @see http://doc.babylonjs.com/how_to/polyhedra_shapes
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/polyhedra_shapes
|
|
*/
|
|
*/
|
|
public static CreatePolyhedron(name: string, options: { type?: number, size?: number, sizeX?: number, sizeY?: number, sizeZ?: number, custom?: any, faceUV?: Vector4[], faceColors?: Color4[], flat?: boolean, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Scene): Mesh {
|
|
public static CreatePolyhedron(name: string, options: { type?: number, size?: number, sizeX?: number, sizeY?: number, sizeZ?: number, custom?: any, faceUV?: Vector4[], faceColors?: Color4[], flat?: boolean, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Scene): Mesh {
|
|
var polyhedron = new Mesh(name, scene);
|
|
var polyhedron = new Mesh(name, scene);
|
|
@@ -1369,7 +1368,7 @@ Mesh.CreateDecal = (name: string, sourceMesh: AbstractMesh, position: Vector3, n
|
|
* @param options defines the options used to create the mesh
|
|
* @param options defines the options used to create the mesh
|
|
* @param scene defines the hosting scene
|
|
* @param scene defines the hosting scene
|
|
* @returns the decal mesh
|
|
* @returns the decal mesh
|
|
- * @see http://doc.babylonjs.com/how_to/decals
|
|
|
|
|
|
+ * @see https://doc.babylonjs.com/how_to/decals
|
|
*/
|
|
*/
|
|
public static CreateDecal(name: string, sourceMesh: AbstractMesh, options: { position?: Vector3, normal?: Vector3, size?: Vector3, angle?: number }): Mesh {
|
|
public static CreateDecal(name: string, sourceMesh: AbstractMesh, options: { position?: Vector3, normal?: Vector3, size?: Vector3, angle?: number }): Mesh {
|
|
var indices = <IndicesArray>sourceMesh.getIndices();
|
|
var indices = <IndicesArray>sourceMesh.getIndices();
|