Skip to content

Commit 00904c5

Browse files
committed
Updated builds.
1 parent 1da7835 commit 00904c5

File tree

3 files changed

+47
-48
lines changed

3 files changed

+47
-48
lines changed

build/three.js

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12356,13 +12356,11 @@
1235612356
var image = texture.image;
1235712357

1235812358
if (image && image.height > 0) {
12359-
var currentRenderList = renderer.getRenderList();
1236012359
var currentRenderTarget = renderer.getRenderTarget();
1236112360
var renderTarget = new WebGLCubeRenderTarget(image.height / 2);
1236212361
renderTarget.fromEquirectangularTexture(renderer, texture);
1236312362
cubemaps.set(texture, renderTarget);
1236412363
renderer.setRenderTarget(currentRenderTarget);
12365-
renderer.setRenderList(currentRenderList);
1236612364
texture.addEventListener('dispose', onTextureDispose);
1236712365
return mapTextureMapping(renderTarget.texture, texture.mapping);
1236812366
} else {
@@ -14480,20 +14478,19 @@
1448014478
function WebGLRenderLists(properties) {
1448114479
var lists = new WeakMap();
1448214480

14483-
function get(scene, camera) {
14484-
var cameras = lists.get(scene);
14481+
function get(scene, renderCallDepth) {
1448514482
var list;
1448614483

14487-
if (cameras === undefined) {
14484+
if (lists.has(scene) === false) {
1448814485
list = new WebGLRenderList(properties);
14489-
lists.set(scene, new WeakMap());
14490-
lists.get(scene).set(camera, list);
14486+
lists.set(scene, []);
14487+
lists.get(scene).push(list);
1449114488
} else {
14492-
list = cameras.get(camera);
14493-
14494-
if (list === undefined) {
14489+
if (renderCallDepth >= lists.get(scene).length) {
1449514490
list = new WebGLRenderList(properties);
14496-
cameras.set(camera, list);
14491+
lists.get(scene).push(list);
14492+
} else {
14493+
list = lists.get(scene)[renderCallDepth];
1449714494
}
1449814495
}
1449914496

@@ -18168,8 +18165,9 @@
1816818165

1816918166
var currentRenderList = null;
1817018167
var currentRenderState = null; // render() can be called from within a callback triggered by another render.
18171-
// We track this so that the nested render call gets its state isolated from the parent render call.
18168+
// We track this so that the nested render call gets its list and state isolated from the parent render call.
1817218169

18170+
var renderListStack = [];
1817318171
var renderStateStack = []; // public properties
1817418172

1817518173
this.domElement = _canvas; // Debug configuration container
@@ -18838,8 +18836,9 @@
1883818836

1883918837
_localClippingEnabled = this.localClippingEnabled;
1884018838
_clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled, camera);
18841-
currentRenderList = renderLists.get(scene, camera);
18839+
currentRenderList = renderLists.get(scene, renderListStack.length);
1884218840
currentRenderList.init();
18841+
renderListStack.push(currentRenderList);
1884318842
projectObject(scene, camera, 0, _this.sortObjects);
1884418843
currentRenderList.finish();
1884518844

@@ -18892,7 +18891,13 @@
1889218891
currentRenderState = null;
1889318892
}
1889418893

18895-
currentRenderList = null;
18894+
renderListStack.pop();
18895+
18896+
if (renderListStack.length > 0) {
18897+
currentRenderList = renderListStack[renderListStack.length - 1];
18898+
} else {
18899+
currentRenderList = null;
18900+
}
1889618901
};
1889718902

1889818903
function projectObject(object, camera, groupOrder, sortObjects) {
@@ -19308,14 +19313,6 @@
1930819313
return _currentActiveMipmapLevel;
1930919314
};
1931019315

19311-
this.getRenderList = function () {
19312-
return currentRenderList;
19313-
};
19314-
19315-
this.setRenderList = function (renderList) {
19316-
currentRenderList = renderList;
19317-
};
19318-
1931919316
this.getRenderTarget = function () {
1932019317
return _currentRenderTarget;
1932119318
};

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14682,15 +14682,13 @@ function WebGLCubeMaps( renderer ) {
1468214682

1468314683
if ( image && image.height > 0 ) {
1468414684

14685-
const currentRenderList = renderer.getRenderList();
1468614685
const currentRenderTarget = renderer.getRenderTarget();
1468714686

1468814687
const renderTarget = new WebGLCubeRenderTarget( image.height / 2 );
1468914688
renderTarget.fromEquirectangularTexture( renderer, texture );
1469014689
cubemaps.set( texture, renderTarget );
1469114690

1469214691
renderer.setRenderTarget( currentRenderTarget );
14693-
renderer.setRenderList( currentRenderList );
1469414692

1469514693
texture.addEventListener( 'dispose', onTextureDispose );
1469614694

@@ -17801,24 +17799,26 @@ function WebGLRenderLists( properties ) {
1780117799

1780217800
let lists = new WeakMap();
1780317801

17804-
function get( scene, camera ) {
17802+
function get( scene, renderCallDepth ) {
1780517803

17806-
const cameras = lists.get( scene );
1780717804
let list;
1780817805

17809-
if ( cameras === undefined ) {
17806+
if ( lists.has( scene ) === false ) {
1781017807

1781117808
list = new WebGLRenderList( properties );
17812-
lists.set( scene, new WeakMap() );
17813-
lists.get( scene ).set( camera, list );
17809+
lists.set( scene, [] );
17810+
lists.get( scene ).push( list );
1781417811

1781517812
} else {
1781617813

17817-
list = cameras.get( camera );
17818-
if ( list === undefined ) {
17814+
if ( renderCallDepth >= lists.get( scene ).length ) {
1781917815

1782017816
list = new WebGLRenderList( properties );
17821-
cameras.set( camera, list );
17817+
lists.get( scene ).push( list );
17818+
17819+
} else {
17820+
17821+
list = lists.get( scene )[ renderCallDepth ];
1782217822

1782317823
}
1782417824

@@ -22991,8 +22991,9 @@ function WebGLRenderer( parameters ) {
2299122991
let currentRenderState = null;
2299222992

2299322993
// render() can be called from within a callback triggered by another render.
22994-
// We track this so that the nested render call gets its state isolated from the parent render call.
22994+
// We track this so that the nested render call gets its list and state isolated from the parent render call.
2299522995

22996+
const renderListStack = [];
2299622997
const renderStateStack = [];
2299722998

2299822999
// public properties
@@ -23946,9 +23947,11 @@ function WebGLRenderer( parameters ) {
2394623947
_localClippingEnabled = this.localClippingEnabled;
2394723948
_clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled, camera );
2394823949

23949-
currentRenderList = renderLists.get( scene, camera );
23950+
currentRenderList = renderLists.get( scene, renderListStack.length );
2395023951
currentRenderList.init();
2395123952

23953+
renderListStack.push( currentRenderList );
23954+
2395223955
projectObject( scene, camera, 0, _this.sortObjects );
2395323956

2395423957
currentRenderList.finish();
@@ -24023,6 +24026,7 @@ function WebGLRenderer( parameters ) {
2402324026
// _gl.finish();
2402424027

2402524028
renderStateStack.pop();
24029+
2402624030
if ( renderStateStack.length > 0 ) {
2402724031

2402824032
currentRenderState = renderStateStack[ renderStateStack.length - 1 ];
@@ -24033,7 +24037,17 @@ function WebGLRenderer( parameters ) {
2403324037

2403424038
}
2403524039

24036-
currentRenderList = null;
24040+
renderListStack.pop();
24041+
24042+
if ( renderListStack.length > 0 ) {
24043+
24044+
currentRenderList = renderListStack[ renderListStack.length - 1 ];
24045+
24046+
} else {
24047+
24048+
currentRenderList = null;
24049+
24050+
}
2403724051

2403824052
};
2403924053

@@ -24673,18 +24687,6 @@ function WebGLRenderer( parameters ) {
2467324687

2467424688
};
2467524689

24676-
this.getRenderList = function () {
24677-
24678-
return currentRenderList;
24679-
24680-
};
24681-
24682-
this.setRenderList = function ( renderList ) {
24683-
24684-
currentRenderList = renderList;
24685-
24686-
};
24687-
2468824690
this.getRenderTarget = function () {
2468924691

2469024692
return _currentRenderTarget;

0 commit comments

Comments
 (0)