diff --git a/examples/threejs/custom-pipeline-module/customThreejsPipelineModule.js b/examples/threejs/custom-pipeline-module/customThreejsPipelineModule.js index ec533cb..b37f961 100644 --- a/examples/threejs/custom-pipeline-module/customThreejsPipelineModule.js +++ b/examples/threejs/custom-pipeline-module/customThreejsPipelineModule.js @@ -47,8 +47,10 @@ const customThreejsPipelineModule = () => { } }, onCanvasSizeChange: ({canvasWidth, canvasHeight}) => { - const {renderer} = scene3 + const {renderer, camera} = scene3 renderer.setSize(canvasWidth, canvasHeight) + camera.aspect = canvasWidth / canvasHeight + camera.updateProjectionMatrix() }, onRender: () => { const {scene, renderer, camera} = scene3