33 lines
744 B
JavaScript
33 lines
744 B
JavaScript
import {ExtensionType} from '@pixi/core';
|
|
import {Stage as LayerStage} from '@pixi/layers';
|
|
|
|
import {
|
|
AmbientLight,
|
|
deferredLighting,
|
|
} from './lights.js';
|
|
|
|
export const ApplicationStageLayers = {
|
|
type: ExtensionType.Application,
|
|
priority: 100,
|
|
ref: {
|
|
destroy: function() {},
|
|
init: function() {
|
|
this.stage = new LayerStage();
|
|
},
|
|
},
|
|
};
|
|
|
|
export const ApplicationStageLights = {
|
|
type: ExtensionType.Application,
|
|
ref: {
|
|
destroy: function() {},
|
|
init: function() {
|
|
const {stage} = this;
|
|
deferredLighting.addToStage(stage);
|
|
// const ambientLight = new AmbientLight(0x2244cc, 0.25);
|
|
const ambientLight = new AmbientLight(0xffffff, 1);
|
|
stage.addChild(ambientLight);
|
|
},
|
|
},
|
|
};
|