@onerjs/core 8.29.1 → 8.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Engines/abstractEngine.d.ts +13 -1
- package/Engines/abstractEngine.js +6 -3
- package/Engines/abstractEngine.js.map +1 -1
- package/Materials/floatingOriginMatrixOverrides.d.ts +7 -1
- package/Materials/floatingOriginMatrixOverrides.js +21 -9
- package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +15 -12
- package/scene.js +27 -16
- package/scene.js.map +1 -1
|
@@ -97,9 +97,20 @@ export interface AbstractEngineOptions {
|
|
|
97
97
|
*/
|
|
98
98
|
doNotHandleTouchAction?: boolean;
|
|
99
99
|
/**
|
|
100
|
-
* Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default
|
|
100
|
+
* Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default.
|
|
101
|
+
* Note that setting useLargeWorldRendering will also set high precision matrices
|
|
101
102
|
*/
|
|
102
103
|
useHighPrecisionMatrix?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* @experimental
|
|
106
|
+
* LargeWorldRendering helps avoid floating point imprecision of rendering large worlds by
|
|
107
|
+
* 1. Forcing highPrecisionMatrices (matrix computations in 64 bits instead of 32)
|
|
108
|
+
* 2. Enabling floatingOriginMode in all scenes -- offsetting position-related uniform and attribute values before passing to shader so that active camera is centered at origin and world is offset by active camera position
|
|
109
|
+
*
|
|
110
|
+
* NOTE that if this mode is set during engineCreation, all scenes will have floatingOrigin offset and you do not need to send floatingOriginMode option to each scene creation.
|
|
111
|
+
* If you'd like to have only specific scenes using the offset logic, you can set the flag on those scenes directly -- however, to achieve proper large world rendering, you must also set the useHighPrecisionMatrix option on engine.
|
|
112
|
+
*/
|
|
113
|
+
readonly useLargeWorldRendering?: boolean;
|
|
103
114
|
/**
|
|
104
115
|
* Defines whether to adapt to the device's viewport characteristics (default: false)
|
|
105
116
|
*/
|
|
@@ -1039,6 +1050,7 @@ export declare abstract class AbstractEngine {
|
|
|
1039
1050
|
protected _creationOptions: AbstractEngineOptions;
|
|
1040
1051
|
/**
|
|
1041
1052
|
* Gets the options used for engine creation
|
|
1053
|
+
* NOTE that modifying the object after engine creation will have no effect
|
|
1042
1054
|
* @returns EngineOptions object
|
|
1043
1055
|
*/
|
|
1044
1056
|
getCreationOptions(): AbstractEngineOptions;
|
|
@@ -794,13 +794,13 @@ export class AbstractEngine {
|
|
|
794
794
|
*/
|
|
795
795
|
// Not mixed with Version for tooling purpose.
|
|
796
796
|
static get NpmPackage() {
|
|
797
|
-
return "babylonjs@8.
|
|
797
|
+
return "babylonjs@8.33.2";
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
800
800
|
* Returns the current version of the framework
|
|
801
801
|
*/
|
|
802
802
|
static get Version() {
|
|
803
|
-
return "8.
|
|
803
|
+
return "8.33.2";
|
|
804
804
|
}
|
|
805
805
|
/**
|
|
806
806
|
* Gets the HTML canvas attached with the current webGL context
|
|
@@ -862,6 +862,7 @@ export class AbstractEngine {
|
|
|
862
862
|
}
|
|
863
863
|
/**
|
|
864
864
|
* Gets the options used for engine creation
|
|
865
|
+
* NOTE that modifying the object after engine creation will have no effect
|
|
865
866
|
* @returns EngineOptions object
|
|
866
867
|
*/
|
|
867
868
|
getCreationOptions() {
|
|
@@ -1106,7 +1107,9 @@ export class AbstractEngine {
|
|
|
1106
1107
|
EngineStore.Instances.push(this);
|
|
1107
1108
|
this.startTime = PrecisionDate.Now;
|
|
1108
1109
|
this._stencilStateComposer.stencilGlobal = this._stencilState;
|
|
1109
|
-
|
|
1110
|
+
// LargeWorldRendering set to true will set high precision matrix, regardless of useHighPrecisionMatrix value
|
|
1111
|
+
// It will also set all scenes to use floatingOriginMode upon their creation
|
|
1112
|
+
PerformanceConfigurator.SetMatrixPrecision(!!options.useLargeWorldRendering || !!options.useHighPrecisionMatrix);
|
|
1110
1113
|
if (IsNavigatorAvailable() && navigator.userAgent) {
|
|
1111
1114
|
// Detect if we are running on a faulty buggy OS.
|
|
1112
1115
|
this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
|