Threepipe Tweakpane Editor Plugin
    Preparing search index...

    Class NotesPlugin

    Notes Plugin

    A list of notes, each kept in a store:

    • file: fileNotes, a serialized property, so these notes are saved in the viewer config, inside an exported .glb, and come back when the file loads;
    • browser: localStorage (BrowserNotesStore);
    • any store the app adds (addStore), for example HttpNotesStore or its own.

    The plugin has no notes UI: a view shows notes and edits them with addNote, updateNote and removeNote, for example StickyNotesUiPlugin (post-its over the canvas). The notesChange event tells the views to update. Changes are saved per store, 600 ms after the last one, and when the plugin is removed.

    Its UI folder (Notes) has the settings: the store of new notes, and clear the notes in the file.

    Hierarchy

    Index
    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    contextProvider?: () => string

    Extra text for contextLine

    defaultStore: string = ''

    The store of a note made with addNote when it names none. Default: the first store.

    enabled: boolean = true
    fileNotes: NoteItem[] = []

    The notes of the file store: saved in the viewer config, so in an exported .glb

    isViewerPluginSync: true = ...
    uiConfig: UiObjectConfig = ...
    OldPluginType?: string
    PluginType: "NotesPlugin" = 'NotesPlugin'
    • Parameters

      • e: IViewerEvent

      Returns IViewerEvent

    • Parameters

      • Optionalprefix: string

      Returns string

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Parameters

      • key: any
      • setDirty: boolean = true

      Returns void

    • Returns ISerializedConfig | Record<string, never>

    • Saves the changed stores now, instead of 600 ms after the last change, and waits for all the saves that run. A store that still loads and has changes is saved after its load; one that cannot load keeps its changes.

      Returns Promise<void>

    • Parameters

      • state: any

      Returns Promise<void>

    • Parameters

      • ...args: any[]

      Returns any

    • Parameters

      • Optionalmeta: SerializationMetaType

      Returns ISerializedConfig