|
@@ -25,6 +25,7 @@ import { Constants } from "../Engines/constants";
|
|
|
import { SerializationHelper } from "../Misc/decorators";
|
|
|
import { Logger } from "../Misc/logger";
|
|
|
import { _TypeStore } from '../Misc/typeStore';
|
|
|
+import { _DevTools } from '../Misc/devTools';
|
|
|
|
|
|
declare type LinesMesh = import("./linesMesh").LinesMesh;
|
|
|
declare type InstancedMesh = import("./instancedMesh").InstancedMesh;
|
|
@@ -2404,12 +2405,12 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
// Instances
|
|
|
/** @hidden */
|
|
|
public static _instancedMeshFactory(name: string, mesh: Mesh): InstancedMesh {
|
|
|
- throw "Import InstancedMesh before creating instances.";
|
|
|
+ throw _DevTools.WarnImport("InstancedMesh");
|
|
|
}
|
|
|
|
|
|
/** @hidden */
|
|
|
public static _PhysicsImpostorParser(scene: Scene, physicObject: IPhysicsEnabledObject, jsonObject: any): PhysicsImpostor {
|
|
|
- throw "Import PhysicsImpostor before parsing physics objects.";
|
|
|
+ throw _DevTools.WarnImport("PhysicsImpostor");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2699,7 +2700,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
// Statics
|
|
|
/** @hidden */
|
|
|
public static _GroundMeshParser = (parsedMesh: any, scene: Scene): Mesh => {
|
|
|
- throw "Import GroundMesh before trying to parse it.";
|
|
|
+ throw _DevTools.WarnImport("GroundMesh");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3003,7 +3004,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateRibbon(name: string, pathArray: Vector3[][], closeArray: boolean, closePath: boolean, offset: number, scene?: Scene, updatable?: boolean, sideOrientation?: number, instance?: Mesh): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3017,7 +3018,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateDisc(name: string, radius: number, tessellation: number, scene: Nullable<Scene> = null, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3030,7 +3031,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateBox(name: string, size: number, scene: Nullable<Scene> = null, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3044,7 +3045,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateSphere(name: string, segments: number, diameter: number, scene?: Scene, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3061,7 +3062,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateCylinder(name: string, height: number, diameterTop: number, diameterBottom: number, tessellation: number, subdivisions: any, scene?: Scene, updatable?: any, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
// Torus (Code from SharpDX.org)
|
|
@@ -3077,7 +3078,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateTorus(name: string, diameter: number, thickness: number, tessellation: number, scene?: Scene, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3095,7 +3096,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateTorusKnot(name: string, radius: number, tube: number, radialSegments: number, tubularSegments: number, p: number, q: number, scene?: Scene, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3108,7 +3109,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateLines(name: string, points: Vector3[], scene: Nullable<Scene> = null, updatable: boolean = false, instance: Nullable<LinesMesh> = null): LinesMesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3124,7 +3125,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateDashedLines(name: string, points: Vector3[], dashSize: number, gapSize: number, dashNb: number, scene: Nullable<Scene> = null, updatable?: boolean, instance?: LinesMesh): LinesMesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3145,7 +3146,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreatePolygon(name: string, shape: Vector3[], scene: Scene, holes?: Vector3[][], updatable?: boolean, sideOrientation?: number, earcutInjection = earcut): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3162,7 +3163,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static ExtrudePolygon(name: string, shape: Vector3[], depth: number, scene: Scene, holes?: Vector3[][], updatable?: boolean, sideOrientation?: number, earcutInjection = earcut): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3183,7 +3184,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static ExtrudeShape(name: string, shape: Vector3[], path: Vector3[], scale: number, rotation: number, cap: number, scene: Nullable<Scene> = null, updatable?: boolean, sideOrientation?: number, instance?: Mesh): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3207,7 +3208,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static ExtrudeShapeCustom(name: string, shape: Vector3[], path: Vector3[], scaleFunction: Function, rotationFunction: Function, ribbonCloseArray: boolean, ribbonClosePath: boolean, cap: number, scene: Scene, updatable?: boolean, sideOrientation?: number, instance?: Mesh): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3224,7 +3225,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateLathe(name: string, shape: Vector3[], radius: number, tessellation: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3237,7 +3238,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreatePlane(name: string, size: number, scene: Scene, updatable?: boolean, sideOrientation?: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3252,7 +3253,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateGround(name: string, width: number, height: number, subdivisions: number, scene?: Scene, updatable?: boolean): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3270,7 +3271,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateTiledGround(name: string, xmin: number, zmin: number, xmax: number, zmax: number, subdivisions: { w: number; h: number; }, precision: { w: number; h: number; }, scene: Scene, updatable?: boolean): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3291,7 +3292,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateGroundFromHeightMap(name: string, url: string, width: number, height: number, subdivisions: number, minHeight: number, maxHeight: number, scene: Scene, updatable?: boolean, onReady?: (mesh: GroundMesh) => void, alphaFilter?: number): GroundMesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3313,7 +3314,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateTube(name: string, path: Vector3[], radius: number, tessellation: number, radiusFunction: { (i: number, distance: number): number; }, cap: number, scene: Scene, updatable?: boolean, sideOrientation?: number, instance?: Mesh): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3336,7 +3337,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreatePolyhedron(name: string, options: { type?: number, size?: number, sizeX?: number, sizeY?: number, sizeZ?: number, custom?: any, faceUV?: Vector4[], faceColors?: Color4[], updatable?: boolean, sideOrientation?: number }, scene: Scene): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3355,7 +3356,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @see http://doc.babylonjs.com/how_to/polyhedra_shapes#icosphere
|
|
|
*/
|
|
|
public static CreateIcoSphere(name: string, options: { radius?: number, flat?: boolean, subdivisions?: number, sideOrientation?: number, updatable?: boolean }, scene: Scene): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3371,7 +3372,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
|
|
|
* @returns a new Mesh
|
|
|
*/
|
|
|
public static CreateDecal(name: string, sourceMesh: AbstractMesh, position: Vector3, normal: Vector3, size: Vector3, angle: number): Mesh {
|
|
|
- throw "Import MeshBuilder before creating meshes.";
|
|
|
+ throw _DevTools.WarnImport("MeshBuilder");
|
|
|
}
|
|
|
|
|
|
// Skeletons
|