StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticAR_StaticERROR_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.
StaticNFT_StaticteardownInternal
True when teardown() cannot run on the browser main thread: the tracker facade's dispose() then skips it (#720, #695). Only the threaded build says true.
StaticUNKNOWN_static properties
Loads NFT markers and registers them as one batch.
Each entry is either a URL without extension (.zft is probed first,
then .fset, .iset and .fset3), a URL ending in .zft, or an explicit
list of file URLs for one marker.
All or nothing: if any marker fails, none of this call's markers is registered and its files are removed. Markers loaded by earlier calls stay.
NFTLoadError, or with signal.reason (AbortError,
TimeoutError) when opts.signal aborts.callback and/or onError): never rejects for a load
failure. onError(code) is called once, with the HTTP status or -1
(or console.error when there is no onError), and the Promise resolves
to [].Errors from different bundles are different classes, so test
err.name === "NFTLoadError" and err.kind rather than instanceof.
the markers to load, one entry per marker.
Optionalcallback: (ids: number[]) => void
deprecated: receives the ids on success.
OptionalonError: (code: number) => void
deprecated: receives the error code on failure.
Optionalopts: NFTLoadOptions
signal cancels the downloads; probeZFT (default true)
probes for a .zft before the three files.
the ids the native core assigned, in the order of urls.
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.
any subset of the settings.
Returns the Emscripten HEAP offset of the square-marker detector's debug image.
HEAP offset of the debug image.
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.
a fresh object; changing it changes nothing until passed to configure().
Init the class injecting the Wasm Module, link the instanced methods and create a global artoolkitNFT variable.
Optionaloptions: ARInitOptions & { moduleOptions?: Record<string, unknown> }
logLevel is applied to the fresh module before the core is
constructed (#677, D10), so the start-up lines follow it. moduleOptions is handed
to the Emscripten module factory as its Module object: the tracker facade's threaded
worker host sets mainScriptUrlOrBlob through it (#720 D16).
the this object
Load the camera, this is an important and required step, Internally fill the ARParam struct.
the camera parameter, usually a path to a .dat file
a promise that resolves to a number, the internal id.
A download failure rejects with the NFTLoadError from the fetch (kind
http or network), which names the URL.
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.
Enables or disables the square-marker detector's debug mode.
true to enable debug mode, false to disable it
Sets the square-marker detector's image processing mode (frame or field).
AR_IMAGE_PROC_FRAME_IMAGE or AR_IMAGE_PROC_FIELD_IMAGE.
Set the logging verbosity.
Lower is more verbose: ARLogLevel.Debug (0) shows everything,
ARLogLevel.RelInfo (4) the least. The library starts at
ARLogLevel.Info.
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.
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.
the far plane, > the near plane.
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.
the near plane, > 0.
Sets the square-marker labeling threshold mode (auto/manual).
One of the AR_LABELING_THRESH_MODE_* values.
The ARToolkitNFT constructor. It has no arguments. These properties are initialized: