Browse Source

[threejs-backgrounds.md]: fix 'scene.background = rt.texture'

puxiao 4 years ago
parent
commit
0ea01ef8c6

+ 1 - 1
threejs/lessons/ja/threejs-backgrounds.md

@@ -219,7 +219,7 @@ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
 +    () => {
 +    () => {
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      rt.fromEquirectangularTexture(renderer, texture);
 +      rt.fromEquirectangularTexture(renderer, texture);
-+      scene.background = rt;
++      scene.background = rt.texture;
 +    });
 +    });
 }
 }
 ```
 ```

+ 1 - 1
threejs/lessons/kr/threejs-backgrounds.md

@@ -222,7 +222,7 @@ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
 +    () => {
 +    () => {
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      rt.fromEquirectangularTexture(renderer, texture);
 +      rt.fromEquirectangularTexture(renderer, texture);
-+      scene.background = rt;
++      scene.background = rt.texture;
 +    });
 +    });
 }
 }
 ```
 ```

+ 1 - 1
threejs/lessons/threejs-backgrounds.md

@@ -235,7 +235,7 @@ Passing in the height of the equirectangular image seems like a good bet.
 +    () => {
 +    () => {
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
 +      rt.fromEquirectangularTexture(renderer, texture);
 +      rt.fromEquirectangularTexture(renderer, texture);
-+      scene.background = rt;
++      scene.background = rt.texture;
 +    });
 +    });
 }
 }
 ```
 ```