@rbxts/planck 0.1.1 → 0.1.3-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/Phase.d.ts CHANGED
@@ -1,3 +1,17 @@
1
- import { Phase } from "./types";
1
+ declare class Phase {
2
+ constructor(debugName?: string)
3
+ static readonly PreStartup: Phase
4
+ static readonly Startup: Phase
5
+ static readonly PostStartup: Phase
6
+ static readonly PreRender: Phase
7
+ static readonly PreAnimation: Phase
8
+ static readonly PreSimulation: Phase
9
+ static readonly PostSimulation: Phase
10
+ static readonly First: Phase
11
+ static readonly PreUpdate: Phase
12
+ static readonly Update: Phase
13
+ static readonly PostUpdate: Phase
14
+ static readonly Last: Phase
15
+ }
2
16
 
3
17
  export = Phase;
package/out/Pipeline.d.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { Pipeline } from "./types";
1
+ import Phase from "./Phase";
2
2
 
3
+ declare class Pipeline {
4
+ constructor(debugName?: string)
5
+ insert(phase: Phase) : Pipeline
6
+ insertAfter(phase: Phase, after: Phase): Pipeline
7
+ static readonly Main: Pipeline
8
+ static readonly Startup: Pipeline
9
+ }
3
10
 
4
11
  export = Pipeline;
@@ -1,3 +1,32 @@
1
- import { Scheduler } from "./types";
1
+ import Phase from "./Phase";
2
+ import Pipeline from "./Pipeline";
3
+ import { Hooks, EventInstance, EventLike, System, Plugin, HookFunctionMap, HookFunctionArgs } from "./types";
4
+
5
+ declare class Scheduler<T extends unknown[]> {
6
+ /** @hidden */
7
+ _orderedPhases: Phase[]
8
+ Hooks: Hooks["Hooks"]
9
+ insertAfter(phase: Phase, after: Phase | Pipeline): Scheduler<T>
10
+ insertAfter(pipeline: Pipeline, after: Phase | Pipeline): Scheduler<T>
11
+ insert(phase: Phase): Scheduler<T>
12
+ insert(phase: Pipeline): Scheduler<T>
13
+ insert(phase: Phase, instance: EventInstance | EventLike): Scheduler<T>
14
+ insert(pipeline: Pipeline, instance: EventInstance | EventLike): Scheduler<T>
15
+ runAll(): Scheduler<T>
16
+ run(system: System<T>): Scheduler<T>
17
+ run(phase: Phase): Scheduler<T>
18
+ run(pipeline: Pipeline): Scheduler<T>
19
+ setRunCondition(system: System<T>, fn: (...args: T) => boolean): Scheduler<T>
20
+ setRunCondition(phase: Phase, fn: (...args: T) => boolean): Scheduler<T>
21
+ setRunCondition(pipeline: Pipeline, fn: (...args: T) => boolean): Scheduler<T>
22
+ removeSystem(system: System<T>): Scheduler<T>
23
+ replaceSystem(oldSystem: System<T>, newSystem: System<T>): Scheduler<T>
24
+ editSystem(system: System<T>, phase: Phase): Scheduler<T>
25
+ addSystem(system: System<T>, phase?: Phase): Scheduler<T>
26
+ addPlugin(plugin: Plugin): Scheduler<T>
27
+ /** @hidden */
28
+ _addHook<K extends keyof HookFunctionMap>(hook: K, fn: (info: HookFunctionArgs<K, T>) => void): void
29
+ constructor(...args: T)
30
+ }
2
31
 
3
32
  export = Scheduler;
package/out/types.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import Phase from "./Phase";
2
+ import Pipeline from "./Pipeline";
3
+ import Scheduler from "./Scheduler";
1
4
 
2
5
  export type SystemInfo<T extends unknown[]> = {
3
6
  readonly system: SystemFn<T>;
@@ -83,29 +86,6 @@ export interface EventLike {
83
86
 
84
87
  export type EventInstance = Instance | EventLike;
85
88
 
86
- declare class Phase {
87
- constructor(debugName?: string)
88
- static readonly PreStartup: Phase
89
- static readonly Startup: Phase
90
- static readonly PostStartup: Phase
91
- static readonly PreRender: Phase
92
- static readonly PreAnimation: Phase
93
- static readonly PreSimulation: Phase
94
- static readonly PostSimulation: Phase
95
- static readonly First: Phase
96
- static readonly PreUpdate: Phase
97
- static readonly Update: Phase
98
- static readonly PostUpdate: Phase
99
- static readonly Last: Phase
100
- }
101
-
102
- declare class Pipeline {
103
- constructor(debugName?: string)
104
- insert(phase: Phase) : Pipeline
105
- insertAfter(phase: Phase, after: Phase): Pipeline
106
- static readonly Main: Pipeline
107
- static readonly Startup: Pipeline
108
- }
109
89
 
110
90
  export interface Utils {
111
91
  getSystem: <T extends unknown[]>(system: System<T>) => SystemFn<T> | undefined
@@ -117,35 +97,9 @@ export interface Utils {
117
97
  }
118
98
 
119
99
  export interface Plugin {
120
- build<T extends unknown[] = unknown[]>(schedular: Scheduler<T>): void
100
+ build(schedular: Scheduler<unknown[]>): void
121
101
  }
122
102
 
123
- declare class Scheduler<T extends unknown[]> {
124
- /** @hidden */
125
- _orderedPhases: Phase[]
126
- Hooks: Hooks["Hooks"]
127
- insertAfter(phase: Phase, after: Phase | Pipeline): Scheduler<T>
128
- insertAfter(pipeline: Pipeline, after: Phase | Pipeline): Scheduler<T>
129
- insert(phase: Phase): Scheduler<T>
130
- insert(phase: Pipeline): Scheduler<T>
131
- insert(phase: Phase, instance: EventInstance | EventLike): Scheduler<T>
132
- insert(pipeline: Pipeline, instance: EventInstance | EventLike): Scheduler<T>
133
- runAll(): Scheduler<T>
134
- run(system: System<T>): Scheduler<T>
135
- run(phase: Phase): Scheduler<T>
136
- run(pipeline: Pipeline): Scheduler<T>
137
- setRunCondition(system: System<T>, fn: (...args: T) => boolean): Scheduler<T>
138
- setRunCondition(phase: Phase, fn: (...args: T) => boolean): Scheduler<T>
139
- setRunCondition(pipeline: Pipeline, fn: (...args: T) => boolean): Scheduler<T>
140
- removeSystem(system: System<T>): Scheduler<T>
141
- replaceSystem(oldSystem: System<T>, newSystem: System<T>): Scheduler<T>
142
- editSystem(system: System<T>, phase: Phase): Scheduler<T>
143
- addSystem(system: System<T>, phase?: Phase): Scheduler<T>
144
- addPlugin(plugin: Plugin): Scheduler<T>
145
- /** @hidden */
146
- _addHook<K extends keyof HookFunctionMap>(hook: K, fn: (info: HookFunctionArgs<K, T>) => void): void
147
- constructor(...args: T)
148
- }
149
103
 
150
104
 
151
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/planck",
3
- "version": "0.1.1",
3
+ "version": "0.1.3-rc.0",
4
4
  "description": "An agnostic scheduler for ECS",
5
5
  "main": "out/init.lua",
6
6
  "repository": {