提交 87ae9e71 编写于 作者: M Mr.doob

Fixed postprocessing Object.assign()s.

上级 e803bbc0
......@@ -123,9 +123,9 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
};
THREE.AdaptiveToneMappingPass.prototype = Object.create( THREE.Pass.prototype );
THREE.AdaptiveToneMappingPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.AdaptiveToneMappingPass.prototype, {
constructor: THREE.AdaptiveToneMappingPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -73,9 +73,9 @@ THREE.BloomPass = function ( strength, kernelSize, sigma, resolution ) {
};
THREE.BloomPass.prototype = Object.create( THREE.Pass.prototype );
THREE.BloomPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.BloomPass.prototype, {
constructor: THREE.BloomPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -67,9 +67,9 @@ THREE.BokehPass = function ( scene, camera, params ) {
};
THREE.BokehPass.prototype = Object.create( THREE.Pass.prototype );
THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.BokehPass.prototype, {
constructor: THREE.BokehPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -10,9 +10,9 @@ THREE.ClearPass = function () {
};
THREE.ClearPass.prototype = Object.create( THREE.Pass.prototype );
THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
Object.assign( THREE.ClearPass.prototype, {
constructor: THREE.ClearPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -33,9 +33,9 @@ THREE.DotScreenPass = function ( center, angle, scale ) {
};
THREE.DotScreenPass.prototype = Object.create( THREE.Pass.prototype );
THREE.DotScreenPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.DotScreenPass.prototype, {
constructor: THREE.DotScreenPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -34,7 +34,7 @@ THREE.EffectComposer = function ( renderer, renderTarget ) {
};
THREE.EffectComposer.prototype = {
Object.assign( THREE.EffectComposer.prototype, {
swapBuffers: function() {
......@@ -142,7 +142,7 @@ THREE.EffectComposer.prototype = {
}
};
} );
THREE.Pass = function () {
......@@ -161,9 +161,7 @@ THREE.Pass = function () {
};
THREE.Pass.prototype = {
constructor: THREE.Pass,
Object.assign( THREE.Pass.prototype, {
setSize: function( width, height ) {},
......@@ -173,4 +171,4 @@ THREE.Pass.prototype = {
}
};
} );
......@@ -34,9 +34,9 @@ THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount,
};
THREE.FilmPass.prototype = Object.create( THREE.Pass.prototype );
THREE.FilmPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.FilmPass.prototype, {
constructor: THREE.FilmPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -35,9 +35,9 @@ THREE.GlitchPass = function ( dt_size ) {
};
THREE.GlitchPass.prototype = Object.create( THREE.Pass.prototype );
THREE.GlitchPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.GlitchPass.prototype, {
constructor: THREE.GlitchPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -43,9 +43,9 @@ THREE.ManualMSAARenderPass = function ( scene, camera ) {
};
THREE.ManualMSAARenderPass.prototype = Object.create( THREE.Pass.prototype );
THREE.ManualMSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.ManualMSAARenderPass.prototype, {
constructor: THREE.ManualMSAARenderPass,
dispose: function() {
......
......@@ -16,9 +16,9 @@ THREE.MaskPass = function ( scene, camera ) {
};
THREE.MaskPass.prototype = Object.create( THREE.Pass.prototype );
THREE.MaskPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.MaskPass.prototype, {
constructor: THREE.MaskPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -22,9 +22,9 @@ THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clear
};
THREE.RenderPass.prototype = Object.create( THREE.Pass.prototype );
THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.RenderPass.prototype, {
constructor: THREE.RenderPass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -104,10 +104,10 @@ THREE.SMAAPass = function ( width, height ) {
};
THREE.SMAAPass.prototype = Object.create( THREE.Pass.prototype );
THREE.SMAAPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
constructor: THREE.SMAAPass,
Object.assign( THREE.SMAAPass.prototype, {
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
// pass 1
......
......@@ -42,9 +42,9 @@ THREE.SavePass = function ( renderTarget ) {
};
THREE.SavePass.prototype = Object.create( THREE.Pass.prototype );
THREE.SavePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.SavePass.prototype, {
constructor: THREE.SavePass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -38,9 +38,9 @@ THREE.ShaderPass = function( shader, textureID ) {
};
THREE.ShaderPass.prototype = Object.create( THREE.Pass.prototype );
THREE.ShaderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.ShaderPass.prototype, {
constructor: THREE.ShaderPass,
render: function( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
......@@ -28,9 +28,9 @@ THREE.TAARenderPass = function ( scene, camera, params ) {
THREE.TAARenderPass.JitterVectors = THREE.ManualMSAARenderPass.JitterVectors;
THREE.TAARenderPass.prototype = Object.create( THREE.ManualMSAARenderPass.prototype );
THREE.TAARenderPass.prototype = Object.assign( Object.create( THREE.ManualMSAARenderPass.prototype ), {
Object.assign( THREE.TAARenderPass.prototype, {
constructor: THREE.TAARenderPass,
render: function ( renderer, writeBuffer, readBuffer, delta ) {
......@@ -95,7 +95,7 @@ Object.assign( THREE.TAARenderPass.prototype, {
}
if ( this.camera.clearViewOffset ) this.camera.clearViewOffset();
}
var accumulationWeight = this.accumulateIndex * sampleWeight;
......
......@@ -34,9 +34,9 @@ THREE.TexturePass = function ( texture, opacity ) {
};
THREE.TexturePass.prototype = Object.create( THREE.Pass.prototype );
THREE.TexturePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {
Object.assign( THREE.TexturePass.prototype, {
constructor: THREE.TexturePass,
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册