Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/renderers/webgl/WebGLRenderLists.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function WebGLRenderList() {
const transmissive = [];
const transparent = [];

const objectIdToRenderItem = new Map();

function init() {

renderItemsIndex = 0;
Expand All @@ -64,6 +66,8 @@ function WebGLRenderList() {
transmissive.length = 0;
transparent.length = 0;

objectIdToRenderItem.clear();

}

function getNextRenderItem( object, geometry, material, groupOrder, z, group ) {
Expand Down Expand Up @@ -122,6 +126,8 @@ function WebGLRenderList() {

}

objectIdToRenderItem.set( object.id, renderItem );

}

function unshift( object, geometry, material, groupOrder, z, group ) {
Expand All @@ -142,6 +148,8 @@ function WebGLRenderList() {

}

objectIdToRenderItem.set( object.id, renderItem );

}

function sort( customOpaqueSort, customTransparentSort ) {
Expand Down Expand Up @@ -178,6 +186,8 @@ function WebGLRenderList() {
transmissive: transmissive,
transparent: transparent,

objectIdToRenderItem: objectIdToRenderItem,

init: init,
push: push,
unshift: unshift,
Expand Down
Loading