Class LXEffect.Placeholder

All Implemented Interfaces:
LXComponent.Placeholder, LXComponent.Renamable, LXLoopTask, LXPath, LXPresetComponent, LXSerializable, LXMidiListener, LXModulationContainer, LXOscComponent, LXParameterListener
Enclosing class:
LXEffect

public static class LXEffect.Placeholder extends LXEffect implements LXComponent.Placeholder
Placeholder pattern for when a class is missing
  • Constructor Details

  • Method Details

    • getPlaceholderTypeName

      public String getPlaceholderTypeName()
      Specified by:
      getPlaceholderTypeName in interface LXComponent.Placeholder
    • getPlaceholderClassName

      public String getPlaceholderClassName()
      Specified by:
      getPlaceholderClassName in interface LXComponent.Placeholder
    • getInstantiationException

      public LX.InstantiationException getInstantiationException()
      Specified by:
      getInstantiationException in interface LXComponent.Placeholder
    • save

      public void save(LX lx, JsonObject object)
      Description copied from class: LXComponent
      Serializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to call super.save(lx, obj) at the appropriate time.
      Specified by:
      save in interface LXSerializable
      Overrides:
      save in class LXDeviceComponent
      Parameters:
      lx - LX instance
      object - Object to serialize into
    • load

      public void load(LX lx, JsonObject object)
      Description copied from class: LXComponent
      Loads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.
      Specified by:
      load in interface LXSerializable
      Overrides:
      load in class LXDeviceComponent
      Parameters:
      lx - LX instance
      object - Object to deserialize
    • run

      protected void run(double deltaMs, double enabledAmount)
      Description copied from class: LXEffect
      Implementation of the effect. Subclasses need to override this to implement their functionality.
      Specified by:
      run in class LXEffect
      Parameters:
      deltaMs - Number of milliseconds elapsed since last invocation
      enabledAmount - The amount of the effect to apply, scaled from 0-1