mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
509d73b27d
* PR1: add explicit function return type (#15311) * PR4: add explicit function return type (#15314) * [ci skip][AUTO]: Automated code generating update: 8843bfe54cd3f8e6f84432948716c8d130ecb233 (#15314) (#15357) Co-authored-by: cocos-robot <cocos-robot@cocos.com> * add function return type * fix version checking * fix return type --------- Co-authored-by: Cocos Robot <48829427+cocos-robot@users.noreply.github.com> Co-authored-by: cocos-robot <cocos-robot@cocos.com>
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 (): number {
|
|
return this._threshold;
|
|
}
|
|
|
|
@slide
|
|
@range([1, 6, 1])
|
|
@type(CCInteger)
|
|
set iterations (value: number) {
|
|
this._iterations = value;
|
|
}
|
|
get iterations (): number {
|
|
return this._iterations;
|
|
}
|
|
|
|
@rangeMin(0)
|
|
@type(CCFloat)
|
|
set intensity (value: number) {
|
|
this._intensity = value;
|
|
}
|
|
get intensity (): number {
|
|
return this._intensity;
|
|
}
|
|
}
|