|
@@ -1249,6 +1249,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
var array, index;
|
|
|
|
|
|
+ // allocate the next position in the appropriate array
|
|
|
+
|
|
|
if ( object.material.transparent ) {
|
|
|
|
|
|
array = transparentImmediateObjects;
|
|
@@ -1261,6 +1263,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // recycle existing position or grow the array
|
|
|
+
|
|
|
if ( index < array.length ) {
|
|
|
|
|
|
array[ index ] = object;
|
|
@@ -1279,6 +1283,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
var array, index;
|
|
|
|
|
|
+ // allocate the next position in the appropriate array
|
|
|
+
|
|
|
if ( material.transparent ) {
|
|
|
|
|
|
array = transparentObjects;
|
|
@@ -1291,6 +1297,8 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // recycle existing render item or grow the array
|
|
|
+
|
|
|
var renderItem = array[ index ];
|
|
|
|
|
|
if ( renderItem !== undefined ) {
|