1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/src/effects/RenderPass.js

19 lines
511 B
JavaScript
Raw Normal View History

2021-04-05 03:02:21 +08:00
import { defineComponent } from 'vue';
2020-09-17 05:27:29 +08:00
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
import EffectPass from './EffectPass.js';
2021-04-05 03:02:21 +08:00
export default defineComponent({
2020-09-17 05:27:29 +08:00
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);
2021-03-22 02:49:41 +08:00
this.completePass(pass);
2020-09-17 05:27:29 +08:00
},
2020-09-20 02:29:53 +08:00
__hmrId: 'RenderPass',
2021-04-05 03:02:21 +08:00
});