|
@@ -1521,23 +1521,6 @@ var BABYLON;
|
|
|
return s;
|
|
|
};
|
|
|
/**
|
|
|
- * Get angle between two vectors.
|
|
|
- * @param vector0 {BABYLON.Vector3}
|
|
|
- * @param vector1 {BABYLON.Vector3}
|
|
|
- * @param normal {BABYLON.Vector3} direction of the normal.
|
|
|
- * @return {number} the angle between vector0 and vector1.
|
|
|
- */
|
|
|
- Vector3.GetAngleBetweenVectors = function (vector0, vector1, normal) {
|
|
|
- var v0 = vector0.clone().normalize();
|
|
|
- var v1 = vector1.clone().normalize();
|
|
|
- var dot = Vector3.Dot(v0, v1);
|
|
|
- var n = Vector3.Cross(v0, v1);
|
|
|
- if (Vector3.Dot(n, normal) > 0) {
|
|
|
- return Math.acos(dot);
|
|
|
- }
|
|
|
- return -Math.acos(dot);
|
|
|
- };
|
|
|
- /**
|
|
|
* Returns a new Vector3 set from the index "offset" of the passed array.
|
|
|
*/
|
|
|
Vector3.FromArray = function (array, offset) {
|
|
@@ -14481,29 +14464,29 @@ var BABYLON;
|
|
|
_this.definedFacingForward = true; // orientation for POV movement & rotation
|
|
|
/**
|
|
|
* This property determines the type of occlusion query algorithm to run in WebGl, you can use:
|
|
|
-
|
|
|
+
|
|
|
* AbstractMesh.OCCLUSION_ALGORITHM_TYPE_ACCURATE which is mapped to GL_ANY_SAMPLES_PASSED.
|
|
|
-
|
|
|
+
|
|
|
* or
|
|
|
-
|
|
|
+
|
|
|
* AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE (Default Value) which is mapped to GL_ANY_SAMPLES_PASSED_CONSERVATIVE which is a false positive algorithm that is faster than GL_ANY_SAMPLES_PASSED but less accurate.
|
|
|
-
|
|
|
+
|
|
|
* for more info check WebGl documentations
|
|
|
*/
|
|
|
_this.occlusionQueryAlgorithmType = AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE;
|
|
|
/**
|
|
|
* This property is responsible for starting the occlusion query within the Mesh or not, this property is also used to determine what should happen when the occlusionRetryCount is reached. It has supports 3 values:
|
|
|
-
|
|
|
+
|
|
|
* OCCLUSION_TYPE_NONE (Default Value): this option means no occlusion query whith the Mesh.
|
|
|
-
|
|
|
+
|
|
|
* OCCLUSION_TYPE_OPTIMISTIC: this option is means use occlusion query and if occlusionRetryCount is reached and the query is broken show the mesh.
|
|
|
-
|
|
|
+
|
|
|
* OCCLUSION_TYPE_STRICT: this option is means use occlusion query and if occlusionRetryCount is reached and the query is broken restore the last state of the mesh occlusion if the mesh was visible then show the mesh if was hidden then hide don't show.
|
|
|
*/
|
|
|
_this.occlusionType = AbstractMesh.OCCLUSION_TYPE_NONE;
|
|
|
/**
|
|
|
* This number indicates the number of allowed retries before stop the occlusion query, this is useful if the occlusion query is taking long time before to the query result is retireved, the query result indicates if the object is visible within the scene or not and based on that Babylon.Js engine decideds to show or hide the object.
|
|
|
-
|
|
|
+
|
|
|
* The default value is -1 which means don't break the query and wait till the result.
|
|
|
*/
|
|
|
_this.occlusionRetryCount = -1;
|
|
@@ -19095,18 +19078,6 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
- Object.defineProperty(Scene.prototype, "geometryBufferRenderer", {
|
|
|
- get: function () {
|
|
|
- return this._geometryBufferRenderer;
|
|
|
- },
|
|
|
- set: function (geometryBufferRenderer) {
|
|
|
- if (geometryBufferRenderer && geometryBufferRenderer.isSupported) {
|
|
|
- this._geometryBufferRenderer = geometryBufferRenderer;
|
|
|
- }
|
|
|
- },
|
|
|
- enumerable: true,
|
|
|
- configurable: true
|
|
|
- });
|
|
|
Object.defineProperty(Scene.prototype, "debugLayer", {
|
|
|
// Properties
|
|
|
get: function () {
|
|
@@ -43912,24 +43883,6 @@ var BABYLON;
|
|
|
return action;
|
|
|
};
|
|
|
/**
|
|
|
- * Unregisters an action to this action manager
|
|
|
- * @param {BABYLON.Action} action - the action to be unregistered
|
|
|
- * @return {Boolean}
|
|
|
- */
|
|
|
- ActionManager.prototype.unregisterAction = function (action) {
|
|
|
- var index = this.actions.indexOf(action);
|
|
|
- if (index !== -1) {
|
|
|
- this.actions.splice(index, 1);
|
|
|
- ActionManager.Triggers[action.trigger] -= 1;
|
|
|
- if (ActionManager.Triggers[action.trigger] === 0) {
|
|
|
- delete ActionManager.Triggers[action.trigger];
|
|
|
- }
|
|
|
- delete action._actionManager;
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- };
|
|
|
- /**
|
|
|
* Process a specific trigger
|
|
|
* @param {number} trigger - the trigger to process
|
|
|
* @param evt {BABYLON.ActionEvent} the event details to be processed
|
|
@@ -61716,20 +61669,6 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
- Object.defineProperty(GeometryBufferRenderer.prototype, "scene", {
|
|
|
- get: function () {
|
|
|
- return this._scene;
|
|
|
- },
|
|
|
- enumerable: true,
|
|
|
- configurable: true
|
|
|
- });
|
|
|
- Object.defineProperty(GeometryBufferRenderer.prototype, "ratio", {
|
|
|
- get: function () {
|
|
|
- return this._ratio;
|
|
|
- },
|
|
|
- enumerable: true,
|
|
|
- configurable: true
|
|
|
- });
|
|
|
GeometryBufferRenderer.prototype.isReady = function (subMesh, useInstances) {
|
|
|
var material = subMesh.getMaterial();
|
|
|
if (material && material.disableDepthWrite) {
|