mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { ccclass, disallowMultiple, executeInEditMode, menu, range, rangeMin, serializable, slide, tooltip, type } from '../../../core/data/decorators';
|
|
import { CCFloat, CCInteger } from '../../../core/data/utils/attribute';
|
|
import { PostProcessSetting } from './post-process-setting';
|
|
|
|
@ccclass('cc.Bloom')
|
|
@menu('PostProcess/Bloom')
|
|
@disallowMultiple
|
|
@executeInEditMode
|
|
export class Bloom extends PostProcessSetting {
|
|
@serializable
|
|
protected _threshold = 0.8;
|
|
@serializable
|
|
protected _iterations = 3;
|
|
@serializable
|
|
protected _intensity = 2.3;
|
|
|
|
@rangeMin(0)
|
|
@type(CCFloat)
|
|
set threshold (value: number) {
|
|
this._threshold = value;
|
|
}
|
|
get threshold () {
|
|
return this._threshold;
|
|
}
|
|
|
|
@slide
|
|
@range([1, 6, 1])
|
|
@type(CCInteger)
|
|
set iterations (value: number) {
|
|
this._iterations = value;
|
|
}
|
|
get iterations () {
|
|
return this._iterations;
|
|
}
|
|
|
|
@rangeMin(0)
|
|
@type(CCFloat)
|
|
set intensity (value: number) {
|
|
this._intensity = value;
|
|
}
|
|
get intensity () {
|
|
return this._intensity;
|
|
}
|
|
}
|