MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / onWindowResize

Function onWindowResize

public/iframe/lib/js/mixinsThree.js:84–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83 },
84 onWindowResize () {
85 const { camera, renderer } = this
86 const height = document.getElementById(this.id).clientHeight;
87 const width = document.getElementById(this.id).clientWidth;
88 camera.aspect = width / height
89 camera.updateProjectionMatrix();
90
91 renderer.setSize(width, height);
92 this.render();
93
94 },
95 animation () {
96 const { camera, controls, scene } = this
97 TWEEN.update();

Callers

nothing calls this directly

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected