seinjs-gpu-particle-system > Emitter
GPU例子系统发生器基类,一般不直接使用,而是使用其派生类。
template: IOptions 初始化参数类型。
template: IUniforms 用于自定义需要追加的Uniform类型。
IUniforms : IParticleUniforms
SObject
↳ Emitter
↳ Emitter
- IEmitter<
IOptions
,IUniforms
>
⊕ new Emitter(options: IOptions
): Emitter
Overrides SObject.__constructor
Defined in emitter/Emitter.ts:32
Parameters:
Name | Type |
---|---|
options | IOptions |
Returns: Emitter
● system: Component
Implementation of IEmitter.system
Defined in emitter/Emitter.ts:28
从属的粒子系统实例引用。
▸ getOption<Key
>(key: Key
): IOptions[Key]
Defined in emitter/Emitter.ts:63
获取某个配置项。
Type parameters:
Parameters:
Name | Type |
---|---|
key | Key |
Returns: IOptions[Key]
▸ getShadersAndModifyUniforms(options: IOptions
, uniforms: IUniforms
, systemState: IComponentState): object
Defined in emitter/Emitter.ts:43
根据参数,添加uniform并获取具体实现的Shader。
Parameters:
Name | Type |
---|---|
options | IOptions |
uniforms | IUniforms |
systemState | IComponentState |
Returns: object
▸ setOption<Key
>(key: Key
, value: IOptions[Key]
): this
Defined in emitter/Emitter.ts:53
设置某配置项,将会强制重新生成粒子系统的Material
,谨慎使用!。
Type parameters:
Parameters:
Name | Type |
---|---|
key | Key |
value | IOptions[Key] |
Returns: this