MCPcopy Create free account
hub / github.com/eva-engine/eva.js / init

Method init

packages/plugin-stats/lib/StatsSystem.ts:26–37  ·  view source on GitHub ↗
(param: StatsParams = { show: true })

Source from the content-addressed store, hash-verified

24 hook;
25 component: StatsComponent;
26 init(param: StatsParams = { show: true }) {
27 this.show = param.show;
28 this.style = param.style;
29 this.renderSystem = this.game.getSystem('Renderer') as RendererSystem;
30 this.app = this.renderSystem.application;
31 if (this.app && this.show) {
32 // @ts-ignore
33 const gl = this.app.renderer.gl as WebGLRenderingContext;
34 this.hook = new BaseHooks();
35 this.hook.attach(gl);
36 }
37 }
38 start() {
39 if (!this.show) return;
40 this.component = this.game.scene.addComponent(new StatsComponent());

Callers

nothing calls this directly

Calls 2

getSystemMethod · 0.80
attachMethod · 0.80

Tested by

no test coverage detected