浏览代码

Remove setting Group.material in godrays example (#26431)

* Remove setting Group.material in godrays example

* Update webgl_postprocessing_godrays.html

Clean up.

---------

Co-authored-by: Michael Herzog <[email protected]>
Nathan Bierema 2 年之前
父节点
当前提交
c5ad711da8
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      examples/webgl_postprocessing_godrays.html

+ 1 - 4
examples/webgl_postprocessing_godrays.html

@@ -73,14 +73,11 @@
 
 				materialDepth = new THREE.MeshDepthMaterial();
 
-				const materialScene = new THREE.MeshBasicMaterial( { color: 0x000000 } );
-
 				// tree
 
 				const loader = new OBJLoader();
 				loader.load( 'models/obj/tree.obj', function ( object ) {
 
-					object.material = materialScene;
 					object.position.set( 0, - 150, - 150 );
 					object.scale.multiplyScalar( 400 );
 					scene.add( object );
@@ -90,7 +87,7 @@
 				// sphere
 
 				const geo = new THREE.SphereGeometry( 1, 20, 10 );
-				sphereMesh = new THREE.Mesh( geo, materialScene );
+				sphereMesh = new THREE.Mesh( geo, new THREE.MeshBasicMaterial( { color: 0x000000 } ) );
 				sphereMesh.scale.multiplyScalar( 20 );
 				scene.add( sphereMesh );