Skip to content

Add rotated GPU tiles example#409

Open
moufmouf wants to merge 1 commit into
phaserjs:masterfrom
moufmouf:example/tilemapgpulayer-rotated-tiles
Open

Add rotated GPU tiles example#409
moufmouf wants to merge 1 commit into
phaserjs:masterfrom
moufmouf:example/tilemapgpulayer-rotated-tiles

Conversation

@moufmouf

@moufmouf moufmouf commented Jul 16, 2026

Copy link
Copy Markdown

Adds tilemaps/tilemap gpu layer/rotated gpu tiles.js, a companion to the TilemapGPULayer tile-rotation fix in phaserjs/phaser#7338.

It draws the same asymmetric "F" tile in all eight orientations (rotations 0/90/180/270°, each with and without a horizontal flip) and renders it with both a CPU TilemapLayer and a GPU TilemapGPULayer side by side, so the two are visibly identical. The tileset texture is generated at runtime, so no new asset is needed.

Note: requires the TilemapGPULayer rotation fix (phaserjs/phaser#7338) to render correctly on the GPU side.

Disclaimer: mostly generated by Claude.

Demonstrates TilemapGPULayer rendering tiles rotated in Tiled (via the
anti-diagonal flip flag) in all eight orientations, side by side with a CPU
TilemapLayer for reference. The tileset texture is generated at runtime, so
the example is self-contained.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant