@webarkit/jsartoolkit-nft
    Preparing search index...

    Implements

    • IARToolkitNFT_node
    Index
    • The ARToolkitNFT constructor. It has no arguments. These properties are initialized:

      • instance
      • cameraCount
      • version A message is displayed in the console during init(), for example: "ARToolkitNFT 1.5.0" (it moved there from the constructor, #677).

      Returns ARToolkitNFT

    free: any
    FS: any
    malloc: any
    NFTMarkerInfo: { error: number; found: number; id: number; pose: Float64Array }
    nftMarkers: any
    StringList: any
    videoFramePtr: number
    videoLumaPtr: number
    AR_DEBUG_DISABLE: number
    AR_DEBUG_ENABLE: number
    AR_DEFAULT_DEBUG_MODE: number
    AR_DEFAULT_IMAGE_PROC_MODE: number
    AR_DEFAULT_LABELING_THRESH: number
    AR_IMAGE_PROC_FIELD_IMAGE: number
    AR_IMAGE_PROC_FRAME_IMAGE: number
    AR_LABELING_THRESH_MODE_AUTO_ADAPTIVE: number
    AR_LABELING_THRESH_MODE_AUTO_MEDIAN: number
    AR_LABELING_THRESH_MODE_AUTO_OTSU: number
    AR_LABELING_THRESH_MODE_MANUAL: number
    AR_LOG_LEVEL_DEBUG: number
    AR_LOG_LEVEL_ERROR: number
    AR_LOG_LEVEL_INFO: number
    AR_LOG_LEVEL_REL_INFO: number
    AR_LOG_LEVEL_WARN: number
    AR_LOOP_BREAK_THRESH: number
    AR_MARKER_INFO_CUTOFF_PHASE_HEURISTIC_TROUBLESOME_MATRIX_CODES: number
    AR_MARKER_INFO_CUTOFF_PHASE_MATCH_BARCODE_EDC_FAIL: number
    AR_MARKER_INFO_CUTOFF_PHASE_MATCH_BARCODE_NOT_FOUND: number
    AR_MARKER_INFO_CUTOFF_PHASE_MATCH_CONFIDENCE: number
    AR_MARKER_INFO_CUTOFF_PHASE_MATCH_CONTRAST: number
    AR_MARKER_INFO_CUTOFF_PHASE_MATCH_GENERIC: number
    AR_MARKER_INFO_CUTOFF_PHASE_NONE: number
    AR_MARKER_INFO_CUTOFF_PHASE_PATTERN_EXTRACTION: number
    AR_MARKER_INFO_CUTOFF_PHASE_POSE_ERROR: number
    AR_MARKER_INFO_CUTOFF_PHASE_POSE_ERROR_MULTI: number
    AR_MAX_LOOP_COUNT: number
    ERROR_MARKER_INDEX_OUT_OF_BOUNDS: number
    • get HEAPU8(): any

      The WASM heap view. Read from the module on every access rather than cached: the build enables ALLOW_MEMORY_GROWTH, and Emscripten replaces this typed array when the heap grows, detaching any previously captured reference.

      Returns any

    • Load the NFT Markers (.fset, .iset and .fset3) in the code. Each entry is the path of the descriptor files without the extension, relative to the working directory. The files are read in place through NODEFS.

      It can be called more than once: ids continue from the markers already loaded (#612). A call that fails reports through onError2 and leaves the markers loaded by earlier calls in place, so it can be retried.

      Parameters

      • urls: string[]

        array of paths of the descriptor files without ext

      • Optionalcallback: (ids: number[]) => void

        the callback to retrieve the ids.

      • OptionalonError2: (errorNumber: number) => void

        the error callback.

      Returns number[]

      an array of ids.

    • Changes several runtime settings at once (#720). The patch is deep-merged into getRuntimeSettings (ar2 field by field) and applied in one native call, which validates everything first and changes nothing on failure.

      logLevel is per controller: the level lives in the WASM module's globals, and each init() creates its own module.

      Parameters

      Returns void

      on an unknown key (including the deprecated square-marker keys threshold, thresholdMode, imageProcMode, debugMode), a value of the wrong type, or a non-integer for an integer field (logLevel, ar2.searchFeatureNum, ar2.templateSize1/2, ar2.searchSize); nothing is changed.

      when the values are out of range; nothing is changed.

    • Returns whether the square-marker detector's debug mode is enabled.

      Returns boolean

      true when debug mode is enabled

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Returns the square-marker detector's image processing mode.

      Returns number

      The current image processing mode.

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Parameters

      • index: number

      Returns object

    • Returns the Emscripten HEAP offset of the square-marker detector's debug image.

      Returns number

      HEAP offset of the debug image.

      The image is never filled for NFT tracking: only the square-marker labeling writes it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Returns number

    • Returns number

    • The current runtime settings (#720), with the effective values: detectionInterval and ar2.searchSize are the build's resolved defaults when they were not set, and logLevel is the module's current level.

      Returns NFTRuntimeSettings

      a fresh object; changing it changes nothing until passed to configure().

    • Returns the square-marker labeling threshold.

      Returns number

      The current threshold value.

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Returns the square-marker labeling threshold mode.

      Returns number

      The current threshold mode.

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Init the class injecting the Wasm Module and link the instanced methods. Every call builds its own module, so each ARToolkitNFT has its own heap and filesystem.

      Parameters

      • Optionaloptions: ARInitOptions

        logLevel is applied to the fresh module before the core is constructed (#677, D10), so the start-up lines follow it.

      Returns Promise<ARToolkitNFT>

      the this object

    • Load the camera, this is an important and required step, Internally fill the ARParam struct.

      Parameters

      • pathOrData: string | Uint8Array<ArrayBufferLike>

        the camera parameter: a path to a .dat file, relative to the working directory, or its contents.

      Returns Promise<number>

      a promise that resolves to a number, the internal id.

    • Parameters

      • videoFrame: Uint8ClampedArray
      • videoLuma: Uint8Array
      • lumaInternal: boolean

      Returns void

    • Rebuilds the camera frustum from the near and far planes. Kept for compatibility: since WebARKitLib 0.12.0 the lens follows the planes, as the projection setters and configure() rebuild it themselves, so calling this changes nothing.

      Returns void

    • Parameters

      • enabled: boolean

      Returns void

    • Enables or disables the square-marker detector's debug mode.

      Parameters

      • mode: boolean

        true to enable debug mode, false to disable it

      Returns number

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Parameters

      • ms: number

      Returns void

    • Parameters

      • enableFiltering: boolean

      Returns void

    • Sets the square-marker detector's image processing mode (frame or field).

      Parameters

      • mode: number

        AR_IMAGE_PROC_FRAME_IMAGE or AR_IMAGE_PROC_FIELD_IMAGE.

      Returns number

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Set the logging verbosity.

      Lower is more verbose: ARLogLevel.Debug (0) shows everything, ARLogLevel.RelInfo (4) the least. The library starts at ARLogLevel.Info.

      Parameters

      • level: number

        one of the ARLogLevel values. Returns nothing: the native setter is void. Use getLogLevel() to read back the effective level, which also reveals when a negative value was rejected by the guard.

      Returns void

    • Sets the far plane of the projection. Once a camera is loaded the camera lens is rebuilt at once (WebARKitLib 0.12.0); before that the value is stored.

      Parameters

      • value: number

        the far plane, > the near plane.

      Returns void

    • Sets the near plane of the projection. Once a camera is loaded the camera lens is rebuilt at once (WebARKitLib 0.12.0); before that the value is stored.

      Parameters

      • value: number

        the near plane, > 0.

      Returns void

    • Sets the square-marker labeling threshold.

      Parameters

      • threshold: number

        An integer in the range [0,255] (inclusive).

      Returns number

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Sets the square-marker labeling threshold mode (auto/manual).

      Parameters

      • mode: number

        One of the AR_LABELING_THRESH_MODE_* values.

      Returns number

      Has no effect on NFT tracking: only the square-marker labeling reads it, and NFT tracking never runs it. Will be removed in the next major version (#659).

    • Parameters

      • width: number
      • height: number
      • cameraId: number

      Returns number

    • Internal

      The throwing core of addNFTMarkers. Synchronous like it (#685, D9): Node reads the files in place, so there is nothing to await. Shared with the tracker facade (#720 D10); kept out of the public docs. Used by ARControllerNFT_node and nodeTargetLoader, which need the NFTLoadError.

      Parameters

      • urls: string[]

        paths of the descriptor files without ext

      Returns number[]

      the real marker ids.

      argument for an empty list or URL, missing for a file that does not exist, rejected when the native loader refuses the markers or throws.