WIP
This commit is contained in:
@@ -29,7 +29,7 @@ sceneChangeSet.add((sceneData) => {
|
||||
});
|
||||
|
||||
export function drawSprites(ctx: CanvasRenderingContext2D): void {
|
||||
const { bounds } = viewport;
|
||||
const { boundaries } = viewport;
|
||||
|
||||
visibleDrawables.length = 0;
|
||||
for (const drawable of drawables) {
|
||||
@@ -40,10 +40,10 @@ export function drawSprites(ctx: CanvasRenderingContext2D): void {
|
||||
const relY = pos.y + sprite.offset.y;
|
||||
|
||||
if (
|
||||
relX + sprite.width > bounds.minX &&
|
||||
relX < bounds.maxX &&
|
||||
relY + sprite.height > bounds.minY &&
|
||||
relY < bounds.maxY
|
||||
relX + sprite.width > boundaries.minX &&
|
||||
relX < boundaries.maxX &&
|
||||
relY + sprite.height > boundaries.minY &&
|
||||
relY < boundaries.maxY
|
||||
) {
|
||||
visibleDrawables.push(drawable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user