浏览代码

Updated NullEngine

Popov72 5 年之前
父节点
当前提交
0ac1b72935
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/Engines/nullEngine.ts

+ 8 - 0
src/Engines/nullEngine.ts

@@ -10,6 +10,7 @@ import { IPipelineContext } from './IPipelineContext';
 import { DataBuffer } from '../Meshes/dataBuffer';
 import { IColor4Like, IViewportLike } from '../Maths/math.like';
 import { ISceneLike } from './thinEngine';
+import { Matrix } from '../Maths/math.vector';
 
 declare const global: any;
 
@@ -42,6 +43,11 @@ export class NullEngineOptions {
      * @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
      */
     public lockstepMaxSteps = 4;
+
+    /**
+     * Make the matrix computations to be performed in 64 bits instead of 32 bits. False by default
+     */
+    useHighPrecisionMatrix?: boolean;
 }
 
 /**
@@ -94,6 +100,8 @@ export class NullEngine extends Engine {
 
         this._options = options;
 
+        Matrix.SetPrecision(!!options.useHighPrecisionMatrix);
+
         // Init caps
         // We consider we are on a webgl1 capable device