mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
18 lines
451 B
JavaScript
18 lines
451 B
JavaScript
|
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
|
||
|
import EffectPass from './EffectPass.js';
|
||
|
|
||
|
export default {
|
||
|
extends: EffectPass,
|
||
|
mounted() {
|
||
|
if (!this.three.scene) {
|
||
|
console.error('Missing Scene');
|
||
|
}
|
||
|
if (!this.three.camera) {
|
||
|
console.error('Missing Camera');
|
||
|
}
|
||
|
const pass = new RenderPass(this.three.scene, this.three.camera);
|
||
|
this.passes.push(pass);
|
||
|
this.pass = pass;
|
||
|
},
|
||
|
};
|