75 lines
2.4 KiB
JavaScript
75 lines
2.4 KiB
JavaScript
/* globals ColorAdjustmentsSamplerShader, VisionMode */
|
|
import { log } from './globals.js';
|
|
export function initVisionModes() {
|
|
log('INIT VISION');
|
|
CONFIG.Canvas.visionModes.basic = new VisionMode({
|
|
id: 'basic',
|
|
label: 'VISION.ModeBasicVision',
|
|
canvas: {
|
|
shader: ColorAdjustmentsSamplerShader,
|
|
uniforms: { contrast: 0, saturation: -0.85, brightness: -1.0 },
|
|
},
|
|
lighting: {
|
|
background: { visibility: VisionMode.LIGHTING_VISIBILITY.REQUIRED },
|
|
},
|
|
vision: {
|
|
darkness: { adaptive: false },
|
|
defaults: { attenuation: 0, contrast: 0, saturation: -0.85, brightness: -1.0 },
|
|
preferred: true,
|
|
},
|
|
});
|
|
CONFIG.Canvas.visionModes.darkvision = new VisionMode({
|
|
id: 'darkvision',
|
|
label: 'VISION.ModeDarkvision',
|
|
canvas: {
|
|
shader: ColorAdjustmentsSamplerShader,
|
|
uniforms: { contrast: 0, saturation: 0, brightness: 0.75, tint: [0.8, 0.8, 1.0] },
|
|
},
|
|
lighting: {
|
|
background: { visibility: VisionMode.LIGHTING_VISIBILITY.REQUIRED },
|
|
levels: {
|
|
[VisionMode.LIGHTING_LEVELS.DIM]: VisionMode.LIGHTING_LEVELS.BRIGHT,
|
|
},
|
|
},
|
|
vision: {
|
|
darkness: { adaptive: false },
|
|
defaults: { attenuation: 0.1, contrast: 0, saturation: 0, brightness: 0.75 },
|
|
preferred: false,
|
|
},
|
|
});
|
|
CONFIG.Canvas.visionModes.lowlight = new VisionMode({
|
|
id: 'lowlight',
|
|
label: 'Low Light Vision',
|
|
canvas: {
|
|
shader: ColorAdjustmentsSamplerShader,
|
|
uniforms: { contrast: 0, saturation: -0.5, brightness: -0.2 },
|
|
},
|
|
lighting: {
|
|
background: { visibility: VisionMode.LIGHTING_VISIBILITY.REQUIRED },
|
|
},
|
|
vision: {
|
|
darkness: { adaptive: false },
|
|
defaults: { attenuation: 0.1, contrast: 0, saturation: -0.5, brightness: -0.2 },
|
|
preferred: false,
|
|
},
|
|
});
|
|
CONFIG.Canvas.visionModes.blindsense = new VisionMode({
|
|
id: 'blindsense',
|
|
label: 'Blindsense',
|
|
canvas: {
|
|
shader: ColorAdjustmentsSamplerShader,
|
|
uniforms: { contrast: 0, saturation: -0.5, brightness: -0.2 },
|
|
},
|
|
lighting: {
|
|
background: { visibility: VisionMode.LIGHTING_VISIBILITY.DISABLED },
|
|
coloration: { visibility: VisionMode.LIGHTING_VISIBILITY.DISABLED },
|
|
illumination: { visibility: VisionMode.LIGHTING_VISIBILITY.DISABLED },
|
|
},
|
|
vision: {
|
|
darkness: { adaptive: false },
|
|
defaults: { attenuation: 0.3, contrast: -0.25, saturation: 0.75, brightness: 0.5 },
|
|
preferred: false,
|
|
},
|
|
});
|
|
}
|