Skip to content

Commit 87ae9e7

Browse files
committed
Fixed postprocessing Object.assign()s.
1 parent e803bbc commit 87ae9e7

16 files changed

+36
-38
lines changed

examples/js/postprocessing/AdaptiveToneMappingPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
123123

124124
};
125125

126-
THREE.AdaptiveToneMappingPass.prototype = Object.create( THREE.Pass.prototype );
126+
THREE.AdaptiveToneMappingPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
127127

128-
Object.assign( THREE.AdaptiveToneMappingPass.prototype, {
128+
constructor: THREE.AdaptiveToneMappingPass,
129129

130130
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
131131

examples/js/postprocessing/BloomPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
7373

7474
};
7575

76-
THREE.BloomPass.prototype = Object.create( THREE.Pass.prototype );
76+
THREE.BloomPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
7777

78-
Object.assign( THREE.BloomPass.prototype, {
78+
constructor: THREE.BloomPass,
7979

8080
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
8181

examples/js/postprocessing/BokehPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ THREE.BokehPass = function ( scene, camera, params ) {
6767

6868
};
6969

70-
THREE.BokehPass.prototype = Object.create( THREE.Pass.prototype );
70+
THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
7171

72-
Object.assign( THREE.BokehPass.prototype, {
72+
constructor: THREE.BokehPass,
7373

7474
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
7575

examples/js/postprocessing/ClearPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ THREE.ClearPass = function () {
1010

1111
};
1212

13-
THREE.ClearPass.prototype = Object.create( THREE.Pass.prototype );
13+
THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
1414

15-
Object.assign( THREE.ClearPass.prototype, {
15+
constructor: THREE.ClearPass,
1616

1717
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
1818

examples/js/postprocessing/DotScreenPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ THREE.DotScreenPass = function ( center, angle, scale ) {
3333

3434
};
3535

36-
THREE.DotScreenPass.prototype = Object.create( THREE.Pass.prototype );
36+
THREE.DotScreenPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
3737

38-
Object.assign( THREE.DotScreenPass.prototype, {
38+
constructor: THREE.DotScreenPass,
3939

4040
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
4141

examples/js/postprocessing/EffectComposer.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ THREE.EffectComposer = function ( renderer, renderTarget ) {
3434

3535
};
3636

37-
THREE.EffectComposer.prototype = {
37+
Object.assign( THREE.EffectComposer.prototype, {
3838

3939
swapBuffers: function() {
4040

@@ -142,7 +142,7 @@ THREE.EffectComposer.prototype = {
142142

143143
}
144144

145-
};
145+
} );
146146

147147

148148
THREE.Pass = function () {
@@ -161,9 +161,7 @@ THREE.Pass = function () {
161161

162162
};
163163

164-
THREE.Pass.prototype = {
165-
166-
constructor: THREE.Pass,
164+
Object.assign( THREE.Pass.prototype, {
167165

168166
setSize: function( width, height ) {},
169167

@@ -173,4 +171,4 @@ THREE.Pass.prototype = {
173171

174172
}
175173

176-
};
174+
} );

examples/js/postprocessing/FilmPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount,
3434

3535
};
3636

37-
THREE.FilmPass.prototype = Object.create( THREE.Pass.prototype );
37+
THREE.FilmPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
3838

39-
Object.assign( THREE.FilmPass.prototype, {
39+
constructor: THREE.FilmPass,
4040

4141
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
4242

examples/js/postprocessing/GlitchPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ THREE.GlitchPass = function ( dt_size ) {
3535

3636
};
3737

38-
THREE.GlitchPass.prototype = Object.create( THREE.Pass.prototype );
38+
THREE.GlitchPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
3939

40-
Object.assign( THREE.GlitchPass.prototype, {
40+
constructor: THREE.GlitchPass,
4141

4242
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
4343

examples/js/postprocessing/ManualMSAARenderPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ THREE.ManualMSAARenderPass = function ( scene, camera ) {
4343

4444
};
4545

46-
THREE.ManualMSAARenderPass.prototype = Object.create( THREE.Pass.prototype );
46+
THREE.ManualMSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
4747

48-
Object.assign( THREE.ManualMSAARenderPass.prototype, {
48+
constructor: THREE.ManualMSAARenderPass,
4949

5050
dispose: function() {
5151

examples/js/postprocessing/MaskPass.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ THREE.MaskPass = function ( scene, camera ) {
1616

1717
};
1818

19-
THREE.MaskPass.prototype = Object.create( THREE.Pass.prototype );
19+
THREE.MaskPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
2020

21-
Object.assign( THREE.MaskPass.prototype, {
21+
constructor: THREE.MaskPass,
2222

2323
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
2424

0 commit comments

Comments
 (0)