23 lines
513 B
JavaScript
23 lines
513 B
JavaScript
import Ecs from '@/ecs/ecs.js';
|
|
import {readAsset} from '@/util/resources.js';
|
|
|
|
export default class ClientEcs extends Ecs {
|
|
constructor(specification) {
|
|
super(specification);
|
|
[
|
|
'MaintainColliderHash',
|
|
].forEach((defaultSystem) => {
|
|
const System = this.system(defaultSystem);
|
|
if (System) {
|
|
System.active = true;
|
|
}
|
|
});
|
|
}
|
|
async readAsset(path) {
|
|
const resource = await readAsset(path);
|
|
return resource
|
|
? resource
|
|
: new ArrayBuffer(0);
|
|
}
|
|
}
|