瀏覽代碼

allowing configuration of animationPropertiesOverride

Raanan Weber 7 年之前
父節點
當前提交
8624cc4f94
共有 3 個文件被更改,包括 14 次插入6 次删除
  1. 3 0
      Viewer/src/configuration/configuration.ts
  2. 0 5
      Viewer/src/model/viewerModel.ts
  3. 11 1
      Viewer/src/viewer/sceneManager.ts

+ 3 - 0
Viewer/src/configuration/configuration.ts

@@ -215,6 +215,9 @@ export interface ISceneConfiguration {
     colorGrading?: IColorGradingConfiguration;
     environmentRotationY?: number;
     glow?: boolean | IGlowLayerOptions;
+    animationPropertiesOverride?: {
+        [propName: string]: any;
+    }
 }
 
 /**

+ 0 - 5
Viewer/src/model/viewerModel.ts

@@ -168,11 +168,6 @@ export class ViewerModel implements IDisposable {
 
 
     private _initAnimations() {
-        Animation.AllowMatricesInterpolation = true;
-        this._viewer.sceneManager.scene.animationPropertiesOverride = new AnimationPropertiesOverride();
-        this._viewer.sceneManager.scene.animationPropertiesOverride.enableBlending = true;
-        this._viewer.sceneManager.scene.animationPropertiesOverride.blendingSpeed = 0.02;
-        this._viewer.sceneManager.scene.animationPropertiesOverride.loopMode = 1;
         // check if this is not a gltf loader and init the animations
         if (this.skeletons.length) {
             this.skeletons.forEach((skeleton, idx) => {

File diff suppressed because it is too large
+ 11 - 1
Viewer/src/viewer/sceneManager.ts