File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,22 @@ class App {
5454 if (Scene .active == null || ! Scene .active .ready ) return ;
5555 iron.system. Time .update ();
5656
57+ // Rebuild projection on window resize
58+ if (lastw == - 1 ) {
59+ lastw = App .w ();
60+ lasth = App .h ();
61+ }
62+ if (lastw != App .w () || lasth != App .h ()) {
63+ if (onResize != null ) onResize ();
64+ else {
65+ if (Scene .active != null && Scene .active .camera != null ) {
66+ Scene .active .camera .buildProjection ();
67+ }
68+ }
69+ }
70+ lastw = App .w ();
71+ lasth = App .h ();
72+
5773 if (pauseUpdates ) return ;
5874
5975 #if arm_debug
@@ -97,22 +113,6 @@ class App {
97113 for (cb in endFrameCallbacks ) cb ();
98114 updateTime = kha. Scheduler .realTime () - startTime ;
99115 #end
100-
101- // Rebuild projection on window resize
102- if (lastw == - 1 ) {
103- lastw = App .w ();
104- lasth = App .h ();
105- }
106- if (lastw != App .w () || lasth != App .h ()) {
107- if (onResize != null ) onResize ();
108- else {
109- if (Scene .active != null && Scene .active .camera != null ) {
110- Scene .active .camera .buildProjection ();
111- }
112- }
113- }
114- lastw = App .w ();
115- lasth = App .h ();
116116 }
117117
118118 static function render (frames : Array <kha. Framebuffer >) {
Original file line number Diff line number Diff line change @@ -903,7 +903,7 @@ class Scene {
903903
904904 if (StringTools .endsWith (ptype , " Object" ) && pval != " " ) {
905905 Reflect .setProperty (traitInst , pname , Scene .active .getChild (pval ));
906- } else if (ptype == " TSceneFormat" && pval != " " ) {
906+ } else if (ptype == " TSceneFormat" && pval != " " && pval != null ) {
907907 Data .getSceneRaw (pval , function (r : TSceneFormat ) {
908908 Reflect .setProperty (traitInst , pname , r );
909909 });
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Time {
1414 return 1 / frequency ;
1515 }
1616
17- static var _fixedStep : Null <Float >;
17+ static var _fixedStep : Null <Float > = 1 / 60 ;
1818 public static var fixedStep (get , never ): Float ;
1919 static function get_fixedStep (): Float {
2020 return _fixedStep ;
You can’t perform that action at this time.
0 commit comments