gs-bim-air 0.1.3-0.2 → 0.1.3-0.5

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/READMEBETA.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ## 更新日志
2
2
 
3
+ ## BETA1日志
3
4
  ### 0.0.30.2
4
5
  - 重构renderObject树的结构(非标项目多模型交互操作)
5
6
  - 添加获取与修改Viewer相机信息的接口 (Viewer.camera)
@@ -10,5 +11,18 @@
10
11
  - 修复双屏窗口updateSize问题
11
12
  - 修复多viewer及加载相同模型时路径动画的问题
12
13
 
14
+ ### 0.0.30.7
15
+ - 更新public/js里的内核文件,安装此版本需替换js文件夹
16
+ - 修复构件修改颜色问题
17
+ - 添加视点管理的接口
18
+
19
+ ## BETA2日志
13
20
  ### 0.1.30.1
14
- - 添加token验证
21
+ - 添加token验证
22
+
23
+ ### 0.1.30.4
24
+ - 更新public/js里的内核文件,安装此版本需替换js文件夹
25
+ - 修复各种function undefined问题
26
+
27
+ ### 0.1.30.5
28
+ - 修复各种function undefined问题
@@ -58,6 +58,8 @@
58
58
  console.log("roam Test");
59
59
  this.modelName = viewer.renderObject.name;
60
60
 
61
+ // 肘管模型
62
+ let moveModel = lightModels[1];
61
63
 
62
64
  // 动画移动的对象
63
65
  let moveObjId = "QMD+M+4G+HYD+XDRA01+EL002";
@@ -68,12 +70,12 @@
68
70
  (bb[0] + bb[3]) / 2,
69
71
  (bb[1] + bb[4]) / 2,
70
72
  (bb[2] + bb[5]) / 2,
71
- ])
73
+ ]);
72
74
 
73
75
  let p0 = new BimAir.Longan.Point();
74
- p0[0] = 380022.3124998525;
75
- p0[1] = 39384.624999855165;
76
- p0[2] = 3072.023193359375;
76
+ p0[0] = center[0];
77
+ p0[1] = center[1];
78
+ p0[2] = center[2] + 30;
77
79
 
78
80
  let p1 = new BimAir.Longan.Point();
79
81
  p1[0] = center[0];
@@ -88,16 +90,16 @@
88
90
  let points = new Array();
89
91
  points.push(p0);
90
92
  points.push(p1);
91
- points.push(p2);
93
+ // points.push(p2);
92
94
 
93
95
  // 绘制路径点线段(用来看的).
94
- viewer.process.animationManager.drawStraight(points);
96
+ viewer.process.animationManager.drawStraight(viewer, points);
95
97
 
96
98
  // 漫游时长
97
- let roamTime = 10;
99
+ let roamTime = 5;
98
100
  // 添加路径动画并返回动画事件的Id.
99
101
  // 添加动画1
100
- let animationId1 = viewer.process.animationManager.objectRoamWithoutRotate(moveSegmentObject, points, roamTime, PathType.Curve, () => {
102
+ let animationId1 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, moveSegmentObject, points, roamTime, PathType.Straight, () => {
101
103
  console.log("finish1");
102
104
  });
103
105
 
@@ -114,12 +116,12 @@
114
116
  (bb[0] + bb[3]) / 2,
115
117
  (bb[1] + bb[4]) / 2,
116
118
  (bb[2] + bb[5]) / 2,
117
- ])
119
+ ]);
118
120
 
119
121
  let p0 = new BimAir.Longan.Point();
120
- p0[0] = 380022.3124998525;
121
- p0[1] = 39384.624999855165;
122
- p0[2] = 3072.023193359375;
122
+ p0[0] = center[0];
123
+ p0[1] = center[1];
124
+ p0[2] = center[2] + 30;
123
125
 
124
126
  let p1 = new BimAir.Longan.Point();
125
127
  p1[0] = center[0];
@@ -134,10 +136,10 @@
134
136
  let points = new Array();
135
137
  points.push(p0);
136
138
  points.push(p1);
137
- points.push(p2);
139
+ // points.push(p2);
138
140
 
139
141
  // 添加动画2
140
- animationId2 = viewer.process.animationManager.objectRoamWithoutRotate(moveSegmentObject, points, roamTime, PathType.Straight, () => {
142
+ animationId2 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, moveSegmentObject, points, roamTime, PathType.Straight, () => {
141
143
  console.log("finish2");
142
144
  });
143
145
  }, 5000);
@@ -146,53 +148,54 @@
146
148
  setTimeout(() => {
147
149
  viewer.process.animationManager.run();
148
150
  }, 2000);
151
+ });
149
152
 
150
- // 8秒后,暂停动画1
151
- setTimeout(() => {
152
- let palyingPercent = viewer.process.animationManager.pauseAnime(animationId1);
153
- console.log("playing:", palyingPercent);
154
- }, 8000);
155
-
156
- // 9秒后,重启动画1
157
- setTimeout(() => {
158
- viewer.process.animationManager.run([animationId1]);
159
- }, 9000);
160
-
161
- // 14秒后,复原所有物体位置
162
- // 若物体的动画已结束,则复位.否则,不会.
163
- // 此时动画1已结束,动画2未结束..因此动画1的物体会复位,而动画2不会.
164
- setTimeout(() => {
165
- viewer.process.animationManager.resetAnimationItems();
166
- console.log("reset1");
167
- }, 14000);
168
-
169
- // 18秒后,复原所有物体位置.
170
- // 此时动画1已结束,动画2已结束..因此都会复位
171
- setTimeout(() => {
172
- viewer.process.animationManager.resetAnimationItems();
173
- console.log("reset2");
174
- }, 18000);
175
-
176
- // 19秒后,从头开始播放动画2
177
- setTimeout(() => {
178
- viewer.process.animationManager.restartAnime(animationId2);
179
- }, 19000);
180
-
181
- //20秒后,先删除动画1,再添加动画3
182
- let animationId3 = "";
183
- setTimeout(() => {
184
- viewer.process.animationManager.removeAnime(animationId1);
185
- animationId3 = viewer.process.animationManager.objectRoamWithoutRotate(moveSegmentObject, points, roamTime, PathType.Straight, () => {
186
- console.log("finish3")
187
- });
188
- viewer.process.animationManager.run([animationId3]);
189
- }, 20000);
190
-
191
- // 25秒后,停止播放动画2,并将segmentObject复位.
192
- setTimeout(() => {
193
- viewer.process.animationManager.stopAnime(animationId2, true);
194
- }, 25000);
153
+ // 8秒后,暂停动画1
154
+ setTimeout(() => {
155
+ let palyingPercent =
156
+ viewer.process.animationManager.pauseAnime(animationId1);
157
+ console.log("playing:", palyingPercent);
158
+ }, 8000);
159
+
160
+ // 9秒后,重启动画1
161
+ setTimeout(() => {
162
+ viewer.process.animationManager.run([animationId1]);
163
+ }, 9000);
164
+
165
+ // 14秒后,复原所有物体位置
166
+ // 若物体的动画已结束,则复位.否则,不会.
167
+ // 此时动画1已结束,动画2未结束..因此动画1的物体会复位,而动画2不会.
168
+ setTimeout(() => {
169
+ viewer.process.animationManager.resetAnimationItems(viewer);
170
+ console.log("reset1");
171
+ }, 14000);
172
+
173
+ // 18秒后,复原所有物体位置.
174
+ // 此时动画1已结束,动画2已结束..因此都会复位
175
+ setTimeout(() => {
176
+ viewer.process.animationManager.resetAnimationItems(viewer);
177
+ console.log("reset2");
178
+ }, 18000);
179
+
180
+ // 19秒后,从头开始播放动画2
181
+ setTimeout(() => {
182
+ viewer.process.animationManager.restartAnime(animationId2);
183
+ }, 19000);
184
+
185
+ //20秒后,先删除动画1,再添加动画3
186
+ let animationId3 = "";
187
+ setTimeout(() => {
188
+ viewer.process.animationManager.removeAnime(animationId1);
189
+ animationId3 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, moveSegmentObject, points, roamTime, PathType.Straight, () => {
190
+ console.log("finish3")
195
191
  });
192
+ viewer.process.animationManager.run([animationId3]);
193
+ }, 20000);
194
+
195
+ // 25秒后,停止播放动画2,并将segmentObject复位.
196
+ setTimeout(() => {
197
+ viewer.process.animationManager.stopAnime(animationId2, true);
198
+ }, 25000);
196
199
  });
197
200
  </script>
198
201
  </body>