Skip to content
On this page

mxcad API 文档 / WasmConfig

Interface: WasmConfig

wasm importObject 的可配置选项

Hierarchy

Table of contents

Properties

Properties

locateFile

Optional locateFile: (wasmURL: string, baseURL: string | URL) => string

Type declaration

▸ (wasmURL, baseURL?): string

手动指定wasm文件位置

Parameters
NameTypeDefault value
wasmURLstringundefined
baseURLstring | URLself.location.href
Returns

string


onRuntimeInitialized

Optional onRuntimeInitialized: () => void

Type declaration

▸ (): void

监听运行时初始化

Returns

void


print

Optional print: (theText: string) => string

Type declaration

▸ (theText): string

打印

Parameters
NameType
theTextstring
Returns

string


printErr

Optional printErr: (theText: string) => void

Type declaration

▸ (theText): void

打印错误

Parameters
NameType
theTextstring
Returns

void


wasmBinary

Optional wasmBinary: ArrayBuffer

二进制数据 设置wasmBinary 则 locateFile 不生效*