Enum Class Fabric

java.lang.Object
java.lang.Enum<Fabric>
net.ixdarklord.coolcatcanvas.api.client.armature.Fabric
All Implemented Interfaces:
Serializable, Comparable<Fabric>, Constable

public enum Fabric extends Enum<Fabric>
What a cloth is made of, for Spring.fabric(Fabric): how heavy it is, how it hangs, how it moves through the air, how it gives and how it folds, all at once. A fabric sets a spring's Spring.mass, Spring.damping, Spring.gravity, Spring.airDrag, Spring.flutter, Spring.stretch, Spring.bend, Spring.linkStiffness and Spring.follow (lighter, looser cloth trails its wearer more); set any of them after it to change just that. How stiffly the cloth holds to its animated place (Spring.stiffness) and how far it swings (Spring.maxAngle) are left to the cloth's own cut: a cape's top lengths stiffer than its hem, say.
animator.spring("cape_0_2").fabric(Fabric.SILK).stiffness(25);
In an armature file, "fabric": "silk" on a spring.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Stiff and heavy: hangs in long curves, drags.
    A string or a thin cord, as a chain of springs: nearly weightless, doesn't stretch, bends anywhere and trails what it hangs from.
    The everyday middle: a skirt, an apron, a tunic.
    Heaviest and stiffest: barely ripples, folds in wide arcs.
    A cloak of leaves: light, rustling, a little springy.
    Light and soft: a nightgown, a shirt, a summer dress.
    Torn and loose: flaps and tangles, gives easily.
    Light and slippery: flows far behind, ripples at any pace, folds sharply.
    Heavy and warm: swings slowly and keeps swinging, hardly ripples.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Fabric
    byName(String name)
    A fabric by name ("silk", "wool"...), or null.
    static Fabric
    Returns the enum constant of this class with the specified name.
    static Fabric[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SILK

      public static final Fabric SILK
      Light and slippery: flows far behind, ripples at any pace, folds sharply. A veil, a ribbon, a ghost's shroud.
    • LINEN

      public static final Fabric LINEN
      Light and soft: a nightgown, a shirt, a summer dress.
    • COTTON

      public static final Fabric COTTON
      The everyday middle: a skirt, an apron, a tunic.
    • WOOL

      public static final Fabric WOOL
      Heavy and warm: swings slowly and keeps swinging, hardly ripples. A cloak, a hood, a shawl.
    • CANVAS

      public static final Fabric CANVAS
      Stiff and heavy: hangs in long curves, drags. A traveller's robe, a sail, a sack.
    • LEATHER

      public static final Fabric LEATHER
      Heaviest and stiffest: barely ripples, folds in wide arcs. A coat's skirts, an apron of hide, armour's straps.
    • RAGS

      public static final Fabric RAGS
      Torn and loose: flaps and tangles, gives easily. Tatters, a shroud worn to threads.
    • LEAVES

      public static final Fabric LEAVES
      A cloak of leaves: light, rustling, a little springy.
    • CORD

      public static final Fabric CORD
      A string or a thin cord, as a chain of springs: nearly weightless, doesn't stretch, bends anywhere and trails what it hangs from. A balloon's string (with Spring.buoyancy(float) for its pull), a kite's line, a necklace.
  • Method Details

    • values

      public static Fabric[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Fabric valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • byName

      public static Fabric byName(String name)
      A fabric by name ("silk", "wool"...), or null.