MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / resize

Method resize

components/liquid-ether.tsx:157–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 this.clock.start();
156 }
157 resize() {
158 if (!this.container) return;
159 const rect = this.container.getBoundingClientRect();
160 this.width = Math.max(1, Math.floor(rect.width));
161 this.height = Math.max(1, Math.floor(rect.height));
162 this.aspect = this.width / this.height;
163 if (this.renderer)
164 this.renderer.setSize(this.width, this.height, false);
165 }
166 update() {
167 if (!this.clock) return;
168 this.delta = this.clock.getDelta();

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected