Namespace core

xeokit Core


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.



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);
}

const unsub = viewer.events.onError.subscribe((source, err) => {
console.warn(`[${source.id}] ${err.error}`);
});

// ...later:
unsub();

Enumerations

SDKErrorType

Classes

EventEmitter
EventsLogger
SDKInternalException
SDKProgress
SDKTask
SDKTaskRunner

Interfaces

ModelChunksManifestParams
TextureCompressedParams
TextureTranscoder

Type Aliases

SDKResult

Variables

sdkProgress
SDKResultOK

Functions

getGlobalTaskRunner