Skip to content

Commit

Permalink
OutlinePass: change var to const (#23294)
Browse files Browse the repository at this point in the history
* change var to const

* remove unused material

* remove unused class (MeshBasicMaterial)
  • Loading branch information
tomhsiao1260 authored Jan 21, 2022
1 parent 84f3e57 commit 08f0972
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/jsm/postprocessing/OutlinePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
DoubleSide,
LinearFilter,
Matrix4,
MeshBasicMaterial,
MeshDepthMaterial,
NoBlending,
RGBADepthPacking,
Expand Down Expand Up @@ -46,8 +45,6 @@ class OutlinePass extends Pass {
const resx = Math.round( this.resolution.x / this.downSampleRatio );
const resy = Math.round( this.resolution.y / this.downSampleRatio );

this.maskBufferMaterial = new MeshBasicMaterial( { color: 0xffffff } );
this.maskBufferMaterial.side = DoubleSide;
this.renderTargetMaskBuffer = new WebGLRenderTarget( this.resolution.x, this.resolution.y, pars );
this.renderTargetMaskBuffer.texture.name = 'OutlinePass.mask';
this.renderTargetMaskBuffer.texture.generateMipmaps = false;
Expand Down Expand Up @@ -129,7 +126,7 @@ class OutlinePass extends Pass {

function replaceDepthToViewZ( string, camera ) {

var type = camera.isPerspectiveCamera ? 'perspective' : 'orthographic';
const type = camera.isPerspectiveCamera ? 'perspective' : 'orthographic';

return string.replace( /DEPTH_TO_VIEW_Z/g, type + 'DepthToViewZ' );

Expand Down

0 comments on commit 08f0972

Please sign in to comment.