INNER CODE UNIT · JavaScript
onWindowResize
moshang-ax/lottery · product/src/lottery/index.js:451
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
render();
}
function animate() {
// 让场景通过x轴或者y轴旋转
// rotate && (scene.rotation.y += 0.088);
requestAnimationFrame(animate);
TWEEN.update();
controls.update();
// 渲染循环
// render();
}