未验证 提交 b36ce9e6 编写于 作者: V Vis 提交者: GitHub

Fix webgl_gpgpu_birds references error (#20675)

* fix_webgl_gpgpu_birds_index_error

* screenshot

* Restore Left Right names

* Update webgl_gpgpu_birds.html
Co-authored-by: NMichael Herzog <michael.herzog@human-interactive.org>
上级 1dd66f39
......@@ -318,7 +318,8 @@
super();
const triangles = BIRDS * 3;
const trianglesPerBird = 3;
const triangles = BIRDS * trianglesPerBird;
const points = triangles * 3;
const vertices = new THREE.BufferAttribute( new Float32Array( points * 3 ), 3 );
......@@ -375,9 +376,10 @@
for ( let v = 0; v < triangles * 3; v ++ ) {
const i = ~ ~ ( v / 3 );
const x = ( i % WIDTH ) / WIDTH;
const y = ~ ~ ( i / WIDTH ) / WIDTH;
const triangleIndex = ~ ~ ( v / 3 );
const birdIndex = ~ ~ ( triangleIndex / trianglesPerBird )
const x = ( birdIndex % WIDTH ) / WIDTH;
const y = ~ ~ ( birdIndex / WIDTH ) / WIDTH;
const c = new THREE.Color(
0x444444 +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册