Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class VFXReferenceObjectField<ValueType>

    A subclass of VFXReferenceField which is used to target an entire object. This allows applying deltas to multiple properties of that object.

    const dimensions = new VFXReferenceObjectField(new SchemaField({
    width: new NumberField(),
    height: new NumberField()
    }));
    const unresolvedValue = {reference: "target", deltas: {width: 1, height: -1}};
    const references = {target: tokenDocument}; // Suppose tokenDocument width=4 and tokenDocument height=4
    const resolvedObject = dimensions.resolve(unresolvedValue, references); // {width: 5, height: 3}

    Type Parameters

    • ValueType extends object = any

    Hierarchy (View Summary)

    Index

    Properties

    hierarchical: boolean = false

    Whether this field defines part of a Document/Embedded Document hierarchy.

    recursive: boolean = false

    Does this field type contain other fields in a recursive structure? Examples of recursive fields are SchemaField, ArrayField, or TypeDataField Examples of non-recursive fields are StringField, NumberField, or ObjectField

    referenceField: SchemaField = ...

    Accessors

    • get hasFormSupport(): boolean

      Does this form field class have defined form support?

      Returns boolean

    Methods

    • Parameters

      • value: any
      • references: any

      Returns any

    • Test whether a value is a reference.

      Parameters

      • value: any

      Returns boolean