类 ParticleEmitter

java.lang.Object
mod.chloeprime.aaaparticles.api.client.effekseer.ParticleEmitter
直接已知子类:
DummyParticleEmitter

public class ParticleEmitter extends Object
Wrapper for the int handle of native particle emitters.
从以下版本开始:
1.0.0
  • 字段详细资料

    • handle

      public final int handle
    • type

      public final ParticleEmitter.Type type
    • isVisible

      @Internal public boolean isVisible
    • isPaused

      @Internal public boolean isPaused
  • 构造器详细资料

  • 方法详细资料

    • dummy

      public static ParticleEmitter dummy(ParticleEmitter.Type type)
      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 through setVisibility(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 1 may 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

      public void addPreDrawCallback(ParticleEmitter.PreDrawCallback callback)
      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)