@mlightcad/cad-viewer 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/app/app.d.ts.map +1 -1
- package/dist/component/MlCadViewer.vue.d.ts +5 -0
- package/dist/component/MlCadViewer.vue.d.ts.map +1 -1
- package/dist/index.js +316 -329
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -63,8 +63,6 @@ Firstly, add the following dependencies into your package.json.
|
|
|
63
63
|
- @mlightcad/cad-simple-viewer
|
|
64
64
|
- @mlightcad/cad-viewer
|
|
65
65
|
- @mlightcad/data-model
|
|
66
|
-
- @mlightcad/libredwg-converter
|
|
67
|
-
- @mlightcad/libredwg-web
|
|
68
66
|
- @vueuse/core
|
|
69
67
|
- element-plus
|
|
70
68
|
- vue
|
|
@@ -75,7 +73,7 @@ Then create one vue component as follows.
|
|
|
75
73
|
```vue
|
|
76
74
|
<template>
|
|
77
75
|
<div>
|
|
78
|
-
<MlCADViewer canvas-id="canvas" />
|
|
76
|
+
<MlCADViewer canvas-id="canvas" :background="0x808080" />
|
|
79
77
|
</div>
|
|
80
78
|
</template>
|
|
81
79
|
|
|
@@ -116,6 +114,7 @@ The `MlCadViewer` component accepts the following props:
|
|
|
116
114
|
| `url` | `string` | `undefined` | Optional URL to automatically load a CAD file when the component mounts. The file will be fetched and opened automatically. |
|
|
117
115
|
| `wait` | `number` | `10` | When set to a positive number, the component will wait for DWG converter ready to use for the specified number of seconds before initializing. This is useful when you need to ensure DWG file support is available before the component becomes interactive. Set to `0` or negative value to disable waiting. |
|
|
118
116
|
| `canvasId` | `string` | **Required** | Canvas element ID for the CAD viewer. The component will automatically call `initializeCadViewer` with this ID during its mount lifecycle. |
|
|
117
|
+
| `background` | `number` | `undefined` | Background color as 24-bit hexadecimal RGB (e.g., `0x000000` for black, `0x808080` for gray). |
|
|
119
118
|
|
|
120
119
|
### UI Settings
|
|
121
120
|
|
package/dist/app/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;AAS5B,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,SAMpD,CAAA"}
|
|
@@ -8,18 +8,23 @@ interface Props {
|
|
|
8
8
|
wait?: number;
|
|
9
9
|
/** Canvas element ID for the CAD viewer. This is required to specify which canvas element to use */
|
|
10
10
|
canvasId: string;
|
|
11
|
+
/** Background color as 24-bit hexadecimal RGB number (e.g., 0x000000) */
|
|
12
|
+
background?: number;
|
|
11
13
|
}
|
|
12
14
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
13
15
|
locale: string;
|
|
14
16
|
url: undefined;
|
|
15
17
|
wait: number;
|
|
18
|
+
background: undefined;
|
|
16
19
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
17
20
|
locale: string;
|
|
18
21
|
url: undefined;
|
|
19
22
|
wait: number;
|
|
23
|
+
background: undefined;
|
|
20
24
|
}>>> & Readonly<{}>, {
|
|
21
25
|
locale: LocaleProp;
|
|
22
26
|
url: string;
|
|
27
|
+
background: number;
|
|
23
28
|
wait: number;
|
|
24
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
25
30
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MlCadViewer.vue.d.ts","sourceRoot":"","sources":["../../src/component/MlCadViewer.vue"],"names":[],"mappings":"AAyCA;
|
|
1
|
+
{"version":3,"file":"MlCadViewer.vue.d.ts","sourceRoot":"","sources":["../../src/component/MlCadViewer.vue"],"names":[],"mappings":"AAyCA;AAkVA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAatC,UAAU,KAAK;IACb,0EAA0E;IAC1E,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oGAAoG;IACpG,QAAQ,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;;;;;;;;;;;;YATU,UAAU;SAEb,MAAM;gBAMC,MAAM;UAJZ,MAAM;;AAySf,wBAMG;AAEH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GAC5C,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AACF,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC;AACF,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|