浏览代码

Manual: Fix GPU picking demo. (#27866)

* Manual: Fix GPU picking demo.

* Update picking-gpu.html
Michael Herzog 1 年之前
父节点
当前提交
b09f60e837
共有 5 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      manual/en/picking.html
  2. 1 1
      manual/examples/picking-gpu.html
  3. 1 1
      manual/ja/picking.html
  4. 1 1
      manual/ko/picking.html
  5. 1 1
      manual/zh/picking.html

+ 1 - 1
manual/en/picking.html

@@ -279,7 +279,7 @@ for (let i = 0; i < numObjects; ++i) {
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
-+    emissive: new THREE.Color(id),
++    emissive: new THREE.Color().setHex(id, THREE.NoColorSpace),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,

+ 1 - 1
manual/examples/picking-gpu.html

@@ -113,7 +113,7 @@ function main() {
 		cube.scale.set( rand( 3, 6 ), rand( 3, 6 ), rand( 3, 6 ) );
 
 		const pickingMaterial = new THREE.MeshPhongMaterial( {
-			emissive: new THREE.Color( id ),
+			emissive: new THREE.Color().setHex( id, THREE.NoColorSpace ),
 			color: new THREE.Color( 0, 0, 0 ),
 			specular: new THREE.Color( 0, 0, 0 ),
 			map: texture,

+ 1 - 1
manual/ja/picking.html

@@ -296,7 +296,7 @@ for (let i = 0; i < numObjects; ++i) {
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
-+    emissive: new THREE.Color(id),
++    emissive: new THREE.Color().setHex(id, THREE.NoColorSpace),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,

+ 1 - 1
manual/ko/picking.html

@@ -268,7 +268,7 @@ for (let i = 0; i < numObjects; ++i) {
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
-+    emissive: new THREE.Color(id),
++    emissive: new THREE.Color().setHex(id, THREE.NoColorSpace),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,

+ 1 - 1
manual/zh/picking.html

@@ -262,7 +262,7 @@ for (let i = 0; i < numObjects; ++i) {
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
-+    emissive: new THREE.Color(id),
++    emissive: new THREE.Color().setHex(id, THREE.NoColorSpace),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,