File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export class ScenePreviewNode extends WinNode {
1616 protected rotationSpeedSlider :DraggableValue ;
1717 protected objTypeCombo :ComboBox ;
1818 protected errorMaterial :MeshBasicMaterial ;
19+ protected updateWaitInterval = 0 ;
1920
2021 constructor ( protected scene :ThreeScene ) {
2122
@@ -25,8 +26,8 @@ export class ScenePreviewNode extends WinNode {
2526
2627 const materialSlots = [
2728 new MaterialProperty ( 0 ) ,
28- new MaterialProperty ( 1 ) ,
29- new MaterialProperty ( 2 ) ,
29+ // new MaterialProperty(1),
30+ // new MaterialProperty(2),
3031 ]
3132
3233 super ( "Scene Preview" , Theme . config . groupOutput , [
@@ -62,9 +63,14 @@ export class ScenePreviewNode extends WinNode {
6263 }
6364
6465 override update ( ) : void {
65-
66- this . compileMaterialAndAdd ( 0 )
6766
67+ clearInterval ( this . updateWaitInterval ) ;
68+
69+ this . updateWaitInterval = setTimeout ( ( ) => {
70+
71+ this . compileMaterialAndAdd ( 0 )
72+
73+ } , 400 ) ;
6874 }
6975
7076 protected compileMaterialAndAdd ( materialIndex :number )
You can’t perform that action at this time.
0 commit comments