|
@@ -1387,7 +1387,7 @@ var BABYLON;
|
|
|
*/
|
|
|
PointerEventTypes.POINTERTAP = 0x20;
|
|
|
/**
|
|
|
- * The pointertap event is fired when a the object has been touched and released twice without drag.
|
|
|
+ * The pointerdoubletap event is fired when a the object has been touched and released twice without drag.
|
|
|
*/
|
|
|
PointerEventTypes.POINTERDOUBLETAP = 0x40;
|
|
|
return PointerEventTypes;
|
|
@@ -1559,9 +1559,9 @@ var BABYLON;
|
|
|
return this;
|
|
|
};
|
|
|
/**
|
|
|
- * Returns a new {BABYLON.Color4} object from the current Color3 and the given alpha
|
|
|
- * @param alpha defines the alpha component on the new {BABYLON.Color4} object (default is 1)
|
|
|
- * @returns a new {BABYLON.Color4} object
|
|
|
+ * Returns a new Color4 object from the current Color3 and the given alpha
|
|
|
+ * @param alpha defines the alpha component on the new Color4 object (default is 1)
|
|
|
+ * @returns a new Color4 object
|
|
|
*/
|
|
|
Color3.prototype.toColor4 = function (alpha) {
|
|
|
if (alpha === void 0) { alpha = 1; }
|
|
@@ -3232,9 +3232,12 @@ var BABYLON;
|
|
|
* @returns the current updated Vector3
|
|
|
*/
|
|
|
Vector3.prototype.minimizeInPlaceFromFloats = function (x, y, z) {
|
|
|
- this.x = Math.min(this.x, x);
|
|
|
- this.y = Math.min(this.y, y);
|
|
|
- this.z = Math.min(this.z, z);
|
|
|
+ if (x < this.x)
|
|
|
+ this.x = x;
|
|
|
+ if (y < this.y)
|
|
|
+ this.y = y;
|
|
|
+ if (z < this.z)
|
|
|
+ this.z = z;
|
|
|
return this;
|
|
|
};
|
|
|
/**
|
|
@@ -3245,9 +3248,12 @@ var BABYLON;
|
|
|
* @returns the current updated Vector3
|
|
|
*/
|
|
|
Vector3.prototype.maximizeInPlaceFromFloats = function (x, y, z) {
|
|
|
- this.x = Math.max(this.x, x);
|
|
|
- this.y = Math.max(this.y, y);
|
|
|
- this.z = Math.max(this.z, z);
|
|
|
+ if (x > this.x)
|
|
|
+ this.x = x;
|
|
|
+ if (y > this.y)
|
|
|
+ this.y = y;
|
|
|
+ if (z > this.z)
|
|
|
+ this.z = z;
|
|
|
return this;
|
|
|
};
|
|
|
Object.defineProperty(Vector3.prototype, "isNonUniform", {
|
|
@@ -3404,10 +3410,11 @@ var BABYLON;
|
|
|
* @return the angle between vector0 and vector1
|
|
|
*/
|
|
|
Vector3.GetAngleBetweenVectors = function (vector0, vector1, normal) {
|
|
|
- var v0 = vector0.clone().normalize();
|
|
|
- var v1 = vector1.clone().normalize();
|
|
|
+ var v0 = MathTmp.Vector3[1].copyFrom(vector0).normalize();
|
|
|
+ var v1 = MathTmp.Vector3[2].copyFrom(vector1).normalize();
|
|
|
var dot = Vector3.Dot(v0, v1);
|
|
|
- var n = Vector3.Cross(v0, v1);
|
|
|
+ var n = MathTmp.Vector3[3];
|
|
|
+ Vector3.CrossToRef(v0, v1, n);
|
|
|
if (Vector3.Dot(n, normal) > 0) {
|
|
|
return Math.acos(dot);
|
|
|
}
|
|
@@ -12421,6 +12428,10 @@ var BABYLON;
|
|
|
this._gl = (canvas.getContext("webgl2", options) || canvas.getContext("experimental-webgl2", options));
|
|
|
if (this._gl) {
|
|
|
this._webGLVersion = 2.0;
|
|
|
+ // Prevent weird browsers to lie :-)
|
|
|
+ if (!this._gl.deleteQuery) {
|
|
|
+ this._webGLVersion = 1.0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
catch (e) {
|
|
@@ -18384,8 +18395,8 @@ var BABYLON;
|
|
|
var Node = /** @class */ (function () {
|
|
|
/**
|
|
|
* Creates a new Node
|
|
|
- * @param {string} name - the name and id to be given to this node
|
|
|
- * @param {BABYLON.Scene} the scene this node will be added to
|
|
|
+ * @param name the name and id to be given to this node
|
|
|
+ * @param scene the scene this node will be added to
|
|
|
*/
|
|
|
function Node(name, scene) {
|
|
|
if (scene === void 0) { scene = null; }
|
|
@@ -18559,14 +18570,14 @@ var BABYLON;
|
|
|
});
|
|
|
/**
|
|
|
* Gets the scene of the node
|
|
|
- * @returns a {BABYLON.Scene}
|
|
|
+ * @returns a scene
|
|
|
*/
|
|
|
Node.prototype.getScene = function () {
|
|
|
return this._scene;
|
|
|
};
|
|
|
/**
|
|
|
* Gets the engine of the node
|
|
|
- * @returns a {BABYLON.Engine}
|
|
|
+ * @returns a Engine
|
|
|
*/
|
|
|
Node.prototype.getEngine = function () {
|
|
|
return this._scene.getEngine();
|
|
@@ -18803,7 +18814,7 @@ var BABYLON;
|
|
|
* Get all child-meshes of this node
|
|
|
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
|
|
|
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
|
- * @returns an array of {BABYLON.AbstractMesh}
|
|
|
+ * @returns an array of AbstractMesh
|
|
|
*/
|
|
|
Node.prototype.getChildMeshes = function (directDescendantsOnly, predicate) {
|
|
|
var results = [];
|
|
@@ -18816,7 +18827,7 @@ var BABYLON;
|
|
|
* Get all child-transformNodes of this node
|
|
|
* @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
|
|
|
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
|
- * @returns an array of {BABYLON.TransformNode}
|
|
|
+ * @returns an array of TransformNode
|
|
|
*/
|
|
|
Node.prototype.getChildTransformNodes = function (directDescendantsOnly, predicate) {
|
|
|
var results = [];
|
|
@@ -18828,7 +18839,7 @@ var BABYLON;
|
|
|
/**
|
|
|
* Get all direct children of this node
|
|
|
* @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
|
|
|
- * @returns an array of {BABYLON.Node}
|
|
|
+ * @returns an array of Node
|
|
|
*/
|
|
|
Node.prototype.getChildren = function (predicate) {
|
|
|
return this.getDescendants(true, predicate);
|
|
@@ -29978,7 +29989,7 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
- * Create a new {BABYLON.VertexBuffer} based on the current buffer
|
|
|
+ * Create a new VertexBuffer based on the current buffer
|
|
|
* @param kind defines the vertex buffer kind (position, normal, etc.)
|
|
|
* @param offset defines offset in the buffer (0 by default)
|
|
|
* @param size defines the size in floats of attributes (position is 3 for instance)
|
|
@@ -30524,7 +30535,7 @@ var BABYLON;
|
|
|
var BABYLON;
|
|
|
(function (BABYLON) {
|
|
|
/**
|
|
|
- * Internal class used by the engine to get list of {BABYLON.InternalTexture} already bound to the GL context
|
|
|
+ * Internal class used by the engine to get list of InternalTexture already bound to the GL context
|
|
|
*/
|
|
|
var DummyInternalTextureTracker = /** @class */ (function () {
|
|
|
function DummyInternalTextureTracker() {
|
|
@@ -30610,7 +30621,7 @@ var BABYLON;
|
|
|
configurable: true
|
|
|
});
|
|
|
/**
|
|
|
- * Increments the number of references (ie. the number of {BABYLON.Texture} that point to it)
|
|
|
+ * Increments the number of references (ie. the number of Texture that point to it)
|
|
|
*/
|
|
|
InternalTexture.prototype.incrementReferences = function () {
|
|
|
this._references++;
|
|
@@ -35739,7 +35750,6 @@ var BABYLON;
|
|
|
* @returns intersection info or null if no intersection
|
|
|
*/
|
|
|
SubMesh.prototype.intersects = function (ray, positions, indices, fastCheck) {
|
|
|
- var intersectInfo = null;
|
|
|
var material = this.getMaterial();
|
|
|
if (!material) {
|
|
|
return null;
|
|
@@ -35754,45 +35764,57 @@ var BABYLON;
|
|
|
return null;
|
|
|
}
|
|
|
// LineMesh first as it's also a Mesh...
|
|
|
- if (BABYLON.LinesMesh && this._mesh instanceof BABYLON.LinesMesh) {
|
|
|
- var lineMesh = this._mesh;
|
|
|
- // Line test
|
|
|
- for (var index = this.indexStart; index < this.indexStart + this.indexCount; index += 2) {
|
|
|
- var p0 = positions[indices[index]];
|
|
|
- var p1 = positions[indices[index + 1]];
|
|
|
- var length = ray.intersectionSegment(p0, p1, lineMesh.intersectionThreshold);
|
|
|
- if (length < 0) {
|
|
|
+ if (BABYLON.LinesMesh) {
|
|
|
+ var mesh = this._mesh instanceof BABYLON.InstancedMesh ? this._mesh.sourceMesh : this._mesh;
|
|
|
+ if (mesh instanceof BABYLON.LinesMesh) {
|
|
|
+ var linesMesh = mesh;
|
|
|
+ return this._intersectLines(ray, positions, indices, linesMesh.intersectionThreshold, fastCheck);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this._intersectTriangles(ray, positions, indices, fastCheck);
|
|
|
+ };
|
|
|
+ /** @hidden */
|
|
|
+ SubMesh.prototype._intersectLines = function (ray, positions, indices, intersectionThreshold, fastCheck) {
|
|
|
+ var intersectInfo = null;
|
|
|
+ // Line test
|
|
|
+ for (var index = this.indexStart; index < this.indexStart + this.indexCount; index += 2) {
|
|
|
+ var p0 = positions[indices[index]];
|
|
|
+ var p1 = positions[indices[index + 1]];
|
|
|
+ var length = ray.intersectionSegment(p0, p1, intersectionThreshold);
|
|
|
+ if (length < 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (fastCheck || !intersectInfo || length < intersectInfo.distance) {
|
|
|
+ intersectInfo = new BABYLON.IntersectionInfo(null, null, length);
|
|
|
+ if (fastCheck) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return intersectInfo;
|
|
|
+ };
|
|
|
+ /** @hidden */
|
|
|
+ SubMesh.prototype._intersectTriangles = function (ray, positions, indices, fastCheck) {
|
|
|
+ var intersectInfo = null;
|
|
|
+ // Triangles test
|
|
|
+ for (var index = this.indexStart; index < this.indexStart + this.indexCount; index += 3) {
|
|
|
+ var p0 = positions[indices[index]];
|
|
|
+ var p1 = positions[indices[index + 1]];
|
|
|
+ var p2 = positions[indices[index + 2]];
|
|
|
+ var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);
|
|
|
+ if (currentIntersectInfo) {
|
|
|
+ if (currentIntersectInfo.distance < 0) {
|
|
|
continue;
|
|
|
}
|
|
|
- if (fastCheck || !intersectInfo || length < intersectInfo.distance) {
|
|
|
- intersectInfo = new BABYLON.IntersectionInfo(null, null, length);
|
|
|
+ if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
|
|
|
+ intersectInfo = currentIntersectInfo;
|
|
|
+ intersectInfo.faceId = index / 3;
|
|
|
if (fastCheck) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else {
|
|
|
- // Triangles test
|
|
|
- for (var index = this.indexStart; index < this.indexStart + this.indexCount; index += 3) {
|
|
|
- var p0 = positions[indices[index]];
|
|
|
- var p1 = positions[indices[index + 1]];
|
|
|
- var p2 = positions[indices[index + 2]];
|
|
|
- var currentIntersectInfo = ray.intersectsTriangle(p0, p1, p2);
|
|
|
- if (currentIntersectInfo) {
|
|
|
- if (currentIntersectInfo.distance < 0) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (fastCheck || !intersectInfo || currentIntersectInfo.distance < intersectInfo.distance) {
|
|
|
- intersectInfo = currentIntersectInfo;
|
|
|
- intersectInfo.faceId = index / 3;
|
|
|
- if (fastCheck) {
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
return intersectInfo;
|
|
|
};
|
|
|
/** @hidden */
|
|
@@ -40161,7 +40183,7 @@ var BABYLON;
|
|
|
* Creates a new geometry
|
|
|
* @param id defines the unique ID
|
|
|
* @param scene defines the hosting scene
|
|
|
- * @param vertexData defines the {BABYLON.VertexData} used to get geometry data
|
|
|
+ * @param vertexData defines the VertexData used to get geometry data
|
|
|
* @param updatable defines if geometry must be updatable (false by default)
|
|
|
* @param mesh defines the mesh that will be associated with the geometry
|
|
|
*/
|
|
@@ -40232,7 +40254,7 @@ var BABYLON;
|
|
|
/**
|
|
|
* Static function used to attach a new empty geometry to a mesh
|
|
|
* @param mesh defines the mesh to attach the geometry to
|
|
|
- * @returns the new {BABYLON.Geometry}
|
|
|
+ * @returns the new Geometry
|
|
|
*/
|
|
|
Geometry.CreateGeometryForMesh = function (mesh) {
|
|
|
var geometry = new Geometry(Geometry.RandomId(), mesh.getScene());
|
|
@@ -40251,14 +40273,14 @@ var BABYLON;
|
|
|
});
|
|
|
/**
|
|
|
* Gets the hosting scene
|
|
|
- * @returns the hosting {BABYLON.Scene}
|
|
|
+ * @returns the hosting Scene
|
|
|
*/
|
|
|
Geometry.prototype.getScene = function () {
|
|
|
return this._scene;
|
|
|
};
|
|
|
/**
|
|
|
* Gets the hosting engine
|
|
|
- * @returns the hosting {BABYLON.Engine}
|
|
|
+ * @returns the hosting Engine
|
|
|
*/
|
|
|
Geometry.prototype.getEngine = function () {
|
|
|
return this._engine;
|
|
@@ -40521,7 +40543,7 @@ var BABYLON;
|
|
|
/**
|
|
|
* Gets a specific vertex buffer
|
|
|
* @param kind defines the data kind (Position, normal, etc...)
|
|
|
- * @returns a {BABYLON.VertexBuffer}
|
|
|
+ * @returns a VertexBuffer
|
|
|
*/
|
|
|
Geometry.prototype.getVertexBuffer = function (kind) {
|
|
|
if (!this.isReady()) {
|
|
@@ -53299,7 +53321,7 @@ var BABYLON;
|
|
|
* Add an animation (with its target) in the group
|
|
|
* @param animation defines the animation we want to add
|
|
|
* @param target defines the target of the animation
|
|
|
- * @returns the {BABYLON.TargetedAnimation} object
|
|
|
+ * @returns the TargetedAnimation object
|
|
|
*/
|
|
|
AnimationGroup.prototype.addTargetedAnimation = function (animation, target) {
|
|
|
var targetedAnimation = {
|
|
@@ -61642,7 +61664,7 @@ var BABYLON;
|
|
|
return newOne;
|
|
|
};
|
|
|
/**
|
|
|
- * Called by the {BABYLON.GPUParticleSystem} to setup the update shader
|
|
|
+ * Called by the GPUParticleSystem to setup the update shader
|
|
|
* @param effect defines the update shader
|
|
|
*/
|
|
|
CylinderParticleEmitter.prototype.applyToShader = function (effect) {
|
|
@@ -62057,7 +62079,7 @@ var BABYLON;
|
|
|
return newOne;
|
|
|
};
|
|
|
/**
|
|
|
- * Called by the {BABYLON.GPUParticleSystem} to setup the update shader
|
|
|
+ * Called by the GPUParticleSystem to setup the update shader
|
|
|
* @param effect defines the update shader
|
|
|
*/
|
|
|
SphereParticleEmitter.prototype.applyToShader = function (effect) {
|
|
@@ -62279,7 +62301,7 @@ var BABYLON;
|
|
|
return newOne;
|
|
|
};
|
|
|
/**
|
|
|
- * Called by the {BABYLON.GPUParticleSystem} to setup the update shader
|
|
|
+ * Called by the GPUParticleSystem to setup the update shader
|
|
|
* @param effect defines the update shader
|
|
|
*/
|
|
|
HemisphericParticleEmitter.prototype.applyToShader = function (effect) {
|
|
@@ -73379,13 +73401,13 @@ var BABYLON;
|
|
|
var BABYLON;
|
|
|
(function (BABYLON) {
|
|
|
/**
|
|
|
- * A class extending {BABYLON.Texture} allowing drawing on a texture
|
|
|
+ * A class extending Texture allowing drawing on a texture
|
|
|
* @see http://doc.babylonjs.com/how_to/dynamictexture
|
|
|
*/
|
|
|
var DynamicTexture = /** @class */ (function (_super) {
|
|
|
__extends(DynamicTexture, _super);
|
|
|
/**
|
|
|
- * Creates a {BABYLON.DynamicTexture}
|
|
|
+ * Creates a DynamicTexture
|
|
|
* @param name defines the name of the texture
|
|
|
* @param options provides 3 alternatives for width and height of texture, a canvas, object with width and height properties, number for both width and height
|
|
|
* @param scene defines the scene where you want the texture
|
|
@@ -73575,13 +73597,13 @@ var BABYLON;
|
|
|
* If you want to display a video in your scene, this is the special texture for that.
|
|
|
* This special texture works similar to other textures, with the exception of a few parameters.
|
|
|
* @see https://doc.babylonjs.com/how_to/video_texture
|
|
|
- * @param {string | null} name optional name, will detect from video source, if not defined
|
|
|
- * @param {(string | string[] | HTMLVideoElement)} src can be used to provide an url, array of urls or an already setup HTML video element.
|
|
|
- * @param {BABYLON.Scene} scene is obviously the current scene.
|
|
|
- * @param {boolean} generateMipMaps can be used to turn on mipmaps (Can be expensive for videoTextures because they are often updated).
|
|
|
- * @param {boolean} invertY is false by default but can be used to invert video on Y axis
|
|
|
- * @param {number} samplingMode controls the sampling method and is set to TRILINEAR_SAMPLINGMODE by default
|
|
|
- * @param {VideoTextureSettings} [settings] allows finer control over video usage
|
|
|
+ * @param name optional name, will detect from video source, if not defined
|
|
|
+ * @param src can be used to provide an url, array of urls or an already setup HTML video element.
|
|
|
+ * @param scene is obviously the current scene.
|
|
|
+ * @param generateMipMaps can be used to turn on mipmaps (Can be expensive for videoTextures because they are often updated).
|
|
|
+ * @param invertY is false by default but can be used to invert video on Y axis
|
|
|
+ * @param samplingMode controls the sampling method and is set to TRILINEAR_SAMPLINGMODE by default
|
|
|
+ * @param settings allows finer control over video usage
|
|
|
*/
|
|
|
function VideoTexture(name, src, scene, generateMipMaps, invertY, samplingMode, settings) {
|
|
|
if (generateMipMaps === void 0) { generateMipMaps = false; }
|
|
@@ -84256,10 +84278,10 @@ var BABYLON;
|
|
|
__extends(SSAORenderingPipeline, _super);
|
|
|
/**
|
|
|
* @constructor
|
|
|
- * @param {string} name - The rendering pipeline name
|
|
|
- * @param {BABYLON.Scene} scene - The scene linked to this pipeline
|
|
|
- * @param {any} ratio - The size of the postprocesses. Can be a number shared between passes or an object for more precision: { ssaoRatio: 0.5, combineRatio: 1.0 }
|
|
|
- * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to
|
|
|
+ * @param name - The rendering pipeline name
|
|
|
+ * @param scene - The scene linked to this pipeline
|
|
|
+ * @param ratio - The size of the postprocesses. Can be a number shared between passes or an object for more precision: { ssaoRatio: 0.5, combineRatio: 1.0 }
|
|
|
+ * @param cameras - The array of cameras that the rendering pipeline will be attached to
|
|
|
*/
|
|
|
function SSAORenderingPipeline(name, scene, ratio, cameras) {
|
|
|
var _this = _super.call(this, scene.getEngine(), name) || this;
|
|
@@ -84484,10 +84506,10 @@ var BABYLON;
|
|
|
__extends(SSAO2RenderingPipeline, _super);
|
|
|
/**
|
|
|
* @constructor
|
|
|
- * @param {string} name - The rendering pipeline name
|
|
|
- * @param {BABYLON.Scene} scene - The scene linked to this pipeline
|
|
|
- * @param {any} ratio - The size of the postprocesses. Can be a number shared between passes or an object for more precision: { ssaoRatio: 0.5, blurRatio: 1.0 }
|
|
|
- * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to
|
|
|
+ * @param name The rendering pipeline name
|
|
|
+ * @param scene The scene linked to this pipeline
|
|
|
+ * @param ratio The size of the postprocesses. Can be a number shared between passes or an object for more precision: { ssaoRatio: 0.5, blurRatio: 1.0 }
|
|
|
+ * @param cameras The array of cameras that the rendering pipeline will be attached to
|
|
|
*/
|
|
|
function SSAO2RenderingPipeline(name, scene, ratio, cameras) {
|
|
|
var _this = _super.call(this, scene.getEngine(), name) || this;
|
|
@@ -84894,11 +84916,11 @@ var BABYLON;
|
|
|
* }
|
|
|
* Note: if an effect parameter is unset, effect is disabled
|
|
|
*
|
|
|
- * @param {string} name - The rendering pipeline name
|
|
|
- * @param {object} parameters - An object containing all parameters (see above)
|
|
|
- * @param {BABYLON.Scene} scene - The scene linked to this pipeline
|
|
|
- * @param {number} ratio - The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
- * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to
|
|
|
+ * @param name The rendering pipeline name
|
|
|
+ * @param parameters - An object containing all parameters (see above)
|
|
|
+ * @param scene The scene linked to this pipeline
|
|
|
+ * @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
+ * @param cameras The array of cameras that the rendering pipeline will be attached to
|
|
|
*/
|
|
|
function LensRenderingPipeline(name, parameters, scene, ratio, cameras) {
|
|
|
if (ratio === void 0) { ratio = 1.0; }
|
|
@@ -85183,11 +85205,11 @@ var BABYLON;
|
|
|
/**
|
|
|
* Default pipeline should be used going forward but the standard pipeline will be kept for backwards compatibility.
|
|
|
* @constructor
|
|
|
- * @param {string} name - The rendering pipeline name
|
|
|
- * @param {BABYLON.Scene} scene - The scene linked to this pipeline
|
|
|
- * @param {any} ratio - The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
- * @param {BABYLON.PostProcess} originalPostProcess - the custom original color post-process. Must be "reusable". Can be null.
|
|
|
- * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to
|
|
|
+ * @param name The rendering pipeline name
|
|
|
+ * @param scene The scene linked to this pipeline
|
|
|
+ * @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
+ * @param originalPostProcess the custom original color post-process. Must be "reusable". Can be null.
|
|
|
+ * @param cameras The array of cameras that the rendering pipeline will be attached to
|
|
|
*/
|
|
|
function StandardRenderingPipeline(name, scene, ratio, originalPostProcess, cameras) {
|
|
|
if (originalPostProcess === void 0) { originalPostProcess = null; }
|
|
@@ -87230,11 +87252,11 @@ var BABYLON;
|
|
|
__extends(DefaultRenderingPipeline, _super);
|
|
|
/**
|
|
|
* @constructor
|
|
|
- * @param {string} name - The rendering pipeline name (default: "")
|
|
|
- * @param {boolean} hdr - If high dynamic range textures should be used (default: true)
|
|
|
- * @param {BABYLON.Scene} scene - The scene linked to this pipeline (default: the last created scene)
|
|
|
- * @param {BABYLON.Camera[]} cameras - The array of cameras that the rendering pipeline will be attached to (default: scene.cameras)
|
|
|
- * @param {boolean} automaticBuild - if false, you will have to manually call prepare() to update the pipeline (default: true)
|
|
|
+ * @param name - The rendering pipeline name (default: "")
|
|
|
+ * @param hdr - If high dynamic range textures should be used (default: true)
|
|
|
+ * @param scene - The scene linked to this pipeline (default: the last created scene)
|
|
|
+ * @param cameras - The array of cameras that the rendering pipeline will be attached to (default: scene.cameras)
|
|
|
+ * @param automaticBuild - if false, you will have to manually call prepare() to update the pipeline (default: true)
|
|
|
*/
|
|
|
function DefaultRenderingPipeline(name, hdr, scene, cameras, automaticBuild) {
|
|
|
if (name === void 0) { name = ""; }
|
|
@@ -89527,15 +89549,15 @@ var BABYLON;
|
|
|
__extends(VolumetricLightScatteringPostProcess, _super);
|
|
|
/**
|
|
|
* @constructor
|
|
|
- * @param {string} name - The post-process name
|
|
|
- * @param {any} ratio - The size of the post-process and/or internal pass (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
- * @param {BABYLON.Camera} camera - The camera that the post-process will be attached to
|
|
|
- * @param {BABYLON.Mesh} mesh - The mesh used to create the light scattering
|
|
|
- * @param {number} samples - The post-process quality, default 100
|
|
|
- * @param {number} samplingMode - The post-process filtering mode
|
|
|
- * @param {BABYLON.Engine} engine - The babylon engine
|
|
|
- * @param {boolean} reusable - If the post-process is reusable
|
|
|
- * @param {BABYLON.Scene} scene - The constructor needs a scene reference to initialize internal components. If "camera" is null a "scene" must be provided
|
|
|
+ * @param name The post-process name
|
|
|
+ * @param ratio The size of the post-process and/or internal pass (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)
|
|
|
+ * @param camera The camera that the post-process will be attached to
|
|
|
+ * @param mesh The mesh used to create the light scattering
|
|
|
+ * @param samples The post-process quality, default 100
|
|
|
+ * @param samplingModeThe post-process filtering mode
|
|
|
+ * @param engine The babylon engine
|
|
|
+ * @param reusable If the post-process is reusable
|
|
|
+ * @param scene The constructor needs a scene reference to initialize internal components. If "camera" is null a "scene" must be provided
|
|
|
*/
|
|
|
function VolumetricLightScatteringPostProcess(name, ratio, camera, mesh, samples, samplingMode, engine, reusable, scene) {
|
|
|
if (samples === void 0) { samples = 100; }
|
|
@@ -89678,7 +89700,7 @@ var BABYLON;
|
|
|
};
|
|
|
/**
|
|
|
* Returns the light position for light scattering effect
|
|
|
- * @return {BABYLON.Vector3} The custom light position
|
|
|
+ * @return Vector3 The custom light position
|
|
|
*/
|
|
|
VolumetricLightScatteringPostProcess.prototype.getCustomMeshPosition = function () {
|
|
|
return this.customMeshPosition;
|
|
@@ -89696,7 +89718,7 @@ var BABYLON;
|
|
|
};
|
|
|
/**
|
|
|
* Returns the render target texture used by the post-process
|
|
|
- * @return {BABYLON.RenderTargetTexture} The render target texture used by the post-process
|
|
|
+ * @return the render target texture used by the post-process
|
|
|
*/
|
|
|
VolumetricLightScatteringPostProcess.prototype.getPass = function () {
|
|
|
return this._volumetricLightScatteringRTT;
|
|
@@ -89864,7 +89886,7 @@ var BABYLON;
|
|
|
* Creates a default mesh for the Volumeric Light Scattering post-process
|
|
|
* @param name The mesh name
|
|
|
* @param scene The scene where to create the mesh
|
|
|
- * @return {BABYLON.Mesh} the default mesh
|
|
|
+ * @return the default mesh
|
|
|
*/
|
|
|
VolumetricLightScatteringPostProcess.CreateDefaultMesh = function (name, scene) {
|
|
|
var mesh = BABYLON.Mesh.CreatePlane(name, 1, scene);
|
|
@@ -111228,7 +111250,7 @@ var BABYLON;
|
|
|
var BABYLON;
|
|
|
(function (BABYLON) {
|
|
|
/**
|
|
|
- * Defines the list of states available for a task inside a {BABYLON.AssetsManager}
|
|
|
+ * Defines the list of states available for a task inside a AssetsManager
|
|
|
*/
|
|
|
var AssetTaskState;
|
|
|
(function (AssetTaskState) {
|
|
@@ -111250,11 +111272,11 @@ var BABYLON;
|
|
|
AssetTaskState[AssetTaskState["ERROR"] = 3] = "ERROR";
|
|
|
})(AssetTaskState = BABYLON.AssetTaskState || (BABYLON.AssetTaskState = {}));
|
|
|
/**
|
|
|
- * Define an abstract asset task used with a {BABYLON.AssetsManager} class to load assets into a scene
|
|
|
+ * Define an abstract asset task used with a AssetsManager class to load assets into a scene
|
|
|
*/
|
|
|
var AbstractAssetTask = /** @class */ (function () {
|
|
|
/**
|
|
|
- * Creates a new {BABYLON.AssetsManager}
|
|
|
+ * Creates a new AssetsManager
|
|
|
* @param name defines the name of the task
|
|
|
*/
|
|
|
function AbstractAssetTask(
|
|
@@ -111371,7 +111393,7 @@ var BABYLON;
|
|
|
*/
|
|
|
var AssetsProgressEvent = /** @class */ (function () {
|
|
|
/**
|
|
|
- * Creates a {BABYLON.AssetsProgressEvent}
|
|
|
+ * Creates a AssetsProgressEvent
|
|
|
* @param remainingCount defines the number of remaining tasks to process
|
|
|
* @param totalCount defines the total number of tasks
|
|
|
* @param task defines the task that was just processed
|
|
@@ -111385,12 +111407,12 @@ var BABYLON;
|
|
|
}());
|
|
|
BABYLON.AssetsProgressEvent = AssetsProgressEvent;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load meshes
|
|
|
+ * Define a task used by AssetsManager to load meshes
|
|
|
*/
|
|
|
var MeshAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(MeshAssetTask, _super);
|
|
|
/**
|
|
|
- * Creates a new {BABYLON.MeshAssetTask}
|
|
|
+ * Creates a new MeshAssetTask
|
|
|
* @param name defines the name of the task
|
|
|
* @param meshesNames defines the list of mesh's names you want to load
|
|
|
* @param rootUrl defines the root url to use as a base to load your meshes and associated resources
|
|
@@ -111441,7 +111463,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.MeshAssetTask = MeshAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load text content
|
|
|
+ * Define a task used by AssetsManager to load text content
|
|
|
*/
|
|
|
var TextFileAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(TextFileAssetTask, _super);
|
|
@@ -111485,7 +111507,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.TextFileAssetTask = TextFileAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load binary data
|
|
|
+ * Define a task used by AssetsManager to load binary data
|
|
|
*/
|
|
|
var BinaryFileAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(BinaryFileAssetTask, _super);
|
|
@@ -111529,7 +111551,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.BinaryFileAssetTask = BinaryFileAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load images
|
|
|
+ * Define a task used by AssetsManager to load images
|
|
|
*/
|
|
|
var ImageAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(ImageAssetTask, _super);
|
|
@@ -111575,7 +111597,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.ImageAssetTask = ImageAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load 2D textures
|
|
|
+ * Define a task used by AssetsManager to load 2D textures
|
|
|
*/
|
|
|
var TextureAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(TextureAssetTask, _super);
|
|
@@ -111636,7 +111658,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.TextureAssetTask = TextureAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load cube textures
|
|
|
+ * Define a task used by AssetsManager to load cube textures
|
|
|
*/
|
|
|
var CubeTextureAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(CubeTextureAssetTask, _super);
|
|
@@ -111696,7 +111718,7 @@ var BABYLON;
|
|
|
}(AbstractAssetTask));
|
|
|
BABYLON.CubeTextureAssetTask = CubeTextureAssetTask;
|
|
|
/**
|
|
|
- * Define a task used by {BABYLON.AssetsManager} to load HDR cube textures
|
|
|
+ * Define a task used by AssetsManager to load HDR cube textures
|
|
|
*/
|
|
|
var HDRCubeTextureAssetTask = /** @class */ (function (_super) {
|
|
|
__extends(HDRCubeTextureAssetTask, _super);
|
|
@@ -111802,19 +111824,19 @@ var BABYLON;
|
|
|
*/
|
|
|
this.onProgressObservable = new BABYLON.Observable();
|
|
|
/**
|
|
|
- * Gets or sets a boolean defining if the {BABYLON.AssetsManager} should use the default loading screen
|
|
|
+ * Gets or sets a boolean defining if the AssetsManager should use the default loading screen
|
|
|
* @see http://doc.babylonjs.com/how_to/creating_a_custom_loading_screen
|
|
|
*/
|
|
|
this.useDefaultLoadingScreen = true;
|
|
|
this._scene = scene;
|
|
|
}
|
|
|
/**
|
|
|
- * Add a {BABYLON.MeshAssetTask} to the list of active tasks
|
|
|
+ * Add a MeshAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param meshesNames defines the name of meshes to load
|
|
|
* @param rootUrl defines the root url to use to locate files
|
|
|
* @param sceneFilename defines the filename of the scene file
|
|
|
- * @returns a new {BABYLON.MeshAssetTask} object
|
|
|
+ * @returns a new MeshAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addMeshTask = function (taskName, meshesNames, rootUrl, sceneFilename) {
|
|
|
var task = new MeshAssetTask(taskName, meshesNames, rootUrl, sceneFilename);
|
|
@@ -111822,10 +111844,10 @@ var BABYLON;
|
|
|
return task;
|
|
|
};
|
|
|
/**
|
|
|
- * Add a {BABYLON.TextFileAssetTask} to the list of active tasks
|
|
|
+ * Add a TextFileAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
- * @returns a new {BABYLON.TextFileAssetTask} object
|
|
|
+ * @returns a new TextFileAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addTextFileTask = function (taskName, url) {
|
|
|
var task = new TextFileAssetTask(taskName, url);
|
|
@@ -111833,10 +111855,10 @@ var BABYLON;
|
|
|
return task;
|
|
|
};
|
|
|
/**
|
|
|
- * Add a {BABYLON.BinaryFileAssetTask} to the list of active tasks
|
|
|
+ * Add a BinaryFileAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
- * @returns a new {BABYLON.BinaryFileAssetTask} object
|
|
|
+ * @returns a new BinaryFileAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addBinaryFileTask = function (taskName, url) {
|
|
|
var task = new BinaryFileAssetTask(taskName, url);
|
|
@@ -111844,10 +111866,10 @@ var BABYLON;
|
|
|
return task;
|
|
|
};
|
|
|
/**
|
|
|
- * Add a {BABYLON.ImageAssetTask} to the list of active tasks
|
|
|
+ * Add a ImageAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
- * @returns a new {BABYLON.ImageAssetTask} object
|
|
|
+ * @returns a new ImageAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addImageTask = function (taskName, url) {
|
|
|
var task = new ImageAssetTask(taskName, url);
|
|
@@ -111855,13 +111877,13 @@ var BABYLON;
|
|
|
return task;
|
|
|
};
|
|
|
/**
|
|
|
- * Add a {BABYLON.TextureAssetTask} to the list of active tasks
|
|
|
+ * Add a TextureAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
|
* @param invertY defines if you want to invert Y axis of the loaded texture (false by default)
|
|
|
* @param samplingMode defines the sampling mode to use (BABYLON.Texture.TRILINEAR_SAMPLINGMODE by default)
|
|
|
- * @returns a new {BABYLON.TextureAssetTask} object
|
|
|
+ * @returns a new TextureAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addTextureTask = function (taskName, url, noMipmap, invertY, samplingMode) {
|
|
|
if (samplingMode === void 0) { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
|
|
@@ -111870,13 +111892,13 @@ var BABYLON;
|
|
|
return task;
|
|
|
};
|
|
|
/**
|
|
|
- * Add a {BABYLON.CubeTextureAssetTask} to the list of active tasks
|
|
|
+ * Add a CubeTextureAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
* @param extensions defines the extension to use to load the cube map (can be null)
|
|
|
* @param noMipmap defines if the texture must not receive mipmaps (false by default)
|
|
|
* @param files defines the list of files to load (can be null)
|
|
|
- * @returns a new {BABYLON.CubeTextureAssetTask} object
|
|
|
+ * @returns a new CubeTextureAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addCubeTextureTask = function (taskName, url, extensions, noMipmap, files) {
|
|
|
var task = new CubeTextureAssetTask(taskName, url, extensions, noMipmap, files);
|
|
@@ -111885,7 +111907,7 @@ var BABYLON;
|
|
|
};
|
|
|
/**
|
|
|
*
|
|
|
- * Add a {BABYLON.HDRCubeTextureAssetTask} to the list of active tasks
|
|
|
+ * Add a HDRCubeTextureAssetTask to the list of active tasks
|
|
|
* @param taskName defines the name of the new task
|
|
|
* @param url defines the url of the file to load
|
|
|
* @param size defines the size you want for the cubemap (can be null)
|
|
@@ -111893,7 +111915,7 @@ var BABYLON;
|
|
|
* @param generateHarmonics defines if you want to automatically generate (true by default)
|
|
|
* @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)
|
|
|
* @param reserved Internal use only
|
|
|
- * @returns a new {BABYLON.HDRCubeTextureAssetTask} object
|
|
|
+ * @returns a new HDRCubeTextureAssetTask object
|
|
|
*/
|
|
|
AssetsManager.prototype.addHDRCubeTextureTask = function (taskName, url, size, noMipmap, generateHarmonics, gammaSpace, reserved) {
|
|
|
if (noMipmap === void 0) { noMipmap = false; }
|
|
@@ -111977,8 +111999,8 @@ var BABYLON;
|
|
|
task.run(this._scene, done, error);
|
|
|
};
|
|
|
/**
|
|
|
- * Reset the {BABYLON.AssetsManager} and remove all tasks
|
|
|
- * @return the current instance of the {BABYLON.AssetsManager}
|
|
|
+ * Reset the AssetsManager and remove all tasks
|
|
|
+ * @return the current instance of the AssetsManager
|
|
|
*/
|
|
|
AssetsManager.prototype.reset = function () {
|
|
|
this._isLoading = false;
|
|
@@ -111987,7 +112009,7 @@ var BABYLON;
|
|
|
};
|
|
|
/**
|
|
|
* Start the loading process
|
|
|
- * @return the current instance of the {BABYLON.AssetsManager}
|
|
|
+ * @return the current instance of the AssetsManager
|
|
|
*/
|
|
|
AssetsManager.prototype.load = function () {
|
|
|
if (this._isLoading) {
|