浏览代码

Editor: Animation code clean up.

Mr.doob 6 年之前
父节点
当前提交
19bafeb25f
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      editor/js/Editor.js
  2. 1 1
      editor/js/Sidebar.Animation.js
  3. 2 2
      editor/js/Viewport.js

+ 2 - 2
editor/js/Editor.js

@@ -94,7 +94,7 @@ var Editor = function () {
 	this.scripts = {};
 	this.scripts = {};
 
 
 	this.animations = {};
 	this.animations = {};
-	this.animationMixer = new THREE.AnimationMixer( this.scene );
+	this.mixer = new THREE.AnimationMixer( this.scene );
 
 
 	this.selected = null;
 	this.selected = null;
 	this.helpers = {};
 	this.helpers = {};
@@ -468,7 +468,7 @@ Editor.prototype = {
 		this.materials = {};
 		this.materials = {};
 		this.textures = {};
 		this.textures = {};
 		this.scripts = {};
 		this.scripts = {};
-		
+
 		this.animations = {};
 		this.animations = {};
 		this.animationMixer.stopAllAction();
 		this.animationMixer.stopAllAction();
 
 

+ 1 - 1
editor/js/Sidebar.Animation.js

@@ -5,7 +5,7 @@
 Sidebar.Animation = function ( editor ) {
 Sidebar.Animation = function ( editor ) {
 
 
 	var signals = editor.signals;
 	var signals = editor.signals;
-	var mixer = editor.animationMixer;
+	var mixer = editor.mixer;
 
 
 	var actions = {};
 	var actions = {};
 
 

+ 2 - 2
editor/js/Viewport.js

@@ -527,11 +527,11 @@ var Viewport = function ( editor ) {
 
 
 		requestAnimationFrame( animate );
 		requestAnimationFrame( animate );
 
 
-		var mixer = editor.animationMixer;
+		var mixer = editor.mixer;
 
 
 		if ( mixer.stats.actions.inUse > 0 ) {
 		if ( mixer.stats.actions.inUse > 0 ) {
 
 
-			editor.animationMixer.update( ( time - prevTime ) / 1000 );
+			mixer.update( ( time - prevTime ) / 1000 );
 			render();
 			render();
 
 
 		}
 		}