mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-11-11 20:02:57 +08:00
Compare commits
1 Commits
6a74c70914
...
fd07268931
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd07268931 |
@ -68,13 +68,12 @@ export class TextureRowAnimater extends FrameBasedAnimater<void> {
|
||||
const h = height / this.frames;
|
||||
let i = 0;
|
||||
while (true) {
|
||||
if (i === this.frames) i = 0;
|
||||
const renderable: ITextureRenderable = {
|
||||
source: this.texture!.source,
|
||||
rect: this.texture!.clampRect({ x: i * w + ox, y: oy, w, h })
|
||||
};
|
||||
yield renderable;
|
||||
i++;
|
||||
if (i === this.frames) i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -106,13 +105,12 @@ export class TextureColumnAnimater extends FrameBasedAnimater<void> {
|
||||
const w = width / this.frames;
|
||||
let i = 0;
|
||||
while (true) {
|
||||
if (i === this.frames) i = 0;
|
||||
const renderable: ITextureRenderable = {
|
||||
source: this.texture!.source,
|
||||
rect: this.texture!.clampRect({ x: i * w + ox, y: oy, w, h })
|
||||
};
|
||||
yield renderable;
|
||||
i++;
|
||||
if (i === this.frames) i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,7 +202,7 @@ export class TextureScanAnimater
|
||||
rect: texture.clampRect({ x: x * w, y: y * h, w, h })
|
||||
};
|
||||
yield data;
|
||||
index++;
|
||||
|
||||
if (index === this.frames) index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user