@mlightcad/cad-viewer 1.0.15 → 1.0.18
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
CHANGED
|
@@ -73,7 +73,7 @@ Then create one vue component as follows.
|
|
|
73
73
|
```vue
|
|
74
74
|
<template>
|
|
75
75
|
<div>
|
|
76
|
-
<MlCADViewer canvas-id="canvas" />
|
|
76
|
+
<MlCADViewer canvas-id="canvas" :background="0x808080" />
|
|
77
77
|
</div>
|
|
78
78
|
</template>
|
|
79
79
|
|
|
@@ -114,6 +114,7 @@ The `MlCadViewer` component accepts the following props:
|
|
|
114
114
|
| `url` | `string` | `undefined` | Optional URL to automatically load a CAD file when the component mounts. The file will be fetched and opened automatically. |
|
|
115
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. |
|
|
116
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). |
|
|
117
118
|
|
|
118
119
|
### UI Settings
|
|
119
120
|
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentPos.d.ts","sourceRoot":"","sources":["../../src/composable/useCurrentPos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"useCurrentPos.d.ts","sourceRoot":"","sources":["../../src/composable/useCurrentPos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,8BAA8B,CAAA;AAqB/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY;;;;EAsB/C"}
|