Skip to content

Commit

Permalink
Remove setting Group.material in godrays example (#26431)
Browse files Browse the repository at this point in the history
* Remove setting Group.material in godrays example

* Update webgl_postprocessing_godrays.html

Clean up.

---------

Co-authored-by: Michael Herzog <[email protected]>
  • Loading branch information
Methuselah96 and Mugen87 authored Jul 15, 2023
1 parent f72dc50 commit c5ad711
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/webgl_postprocessing_godrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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 );

Expand Down

0 comments on commit c5ad711

Please sign in to comment.