Skip to content
On this page

mxcad API 文档 / MxDraw3dConfig

Interface: MxDraw3dConfig

MxDraw3d的构造函数参数 的可配置选项

Hierarchy

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
NameTypeDefault value
wasmURLstringundefined
baseURLstring | URLself.location.href
Returns

string

Inherited from

WasmConfig.locateFile


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
NameType
theTextstring
Returns

string

Inherited from

WasmConfig.print


printErr

Optional printErr: (theText: string) => void

Type declaration

▸ (theText): void

打印错误

Parameters
NameType
theTextstring
Returns

void

Inherited from

WasmConfig.printErr


updateCanvasSize

Optional updateCanvasSize: () => void

Type declaration

▸ (): void

指定更新Canvas大小的函数,不指定则默认自动处理(指定该函数则 minHeight, minWidth无效)

Returns

void


wasmBinary

Optional wasmBinary: ArrayBuffer

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

Inherited from

WasmConfig.wasmBinary