浏览代码

Examples: Fix onWindowResize (#28706)

Nathan Bierema 1 年之前
父节点
当前提交
291f210353
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      examples/webgpu_tsl_interoperability.html

+ 4 - 6
examples/webgpu_tsl_interoperability.html

@@ -46,8 +46,6 @@
 
 			function onWindowResize() {
 
-				camera.aspect = window.innerWidth / window.innerHeight;
-				camera.updateProjectionMatrix();
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 			}
@@ -92,7 +90,7 @@
 						vUv: vec2f,
 						tex: texture_2d<f32>,
 						texSampler: sampler,
-						crtWidth: f32, 
+						crtWidth: f32,
 						crtHeight: f32,
 						cellOffset: f32,
 						cellSize: f32,
@@ -105,7 +103,7 @@
 					) -> vec3<f32> {
 						// Convert uv into map of pixels
 						var pixel = ( vUv * 0.5 + 0.5 ) * vec2<f32>(
-							crtWidth, 
+							crtWidth,
 							crtHeight
 						);
 						// Coordinate for each cell in the pixel map
@@ -130,8 +128,8 @@
 						let ind = floor( subcoord.x ) % 3;
 
 						var maskColor = vec3<f32>(
-							f32( ind == 0.0 ), 
-							f32( ind == 1.0 ), 
+							f32( ind == 0.0 ),
+							f32( ind == 1.0 ),
 							f32( ind == 2.0 )
 						) * 3.0;