sparkengineweb
    Preparing search index...

    Function getPublicProperties

    • Parameters

      • instance: IComponent

        The component instance to inspect

      • Optionaloptions: { writable?: boolean }

        Optional filtering options

        • Optionalwritable?: boolean

          If true, only include read/write properties; if false, only readonly. If undefined, include all.

      Returns Record<string, any>

      Object mapping property names to their values

      const transform = new TransformComponent();
      PropertyScope.getPublicProperties(transform)
      // Returns: { position: {...}, rotation: {...}, scale: {...}, uuid: '...' }

      PropertyScope.getPublicProperties(transform, { writable: true })
      // Returns: { position: {...}, rotation: {...}, scale: {...} } (only settable properties)

      PropertyScope.getPublicProperties(transform, { writable: false })
      // Returns: { uuid: '...' } (only getter-only properties)