@pretty-chitty/core
    Preparing search index...

    Function ChildOutlet

    • Defines an "outlet" on a chit. This can have an initializer which will automatically set that chit's parent to this object. This will create a property that will automatically assign ownership of the chit to the parent if it's assigned (and remove it from any outlet that it was previously assigned to).

      Sample syntax:

      class MyChit extends Chit {

      @ChildOutlet(new Vector3(1,2,-3))
      public token1?: Token;

      @ChildOutlet
      public token2 = new Token().set(t => t.color = "red");

      public token3?: Token;
      }

      Note that token3 is not a ChildOutlet, so assigning it will not update parent/child relationships. It can still be referenced and used, but it will not affect any parent or child linkages.

      The optional parameter here is a Vector3 that indicates the position offset for the outlet.

      Parameters

      • ...args: any

      Returns any