perf: less particle systems
This commit is contained in:
parent
91af56c9ff
commit
e99ae1136b
|
@ -4,6 +4,17 @@ import createEcs from '@/server/create/ecs.js';
|
|||
import ClientEcs from './client-ecs.js';
|
||||
|
||||
const ecs = createEcs(ClientEcs);
|
||||
|
||||
[
|
||||
'ClampPositions',
|
||||
'Colliders',
|
||||
'MaintainColliderHash',
|
||||
'VisibleAabbs',
|
||||
]
|
||||
.forEach((system) => {
|
||||
ecs.system(system).active = false;
|
||||
})
|
||||
|
||||
ecs.$$caret = Math.pow(2, 31);
|
||||
|
||||
const emitter = new Emitter(ecs);
|
||||
|
@ -30,7 +41,7 @@ function tick(now) {
|
|||
ecs.tick(elapsed);
|
||||
emitter.tick(elapsed);
|
||||
const update = {};
|
||||
const lastNearby = new Set(memory.values());
|
||||
const lastNearby = new Set(memory);
|
||||
for (const id in ecs.$$entities) {
|
||||
const entity = ecs.$$entities[id];
|
||||
if (ecs.$$detached.has(entity.id)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user