Test sprite from script

This commit is contained in:
2026-06-02 09:32:07 -05:00
parent 57766a9104
commit a25871a849
38 changed files with 1913 additions and 377 deletions
+39
View File
@@ -0,0 +1,39 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
/**
* Base type for all components. `entity.add()` returns a subtype when the
* component type has a dedicated module; cast with `as Position` etc. when
* you need the specific API.
*/
interface Component {
/** Entity ID this component belongs to. */
readonly entity: number;
/** Component slot index. */
readonly id: number;
toString(): string;
}
interface ComponentConstructor {
/** Sentinel for an invalid component ID. */
readonly INVALID: number;
readonly POSITION: number;
readonly CAMERA: number;
readonly RENDERABLE: number;
readonly PHYSICS: number;
readonly TRIGGER: number;
readonly OVERWORLD: number;
readonly PLAYER: number;
readonly INTERACTABLE: number;
readonly OVERWORLD_CAMERA: number;
readonly OVERWORLD_TRIGGER: number;
new(): never;
}
declare var Component: ComponentConstructor;