Skip to content

Commit

Permalink
fix: dont need to call Function.call when it's a class
Browse files Browse the repository at this point in the history
resolves #52
  • Loading branch information
joshuaellis committed Apr 11, 2021
1 parent 6fbabe6 commit ab2e560
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions src/postprocessing/AdaptiveToneMappingPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import { ToneMapShader } from '../shaders/ToneMapShader'
*/

var AdaptiveToneMappingPass = function (adaptive, resolution) {
new Pass.call(this)

this.resolution = resolution !== undefined ? resolution : 256
this.needsInit = true
this.adaptive = adaptive !== undefined ? !!adaptive : true
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/BloomPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { CopyShader } from '../shaders/CopyShader'
import { ConvolutionShader } from '../shaders/ConvolutionShader'

var BloomPass = function (strength, kernelSize, sigma, resolution) {
new Pass.call(this)

strength = strength !== undefined ? strength : 1
kernelSize = kernelSize !== undefined ? kernelSize : 25
sigma = sigma !== undefined ? sigma : 4.0
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/BokehPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { BokehShader } from '../shaders/BokehShader'
*/

var BokehPass = function (scene, camera, params) {
new Pass.call(this)

this.scene = scene
this.camera = camera

Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/ClearPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Color } from 'three'
import { Pass } from '../postprocessing/Pass'

var ClearPass = function (clearColor, clearAlpha) {
new Pass.call(this)

this.needsSwap = false

this.clearColor = clearColor !== undefined ? clearColor : 0x000000
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/CubeTexturePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { BackSide, BoxGeometry, Mesh, PerspectiveCamera, Scene, ShaderLib, Shade
import { Pass } from '../postprocessing/Pass'

var CubeTexturePass = function (camera, envMap, opacity) {
new Pass.call(this)

this.camera = camera

this.needsSwap = false
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/DotScreenPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Pass, FullScreenQuad } from '../postprocessing/Pass'
import { DotScreenShader } from '../shaders/DotScreenShader'

var DotScreenPass = function (center, angle, scale) {
new Pass.call(this)

if (DotScreenShader === undefined) console.error('THREE.DotScreenPass relies on DotScreenShader')

var shader = DotScreenShader
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/FilmPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Pass, FullScreenQuad } from '../postprocessing/Pass'
import { FilmShader } from '../shaders/FilmShader'

var FilmPass = function (noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale) {
new Pass.call(this)

if (FilmShader === undefined) console.error('THREE.FilmPass relies on FilmShader')

var shader = FilmShader
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/GlitchPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Pass, FullScreenQuad } from '../postprocessing/Pass'
import { DigitalGlitch } from '../shaders/DigitalGlitch'

var GlitchPass = function (dt_size) {
new Pass.call(this)

if (DigitalGlitch === undefined) console.error('THREE.GlitchPass relies on DigitalGlitch')

var shader = DigitalGlitch
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/HalftonePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { HalftoneShader } from '../shaders/HalftoneShader'
*/

var HalftonePass = function (width, height, params) {
new Pass.call(this)

if (HalftoneShader === undefined) {
console.error('THREE.HalftonePass requires HalftoneShader')
}
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/OutlinePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ var OutlinePass = function (resolution, scene, camera, selectedObjects) {

this._visibilityCache = new Map()

new Pass.call(this)

this.resolution = resolution !== undefined ? new Vector2(resolution.x, resolution.y) : new Vector2(256, 256)

var pars = {
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/SAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import { UnpackDepthRGBAShader } from '../shaders/UnpackDepthRGBAShader'
*/

var SAOPass = function (scene, camera, depthTexture, useNormals, resolution) {
new Pass.call(this)

this.scene = scene
this.camera = camera

Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/SMAAPass.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/postprocessing/SSAARenderPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import { CopyShader } from '../shaders/CopyShader'
*/

var SSAARenderPass = function (scene, camera, clearColor, clearAlpha) {
new Pass.call(this)

this.scene = scene
this.camera = camera

Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/SSAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { SSAOBlurShader, SSAODepthShader, SSAOShader } from '../shaders/SSAOShad
import { CopyShader } from '../shaders/CopyShader'

var SSAOPass = function (scene, camera, width, height) {
new Pass.call(this)

this.width = width !== undefined ? width : 512
this.height = height !== undefined ? height : 512

Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/SSRPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ var SSRPass = function ({
morphTargets = false,
groundReflector,
}) {
new Pass.call(this)

this.width = width !== undefined ? width : 512
this.height = height !== undefined ? height : 512

Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/SavePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Pass, FullScreenQuad } from '../postprocessing/Pass'
import { CopyShader } from '../shaders/CopyShader'

var SavePass = function (renderTarget) {
new Pass.call(this)

if (CopyShader === undefined) console.error('THREE.SavePass relies on CopyShader')

var shader = CopyShader
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/TexturePass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Pass, FullScreenQuad } from '../postprocessing/Pass'
import { CopyShader } from '../shaders/CopyShader'

var TexturePass = function (map, opacity) {
new Pass.call(this)

if (CopyShader === undefined) console.error('THREE.TexturePass relies on CopyShader')

var shader = CopyShader
Expand Down
2 changes: 0 additions & 2 deletions src/postprocessing/UnrealBloomPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import { LuminosityHighPassShader } from '../shaders/LuminosityHighPassShader'
* - https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/
*/
var UnrealBloomPass = function (resolution, strength, radius, threshold) {
new Pass.call(this)

this.strength = strength !== undefined ? strength : 1
this.radius = radius
this.threshold = threshold
Expand Down

1 comment on commit ab2e560

@vercel
Copy link

@vercel vercel bot commented on ab2e560 Apr 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.