Namespace utils

xeokit Core Utilities


Generic data structures, async helpers, GUID / hash helpers, and cooperative-yield throttling used across the SDK.


A miscellaneous helper bag used by the rest of the SDK and safe to use standalone.


  • Map / Queue — small allocation-friendly collections used across SDK hot paths.
  • yieldToHost — cooperative yield helper that loaders and exporters await every ~16 ms so the host's UI thread can paint between batches. Supports AbortSignal cancellation and a runtime-overridable yield interval.
  • GUID helperscreateUUID plus the Base64-style compact GUID encoders the IFC pipeline uses to mint short stable ids.
  • JSON helpersisJSONObject and clone (deep-clone via JSON round-trip) for boundary checks on caller-supplied params.

Installation

npm install @xeokit/sdk

Usage

import { Map, Queue, yieldToHost } from "@xeokit/sdk/base/utils";

Classes

Queue

Functions

apply
apply2
applyIf
b64
clone
compressGuid
concat
copy
createUUID
findNodeOfType
httpRequest
inQuotes
isArray
isEmptyObject
isFunction
isID
isJSONObject
isNumeric
isObject
isString
loadArraybuffer
loadJSON
resetYieldThrottle
saveArrayBuffer
saveJSON
setYieldIntervalOverride
timeout
yieldToHost