Search in sources :

Example 11 with ParticleEmitterWrapper

use of com.talosvfx.talos.editor.ParticleEmitterWrapper in project talos by rockbite.

the class EmitterList method createNewEmitterClicked.

private void createNewEmitterClicked() {
    ParticleEmitterWrapper selectedItem = getSelectedItem();
    float sortPosition = 0;
    // if nothing is selected we are adding on top
    if (selectedItem != null) {
        sortPosition = selectedItem.getEmitter().getSortPosition() + 0.5f;
    }
    final ParticleEmitterWrapper emitter = TalosMain.Instance().TalosProject().createNewEmitter("emitter", sortPosition);
    Array<ParticleEmitterWrapper> activeWrappers = TalosMain.Instance().TalosProject().getActiveWrappers();
    // update all items
    // activeWrappers.reverse();
    setData(activeWrappers);
    setSelected(emitter);
}
Also used : ParticleEmitterWrapper(com.talosvfx.talos.editor.ParticleEmitterWrapper)

Aggregations

ParticleEmitterWrapper (com.talosvfx.talos.editor.ParticleEmitterWrapper)11 ModuleWrapper (com.talosvfx.talos.editor.wrappers.ModuleWrapper)3 Array (com.badlogic.gdx.utils.Array)2 ModuleWrapperGroup (com.talosvfx.talos.editor.data.ModuleWrapperGroup)2 ModuleBoardWidget (com.talosvfx.talos.editor.widgets.ui.ModuleBoardWidget)2 ParticleEmitterDescriptor (com.talosvfx.talos.runtime.ParticleEmitterDescriptor)2 ConnectionData (com.talosvfx.talos.runtime.serialization.ConnectionData)2 Color (com.badlogic.gdx.graphics.Color)1 IntMap (com.badlogic.gdx.utils.IntMap)1 ObjectSet (com.badlogic.gdx.utils.ObjectSet)1 PolylineModule (com.talosvfx.talos.runtime.modules.PolylineModule)1 TextureModule (com.talosvfx.talos.runtime.modules.TextureModule)1 VectorFieldModule (com.talosvfx.talos.runtime.modules.VectorFieldModule)1 ExportData (com.talosvfx.talos.runtime.serialization.ExportData)1