bc-model-viewer 1.6.70 → 1.6.73
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/examples/clip.html
CHANGED
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
<div class="demo">
|
|
26
26
|
<h2>剖切工具演示</h2>
|
|
27
|
-
<button onclick="
|
|
28
|
-
<button onclick="
|
|
27
|
+
<button onclick="viewer.clipper.activate()">激活工具</button>
|
|
28
|
+
<button onclick="viewer.clipper.deactivate()">停止</button>
|
|
29
29
|
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<script type="module">
|
|
33
33
|
|
|
34
|
-
import { Viewer, HUDLabelTool } from '../../index.ts'
|
|
34
|
+
import { Viewer, HUDLabelTool, ModelClipperTool } from '../../index.ts'
|
|
35
35
|
|
|
36
36
|
const container = document.getElementById('container')
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
load: {
|
|
44
44
|
cache: {
|
|
45
|
-
enabled:
|
|
45
|
+
enabled: false,
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
gui: {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
// 加载测试模型
|
|
57
|
-
await viewer.loadZipAsync('
|
|
57
|
+
await viewer.loadZipAsync('../../../assets/new.dgz')
|
|
58
|
+
// await viewer.loadZipAsync('../../../assets/dgz/机电综合.dgz')
|
|
58
59
|
|
|
59
|
-
viewer.clipper.activateSectionBox()
|
|
60
60
|
window.viewer = viewer
|
|
61
61
|
</script>
|
|
62
62
|
|