Commit 5424a3f3 authored by rockyl's avatar rockyl

修复锚点没对子集生效的问题

parent 2b2457de
...@@ -33,7 +33,7 @@ export function traverse(target: Entity, hitChild: (child: Entity, ...params) => ...@@ -33,7 +33,7 @@ export function traverse(target: Entity, hitChild: (child: Entity, ...params) =>
} }
} }
!interrupt && fullCallback && fullCallback(target); fullCallback && fullCallback(target);
} }
/** /**
......
...@@ -85,7 +85,7 @@ export function getRoot(): Entity { ...@@ -85,7 +85,7 @@ export function getRoot(): Entity {
/** /**
* 获取当前帧率 * 获取当前帧率
*/ */
export function getFPS(){ export function getFPS() {
return lastFPS; return lastFPS;
} }
...@@ -128,7 +128,7 @@ function flush(tsNow): void { ...@@ -128,7 +128,7 @@ function flush(tsNow): void {
requestAnimationFrame(flush); requestAnimationFrame(flush);
} }
function onFrameTick(tsNow){ function onFrameTick(tsNow) {
clear(); clear();
const tsNow2 = Date.now(); const tsNow2 = Date.now();
lastFPS = Math.floor(1000 / (tsNow - tsLast)); lastFPS = Math.floor(1000 / (tsNow - tsLast));
...@@ -136,12 +136,12 @@ function onFrameTick(tsNow){ ...@@ -136,12 +136,12 @@ function onFrameTick(tsNow){
tsLast2 = tsNow2; tsLast2 = tsNow2;
const ts = tsNow - tsStart; const ts = tsNow - tsStart;
traverse(root, function (child) { traverse(root, function (child) {
if(!child.isFree && child.enabled){ if (!child.isFree && child.enabled) {
child.onUpdate(ts); child.onUpdate(ts);
}else{ } else {
return true; return true;
} }
}, -1, true, function(current){ }, -1, true, function (current) {
current.afterUpdate(); current.afterUpdate();
}); });
//const tsPass = Date.now() - tsNow; //const tsPass = Date.now() - tsNow;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment