Skip to content

Commit 55b9b14

Browse files
committed
Renderer: Set info as public
1 parent a02aee4 commit 55b9b14

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

examples/jsm/renderers/common/Renderer.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class Renderer {
4646
this.depth = true;
4747
this.stencil = true;
4848

49+
this.info = new Info();
50+
4951
// internals
5052

5153
this._pixelRatio = 1;
@@ -56,7 +58,6 @@ class Renderer {
5658
this._scissor = new Vector4( 0, 0, this._width, this._height );
5759
this._scissorTest = false;
5860

59-
this._info = null;
6061
this._properties = null;
6162
this._attributes = null;
6263
this._geometries = null;
@@ -131,15 +132,14 @@ class Renderer {
131132

132133
}
133134

134-
this._info = new Info();
135135
this._nodes = new Nodes( this, backend );
136136
this._attributes = new Attributes( backend );
137137
this._background = new Background( this, this._nodes );
138-
this._geometries = new Geometries( this._attributes, this._info );
139-
this._textures = new Textures( backend, this._info );
138+
this._geometries = new Geometries( this._attributes, this.info );
139+
this._textures = new Textures( backend, this.info );
140140
this._pipelines = new Pipelines( backend, this._nodes );
141-
this._bindings = new Bindings( backend, this._nodes, this._textures, this._attributes, this._pipelines, this._info );
142-
this._objects = new RenderObjects( this, this._nodes, this._geometries, this._pipelines, this._bindings, this._info );
141+
this._bindings = new Bindings( backend, this._nodes, this._textures, this._attributes, this._pipelines, this.info );
142+
this._objects = new RenderObjects( this, this._nodes, this._geometries, this._pipelines, this._bindings, this.info );
143143
this._renderLists = new RenderLists();
144144
this._renderContexts = new RenderContexts();
145145

@@ -214,9 +214,9 @@ class Renderer {
214214

215215
if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld();
216216

217-
if ( this._info.autoReset === true ) this._info.reset();
217+
if ( this.info.autoReset === true ) this.info.reset();
218218

219-
this._info.render.frame ++;
219+
this.info.render.frame ++;
220220

221221
//
222222

@@ -612,12 +612,13 @@ class Renderer {
612612

613613
dispose() {
614614

615+
this.info.dispose();
616+
615617
this._objects.dispose();
616618
this._properties.dispose();
617619
this._pipelines.dispose();
618620
this._nodes.dispose();
619621
this._bindings.dispose();
620-
this._info.dispose();
621622
this._renderLists.dispose();
622623
this._renderContexts.dispose();
623624
this._textures.dispose();
@@ -921,7 +922,7 @@ class Renderer {
921922

922923
//
923924

924-
this.backend.draw( renderObject, this._info );
925+
this.backend.draw( renderObject, this.info );
925926

926927
}
927928

0 commit comments

Comments
 (0)