Skip to content

Commit

Permalink
Renderer: clean up (mrdoob#29383)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
  • Loading branch information
2 people authored and LD2Studio committed Sep 13, 2024
1 parent 01c47f2 commit cdd9323
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class Renderer {

} else {

const renderObjects = renderBundleData.renderObjects;
const { renderObjects } = renderBundleData;

for ( let i = 0, l = renderObjects.length; i < l; i ++ ) {

Expand Down Expand Up @@ -711,10 +711,12 @@ class Renderer {

// process render lists

const opaqueObjects = renderList.opaque;
const transparentObjects = renderList.transparent;
const bundles = renderList.bundles;
const lightsNode = renderList.lightsNode;
const {
bundles,
lightsNode,
transparent: transparentObjects,
opaque: opaqueObjects
} = renderList;

if ( bundles.length > 0 ) this._renderBundles( bundles, sceneRef, lightsNode );
if ( this.opaque === true && opaqueObjects.length > 0 ) this._renderObjects( opaqueObjects, camera, sceneRef, lightsNode );
Expand Down Expand Up @@ -1297,8 +1299,7 @@ class Renderer {

}

const geometry = object.geometry;
const material = object.material;
const { geometry, material } = object;

if ( material.visible ) {

Expand All @@ -1316,8 +1317,7 @@ class Renderer {

if ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {

const geometry = object.geometry;
const material = object.material;
const { geometry, material } = object;

if ( this.sortObjects === true ) {

Expand Down

0 comments on commit cdd9323

Please sign in to comment.