Explorar el Código

Merge pull request #20753 from Mugen87/dev41

Editor: Trigger rendering when animation is stopped.
Mr.doob hace 4 años
padre
commit
9981113ba6
Se han modificado 3 ficheros con 11 adiciones y 1 borrados
  1. 3 1
      editor/js/Editor.js
  2. 2 0
      editor/js/Sidebar.Animation.js
  3. 6 0
      editor/js/Viewport.js

+ 3 - 1
editor/js/Editor.js

@@ -79,7 +79,9 @@ function Editor() {
 		refreshSidebarObject3D: new Signal(),
 		historyChanged: new Signal(),
 
-		viewportCameraChanged: new Signal()
+		viewportCameraChanged: new Signal(),
+
+		animationStopped: new Signal()
 
 	};
 

+ 2 - 0
editor/js/Sidebar.Animation.js

@@ -60,6 +60,8 @@ function SidebarAnimation( editor ) {
 
 		actions[ animationsSelect.getValue() ].stop();
 
+		signals.animationStopped.dispatch();
+
 	}
 
 	function changeTimeScale() {

+ 6 - 0
editor/js/Viewport.js

@@ -511,6 +511,12 @@ function Viewport( editor ) {
 
 	} );
 
+	signals.animationStopped.add( function () {
+
+		render();
+
+	} );
+
 	// background
 
 	signals.sceneBackgroundChanged.add( function ( backgroundType, backgroundColor, backgroundTexture, backgroundEquirectangularTexture, environmentType ) {