mxcad API 文档 / MxDraw3dConfig
Interface: MxDraw3dConfig
MxDraw3d的构造函数参数 的可配置选项
Hierarchy
↳
MxDraw3dConfig
Implemented by
Indexable
▪ [x: string
]: any
Table of contents
Properties
Properties
canvas
• canvas: string
| HTMLCanvasElement
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
Inherited from
minHeight
• Optional
minHeight: number
canvas最小高度 默认300
minWidth
• Optional
minWidth: number
canvas最小宽度 默认300
onRuntimeInitialized
• Optional
onRuntimeInitialized: () => void
Type declaration
▸ (): void
监听运行时初始化
Returns
void
Inherited from
WasmConfig.onRuntimeInitialized
print
• Optional
print: (theText
: string
) => string
Type declaration
▸ (theText
): string
打印
Parameters
Name | Type |
---|---|
theText | string |
Returns
string
Inherited from
printErr
• Optional
printErr: (theText
: string
) => void
Type declaration
▸ (theText
): void
打印错误
Parameters
Name | Type |
---|---|
theText | string |
Returns
void
Inherited from
updateCanvasSize
• Optional
updateCanvasSize: () => void
Type declaration
▸ (): void
指定更新Canvas大小的函数,不指定则默认自动处理(指定该函数则 minHeight, minWidth无效)
Returns
void
wasmBinary
• Optional
wasmBinary: ArrayBuffer
二进制数据 设置wasmBinary 则 locateFile 不生效*