Class AnamorphicFlare

java.lang.Object
org.dark.graphics.util.AnamorphicFlare

public class AnamorphicFlare extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    createFlare(com.fs.starfarer.api.combat.ShipAPI origin, org.lwjgl.util.vector.Vector2f point, com.fs.starfarer.api.combat.CombatEngineAPI engine, float brightness, float thickness, float angle, float spread, float fringeGain, Color fringeColor, Color coreColor)
    Anamorphic Flare Generator.
    static void
    createStripFlare(com.fs.starfarer.api.combat.ShipAPI origin, org.lwjgl.util.vector.Vector2f point, com.fs.starfarer.api.combat.CombatEngineAPI engine, float brightness, int magnitude, float thickness, float width, float angle, float spread, float fringeGain, Color fringeColor, Color coreColor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AnamorphicFlare

      public AnamorphicFlare()
  • Method Details

    • createFlare

      public static void createFlare(com.fs.starfarer.api.combat.ShipAPI origin, org.lwjgl.util.vector.Vector2f point, com.fs.starfarer.api.combat.CombatEngineAPI engine, float brightness, float thickness, float angle, float spread, float fringeGain, Color fringeColor, Color coreColor)
      Anamorphic Flare Generator. This creates a lot of EMP flares in a tight group, exploiting a bug in the game to create an effect similar to an anamorphic flare. To create the effect you want, you may need to do a lot of tweaking. Keep in mind that the effect has a higher resolution and a greater computational cost with smaller thicknesses; extreme values (0.01 and smaller) can result in odd behavior. This can cause bugs if used in some particular cases, such as on a weapon that spawns free-floating EMP arcs.

      Parameters:
      origin - Put any ship in here. Really, any ship. This CANNOT be null.
      point - Location of the anamorphic flare. You may need to offset this to the right and downward to get it to be centered.
      engine - The base combat engine object.
      brightness - The visual brightness of the anamorphic flare. This can also be used to attenuate its size, due to how it is shaped. Biased such that 1 equals maximum brightness, but it is possible to go above maximum brightness, especially on lower thicknesses, due to how the anamorphic flare works.
      thickness - Thickness ratio of the anamorphic flare. A bit of a misnomer; it won't actually get thinner, just longer, if you make this smaller. Do not use a value above 0.5 because otherwise the flare won't look like anything. The resolution of the flare and the precision of the flare thickness and the computational complexity of the flare all increase when the thickness is decreased. Values below 0.01 can have a huge performance hit.
      angle - The angle the flare points toward, in degrees.
      spread - Controls how misshapen the flare will be, in degrees. Use only for low thickness values (0.2 and below).
      fringeGain - Multiplies the alpha of the outside color of the anamorphic flare, in case it wasn't colorful enough for you. Not sure if this actually works... Default is 1.
      fringeColor - The outside color of the anamorphic flare. Alpha is not used.
      coreColor - The core color of the anamorphic flare. Alpha is not used.
    • createStripFlare

      public static void createStripFlare(com.fs.starfarer.api.combat.ShipAPI origin, org.lwjgl.util.vector.Vector2f point, com.fs.starfarer.api.combat.CombatEngineAPI engine, float brightness, int magnitude, float thickness, float width, float angle, float spread, float fringeGain, Color fringeColor, Color coreColor)