The scene view outlines a tilemap's collision only along its outer edges: where two pieces meet, their shared stretch runs once in each direction and is not drawn, so an autotile lake is one outline without cross strokes at the quarters, merged rectangles of plain tiles and one-way tiles follow the same rule, the bridges from splitting concave outlines disappear and a piece doubled on two layers is outlined once; fill and collision stay as they were, and the result is cached per tilemap and rebuilt only when its collision data changes (#173)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a31f5e0ad
commit
d4ea04d4d6
7 files changed
+365
-10
No files matched your search
@@ -320,6 +320,16 @@ export async function shapes(t) {
|
||||
]),
|
||||
JSON.stringify(solids),
|
||||
);
|
||||
// Drawn along the outer edges only (#173): the wedge's foot on the floor is no stroke.
|
||||
const cornersOf = (line) => (line?.points ?? []).map((p) => `${p.x},${p.y}`).sort();
|
||||
check(
|
||||
'the scene view draws the wedge and the floor as one closed outline, without the edge they share',
|
||||
solids?.boundary?.length === 1 &&
|
||||
solids.boundary[0].closed === true &&
|
||||
JSON.stringify(cornersOf(solids.boundary[0])) ===
|
||||
JSON.stringify(['0,3', '0,4', '12,3', '12,4', '6,3', '7,2', '7,3'].sort()),
|
||||
JSON.stringify(solids?.boundary),
|
||||
);
|
||||
await shot('42-wedge-map');
|
||||
await play();
|
||||
await evaluate(`(() => {
|
||||
|
||||
Reference in new issue
Block a user