File tree Expand file tree Collapse file tree 7 files changed +11
-85
lines changed
Expand file tree Collapse file tree 7 files changed +11
-85
lines changed Original file line number Diff line number Diff line change 227227.nx /
228228.cursor /rules /nx-rules.mdc
229229.github /instructions /nx.instructions.md
230+
231+ compile_commands.json
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export interface Registry extends ClassHandle {
6060 getEntityComponent ( _0 : Entity , _1 : Component ) : any | undefined ;
6161 addComponent ( _0 : Entity , _1 : Component ) : any | undefined ;
6262 runSystems ( _0 : any ) : void ;
63- getZipper ( _0 : [ Component ] ) : any ;
63+ getZipper ( _0 : Component [ ] ) : any ;
6464}
6565
6666interface EmbindModule {
Original file line number Diff line number Diff line change @@ -7,13 +7,12 @@ import {
77 type InitContext ,
88} from "@nanoforge/common" ;
99
10- import type { MainModule } from "../lib" ;
10+ import type { MainModule , Registry } from "../lib" ;
1111import { Module } from "../lib" ;
12- import { ECSRegistry } from "./ecs-registry" ;
1312
1413export class ECSLibrary extends BaseComponentSystemLibrary {
1514 private module : MainModule ;
16- private _registry : ECSRegistry ;
15+ private _registry : Registry ;
1716
1817 private readonly path : string = "libecs.wasm" ;
1918
@@ -33,14 +32,14 @@ export class ECSLibrary extends BaseComponentSystemLibrary {
3332 . getAssetManager < AssetManagerLibrary > ( )
3433 . library . getWasm ( this . path ) ;
3534 this . module = await Module ( { locateFile : ( ) => wasmFile . path } ) ;
36- this . _registry = new ECSRegistry ( new this . module . Registry ( ) ) ;
35+ this . _registry = new this . module . Registry ( ) ;
3736 }
3837
3938 async __run ( ctx : Context ) : Promise < void > {
4039 this . _registry . runSystems ( ctx ) ;
4140 }
4241
43- get registry ( ) : ECSRegistry {
42+ get registry ( ) : Registry {
4443 return this . _registry ;
4544 }
4645}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import "../lib/libecs.wasm" ;
22
33export { ECSLibrary } from "./ecs-library" ;
4- export type { ECSRegistry } from "./ecs-registry" ;
54export type { Component , System , Registry } from "../lib" ;
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import {
66 InitContext ,
77} from "@nanoforge/common" ;
88import { EditableLibraryManager } from "@nanoforge/core/src/common/library/manager/library.manager" ;
9- import { type ECSRegistry } from "@nanoforge/ecs" ;
109import { ECSLibrary } from "@nanoforge/ecs/src/ecs-library" ;
1110
11+ import { type Registry } from "../lib" ;
12+
1213class Position {
1314 name : string = "Position" ;
1415 constructor (
@@ -22,7 +23,7 @@ class Position {
2223
2324describe ( "ECSLibrary" , ( ) => {
2425 let ecs : ECSLibrary ;
25- let registry : ECSRegistry ;
26+ let registry : Registry ;
2627 const assetManager = new AssetManagerLibrary ( ) ;
2728 const appContext = new ApplicationContext ( ) ;
2829 const libraryManager = new EditableLibraryManager ( ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ namespace nfo {
2424 {
2525 emscripten::register_type<Component>(" Component" , " {name: string, [key: string]: any}" );
2626 emscripten::register_type<System>(" System" , " (registry: Registry, ctx: any) => void" );
27- emscripten::register_type<ZipperInput>(" [ Component]" );
27+ emscripten::register_type<ZipperInput>(" Component[ ]" );
2828
2929 emscripten::class_<Registry>(" Registry" )
3030 .constructor ()
You can’t perform that action at this time.
0 commit comments