Open a scene framed, and thin out two inspector sections (#295)
Three small things asked for in one issue. A scene came up wherever the view happened to stand, and the inspector carried a button and a list that are better reached somewhere else. - A scene comes up framed as if Fit had been clicked: after a project is loaded and when another scene is opened. From then on the view belongs to the user. - An empty scene has nothing to frame and stands at the origin, one pixel per unit. A scene the running game loads is not framed anew. - The Container tab is left out. It keeps the view of each container as before (#171). - The Unpack button and the two lines under it are gone from the inspector of a placed container. Unpack container stays in the right-click menu of the hierarchy and of the scene view. - The corners of a polygon collider are no row in the inspector any more. They are edited on the outline in the scene view. The new schema option noRow keeps a property out of the inspector while it stays a property. Tests: - Gate on melektaus-atx: 219 files, 3401 tests, CHECK EXIT 0. - One new unit test in tests/core/polygon.test.ts: the corners are a property of the collider and no row. - Three new e2e checks: a loaded project is framed like Fit (module 03), an opened scene is (04), and after a real reload a click on Fit moves nothing (09). - Module 09 unpacks through the right-click menu now and checks that the inspector offers no button. - Full suite on melektaus-atx: 1695 checks, all pass. Smokes 24, 19 and 21, all pass. - No counter-probe evaluated, and nothing looked at after the build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca5b2db449
commit
963f8a152a
10 files changed
+106
-23
No files matched your search
@@ -21,6 +21,7 @@ import {
|
||||
shapeContains,
|
||||
shapesOverlap,
|
||||
} from '../../src/core/properties/collider';
|
||||
import { defaultsFor, isRowShown, schemaFor } from '../../src/core/properties/PropertySchema';
|
||||
import { gripAt, withCornerAfter, withCornerMoved, withoutCorner } from '../../src/editor/polygonEdit';
|
||||
|
||||
const P = (...xy: number[]) =>
|
||||
@@ -265,6 +266,14 @@ describe('editing an outline by its corners', () => {
|
||||
expect(withoutCorner(P(0, 0, 1, 0, 0, 1), 0)).toBeNull();
|
||||
expect(withoutCorner(P(0, 0, 1, 0), 0, 0)).toEqual(P(1, 0));
|
||||
});
|
||||
|
||||
it('the corners are a property of the collider, but no row in the inspector (#295)', () => {
|
||||
const collider = schemaFor('collider');
|
||||
expect(collider.map((d) => d.key)).toContain('points');
|
||||
expect(defaultsFor('collider').points).toHaveLength(3);
|
||||
for (const shape of ['box', 'polygon'])
|
||||
expect(collider.filter((d) => isRowShown(d, { shape })).map((d) => d.key)).not.toContain('points');
|
||||
});
|
||||
});
|
||||
|
||||
/** A ring as a set of corners, whichever corner it starts at and whichever way it runs. */
|
||||
|
||||
Reference in new issue
Block a user