类 ParticleEmitter
java.lang.Object
mod.chloeprime.aaaparticles.api.client.effekseer.ParticleEmitter
- 直接已知子类:
DummyParticleEmitter
Wrapper for the int handle of native particle emitters.
- 从以下版本开始:
- 1.0.0
-
嵌套类概要
嵌套类修饰符和类型类说明static interfaceFunction type of pre-draw callbacks.static enum -
字段概要
字段 -
构造器概要
构造器修饰符构造器说明protectedParticleEmitter(int handle, EffekseerManager manager, ParticleEmitter.Type type) -
方法概要
修饰符和类型方法说明voidAdd a callback that is called before effeks are drawn.static ParticleEmitterdummy(ParticleEmitter.Type type) Get a dummy emitter that is not bound to any native emitter handles.booleanexists()Get whether this emitter exists in the effek manager.floatgetDynamicInput(int index) Get a dynamic input's value.floatgetSpeed()Get the speed scale of this emitter.voidinternalUpdateProgress(float deltaFrames) booleanisPaused()Get whether this emitter is paused.booleanGet whether this emitter is not explicitly hidden throughsetVisibility(boolean).voidpause()Pause this effek emitter and its effek instance.voidresume()Resume this effek emitter and its effek instance from pausing.voidrunPreDrawCallbacks(float partial) voidsendTrigger(int index) Trigger a trigger with the given index.voidsetBaseTransformMatrix(float[] matrix) Set the base transform matrix of this emitter.voidsetBaseTransformMatrix(float[][] matrix) Set the base transform matrix of this emitter.voidsetDynamicInput(int index, float value) Set a dynamic input's value.voidsetPosition(float x, float y, float z) Set the world position of this emitter.voidsetProgress(float frame) Set the progress of this emitter.voidsetRotation(float x, float y, float z) Set the rotation of this emitter.voidsetScale(float x, float y, float z) Set the rotation of this emitter.voidsetSpeed(float speed) Set relative play speed of this emitter.voidsetTransformMatrix(float[] matrix) Set the transform matrix of this emitter.voidsetTransformMatrix(float[][] matrix) Set the transform matrix of this emitter.voidsetVisibility(boolean visible) Set this emitter's own visibility.voidstop()Stop and destroy this emitter.
-
字段详细资料
-
handle
public final int handle -
type
-
isVisible
@Internal public boolean isVisible -
isPaused
@Internal public boolean isPaused
-
-
构造器详细资料
-
ParticleEmitter
-
-
方法详细资料
-
dummy
Get a dummy emitter that is not bound to any native emitter handles. -
pause
public void pause()Pause this effek emitter and its effek instance. -
resume
public void resume()Resume this effek emitter and its effek instance from pausing. -
isPaused
public boolean isPaused()Get whether this emitter is paused.- 返回:
- whether this emitter is paused.
-
isVisible
public boolean isVisible()Get whether this emitter is not explicitly hidden throughsetVisibility(boolean).- 返回:
- whether this emitter is not explicitly hidden.
-
setVisibility
public void setVisibility(boolean visible) Set this emitter's own visibility.- 参数:
visible- if false, this particle will be invisible.
-
stop
public void stop()Stop and destroy this emitter. -
setProgress
public void setProgress(float frame) Set the progress of this emitter. -
setPosition
public void setPosition(float x, float y, float z) Set the world position of this emitter.- 参数:
x- X coordinate of the new position.y- Y coordinate of the new position.z- Z coordinate of the new position.
-
setRotation
public void setRotation(float x, float y, float z) Set the rotation of this emitter.- 参数:
x- X rotation of the new position.y- Y rotation of the new position.z- Z rotation of the new position.
-
setScale
public void setScale(float x, float y, float z) Set the rotation of this emitter.- 参数:
x- X scale of the new position.y- Y scale of the new position.z- Z scale of the new position.
-
setTransformMatrix
public void setTransformMatrix(float[] matrix) Set the transform matrix of this emitter.- 参数:
matrix- the flattened transform matrix.
-
setTransformMatrix
public void setTransformMatrix(float[][] matrix) Set the transform matrix of this emitter.- 参数:
matrix- the transform matrix.
-
setBaseTransformMatrix
public void setBaseTransformMatrix(float[] matrix) Set the base transform matrix of this emitter.- 参数:
matrix- the flattened base transform matrix.
-
setBaseTransformMatrix
public void setBaseTransformMatrix(float[][] matrix) Set the base transform matrix of this emitter.- 参数:
matrix- the base transform matrix.
-
exists
public boolean exists()Get whether this emitter exists in the effek manager.- 返回:
- whether this emitter exists in the effek manager.
-
setDynamicInput
public void setDynamicInput(int index, float value) Set a dynamic input's value.- 参数:
index- The index of the dynamic input. Valid range is 0-3.value- The new value of the dynamic input.
-
getDynamicInput
public float getDynamicInput(int index) Get a dynamic input's value.- 参数:
index- The index of the dynamic input. Valid range is 0-3.- 返回:
- The value of the dynamic input.
-
sendTrigger
public void sendTrigger(int index) Trigger a trigger with the given index.- 参数:
index- The index of the trigger. Valid range is 0-3.
-
getSpeed
public float getSpeed()Get the speed scale of this emitter.- 从以下版本开始:
- 2.0.0
- Implementation Note:
- Speed scaling is fully implemented on the Java side, by changing the emitter's progress when updating.
-
setSpeed
public void setSpeed(float speed) Set relative play speed of this emitter.WARNING: Effekseer effects are baked as 60 frames (by default), and changing this value to lower than
1may look lagged / stepped.To fix this problem, you should set the play speed in your Effekseer editor as the slowest desired play speed, and call this method with the argument value not lesser than
1, up to your max desired relative play speed.WARNING: Do not set speed on long-time emitters. Emitters with relative speed other than
1(default) will increase performance cost by time, until it has been stopped.- 从以下版本开始:
- 2.0.0
- Implementation Note:
- Speed scaling is fully implemented on the Java side, by changing the emitter's progress when updating.
-
addPreDrawCallback
Add a callback that is called before effeks are drawn.- 参数:
callback- the callback function.- Implementation Note:
- Callbacks are fully implemented on the Java side.
-
runPreDrawCallbacks
@Internal public void runPreDrawCallbacks(float partial) -
internalUpdateProgress
@Internal public void internalUpdateProgress(float deltaFrames)
-