• Creates a Layer from provided data.

    This function constructs a new Layer instance using the given data, setting properties like active state and default fade parameters.

    Parameters

    • zcomp: ZComponent<any>

      The ZComponent instance.

    • anim: Animation

      The Animation instance to which the layer will belong.

    • data: Layer

      The data object defining the Layer.

    Returns Layer | undefined

    A new Layer instance if successful, or undefined if the layer cannot be created.