@spearwolf/twopoint5d
Version:
a library to create 2.5d realtime graphics and pixelart with three.js
41 lines • 1.34 kB
JavaScript
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
export class Stage2DRenderPass extends RenderPass {
constructor(stage) {
super(stage.scene, stage.camera, null, stage.clearColor, stage.clearAlpha);
this.stage = stage;
this.clear = stage.autoClear;
Object.defineProperties(this, {
scene: {
get: () => this.stage.scene ?? null,
set: (val) => {
this.stage.scene = val;
},
},
camera: {
get: () => this.stage.camera ?? null,
set: (val) => {
this.stage.camera = val;
},
},
clear: {
get: () => this.stage.autoClear,
set: (val) => {
this.stage.autoClear = val;
},
},
clearColor: {
get: () => this.stage.clearColor,
set: (val) => {
this.stage.clearColor = val;
},
},
clearAlpha: {
get: () => this.stage.clearAlpha,
set: (val) => {
this.stage.clearAlpha = val;
},
},
});
}
}
//# sourceMappingURL=Stage2DRenderPass.js.map