Przeglądaj źródła

Fix webgpu_compute example

Takahiro 5 lat temu
rodzic
commit
a292c188ac
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      examples/webgpu_compute.html

+ 2 - 2
examples/webgpu_compute.html

@@ -54,8 +54,8 @@
 
 					const r = Math.random() * 0.01 + 0.0005;
 					const degree = Math.random() * 360;
-					velocityArray[ i * 3 + 0 ] = r * Math.sin( degree * Math.PI / 180 );
-					velocityArray[ i * 3 + 1 ] = r * Math.cos( degree * Math.PI / 180 );
+					velocityArray[ i + 0 ] = r * Math.sin( degree * Math.PI / 180 );
+					velocityArray[ i + 1 ] = r * Math.cos( degree * Math.PI / 180 );
 
 				}