mxcad API 文档 / WasmConfig
Interface: WasmConfig
wasm importObject 的可配置选项
Hierarchy
WasmConfig
↳
MxDraw3d
Table of contents
Properties
Properties
locateFile
• Optional
locateFile: (wasmURL
: string
, baseURL
: string
| URL
) => string
Type declaration
▸ (wasmURL
, baseURL?
): string
手动指定wasm文件位置
Parameters
Name | Type | Default value |
---|---|---|
wasmURL | string | undefined |
baseURL | string | URL | self.location.href |
Returns
string
onRuntimeInitialized
• Optional
onRuntimeInitialized: () => void
Type declaration
▸ (): void
监听运行时初始化
Returns
void
print
• Optional
print: (theText
: string
) => string
Type declaration
▸ (theText
): string
打印
Parameters
Name | Type |
---|---|
theText | string |
Returns
string
printErr
• Optional
printErr: (theText
: string
) => void
Type declaration
▸ (theText
): void
打印错误
Parameters
Name | Type |
---|---|
theText | string |
Returns
void
wasmBinary
• Optional
wasmBinary: ArrayBuffer
二进制数据 设置wasmBinary 则 locateFile 不生效*