```typescript=
enum FilterFlags {
None = 0,
Omit = 1 << 0,
Readonly = 1 << 1,
}
rapier.js
three.js
```
```typescript=
type GroupWithSystemsPair = string, System[]];
type Schedule = {
run(): void
}
const schedule = GroupWithSystemsPair[]
const fixedSchedule = GroupWithSystemsPair[]
function run() {
let time_accum = elapsed_since_last_frame()
while(time_accum > 0) {
for(let i = 0; i < fixedSchedule.length; i++) {
fixedSchedule.run()
}
time_accum -= fixed_timestep
}
for(let i = 0; i < schedule.length; i++) {
schedule.run();
}
}
https://www.gafferongames.com/post/fix_your_timestep/
```
```typescript=
type SystemInfo = {
name: string,
group: GroupLike
}
function system(options: GroupLike | Partial<SystemInfo>, system: System) {
return {
options,
system
}
}
export const example_system1 = system(
Groups.FixedUpdate,
() => {
for(const [p,v] of query(Pos, Vel)) {
}
}
export const example_system2 = system({
name: "Example System v3",
group: Groups.FixedUpdate,
}, () => {
for(const [p,v] of query(Pos, Vel)) {
}
}
export const example_system3 = (world: World) => {
for(const [p,v] of query(Pos, Vel)) {
}
}
const TestGroup = group("TestGroup", { after: FixedUpdate })
const world = World.build()
.with({ capacity: 20_000 })
.systems(example_system, example_system2)
.systems_in_group(Groups.Update, example_system3)
.resources(new Time())
.plugins(Vang3DPlugin)
.groups("asdasdasd", TestGroup)
.groups(["test group lmao", { before: TestGroup }])
.done()
```