Initial commit: Game Maker phase 1
Canvas-only 2D game editor/runtime built on PixiJS v8 + Vite + TypeScript. - core: asset model (Scene/Camera/Sprite), scene objects with sparse overrides, property schema + resolve, command stack (undo/redo), serialization and project store interface (16 unit tests) - ui: custom in-canvas widget toolkit (panels, fields, color picker, list/scroll, popup) with a hidden <input> keyboard bridge - editor: asset/hierarchy panels, schema-driven inspector, toolbar - viewport: box rendering, camera frame, selection gizmo, drag/zoom/pan - runtime: world/entity instantiation for play mode, input, camera follow - api: PHP JSON project store with revision counter (409 on conflict) - tools: CDP-based e2e smoke test Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
5a46124454
65 files changed
+7193
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import type { PropertyBag, Vec2 } from './Properties';
|
||||
|
||||
/**
|
||||
* An asset placed inside a scene. It links to the asset by id, owns a position
|
||||
* (assets have none) and may override individual asset properties. Overrides are
|
||||
* sparse: only keys the user changed are stored; everything else follows the asset.
|
||||
*/
|
||||
export interface SceneObject {
|
||||
id: string;
|
||||
assetId: string;
|
||||
/** Optional display name; falls back to the asset name when empty. */
|
||||
name: string;
|
||||
position: Vec2;
|
||||
overrides: PropertyBag;
|
||||
}
|
||||
|
||||
export function createSceneObject(id: string, assetId: string, position: Vec2): SceneObject {
|
||||
return { id, assetId, name: '', position: { x: position.x, y: position.y }, overrides: {} };
|
||||
}
|
||||
Reference in new issue
Block a user