Foundational primitives every other SDK module depends on —
result types, error taxonomy, event dispatcher, task runner, and
progress reporting.
core carries the small, stable types that the rest of the SDK
exchanges across module boundaries. It has no dependencies on
other SDK modules and is safe to import from anywhere.
Features
SDKResult — discriminated union covering every
fallible operation in the SDK. if (r.ok) { use r.value } vs
r.error / r.type. Never throw for caller errors; always
return an SDKResult.
SDKErrorType — small enum of error categories
(InvalidInput, InvalidOperation, NotSupported,
OutOfMemory, …) so callers can branch on machine-readable
error kinds instead of string-matching messages.
SDKInternalException — thrown for internal SDK
bugs (broken invariants, impossible states). Surfaces to the
host as a regular Error with a typed SDKErrorType tag.
EventEmitter — typed wrapper around
strongly-typed-events. Every event in the SDK is exposed as
an EventEmitter<Source, Payload> with subscribe() returning
an unsubscribe function.
SDKTask / SDKTaskRunner — cooperative task
queue with progress reporting; used by the Demo task panel and
by long-running converter pipelines.
SDKProgress — {phase, current, total} snapshot
passed to caller progress callbacks during loading / exporting /
inspecting.
TextureTranscoder — abstract interface for
transcoding compressed-texture payloads (Basis Universal,
KTX2) to GPU-native formats; implementations provided by
format-specific loaders.
EventsLogger — opt-in observer that mirrors every
subscribed event to the console; useful for debugging event
flow.
xeokit Core
Foundational primitives every other SDK module depends on — result types, error taxonomy, event dispatcher, task runner, and progress reporting.
corecarries the small, stable types that the rest of the SDK exchanges across module boundaries. It has no dependencies on other SDK modules and is safe to import from anywhere.Features
if (r.ok) { use r.value }vsr.error / r.type. Never throw for caller errors; always return anSDKResult.InvalidInput,InvalidOperation,NotSupported,OutOfMemory, …) so callers can branch on machine-readable error kinds instead of string-matching messages.Errorwith a typedSDKErrorTypetag.strongly-typed-events. Every event in the SDK is exposed as anEventEmitter<Source, Payload>withsubscribe()returning an unsubscribe function.{phase, current, total}snapshot passed to caller progress callbacks during loading / exporting / inspecting.Installation
Quick Start
1) Branch on SDKResult
2) Subscribe to an EventEmitter