Browse Source

Manual: Fix GPU picking demo. (#27866)

* Manual: Fix GPU picking demo.

* Update picking-gpu.html
Michael Herzog 1 year ago
parent
commit
b09f60e837

+ 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));
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
 +  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),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,
 +    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 ) );
 		cube.scale.set( rand( 3, 6 ), rand( 3, 6 ), rand( 3, 6 ) );
 
 
 		const pickingMaterial = new THREE.MeshPhongMaterial( {
 		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 ),
 			color: new THREE.Color( 0, 0, 0 ),
 			specular: new THREE.Color( 0, 0, 0 ),
 			specular: new THREE.Color( 0, 0, 0 ),
 			map: texture,
 			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));
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
 +  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),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,
 +    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));
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
 +  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),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,
 +    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));
   cube.scale.set(rand(3, 6), rand(3, 6), rand(3, 6));
 
 
 +  const pickingMaterial = new THREE.MeshPhongMaterial({
 +  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),
 +    color: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    specular: new THREE.Color(0, 0, 0),
 +    map: texture,
 +    map: texture,