12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031 |
- import Animation from './Animation.js';
- import RenderObjects from './RenderObjects.js';
- import Attributes from './Attributes.js';
- import Geometries from './Geometries.js';
- import Info from './Info.js';
- import Pipelines from './Pipelines.js';
- import Bindings from './Bindings.js';
- import RenderLists from './RenderLists.js';
- import RenderContexts from './RenderContexts.js';
- import Textures from './Textures.js';
- import Background from './Background.js';
- import Nodes from './nodes/Nodes.js';
- import Color4 from './Color4.js';
- import { Scene, Frustum, Matrix4, Vector2, Vector3, Vector4, DoubleSide, BackSide, FrontSide, SRGBColorSpace, NoToneMapping } from 'three';
- const _scene = new Scene();
- const _drawingBufferSize = new Vector2();
- const _screen = new Vector4();
- const _frustum = new Frustum();
- const _projScreenMatrix = new Matrix4();
- const _vector3 = new Vector3();
- class Renderer {
- constructor( backend, parameters = {} ) {
- this.isRenderer = true;
- //
- const {
- logarithmicDepthBuffer = false,
- } = parameters;
- // public
- this.domElement = backend.getDomElement();
- this.backend = backend;
- this.autoClear = true;
- this.autoClearColor = true;
- this.autoClearDepth = true;
- this.autoClearStencil = true;
- this.logarithmicDepthBuffer = logarithmicDepthBuffer;
- this.outputColorSpace = SRGBColorSpace;
- this.toneMapping = NoToneMapping;
- this.toneMappingExposure = 1.0;
- this.sortObjects = true;
- this.depth = true;
- this.stencil = true;
- this.info = new Info();
- // internals
- this._pixelRatio = 1;
- this._width = this.domElement.width;
- this._height = this.domElement.height;
- this._viewport = new Vector4( 0, 0, this._width, this._height );
- this._scissor = new Vector4( 0, 0, this._width, this._height );
- this._scissorTest = false;
- this._properties = null;
- this._attributes = null;
- this._geometries = null;
- this._nodes = null;
- this._animation = null;
- this._bindings = null;
- this._objects = null;
- this._pipelines = null;
- this._renderLists = null;
- this._renderContexts = null;
- this._textures = null;
- this._background = null;
- this._currentRenderContext = null;
- this._opaqueSort = null;
- this._transparentSort = null;
- this._clearColor = new Color4( 0x000000 );
- this._clearDepth = 1;
- this._clearStencil = 0;
- this._renderTarget = null;
- this._activeCubeFace = 0;
- this._activeMipmapLevel = 0;
- this._renderObjectFunction = null;
- this._currentRenderObjectFunction = null;
- this._initialized = false;
- this._initPromise = null;
- // backwards compatibility
- this.shadowMap = {
- enabled: false,
- type: null
- };
- this.xr = {
- enabled: false
- };
- }
- async init() {
- if ( this._initialized ) {
- throw new Error( 'Renderer: Backend has already been initialized.' );
- }
- if ( this._initPromise !== null ) {
- return this._initPromise;
- }
- this._initPromise = new Promise( async ( resolve, reject ) => {
- const backend = this.backend;
- try {
- await backend.init( this );
- } catch ( error ) {
- reject( error );
- return;
- }
- this._nodes = new Nodes( this, backend );
- this._animation = new Animation( this._nodes, this.info );
- this._attributes = new Attributes( backend );
- this._background = new Background( this, this._nodes );
- this._geometries = new Geometries( this._attributes, this.info );
- this._textures = new Textures( backend, this.info );
- this._pipelines = new Pipelines( backend, this._nodes );
- this._bindings = new Bindings( backend, this._nodes, this._textures, this._attributes, this._pipelines, this.info );
- this._objects = new RenderObjects( this, this._nodes, this._geometries, this._pipelines, this._bindings, this.info );
- this._renderLists = new RenderLists();
- this._renderContexts = new RenderContexts();
- //
- this._initialized = true;
- resolve();
- } );
- return this._initPromise;
- }
- get coordinateSystem() {
- return this.backend.coordinateSystem;
- }
- async compile( /*scene, camera*/ ) {
- console.warn( 'THREE.Renderer: .compile() is not implemented yet.' );
- }
- async render( scene, camera ) {
- if ( this._initialized === false ) await this.init();
- // preserve render tree
- const nodeFrame = this._nodes.nodeFrame;
- const previousRenderId = nodeFrame.renderId;
- const previousRenderContext = this._currentRenderContext;
- const previousRenderObjectFunction = this._currentRenderObjectFunction;
- //
- const sceneRef = ( scene.isScene === true ) ? scene : _scene;
- const renderTarget = this._renderTarget;
- const renderContext = this._renderContexts.get( scene, camera, renderTarget );
- const activeCubeFace = this._activeCubeFace;
- const activeMipmapLevel = this._activeMipmapLevel;
- this._currentRenderContext = renderContext;
- this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
- //
- this.info.calls ++;
- this.info.render.calls ++;
- nodeFrame.renderId = this.info.calls;
- //
- const coordinateSystem = this.coordinateSystem;
- if ( camera.coordinateSystem !== coordinateSystem ) {
- camera.coordinateSystem = coordinateSystem;
- camera.updateProjectionMatrix();
- }
- //
- if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld();
- if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld();
- if ( this.info.autoReset === true ) this.info.reset();
- //
- let viewport = this._viewport;
- let scissor = this._scissor;
- let pixelRatio = this._pixelRatio;
- if ( renderTarget !== null ) {
- viewport = renderTarget.viewport;
- scissor = renderTarget.scissor;
- pixelRatio = 1;
- }
- this.getDrawingBufferSize( _drawingBufferSize );
- _screen.set( 0, 0, _drawingBufferSize.width, _drawingBufferSize.height );
- const minDepth = ( viewport.minDepth === undefined ) ? 0 : viewport.minDepth;
- const maxDepth = ( viewport.maxDepth === undefined ) ? 1 : viewport.maxDepth;
- renderContext.viewportValue.copy( viewport ).multiplyScalar( pixelRatio ).floor();
- renderContext.viewportValue.width >>= activeMipmapLevel;
- renderContext.viewportValue.height >>= activeMipmapLevel;
- renderContext.viewportValue.minDepth = minDepth;
- renderContext.viewportValue.maxDepth = maxDepth;
- renderContext.viewport = renderContext.viewportValue.equals( _screen ) === false;
- renderContext.scissorValue.copy( scissor ).multiplyScalar( pixelRatio ).floor();
- renderContext.scissor = this._scissorTest && renderContext.scissorValue.equals( _screen ) === false;
- renderContext.scissorValue.width >>= activeMipmapLevel;
- renderContext.scissorValue.height >>= activeMipmapLevel;
- renderContext.depth = this.depth;
- renderContext.stencil = this.stencil;
- //
- sceneRef.onBeforeRender( this, scene, camera, renderTarget );
- //
- _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
- _frustum.setFromProjectionMatrix( _projScreenMatrix, coordinateSystem );
- const renderList = this._renderLists.get( scene, camera );
- renderList.begin();
- this._projectObject( scene, camera, 0, renderList );
- renderList.finish();
- if ( this.sortObjects === true ) {
- renderList.sort( this._opaqueSort, this._transparentSort );
- }
- //
- if ( renderTarget !== null ) {
- this._textures.updateRenderTarget( renderTarget, activeMipmapLevel );
- const renderTargetData = this._textures.get( renderTarget );
- renderContext.textures = renderTargetData.textures;
- renderContext.depthTexture = renderTargetData.depthTexture;
- renderContext.width = renderTargetData.width;
- renderContext.height = renderTargetData.height;
- renderContext.renderTarget = renderTarget;
- } else {
- renderContext.textures = null;
- renderContext.depthTexture = null;
- renderContext.width = this.domElement.width;
- renderContext.height = this.domElement.height;
- }
- renderContext.width >>= activeMipmapLevel;
- renderContext.height >>= activeMipmapLevel;
- renderContext.activeCubeFace = activeCubeFace;
- renderContext.activeMipmapLevel = activeMipmapLevel;
- renderContext.occlusionQueryCount = renderList.occlusionQueryCount;
- //
- this._nodes.updateScene( sceneRef );
- //
- this._background.update( sceneRef, renderList, renderContext );
- //
- this.backend.beginRender( renderContext );
- // process render lists
- const opaqueObjects = renderList.opaque;
- const transparentObjects = renderList.transparent;
- const lightsNode = renderList.lightsNode;
- if ( opaqueObjects.length > 0 ) this._renderObjects( opaqueObjects, camera, sceneRef, lightsNode );
- if ( transparentObjects.length > 0 ) this._renderObjects( transparentObjects, camera, sceneRef, lightsNode );
- // finish render pass
- this.backend.finishRender( renderContext );
- // restore render tree
- nodeFrame.renderId = previousRenderId;
- this._currentRenderContext = previousRenderContext;
- this._currentRenderObjectFunction = previousRenderObjectFunction;
- //
- sceneRef.onAfterRender( this, scene, camera, renderTarget );
- }
- getMaxAnisotropy() {
- return this.backend.getMaxAnisotropy();
- }
- getActiveCubeFace() {
- return this._activeCubeFace;
- }
- getActiveMipmapLevel() {
- return this._activeMipmapLevel;
- }
- async setAnimationLoop( callback ) {
- if ( this._initialized === false ) await this.init();
- this._animation.setAnimationLoop( callback );
- }
- getArrayBuffer( attribute ) { // @deprecated, r155
- console.warn( 'THREE.Renderer: getArrayBuffer() is deprecated. Use getArrayBufferAsync() instead.' );
- return this.getArrayBufferAsync( attribute );
- }
- async getArrayBufferAsync( attribute ) {
- return await this.backend.getArrayBufferAsync( attribute );
- }
- getContext() {
- return this._context;
- }
- getPixelRatio() {
- return this._pixelRatio;
- }
- getDrawingBufferSize( target ) {
- return target.set( this._width * this._pixelRatio, this._height * this._pixelRatio ).floor();
- }
- getSize( target ) {
- return target.set( this._width, this._height );
- }
- setPixelRatio( value = 1 ) {
- this._pixelRatio = value;
- this.setSize( this._width, this._height, false );
- }
- setDrawingBufferSize( width, height, pixelRatio ) {
- this._width = width;
- this._height = height;
- this._pixelRatio = pixelRatio;
- this.domElement.width = Math.floor( width * pixelRatio );
- this.domElement.height = Math.floor( height * pixelRatio );
- this.setViewport( 0, 0, width, height );
- if ( this._initialized ) this.backend.updateSize();
- }
- setSize( width, height, updateStyle = true ) {
- this._width = width;
- this._height = height;
- this.domElement.width = Math.floor( width * this._pixelRatio );
- this.domElement.height = Math.floor( height * this._pixelRatio );
- if ( updateStyle === true ) {
- this.domElement.style.width = width + 'px';
- this.domElement.style.height = height + 'px';
- }
- this.setViewport( 0, 0, width, height );
- if ( this._initialized ) this.backend.updateSize();
- }
- setOpaqueSort( method ) {
- this._opaqueSort = method;
- }
- setTransparentSort( method ) {
- this._transparentSort = method;
- }
- getScissor( target ) {
- const scissor = this._scissor;
- target.x = scissor.x;
- target.y = scissor.y;
- target.width = scissor.width;
- target.height = scissor.height;
- return target;
- }
- setScissor( x, y, width, height ) {
- const scissor = this._scissor;
- if ( x.isVector4 ) {
- scissor.copy( x );
- } else {
- scissor.set( x, y, width, height );
- }
- }
- getScissorTest() {
- return this._scissorTest;
- }
- setScissorTest( boolean ) {
- this._scissorTest = boolean;
- }
- getViewport( target ) {
- return target.copy( this._viewport );
- }
- setViewport( x, y, width, height, minDepth = 0, maxDepth = 1 ) {
- const viewport = this._viewport;
- if ( x.isVector4 ) {
- viewport.copy( x );
- } else {
- viewport.set( x, y, width, height );
- }
- viewport.minDepth = minDepth;
- viewport.maxDepth = maxDepth;
- }
- getClearColor( target ) {
- return target.copy( this._clearColor );
- }
- setClearColor( color, alpha = 1 ) {
- this._clearColor.set( color );
- this._clearColor.a = alpha;
- }
- getClearAlpha() {
- return this._clearColor.a;
- }
- setClearAlpha( alpha ) {
- this._clearColor.a = alpha;
- }
- getClearDepth() {
- return this._clearDepth;
- }
- setClearDepth( depth ) {
- this._clearDepth = depth;
- }
- getClearStencil() {
- return this._clearStencil;
- }
- setClearStencil( stencil ) {
- this._clearStencil = stencil;
- }
- isOccluded( object ) {
- const renderContext = this._currentRenderContext;
- return renderContext && this.backend.isOccluded( renderContext, object );
- }
- clear( color = true, depth = true, stencil = true ) {
- let renderTargetData = null;
- const renderTarget = this._renderTarget;
- if ( renderTarget !== null ) {
- this._textures.updateRenderTarget( renderTarget );
- renderTargetData = this._textures.get( renderTarget );
- }
- this.backend.clear( color, depth, stencil, renderTargetData );
- }
- clearColor() {
- this.clear( true, false, false );
- }
- clearDepth() {
- this.clear( false, true, false );
- }
- clearStencil() {
- this.clear( false, false, true );
- }
- get currentColorSpace() {
- const renderTarget = this._renderTarget;
- if ( renderTarget !== null ) {
- const texture = renderTarget.texture;
- return ( Array.isArray( texture ) ? texture[ 0 ] : texture ).colorSpace;
- }
- return this.outputColorSpace;
- }
- dispose() {
- this.info.dispose();
- this._animation.dispose();
- this._objects.dispose();
- this._properties.dispose();
- this._pipelines.dispose();
- this._nodes.dispose();
- this._bindings.dispose();
- this._renderLists.dispose();
- this._renderContexts.dispose();
- this._textures.dispose();
- this.setRenderTarget( null );
- this.setAnimationLoop( null );
- }
- setRenderTarget( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {
- this._renderTarget = renderTarget;
- this._activeCubeFace = activeCubeFace;
- this._activeMipmapLevel = activeMipmapLevel;
- }
- getRenderTarget() {
- return this._renderTarget;
- }
- setRenderObjectFunction( renderObjectFunction ) {
- this._renderObjectFunction = renderObjectFunction;
- }
- getRenderObjectFunction() {
- return this._renderObjectFunction;
- }
- async compute( computeNodes ) {
- if ( this._initialized === false ) await this.init();
- const nodeFrame = this._nodes.nodeFrame;
- const previousRenderId = nodeFrame.renderId;
- //
- this.info.calls ++;
- this.info.compute.calls ++;
- nodeFrame.renderId = this.info.calls;
- //
- const backend = this.backend;
- const pipelines = this._pipelines;
- const bindings = this._bindings;
- const nodes = this._nodes;
- const computeList = Array.isArray( computeNodes ) ? computeNodes : [ computeNodes ];
- if ( computeList[ 0 ] === undefined || computeList[ 0 ].isComputeNode !== true ) {
- throw new Error( 'THREE.Renderer: .compute() expects a ComputeNode.' );
- }
- backend.beginCompute( computeNodes );
- for ( const computeNode of computeList ) {
- // onInit
- if ( pipelines.has( computeNode ) === false ) {
- const dispose = () => {
- computeNode.removeEventListener( 'dispose', dispose );
- pipelines.delete( computeNode );
- bindings.delete( computeNode );
- nodes.delete( computeNode );
- };
- computeNode.addEventListener( 'dispose', dispose );
- //
- computeNode.onInit( { renderer: this } );
- }
- nodes.updateForCompute( computeNode );
- bindings.updateForCompute( computeNode );
- const computeBindings = bindings.getForCompute( computeNode );
- const computePipeline = pipelines.getForCompute( computeNode, computeBindings );
- backend.compute( computeNodes, computeNode, computeBindings, computePipeline );
- }
- backend.finishCompute( computeNodes );
- //
- nodeFrame.renderId = previousRenderId;
- }
- hasFeature( name ) {
- return this.backend.hasFeature( name );
- }
- copyFramebufferToTexture( framebufferTexture ) {
- const renderContext = this._currentRenderContext;
- this._textures.updateTexture( framebufferTexture );
- this.backend.copyFramebufferToTexture( framebufferTexture, renderContext );
- }
- readRenderTargetPixelsAsync( renderTarget, x, y, width, height ) {
- return this.backend.copyTextureToBuffer( renderTarget.texture, x, y, width, height );
- }
- _projectObject( object, camera, groupOrder, renderList ) {
- if ( object.visible === false ) return;
- const visible = object.layers.test( camera.layers );
- if ( visible ) {
- if ( object.isGroup ) {
- groupOrder = object.renderOrder;
- } else if ( object.isLOD ) {
- if ( object.autoUpdate === true ) object.update( camera );
- } else if ( object.isLight ) {
- renderList.pushLight( object );
- } else if ( object.isSprite ) {
- if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {
- if ( this.sortObjects === true ) {
- _vector3.setFromMatrixPosition( object.matrixWorld ).applyMatrix4( _projScreenMatrix );
- }
- const geometry = object.geometry;
- const material = object.material;
- if ( material.visible ) {
- renderList.push( object, geometry, material, groupOrder, _vector3.z, null );
- }
- }
- } else if ( object.isLineLoop ) {
- console.error( 'THREE.Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.' );
- } else if ( object.isMesh || object.isLine || object.isPoints ) {
- if ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {
- const geometry = object.geometry;
- const material = object.material;
- if ( this.sortObjects === true ) {
- if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
- _vector3
- .copy( geometry.boundingSphere.center )
- .applyMatrix4( object.matrixWorld )
- .applyMatrix4( _projScreenMatrix );
- }
- if ( Array.isArray( material ) ) {
- const groups = geometry.groups;
- for ( let i = 0, l = groups.length; i < l; i ++ ) {
- const group = groups[ i ];
- const groupMaterial = material[ group.materialIndex ];
- if ( groupMaterial && groupMaterial.visible ) {
- renderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group );
- }
- }
- } else if ( material.visible ) {
- renderList.push( object, geometry, material, groupOrder, _vector3.z, null );
- }
- }
- }
- }
- const children = object.children;
- for ( let i = 0, l = children.length; i < l; i ++ ) {
- this._projectObject( children[ i ], camera, groupOrder, renderList );
- }
- }
- _renderObjects( renderList, camera, scene, lightsNode ) {
- // process renderable objects
- for ( let i = 0, il = renderList.length; i < il; i ++ ) {
- const renderItem = renderList[ i ];
- // @TODO: Add support for multiple materials per object. This will require to extract
- // the material from the renderItem object and pass it with its group data to renderObject().
- const { object, geometry, material, group } = renderItem;
- if ( camera.isArrayCamera ) {
- const cameras = camera.cameras;
- for ( let j = 0, jl = cameras.length; j < jl; j ++ ) {
- const camera2 = cameras[ j ];
- if ( object.layers.test( camera2.layers ) ) {
- const vp = camera2.viewport;
- const minDepth = ( vp.minDepth === undefined ) ? 0 : vp.minDepth;
- const maxDepth = ( vp.maxDepth === undefined ) ? 1 : vp.maxDepth;
- const viewportValue = this._currentRenderContext.viewportValue;
- viewportValue.copy( vp ).multiplyScalar( this._pixelRatio ).floor();
- viewportValue.minDepth = minDepth;
- viewportValue.maxDepth = maxDepth;
- this.backend.updateViewport( this._currentRenderContext );
- this._currentRenderObjectFunction( object, scene, camera2, geometry, material, group, lightsNode );
- }
- }
- } else {
- this._currentRenderObjectFunction( object, scene, camera, geometry, material, group, lightsNode );
- }
- }
- }
- renderObject( object, scene, camera, geometry, material, group, lightsNode ) {
- let overridePositionNode;
- //
- object.onBeforeRender( this, scene, camera, geometry, material, group );
- material.onBeforeRender( this, scene, camera, geometry, material, group );
- //
- if ( scene.overrideMaterial !== null ) {
- const overrideMaterial = scene.overrideMaterial;
- if ( material.positionNode && material.positionNode.isNode ) {
- overridePositionNode = overrideMaterial.positionNode;
- overrideMaterial.positionNode = material.positionNode;
- }
- material = overrideMaterial;
- }
- //
- if ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) {
- material.side = BackSide;
- this._renderObjectDirect( object, material, scene, camera, lightsNode, 'backSide' ); // create backSide pass id
- material.side = FrontSide;
- this._renderObjectDirect( object, material, scene, camera, lightsNode ); // use default pass id
- material.side = DoubleSide;
- } else {
- this._renderObjectDirect( object, material, scene, camera, lightsNode );
- }
- //
- if ( overridePositionNode !== undefined ) {
- scene.overrideMaterial.positionNode = overridePositionNode;
- }
- //
- object.onAfterRender( this, scene, camera, geometry, material, group );
- }
- _renderObjectDirect( object, material, scene, camera, lightsNode, passId ) {
- const renderObject = this._objects.get( object, material, scene, camera, lightsNode, this._currentRenderContext, passId );
- //
- this._nodes.updateBefore( renderObject );
- //
- object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
- object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
- //
- this._nodes.updateForRender( renderObject );
- this._geometries.updateForRender( renderObject );
- this._bindings.updateForRender( renderObject );
- this._pipelines.updateForRender( renderObject );
- //
- this.backend.draw( renderObject, this.info );
- }
- }
- export default Renderer;
|