|
@@ -10901,14 +10901,6 @@ var BABYLON;
|
|
return results;
|
|
return results;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
- * @param predicate: an optional predicate that will be called on every evaluated children, the predicate must return true for a given child to be part of the result, otherwise it will be ignored.
|
|
|
|
- * @Deprecated, legacy support.
|
|
|
|
- * use getDecendants instead.
|
|
|
|
- */
|
|
|
|
- Node.prototype.getChildren = function (predicate) {
|
|
|
|
- return this.getDescendants(true, predicate);
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
* Get all child-meshes of this node.
|
|
* Get all child-meshes of this node.
|
|
*/
|
|
*/
|
|
Node.prototype.getChildMeshes = function (directDecendantsOnly, predicate) {
|
|
Node.prototype.getChildMeshes = function (directDecendantsOnly, predicate) {
|
|
@@ -11741,26 +11733,6 @@ var BABYLON;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
- * @Deprecated. Use new RayHelper.show() instead.
|
|
|
|
- * */
|
|
|
|
- Ray.prototype.show = function (scene, color) {
|
|
|
|
- console.warn('Ray.show() has been deprecated. Use new RayHelper.show() instead.');
|
|
|
|
- if (!this._rayHelper) {
|
|
|
|
- this._rayHelper = new BABYLON.RayHelper(this);
|
|
|
|
- }
|
|
|
|
- this._rayHelper.show(scene, color);
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * @Deprecated. Use new RayHelper.hide() instead.
|
|
|
|
- * */
|
|
|
|
- Ray.prototype.hide = function () {
|
|
|
|
- console.warn('Ray.hide() has been deprecated. Use new RayHelper.hide() instead.');
|
|
|
|
- if (this._rayHelper) {
|
|
|
|
- this._rayHelper.hide();
|
|
|
|
- this._rayHelper = null;
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
* Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
* Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
* @param sega the first point of the segment to test the intersection against
|
|
* @param sega the first point of the segment to test the intersection against
|
|
* @param segb the second point of the segment to test the intersection against
|
|
* @param segb the second point of the segment to test the intersection against
|
|
@@ -13025,40 +12997,9 @@ var BABYLON;
|
|
}
|
|
}
|
|
return this._boundingInfo.intersectsPoint(point);
|
|
return this._boundingInfo.intersectsPoint(point);
|
|
};
|
|
};
|
|
- // Physics
|
|
|
|
- /**
|
|
|
|
- * @Deprecated. Use new PhysicsImpostor instead.
|
|
|
|
- * */
|
|
|
|
- AbstractMesh.prototype.setPhysicsState = function (impostor, options) {
|
|
|
|
- //legacy support
|
|
|
|
- if (impostor.impostor) {
|
|
|
|
- options = impostor;
|
|
|
|
- impostor = impostor.impostor;
|
|
|
|
- }
|
|
|
|
- this.physicsImpostor = new BABYLON.PhysicsImpostor(this, impostor, options, this.getScene());
|
|
|
|
- return this.physicsImpostor.physicsBody;
|
|
|
|
- };
|
|
|
|
AbstractMesh.prototype.getPhysicsImpostor = function () {
|
|
AbstractMesh.prototype.getPhysicsImpostor = function () {
|
|
return this.physicsImpostor;
|
|
return this.physicsImpostor;
|
|
};
|
|
};
|
|
- /**
|
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("mass");
|
|
|
|
- */
|
|
|
|
- AbstractMesh.prototype.getPhysicsMass = function () {
|
|
|
|
- return this.physicsImpostor.getParam("mass");
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("friction");
|
|
|
|
- */
|
|
|
|
- AbstractMesh.prototype.getPhysicsFriction = function () {
|
|
|
|
- return this.physicsImpostor.getParam("friction");
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * @Deprecated. Use getPhysicsImpostor().getParam("restitution");
|
|
|
|
- */
|
|
|
|
- AbstractMesh.prototype.getPhysicsRestitution = function () {
|
|
|
|
- return this.physicsImpostor.getParam("restitution");
|
|
|
|
- };
|
|
|
|
AbstractMesh.prototype.getPositionInCameraSpace = function (camera) {
|
|
AbstractMesh.prototype.getPositionInCameraSpace = function (camera) {
|
|
if (!camera) {
|
|
if (!camera) {
|
|
camera = this.getScene().activeCamera;
|
|
camera = this.getScene().activeCamera;
|
|
@@ -13093,21 +13034,6 @@ var BABYLON;
|
|
});
|
|
});
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
- /**
|
|
|
|
- * @Deprecated
|
|
|
|
- */
|
|
|
|
- AbstractMesh.prototype.updatePhysicsBodyPosition = function () {
|
|
|
|
- BABYLON.Tools.Warn("updatePhysicsBodyPosition() is deprecated, please use updatePhysicsBody()");
|
|
|
|
- this.updatePhysicsBody();
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * @Deprecated
|
|
|
|
- * Calling this function is not needed anymore.
|
|
|
|
- * The physics engine takes care of transofmration automatically.
|
|
|
|
- */
|
|
|
|
- AbstractMesh.prototype.updatePhysicsBody = function () {
|
|
|
|
- //Unneeded
|
|
|
|
- };
|
|
|
|
Object.defineProperty(AbstractMesh.prototype, "checkCollisions", {
|
|
Object.defineProperty(AbstractMesh.prototype, "checkCollisions", {
|
|
// Collisions
|
|
// Collisions
|
|
/**
|
|
/**
|
|
@@ -21966,40 +21892,6 @@ var BABYLON;
|
|
Scene.prototype.isPhysicsEnabled = function () {
|
|
Scene.prototype.isPhysicsEnabled = function () {
|
|
return this._physicsEngine !== undefined;
|
|
return this._physicsEngine !== undefined;
|
|
};
|
|
};
|
|
- /**
|
|
|
|
- *
|
|
|
|
- * Sets the gravity of the physics engine (and NOT of the scene)
|
|
|
|
- * @param {BABYLON.Vector3} [gravity] - the new gravity to be used
|
|
|
|
- */
|
|
|
|
- Scene.prototype.setGravity = function (gravity) {
|
|
|
|
- BABYLON.Tools.Warn("Deprecated, please use 'scene.getPhysicsEngine().setGravity()'");
|
|
|
|
- if (!this._physicsEngine) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- this._physicsEngine.setGravity(gravity);
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * Legacy support, using the new API
|
|
|
|
- * @Deprecated
|
|
|
|
- */
|
|
|
|
- Scene.prototype.createCompoundImpostor = function (parts, options) {
|
|
|
|
- BABYLON.Tools.Warn("Scene.createCompoundImpostor is deprecated. Please use PhysicsImpostor parent/child");
|
|
|
|
- if (parts.parts) {
|
|
|
|
- options = parts;
|
|
|
|
- parts = parts.parts;
|
|
|
|
- }
|
|
|
|
- var mainMesh = parts[0].mesh;
|
|
|
|
- mainMesh.physicsImpostor = new BABYLON.PhysicsImpostor(mainMesh, parts[0].impostor, options, this);
|
|
|
|
- for (var index = 1; index < parts.length; index++) {
|
|
|
|
- var mesh = parts[index].mesh;
|
|
|
|
- if (mesh.parent !== mainMesh) {
|
|
|
|
- mesh.position = mesh.position.subtract(mainMesh.position);
|
|
|
|
- mesh.parent = mainMesh;
|
|
|
|
- }
|
|
|
|
- mesh.physicsImpostor = new BABYLON.PhysicsImpostor(mesh, parts[index].impostor, options, this);
|
|
|
|
- }
|
|
|
|
- mainMesh.physicsImpostor.forceUpdate();
|
|
|
|
- };
|
|
|
|
Scene.prototype.deleteCompoundImpostor = function (compound) {
|
|
Scene.prototype.deleteCompoundImpostor = function (compound) {
|
|
var mesh = compound.parts[0].mesh;
|
|
var mesh = compound.parts[0].mesh;
|
|
mesh.physicsImpostor.dispose();
|
|
mesh.physicsImpostor.dispose();
|
|
@@ -23360,22 +23252,6 @@ var BABYLON;
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
- * Deprecated since BabylonJS v2.3
|
|
|
|
- */
|
|
|
|
- Mesh.prototype.updateVerticesDataDirectly = function (kind, data, offset, makeItUnique) {
|
|
|
|
- BABYLON.Tools.Warn("Mesh.updateVerticesDataDirectly deprecated since 2.3.");
|
|
|
|
- if (!this._geometry) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (!makeItUnique) {
|
|
|
|
- this._geometry.updateVerticesDataDirectly(kind, data, offset);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- this.makeGeometryUnique();
|
|
|
|
- this.updateVerticesDataDirectly(kind, data, offset, false);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
* This method updates the vertex positions of an updatable mesh according to the `positionFunction` returned values.
|
|
* This method updates the vertex positions of an updatable mesh according to the `positionFunction` returned values.
|
|
* tuto : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions
|
|
* tuto : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions
|
|
* The parameter `positionFunction` is a simple JS function what is passed the mesh `positions` array. It doesn't need to return anything.
|
|
* The parameter `positionFunction` is a simple JS function what is passed the mesh `positions` array. It doesn't need to return anything.
|
|
@@ -24340,9 +24216,10 @@ var BABYLON;
|
|
// Physics
|
|
// Physics
|
|
//TODO implement correct serialization for physics impostors.
|
|
//TODO implement correct serialization for physics impostors.
|
|
if (this.getPhysicsImpostor()) {
|
|
if (this.getPhysicsImpostor()) {
|
|
- serializationObject.physicsMass = this.getPhysicsMass();
|
|
|
|
- serializationObject.physicsFriction = this.getPhysicsFriction();
|
|
|
|
- serializationObject.physicsRestitution = this.getPhysicsRestitution();
|
|
|
|
|
|
+ var impostor = this.getPhysicsImpostor();
|
|
|
|
+ serializationObject.physicsMass = impostor.getParam("mass");
|
|
|
|
+ serializationObject.physicsFriction = impostor.getParam("friction");
|
|
|
|
+ serializationObject.physicsRestitution = impostor.getParam("mass");
|
|
serializationObject.physicsImpostor = this.getPhysicsImpostor().type;
|
|
serializationObject.physicsImpostor = this.getPhysicsImpostor().type;
|
|
}
|
|
}
|
|
// Metadata
|
|
// Metadata
|
|
@@ -24544,7 +24421,7 @@ var BABYLON;
|
|
else {
|
|
else {
|
|
mesh.layerMask = 0x0FFFFFFF;
|
|
mesh.layerMask = 0x0FFFFFFF;
|
|
}
|
|
}
|
|
- //(Deprecated) physics
|
|
|
|
|
|
+ // Physics
|
|
if (parsedMesh.physicsImpostor) {
|
|
if (parsedMesh.physicsImpostor) {
|
|
mesh.physicsImpostor = new BABYLON.PhysicsImpostor(mesh, parsedMesh.physicsImpostor, {
|
|
mesh.physicsImpostor = new BABYLON.PhysicsImpostor(mesh, parsedMesh.physicsImpostor, {
|
|
mass: parsedMesh.physicsMass,
|
|
mass: parsedMesh.physicsMass,
|
|
@@ -36668,21 +36545,7 @@ var BABYLON;
|
|
};
|
|
};
|
|
return PhysicsEngine;
|
|
return PhysicsEngine;
|
|
}());
|
|
}());
|
|
- // Statics, Legacy support.
|
|
|
|
- /**
|
|
|
|
- * @Deprecated
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
- PhysicsEngine.NoImpostor = BABYLON.PhysicsImpostor.NoImpostor;
|
|
|
|
- PhysicsEngine.SphereImpostor = BABYLON.PhysicsImpostor.SphereImpostor;
|
|
|
|
- PhysicsEngine.BoxImpostor = BABYLON.PhysicsImpostor.BoxImpostor;
|
|
|
|
- PhysicsEngine.PlaneImpostor = BABYLON.PhysicsImpostor.PlaneImpostor;
|
|
|
|
- PhysicsEngine.MeshImpostor = BABYLON.PhysicsImpostor.MeshImpostor;
|
|
|
|
- PhysicsEngine.CylinderImpostor = BABYLON.PhysicsImpostor.CylinderImpostor;
|
|
|
|
- PhysicsEngine.HeightmapImpostor = BABYLON.PhysicsImpostor.HeightmapImpostor;
|
|
|
|
- PhysicsEngine.CapsuleImpostor = -1;
|
|
|
|
- PhysicsEngine.ConeImpostor = -1;
|
|
|
|
- PhysicsEngine.ConvexHullImpostor = -1;
|
|
|
|
|
|
+ // Statics
|
|
PhysicsEngine.Epsilon = 0.001;
|
|
PhysicsEngine.Epsilon = 0.001;
|
|
BABYLON.PhysicsEngine = PhysicsEngine;
|
|
BABYLON.PhysicsEngine = PhysicsEngine;
|
|
})(BABYLON || (BABYLON = {}));
|
|
})(BABYLON || (BABYLON = {}));
|
|
@@ -45689,7 +45552,7 @@ var BABYLON;
|
|
var returnValue;
|
|
var returnValue;
|
|
var extendSize = impostor.getObjectExtendSize();
|
|
var extendSize = impostor.getObjectExtendSize();
|
|
switch (impostor.type) {
|
|
switch (impostor.type) {
|
|
- case BABYLON.PhysicsEngine.SphereImpostor:
|
|
|
|
|
|
+ case BABYLON.PhysicsImpostor.SphereImpostor:
|
|
var radiusX = extendSize.x;
|
|
var radiusX = extendSize.x;
|
|
var radiusY = extendSize.y;
|
|
var radiusY = extendSize.y;
|
|
var radiusZ = extendSize.z;
|
|
var radiusZ = extendSize.z;
|
|
@@ -45788,7 +45651,7 @@ var BABYLON;
|
|
impostor.setDeltaRotation(this._plus90X);
|
|
impostor.setDeltaRotation(this._plus90X);
|
|
}
|
|
}
|
|
//If it is a heightfield, if should be centered.
|
|
//If it is a heightfield, if should be centered.
|
|
- if (impostor.type === BABYLON.PhysicsEngine.HeightmapImpostor) {
|
|
|
|
|
|
+ if (impostor.type === BABYLON.PhysicsImpostor.HeightmapImpostor) {
|
|
var mesh = object;
|
|
var mesh = object;
|
|
//calculate the correct body position:
|
|
//calculate the correct body position:
|
|
var rotationQuaternion = mesh.rotationQuaternion;
|
|
var rotationQuaternion = mesh.rotationQuaternion;
|
|
@@ -45812,7 +45675,7 @@ var BABYLON;
|
|
mesh.setPivotMatrix(oldPivot);
|
|
mesh.setPivotMatrix(oldPivot);
|
|
mesh.computeWorldMatrix(true);
|
|
mesh.computeWorldMatrix(true);
|
|
}
|
|
}
|
|
- else if (impostor.type === BABYLON.PhysicsEngine.MeshImpostor) {
|
|
|
|
|
|
+ else if (impostor.type === BABYLON.PhysicsImpostor.MeshImpostor) {
|
|
this._tmpDeltaPosition.copyFromFloats(0, 0, 0);
|
|
this._tmpDeltaPosition.copyFromFloats(0, 0, 0);
|
|
this._tmpPosition.copyFrom(object.position);
|
|
this._tmpPosition.copyFrom(object.position);
|
|
}
|
|
}
|
|
@@ -49293,11 +49156,6 @@ var BABYLON;
|
|
this._attached = false;
|
|
this._attached = false;
|
|
this.getEngine().disableVR();
|
|
this.getEngine().disableVR();
|
|
};
|
|
};
|
|
- WebVRFreeCamera.prototype.requestVRFullscreen = function (requestPointerlock) {
|
|
|
|
- //Backwards comp.
|
|
|
|
- BABYLON.Tools.Warn("requestVRFullscreen is deprecated. call attachControl() inside a user-interaction callback to start sending frames to the VR display.");
|
|
|
|
- //this.getEngine().switchFullscreen(requestPointerlock);
|
|
|
|
- };
|
|
|
|
WebVRFreeCamera.prototype.getClassName = function () {
|
|
WebVRFreeCamera.prototype.getClassName = function () {
|
|
return "WebVRFreeCamera";
|
|
return "WebVRFreeCamera";
|
|
};
|
|
};
|
|
@@ -49307,20 +49165,6 @@ var BABYLON;
|
|
this._vrDevice.resetPose();
|
|
this._vrDevice.resetPose();
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
- * @deprecated
|
|
|
|
- * This function was used to change the position offset. it is now done using camera.position.
|
|
|
|
- *
|
|
|
|
- * @param {Vector3} [newPosition] an optional new position. if not provided, the current camera position will be used.
|
|
|
|
- *
|
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
|
- */
|
|
|
|
- WebVRFreeCamera.prototype.setPositionOffset = function (newPosition) {
|
|
|
|
- if (newPosition) {
|
|
|
|
- this.position.copyFrom(newPosition);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
* This function is called by the two RIG cameras.
|
|
* This function is called by the two RIG cameras.
|
|
* 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
* 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
*/
|
|
*/
|
|
@@ -51819,10 +51663,7 @@ var BABYLON;
|
|
__extends(GamepadCamera, _super);
|
|
__extends(GamepadCamera, _super);
|
|
//-- end properties for backward compatibility for inputs
|
|
//-- end properties for backward compatibility for inputs
|
|
function GamepadCamera(name, position, scene) {
|
|
function GamepadCamera(name, position, scene) {
|
|
- var _this;
|
|
|
|
- BABYLON.Tools.Warn("Deprecated. Please use Universal Camera instead.");
|
|
|
|
- _this = _super.call(this, name, position, scene) || this;
|
|
|
|
- return _this;
|
|
|
|
|
|
+ return _super.call(this, name, position, scene) || this;
|
|
}
|
|
}
|
|
Object.defineProperty(GamepadCamera.prototype, "gamepadAngularSensibility", {
|
|
Object.defineProperty(GamepadCamera.prototype, "gamepadAngularSensibility", {
|
|
//-- Begin properties for backward compatibility for inputs
|
|
//-- Begin properties for backward compatibility for inputs
|
|
@@ -52212,22 +52053,6 @@ var BABYLON;
|
|
}
|
|
}
|
|
// Public Methods
|
|
// Public Methods
|
|
/**
|
|
/**
|
|
- * Returns the horizontal blur PostProcess
|
|
|
|
- * @return {BABYLON.BlurPostProcess} The horizontal blur post-process
|
|
|
|
- */
|
|
|
|
- SSAORenderingPipeline.prototype.getBlurHPostProcess = function () {
|
|
|
|
- BABYLON.Tools.Error("SSAORenderinPipeline.getBlurHPostProcess() is deprecated, no more blur post-process exists");
|
|
|
|
- return null;
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
- * Returns the vertical blur PostProcess
|
|
|
|
- * @return {BABYLON.BlurPostProcess} The vertical blur post-process
|
|
|
|
- */
|
|
|
|
- SSAORenderingPipeline.prototype.getBlurVPostProcess = function () {
|
|
|
|
- BABYLON.Tools.Error("SSAORenderinPipeline.getBlurVPostProcess() is deprecated, no more blur post-process exists");
|
|
|
|
- return null;
|
|
|
|
- };
|
|
|
|
- /**
|
|
|
|
* Removes the internal pipeline assets and detatches the pipeline from the scene cameras
|
|
* Removes the internal pipeline assets and detatches the pipeline from the scene cameras
|
|
*/
|
|
*/
|
|
SSAORenderingPipeline.prototype.dispose = function (disableDepthRender) {
|
|
SSAORenderingPipeline.prototype.dispose = function (disableDepthRender) {
|