Skip to content

Commit

Permalink
Merge pull request #171 from erikhoj/main
Browse files Browse the repository at this point in the history
Fixed issue where Tilemap doesn't render since Pixi v8.7.0
  • Loading branch information
ivanpopelyshev authored Feb 1, 2025
2 parents 77c0474 + 5f36100 commit d00fb69
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Tilemap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-unused-vars */
import { Bounds, Container, groupD8, State, Texture, TextureSource } from 'pixi.js';
import { Bounds, Container, groupD8, State, Texture, TextureSource, ViewContainer } from 'pixi.js';

Check warning on line 2 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

'Container' is defined but never used
import { settings } from './settings';
import { TilemapInstruction, TilemapPipe } from './TilemapPipe';
import { TileTextureArray } from './TileTextureArray';
Expand Down Expand Up @@ -56,7 +56,7 @@ export const POINT_STRUCT_SIZE = (Object.keys(POINT_STRUCT).length / 2);
* .tile('brick_wall.png', 0, 100);
* });
*/
export class Tilemap extends Container
export class Tilemap extends ViewContainer
{
// TODO: make default color work
/**
Expand Down Expand Up @@ -124,6 +124,18 @@ export class Tilemap extends Container
/** The interleaved geometry of the tilemap. */
private pointsBuf: Array<number> = [];

protected updateBounds(): void {

Check warning on line 127 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Opening curly brace appears on the same line as controlling statement
const bounds = this.tilemapBounds;

Check warning on line 128 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs

this._bounds.minX = bounds.minX;

Check warning on line 130 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs
this._bounds.maxX = bounds.maxX;

Check warning on line 131 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs
this._bounds.minY = bounds.minY;

Check warning on line 132 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs
this._bounds.maxY = bounds.maxY;

Check warning on line 133 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

Expected indentation of 8 spaces but found 2 tabs
}

public batched: boolean;


Check warning on line 138 in src/Tilemap.ts

View workflow job for this annotation

GitHub Actions / build

More than 1 blank line not allowed
/**
* @param tileset - The tileset to use for the tilemap. This can be reset later with {@link Tilemap.setTileset}. The
* base-textures in this array must not be duplicated.
Expand Down

0 comments on commit d00fb69

Please sign in to comment.