perf: various opts
This commit is contained in:
parent
d919af7812
commit
63cb41943b
|
@ -114,7 +114,8 @@ export class Visible extends decorate(Trait) {
|
|||
}
|
||||
else {
|
||||
let unifiedBoundingBox = [0, 0, 0, 0];
|
||||
for (const visibleBoundingBox of visibleBoundingBoxes) {
|
||||
for (let i = 0; i < visibleBoundingBoxes.length; ++i) {
|
||||
const visibleBoundingBox = visibleBoundingBoxes[i];
|
||||
unifiedBoundingBox = Rectangle.united(
|
||||
unifiedBoundingBox,
|
||||
visibleBoundingBox,
|
||||
|
|
|
@ -61,7 +61,8 @@ export function Synchronized(Superclass) {
|
|||
|
||||
tick(elapsed) {
|
||||
const children = this.synchronizedChildren();
|
||||
for (const key of children) {
|
||||
for (let i = 0; i < children.length; ++i) {
|
||||
const key = children[i];
|
||||
if (
|
||||
'undefined' !== typeof this[key]
|
||||
&& 'undefined' !== typeof this[key].tick
|
||||
|
@ -70,7 +71,8 @@ export function Synchronized(Superclass) {
|
|||
}
|
||||
}
|
||||
this.state = this.state.withMutations((state) => {
|
||||
for (const key of children) {
|
||||
for (let i = 0; i < children.length; ++i) {
|
||||
const key = children[i];
|
||||
if (
|
||||
'undefined' !== typeof this[key]
|
||||
&& 'undefined' !== typeof this[key].state
|
||||
|
|
Loading…
Reference in New Issue
Block a user