Core types used across the SDK — result handling, errors, events, tasks, progress, and texture transcoding.
core holds the small, stable types shared across module boundaries. It has no dependencies on other SDK modules and is safe to import from anywhere.
core
npm install @xeokit/sdk Copy
npm install @xeokit/sdk
import { SDKResult, SDKErrorType } from "@xeokit/sdk/base/core";const r = doThing();if (r.ok) { useValue(r.value);} else if (r.type === SDKErrorType.NotSupported) { showFallback();} else { console.error(r.error);} Copy
import { SDKResult, SDKErrorType } from "@xeokit/sdk/base/core";const r = doThing();if (r.ok) { useValue(r.value);} else if (r.type === SDKErrorType.NotSupported) { showFallback();} else { console.error(r.error);}
const unsub = viewer.events.onError.subscribe((source, err) => { console.warn(`[${source.id}] ${err.error}`);});// ...later:unsub(); Copy
const unsub = viewer.events.onError.subscribe((source, err) => { console.warn(`[${source.id}] ${err.error}`);});// ...later:unsub();
xeokit Core
Core types used across the SDK — result handling, errors, events, tasks, progress, and texture transcoding.
coreholds the small, stable types shared across module boundaries. It has no dependencies on other SDK modules and is safe to import from anywhere.Features
Installation
Quick Start
1) Branch on SDKResult
2) Subscribe to an EventEmitter