forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
@ -54,6 +54,22 @@ class App {
|
||||
if (Scene.active == null || !Scene.active.ready) return;
|
||||
|
||||
iron.system.Time.update();
|
||||
|
||||
if (lastw == -1) {
|
||||
lastw = App.w();
|
||||
lasth = App.h();
|
||||
}
|
||||
if (lastw != App.w() || lasth != App.h()) {
|
||||
if (onResize != null) onResize();
|
||||
else {
|
||||
if (Scene.active != null && Scene.active.camera != null) {
|
||||
Scene.active.camera.buildProjection();
|
||||
}
|
||||
}
|
||||
}
|
||||
lastw = App.w();
|
||||
lasth = App.h();
|
||||
|
||||
if (pauseUpdates) return;
|
||||
|
||||
#if lnx_debug
|
||||
@ -98,22 +114,6 @@ class App {
|
||||
for (cb in endFrameCallbacks) cb();
|
||||
updateTime = kha.Scheduler.realTime() - startTime;
|
||||
#end
|
||||
|
||||
// Rebuild projection on window resize
|
||||
if (lastw == -1) {
|
||||
lastw = App.w();
|
||||
lasth = App.h();
|
||||
}
|
||||
if (lastw != App.w() || lasth != App.h()) {
|
||||
if (onResize != null) onResize();
|
||||
else {
|
||||
if (Scene.active != null && Scene.active.camera != null) {
|
||||
Scene.active.camera.buildProjection();
|
||||
}
|
||||
}
|
||||
}
|
||||
lastw = App.w();
|
||||
lasth = App.h();
|
||||
}
|
||||
|
||||
static function render(frames: Array<kha.Framebuffer>) {
|
||||
|
@ -887,7 +887,7 @@ class Scene {
|
||||
var ptype: String = t.props[i * 3 + 1];
|
||||
var pval: Dynamic = t.props[i * 3 + 2];
|
||||
|
||||
if (StringTools.endsWith(ptype, "Object") && pval != "") {
|
||||
if (StringTools.endsWith(ptype, "Object") && pval != "" && pval != null) {
|
||||
Reflect.setProperty(traitInst, pname, Scene.active.getChild(pval));
|
||||
} else if (ptype == "TSceneFormat" && pval != "") {
|
||||
Data.getSceneRaw(pval, function (r: TSceneFormat) {
|
||||
|
Reference in New Issue
Block a user