|
@@ -118,63 +118,63 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
// internal properties
|
|
|
|
|
|
- let _this = this,
|
|
|
+ const _this = this;
|
|
|
|
|
|
- _isContextLost = false,
|
|
|
+ let _isContextLost = false;
|
|
|
|
|
|
- // internal state cache
|
|
|
+ // internal state cache
|
|
|
|
|
|
- _framebuffer = null,
|
|
|
+ let _framebuffer = null;
|
|
|
|
|
|
- _currentActiveCubeFace = 0,
|
|
|
- _currentActiveMipmapLevel = 0,
|
|
|
- _currentRenderTarget = null,
|
|
|
- _currentFramebuffer = null,
|
|
|
- _currentMaterialId = - 1,
|
|
|
+ let _currentActiveCubeFace = 0;
|
|
|
+ let _currentActiveMipmapLevel = 0;
|
|
|
+ let _currentRenderTarget = null;
|
|
|
+ let _currentFramebuffer = null;
|
|
|
+ let _currentMaterialId = - 1;
|
|
|
|
|
|
- // geometry and program caching
|
|
|
+ // geometry and program caching
|
|
|
|
|
|
- _currentGeometryProgram = {
|
|
|
- geometry: null,
|
|
|
- program: null,
|
|
|
- wireframe: false
|
|
|
- },
|
|
|
+ const _currentGeometryProgram = {
|
|
|
+ geometry: null,
|
|
|
+ program: null,
|
|
|
+ wireframe: false
|
|
|
+ };
|
|
|
|
|
|
- _currentCamera = null,
|
|
|
- _currentArrayCamera = null,
|
|
|
+ let _currentCamera = null;
|
|
|
+ let _currentArrayCamera = null;
|
|
|
|
|
|
- _currentViewport = new Vector4(),
|
|
|
- _currentScissor = new Vector4(),
|
|
|
- _currentScissorTest = null,
|
|
|
+ const _currentViewport = new Vector4();
|
|
|
+ const _currentScissor = new Vector4();
|
|
|
+ let _currentScissorTest = null;
|
|
|
|
|
|
- //
|
|
|
+ //
|
|
|
|
|
|
- _width = _canvas.width,
|
|
|
- _height = _canvas.height,
|
|
|
+ let _width = _canvas.width;
|
|
|
+ let _height = _canvas.height;
|
|
|
|
|
|
- _pixelRatio = 1,
|
|
|
- _opaqueSort = null,
|
|
|
- _transparentSort = null,
|
|
|
+ let _pixelRatio = 1;
|
|
|
+ let _opaqueSort = null;
|
|
|
+ let _transparentSort = null;
|
|
|
|
|
|
- _viewport = new Vector4( 0, 0, _width, _height ),
|
|
|
- _scissor = new Vector4( 0, 0, _width, _height ),
|
|
|
- _scissorTest = false,
|
|
|
+ const _viewport = new Vector4( 0, 0, _width, _height );
|
|
|
+ const _scissor = new Vector4( 0, 0, _width, _height );
|
|
|
+ let _scissorTest = false;
|
|
|
|
|
|
- // frustum
|
|
|
+ // frustum
|
|
|
|
|
|
- _frustum = new Frustum(),
|
|
|
+ const _frustum = new Frustum();
|
|
|
|
|
|
- // clipping
|
|
|
+ // clipping
|
|
|
|
|
|
- _clipping = new WebGLClipping(),
|
|
|
- _clippingEnabled = false,
|
|
|
- _localClippingEnabled = false,
|
|
|
+ const _clipping = new WebGLClipping();
|
|
|
+ let _clippingEnabled = false;
|
|
|
+ let _localClippingEnabled = false;
|
|
|
|
|
|
- // camera matrices cache
|
|
|
+ // camera matrices cache
|
|
|
|
|
|
- _projScreenMatrix = new Matrix4(),
|
|
|
+ const _projScreenMatrix = new Matrix4();
|
|
|
|
|
|
- _vector3 = new Vector3();
|
|
|
+ const _vector3 = new Vector3();
|
|
|
|
|
|
const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
|
|
|
|