bc-model-viewer 1.6.72 → 1.6.74
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/dist/bc-model-viewer.min.js +1 -1
- package/examples/clip.html +2 -2
- package/examples/measure.html +20 -11
- package/package.json +1 -1
package/examples/clip.html
CHANGED
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
// 加载测试模型
|
|
57
|
-
|
|
58
|
-
await viewer.loadZipAsync('../../../assets/dgz/机电综合.dgz')
|
|
57
|
+
await viewer.loadZipAsync('../../../assets/new.dgz')
|
|
58
|
+
// await viewer.loadZipAsync('../../../assets/dgz/机电综合.dgz')
|
|
59
59
|
|
|
60
60
|
window.viewer = viewer
|
|
61
61
|
</script>
|
package/examples/measure.html
CHANGED
|
@@ -23,32 +23,41 @@
|
|
|
23
23
|
<div id="container">
|
|
24
24
|
</div>
|
|
25
25
|
<div class="demo">
|
|
26
|
-
<h2
|
|
27
|
-
<button onclick="
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<button onclick="
|
|
32
|
-
|
|
26
|
+
<h2>测量工具演示</h2>
|
|
27
|
+
<button onclick="tool.activate()">距离测量</button>
|
|
28
|
+
<button onclick="tool.deactivate()">停止</button>
|
|
29
|
+
<br>
|
|
30
|
+
<button onclick="tool.removeLast()">清除上一次</button>
|
|
31
|
+
<button onclick="tool.clear()">清除所有</button>
|
|
32
|
+
<br>
|
|
33
|
+
<button onclick="console.log(tool.getMeasurements())">打印数据</button>
|
|
33
34
|
</div>
|
|
34
35
|
|
|
35
36
|
<script type="module">
|
|
36
37
|
|
|
37
|
-
import { Viewer,
|
|
38
|
+
import { Viewer, DistanceMeasureTool } from '../../index.ts'
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
const container = document.getElementById('container')
|
|
41
42
|
|
|
42
43
|
// 实例化 Viewer 对象
|
|
43
|
-
const viewer = new Viewer(container
|
|
44
|
+
const viewer = new Viewer(container, {
|
|
45
|
+
load: {
|
|
46
|
+
cache: {
|
|
47
|
+
enabled: false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
44
51
|
|
|
45
52
|
// 加载测试模型
|
|
53
|
+
// await viewer.loadZipAsync('../../assets/dgz/建筑.dgz')
|
|
46
54
|
await viewer.loadZipAsync('../../assets/new.dgz')
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
const tool = new DistanceMeasureTool(viewer)
|
|
49
57
|
|
|
50
|
-
|
|
58
|
+
tool.activate(0)
|
|
51
59
|
|
|
60
|
+
window.tool = tool
|
|
52
61
|
window.viewer = viewer
|
|
53
62
|
</script>
|
|
54
63
|
|