gs-bim-air 1.6.1-beta.10 → 1.6.1-beta.12
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 +22 -0
- package/READMEBETA2.md +1 -1
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/217/214/345/261/217/346/223/215/344/275/234.html +14 -1
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234/UV/345/212/250/347/224/273.html +30 -21
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/210/233/345/273/272/350/267/257/345/276/204.html +1 -0
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/260/264/351/235/242/346/225/210/346/236/234.html +16 -6
- package/docs/README.md +1 -1
- package/docs/classes/Longan.LonganCore.Viewer.md +34 -34
- package/docs/classes/Longan.RenderInstanceObject.md +23 -0
- package/docs/classes/Longan.Segment.md +129 -82
- package/docs/classes/Longan.Viewer.md +61 -61
- package/docs/classes/MaterialManager.md +19 -0
- package/docs/classes/PropertyManager.md +27 -17
- package/docs/classes/TreeNodeObject.md +37 -0
- package/docs/classes/Viewer.md +95 -72
- package/docs/interfaces/{Options.md → ViewerOptions.md} +14 -14
- package/lib/BimAir.common-report.html +2 -2
- package/lib/BimAir.common.js +35 -35
- package/lib/BimAir.css +18 -6
- package/lib/BimAir.umd-report.html +2 -2
- package/lib/BimAir.umd.js +35 -35
- package/lib/BimAir.umd.min-report.html +2 -2
- package/lib/BimAir.umd.min.js +35 -35
- package/lib/img/desertSkyboxIcon.afc36bf4.jpg +0 -0
- package/lib/img/sunsetSkyboxIcon.e9b82eab.jpg +0 -0
- package/lib/undefined.gzundefined +0 -0
- package/package.json +1 -1
- package/public/js/longan/longan.js +4 -4
- package/public/js/longan/longan.wasm +0 -0
- package/public/js/longanWithoutShareArrayBuffer/longan.js +1 -1
- package/public/js/longanWithoutShareArrayBuffer/longan.wasm +0 -0
- package/lib/img/desertSkyboxIcon.3395655b.jpg +0 -0
- package/lib/img/sunsetSkyboxIcon.5f0898f0.jpg +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
## 更新日志
|
|
2
2
|
|
|
3
|
+
### 1.6.1-beta.12
|
|
4
|
+
|
|
5
|
+
> 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
|
|
6
|
+
>
|
|
7
|
+
> Longan 更新为 v1.6.1-beta.9
|
|
8
|
+
|
|
9
|
+
- fix: 修复天空盒图片请求
|
|
10
|
+
- fix: 修复恢复默认设置报错问题
|
|
11
|
+
- fix: 取消全局设置的 axios 拦截
|
|
12
|
+
- fix: 修复透明闪烁问题
|
|
13
|
+
|
|
14
|
+
### 1.6.1-beta.11
|
|
15
|
+
|
|
16
|
+
- feat: 结构树节点拖拽添加确定弹框
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
- fix: 修复批注报错,压缩天空盒图片 icon,修复罗盘文字某些角度消失问题
|
|
21
|
+
- fix: 修复设置样式,刷新页面后无法删除样式的问题;materialManager 添加 reset 函数,表示将构件恢复到最初状态(删除构件添加的所有 material);
|
|
22
|
+
- fix: 修复移动节点后因隐藏的 main 节点导致 segmentPath 出错
|
|
23
|
+
- fix: 修复发布包请求天空盒图片报跨域问题
|
|
24
|
+
|
|
3
25
|
### 1.6.1-beta.10
|
|
4
26
|
|
|
5
27
|
> 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
|
package/READMEBETA2.md
CHANGED
|
@@ -14,7 +14,20 @@
|
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
|
17
|
-
|
|
17
|
+
<style>
|
|
18
|
+
#app {
|
|
19
|
+
height: 100vh;
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.viewer-wrapper1,
|
|
25
|
+
.viewer-wrapper2 {
|
|
26
|
+
height: 100%;
|
|
27
|
+
/* width: 50%; */
|
|
28
|
+
flex: 1;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
18
31
|
<div id="app">
|
|
19
32
|
<div class="viewer-wrapper1">
|
|
20
33
|
<viewer-wrapper
|
package/demo//346/250/241/345/236/213/346/225/210/346/236/234/UV/345/212/250/347/224/273.html
CHANGED
|
@@ -35,28 +35,37 @@
|
|
|
35
35
|
BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
|
|
36
36
|
() => {
|
|
37
37
|
let viewer = new BimAir.Viewer(options);
|
|
38
|
-
|
|
38
|
+
viewer
|
|
39
|
+
.loadModels(
|
|
40
|
+
[
|
|
41
|
+
{
|
|
42
|
+
id: "638dba02cc5b00101d8ebc86", //别墅
|
|
43
|
+
version: 1,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
true
|
|
47
|
+
// true
|
|
48
|
+
)
|
|
49
|
+
.then((lightModels) => {
|
|
50
|
+
// 1、UV动画
|
|
51
|
+
let src =
|
|
52
|
+
"https://static.graphicstone.com/images/effect/dynamic.png";
|
|
53
|
+
let path = [0, 0, 0, 30, -10, 0, 40, 20, 0, 0, 30, 0];
|
|
54
|
+
let uvEffectConfig = new BimAir.Animation.UvEffectConfig(
|
|
55
|
+
viewer,
|
|
56
|
+
"路径1",
|
|
57
|
+
path,
|
|
58
|
+
1,
|
|
59
|
+
0,
|
|
60
|
+
0.5,
|
|
61
|
+
src,
|
|
62
|
+
[1, 1],
|
|
63
|
+
true
|
|
64
|
+
);
|
|
39
65
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
40, 20, 0,
|
|
44
|
-
0,30, 0,
|
|
45
|
-
];
|
|
46
|
-
let uvEffectConfig = new BimAir.Animation.UvEffectConfig(
|
|
47
|
-
viewer,
|
|
48
|
-
"路径1",
|
|
49
|
-
path,
|
|
50
|
-
1,
|
|
51
|
-
0,
|
|
52
|
-
0.5,
|
|
53
|
-
src,
|
|
54
|
-
[1, 1],
|
|
55
|
-
true
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
let uvEffect = new BimAir.Animation.UvEffect(uvEffectConfig);
|
|
59
|
-
uvEffect.create();
|
|
66
|
+
let uvEffect = new BimAir.Animation.UvEffect(uvEffectConfig);
|
|
67
|
+
uvEffect.create();
|
|
68
|
+
});
|
|
60
69
|
}
|
|
61
70
|
);
|
|
62
71
|
</script>
|
|
@@ -34,22 +34,32 @@
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
let viewer;
|
|
37
|
-
let
|
|
37
|
+
let lightModels;
|
|
38
38
|
BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
|
|
39
39
|
() => {
|
|
40
40
|
viewer = new BimAir.Viewer(options);
|
|
41
|
-
viewer.loadModels("64477eb8ae09ef7882f446d4").then((
|
|
42
|
-
|
|
41
|
+
viewer.loadModels("64477eb8ae09ef7882f446d4").then((res) => {
|
|
42
|
+
lightModels = res;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
function create() {
|
|
48
|
-
let componentIds = ["3"];
|
|
48
|
+
// let componentIds = ["3"];
|
|
49
|
+
// let waterEffectConfig = new BimAir.Animation.WaterEffectConfig(
|
|
50
|
+
// viewer,
|
|
51
|
+
// lightModel,
|
|
52
|
+
// componentIds
|
|
53
|
+
// );
|
|
54
|
+
// let waterEffect = new BimAir.Animation.WaterEffect(waterEffectConfig);
|
|
55
|
+
// waterEffect.createPlane().then(() => {
|
|
56
|
+
// viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
|
|
57
|
+
// });
|
|
58
|
+
|
|
49
59
|
let waterEffectConfig = new BimAir.Animation.WaterEffectConfig(
|
|
50
60
|
viewer,
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
lightModels[0],
|
|
62
|
+
["3"]
|
|
53
63
|
);
|
|
54
64
|
let waterEffect = new BimAir.Animation.WaterEffect(waterEffectConfig);
|
|
55
65
|
waterEffect.createPlane().then(() => {
|
package/docs/README.md
CHANGED
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
|
|
70
70
|
### Methods
|
|
71
71
|
|
|
72
|
-
- [ComputeNearPlaneWorldPos](Longan.LonganCore.Viewer.md#computenearplaneworldpos)
|
|
73
|
-
- [DebugLog](Longan.LonganCore.Viewer.md#debuglog)
|
|
74
72
|
- [asynBatchSetSegmentsDataFromCache](Longan.LonganCore.Viewer.md#asynbatchsetsegmentsdatafromcache)
|
|
75
73
|
- [asynLoadGeometries](Longan.LonganCore.Viewer.md#asynloadgeometries)
|
|
76
74
|
- [asynRemoveGeometry](Longan.LonganCore.Viewer.md#asynremovegeometry)
|
|
77
75
|
- [asynUPGDTaskRun](Longan.LonganCore.Viewer.md#asynupgdtaskrun)
|
|
78
76
|
- [asynUpdateView](Longan.LonganCore.Viewer.md#asynupdateview)
|
|
79
77
|
- [checkStreamToGeometryEnable](Longan.LonganCore.Viewer.md#checkstreamtogeometryenable)
|
|
78
|
+
- [computeNearPlaneWorldPos](Longan.LonganCore.Viewer.md#computenearplaneworldpos)
|
|
80
79
|
- [computePerspectiveNearWorldPos](Longan.LonganCore.Viewer.md#computeperspectivenearworldpos)
|
|
81
80
|
- [convertCoordinate](Longan.LonganCore.Viewer.md#convertcoordinate)
|
|
82
81
|
- [convertDCoordinate](Longan.LonganCore.Viewer.md#convertdcoordinate)
|
|
82
|
+
- [debugLog](Longan.LonganCore.Viewer.md#debuglog)
|
|
83
83
|
- [dispose](Longan.LonganCore.Viewer.md#dispose)
|
|
84
84
|
- [ensureCurrentMemorySize](Longan.LonganCore.Viewer.md#ensurecurrentmemorysize)
|
|
85
85
|
- [ensureMemorySize](Longan.LonganCore.Viewer.md#ensurememorysize)
|
|
@@ -757,38 +757,6 @@ ___
|
|
|
757
757
|
|
|
758
758
|
## Methods
|
|
759
759
|
|
|
760
|
-
### ComputeNearPlaneWorldPos
|
|
761
|
-
|
|
762
|
-
▸ **ComputeNearPlaneWorldPos**(`pixel`): `Float64Array`
|
|
763
|
-
|
|
764
|
-
#### Parameters
|
|
765
|
-
|
|
766
|
-
| Name | Type |
|
|
767
|
-
| :------ | :------ |
|
|
768
|
-
| `pixel` | `Float32Array` |
|
|
769
|
-
|
|
770
|
-
#### Returns
|
|
771
|
-
|
|
772
|
-
`Float64Array`
|
|
773
|
-
|
|
774
|
-
___
|
|
775
|
-
|
|
776
|
-
### DebugLog
|
|
777
|
-
|
|
778
|
-
▸ **DebugLog**(`mes`): `void`
|
|
779
|
-
|
|
780
|
-
#### Parameters
|
|
781
|
-
|
|
782
|
-
| Name | Type |
|
|
783
|
-
| :------ | :------ |
|
|
784
|
-
| `mes` | `string` |
|
|
785
|
-
|
|
786
|
-
#### Returns
|
|
787
|
-
|
|
788
|
-
`void`
|
|
789
|
-
|
|
790
|
-
___
|
|
791
|
-
|
|
792
760
|
### asynBatchSetSegmentsDataFromCache
|
|
793
761
|
|
|
794
762
|
▸ **asynBatchSetSegmentsDataFromCache**(`segKey`, `bytes`, `isLast`): `void`
|
|
@@ -867,6 +835,22 @@ ___
|
|
|
867
835
|
|
|
868
836
|
___
|
|
869
837
|
|
|
838
|
+
### computeNearPlaneWorldPos
|
|
839
|
+
|
|
840
|
+
▸ **computeNearPlaneWorldPos**(`pixel`): `Float64Array`
|
|
841
|
+
|
|
842
|
+
#### Parameters
|
|
843
|
+
|
|
844
|
+
| Name | Type |
|
|
845
|
+
| :------ | :------ |
|
|
846
|
+
| `pixel` | `Float32Array` |
|
|
847
|
+
|
|
848
|
+
#### Returns
|
|
849
|
+
|
|
850
|
+
`Float64Array`
|
|
851
|
+
|
|
852
|
+
___
|
|
853
|
+
|
|
870
854
|
### computePerspectiveNearWorldPos
|
|
871
855
|
|
|
872
856
|
▸ **computePerspectiveNearWorldPos**(`pixel`): `Float64Array`
|
|
@@ -919,6 +903,22 @@ ___
|
|
|
919
903
|
|
|
920
904
|
___
|
|
921
905
|
|
|
906
|
+
### debugLog
|
|
907
|
+
|
|
908
|
+
▸ **debugLog**(`mes`): `void`
|
|
909
|
+
|
|
910
|
+
#### Parameters
|
|
911
|
+
|
|
912
|
+
| Name | Type |
|
|
913
|
+
| :------ | :------ |
|
|
914
|
+
| `mes` | `string` |
|
|
915
|
+
|
|
916
|
+
#### Returns
|
|
917
|
+
|
|
918
|
+
`void`
|
|
919
|
+
|
|
920
|
+
___
|
|
921
|
+
|
|
922
922
|
### dispose
|
|
923
923
|
|
|
924
924
|
▸ **dispose**(): `void`
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
- [renderObject](Longan.RenderInstanceObject.md#renderobject)
|
|
25
25
|
- [segment](Longan.RenderInstanceObject.md#segment)
|
|
26
26
|
- [viewer](Longan.RenderInstanceObject.md#viewer)
|
|
27
|
+
- [visible](Longan.RenderInstanceObject.md#visible)
|
|
27
28
|
|
|
28
29
|
### Methods
|
|
29
30
|
|
|
@@ -123,6 +124,28 @@ ___
|
|
|
123
124
|
|
|
124
125
|
[`Viewer`](Longan.Viewer.md)
|
|
125
126
|
|
|
127
|
+
___
|
|
128
|
+
|
|
129
|
+
### visible
|
|
130
|
+
|
|
131
|
+
• `get` **visible**(): `boolean`
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`boolean`
|
|
136
|
+
|
|
137
|
+
• `set` **visible**(`value`): `void`
|
|
138
|
+
|
|
139
|
+
#### Parameters
|
|
140
|
+
|
|
141
|
+
| Name | Type |
|
|
142
|
+
| :------ | :------ |
|
|
143
|
+
| `value` | `boolean` |
|
|
144
|
+
|
|
145
|
+
#### Returns
|
|
146
|
+
|
|
147
|
+
`void`
|
|
148
|
+
|
|
126
149
|
## Methods
|
|
127
150
|
|
|
128
151
|
### afterRender
|
|
@@ -527,13 +527,15 @@ ___
|
|
|
527
527
|
|
|
528
528
|
▸ **editLine**(`key`, `start`, `end?`): [`Line`](Longan.Line.md)
|
|
529
529
|
|
|
530
|
+
编辑线
|
|
531
|
+
|
|
530
532
|
#### Parameters
|
|
531
533
|
|
|
532
|
-
| Name | Type |
|
|
533
|
-
| :------ | :------ |
|
|
534
|
-
| `key` | `number` |
|
|
535
|
-
| `start` | `ArrayLike`<`number`\> |
|
|
536
|
-
| `end?` | `ArrayLike`<`number`\> |
|
|
534
|
+
| Name | Type | Description |
|
|
535
|
+
| :------ | :------ | :------ |
|
|
536
|
+
| `key` | `number` | 线的key |
|
|
537
|
+
| `start` | `ArrayLike`<`number`\> | 起点 |
|
|
538
|
+
| `end?` | `ArrayLike`<`number`\> | 终点 |
|
|
537
539
|
|
|
538
540
|
#### Returns
|
|
539
541
|
|
|
@@ -565,15 +567,17 @@ ___
|
|
|
565
567
|
|
|
566
568
|
▸ **extrudeByShell**(`points`, `indexes`, `normal`, `options?`, `isDouble?`): [`Shell`](Longan.Shell.md)
|
|
567
569
|
|
|
570
|
+
通过定义多边形进行任意方向拉伸
|
|
571
|
+
|
|
568
572
|
#### Parameters
|
|
569
573
|
|
|
570
|
-
| Name | Type | Default value |
|
|
571
|
-
| :------ | :------ | :------ |
|
|
572
|
-
| `points` | `ArrayLike`<`number`\> | `undefined` |
|
|
573
|
-
| `indexes` | `ArrayLike`<`number`\> | `undefined` |
|
|
574
|
-
| `normal` | `ArrayLike`<`number`\> | `undefined` |
|
|
575
|
-
| `options` | `string` | `""` |
|
|
576
|
-
| `isDouble` | `boolean` | `false` |
|
|
574
|
+
| Name | Type | Default value | Description |
|
|
575
|
+
| :------ | :------ | :------ | :------ |
|
|
576
|
+
| `points` | `ArrayLike`<`number`\> | `undefined` | 多边形顶点列表 |
|
|
577
|
+
| `indexes` | `ArrayLike`<`number`\> | `undefined` | 索引列表 |
|
|
578
|
+
| `normal` | `ArrayLike`<`number`\> | `undefined` | 拉伸方向及长度 |
|
|
579
|
+
| `options` | `string` | `""` | 选项 |
|
|
580
|
+
| `isDouble` | `boolean` | `false` | 是否插入double类型数据 |
|
|
577
581
|
|
|
578
582
|
#### Returns
|
|
579
583
|
|
|
@@ -694,13 +698,15 @@ ___
|
|
|
694
698
|
|
|
695
699
|
▸ **insertCircle**(`center`, `radius`, `normal`): `Circle`
|
|
696
700
|
|
|
701
|
+
插入圆
|
|
702
|
+
|
|
697
703
|
#### Parameters
|
|
698
704
|
|
|
699
|
-
| Name | Type |
|
|
700
|
-
| :------ | :------ |
|
|
701
|
-
| `center` | `ArrayLike`<`number`\> |
|
|
702
|
-
| `radius` | `number` |
|
|
703
|
-
| `normal` | `ArrayLike`<`number`\> |
|
|
705
|
+
| Name | Type | Description |
|
|
706
|
+
| :------ | :------ | :------ |
|
|
707
|
+
| `center` | `ArrayLike`<`number`\> | 中心点 |
|
|
708
|
+
| `radius` | `number` | 半径 |
|
|
709
|
+
| `normal` | `ArrayLike`<`number`\> | 法向 |
|
|
704
710
|
|
|
705
711
|
#### Returns
|
|
706
712
|
|
|
@@ -710,47 +716,58 @@ ___
|
|
|
710
716
|
|
|
711
717
|
### insertCube
|
|
712
718
|
|
|
713
|
-
▸ **insertCube**(`length`): [`Shell`](Longan.Shell.md)
|
|
719
|
+
▸ **insertCube**(`length`, `origin?`): [`Shell`](Longan.Shell.md)
|
|
720
|
+
|
|
721
|
+
插入立方体
|
|
714
722
|
|
|
715
723
|
#### Parameters
|
|
716
724
|
|
|
717
|
-
| Name | Type |
|
|
718
|
-
| :------ | :------ |
|
|
719
|
-
| `length` | `number` |
|
|
725
|
+
| Name | Type | Description |
|
|
726
|
+
| :------ | :------ | :------ |
|
|
727
|
+
| `length` | `number` | 边长 |
|
|
728
|
+
| `origin?` | `ArrayLike`<`number`\> | 立方体中心点 |
|
|
720
729
|
|
|
721
730
|
#### Returns
|
|
722
731
|
|
|
723
732
|
[`Shell`](Longan.Shell.md)
|
|
724
733
|
|
|
734
|
+
几何对象
|
|
735
|
+
|
|
725
736
|
___
|
|
726
737
|
|
|
727
738
|
### insertCuboid
|
|
728
739
|
|
|
729
740
|
▸ **insertCuboid**(`points`, `extrudeVector`, `extrudeLength`): [`Shell`](Longan.Shell.md)
|
|
730
741
|
|
|
742
|
+
插入长方体
|
|
743
|
+
|
|
731
744
|
#### Parameters
|
|
732
745
|
|
|
733
|
-
| Name | Type |
|
|
734
|
-
| :------ | :------ |
|
|
735
|
-
| `points` | `Float64Array` |
|
|
736
|
-
| `extrudeVector` | `Float64Array` |
|
|
737
|
-
| `extrudeLength` | `number` |
|
|
746
|
+
| Name | Type | Description |
|
|
747
|
+
| :------ | :------ | :------ |
|
|
748
|
+
| `points` | `Float64Array` | 长方体截面顶点列表 |
|
|
749
|
+
| `extrudeVector` | `Float64Array` | 拉伸方向 |
|
|
750
|
+
| `extrudeLength` | `number` | 拉伸长度 |
|
|
738
751
|
|
|
739
752
|
#### Returns
|
|
740
753
|
|
|
741
754
|
[`Shell`](Longan.Shell.md)
|
|
742
755
|
|
|
756
|
+
几何对象
|
|
757
|
+
|
|
743
758
|
___
|
|
744
759
|
|
|
745
760
|
### insertCuttingPlanes
|
|
746
761
|
|
|
747
762
|
▸ **insertCuttingPlanes**(`planes`): `CuttingPlanes`
|
|
748
763
|
|
|
764
|
+
插入剖切面板
|
|
765
|
+
|
|
749
766
|
#### Parameters
|
|
750
767
|
|
|
751
|
-
| Name | Type |
|
|
752
|
-
| :------ | :------ |
|
|
753
|
-
| `planes` | `ArrayLike`<`number`\> |
|
|
768
|
+
| Name | Type | Description |
|
|
769
|
+
| :------ | :------ | :------ |
|
|
770
|
+
| `planes` | `ArrayLike`<`number`\> | 面板的点数据 |
|
|
754
771
|
|
|
755
772
|
#### Returns
|
|
756
773
|
|
|
@@ -783,16 +800,18 @@ ___
|
|
|
783
800
|
|
|
784
801
|
▸ **insertImage**(`name`, `width`, `height`, `data`, `format?`, `compressionQuality?`): [`Image`](Longan.Image.md)
|
|
785
802
|
|
|
803
|
+
插入贴图
|
|
804
|
+
|
|
786
805
|
#### Parameters
|
|
787
806
|
|
|
788
|
-
| Name | Type |
|
|
789
|
-
| :------ | :------ |
|
|
790
|
-
| `name` | `string` |
|
|
791
|
-
| `width` | `number` |
|
|
792
|
-
| `height` | `number` |
|
|
793
|
-
| `data` | `ArrayBuffer` |
|
|
794
|
-
| `format?` | `ImagePixelFormat` |
|
|
795
|
-
| `compressionQuality?` | `number` |
|
|
807
|
+
| Name | Type | Description |
|
|
808
|
+
| :------ | :------ | :------ |
|
|
809
|
+
| `name` | `string` | 贴图名字 |
|
|
810
|
+
| `width` | `number` | 宽度 |
|
|
811
|
+
| `height` | `number` | 高度 |
|
|
812
|
+
| `data` | `ArrayBuffer` | 图片数据 |
|
|
813
|
+
| `format?` | `ImagePixelFormat` | 图片像素格式 |
|
|
814
|
+
| `compressionQuality?` | `number` | 压缩品质 |
|
|
796
815
|
|
|
797
816
|
#### Returns
|
|
798
817
|
|
|
@@ -804,12 +823,14 @@ ___
|
|
|
804
823
|
|
|
805
824
|
▸ **insertLine**(`start`, `end?`): [`Line`](Longan.Line.md)
|
|
806
825
|
|
|
826
|
+
插入线
|
|
827
|
+
|
|
807
828
|
#### Parameters
|
|
808
829
|
|
|
809
|
-
| Name | Type |
|
|
810
|
-
| :------ | :------ |
|
|
811
|
-
| `start` | `ArrayLike`<`number`\> |
|
|
812
|
-
| `end?` | `ArrayLike`<`number`\> |
|
|
830
|
+
| Name | Type | Description |
|
|
831
|
+
| :------ | :------ | :------ |
|
|
832
|
+
| `start` | `ArrayLike`<`number`\> | 起点 |
|
|
833
|
+
| `end?` | `ArrayLike`<`number`\> | 终点 |
|
|
813
834
|
|
|
814
835
|
#### Returns
|
|
815
836
|
|
|
@@ -821,16 +842,18 @@ ___
|
|
|
821
842
|
|
|
822
843
|
▸ **insertLocalImage**(`name`, `width`, `height`, `data`, `format?`, `compressionQuality?`): [`Image`](Longan.Image.md)
|
|
823
844
|
|
|
845
|
+
插入本地贴图
|
|
846
|
+
|
|
824
847
|
#### Parameters
|
|
825
848
|
|
|
826
|
-
| Name | Type |
|
|
827
|
-
| :------ | :------ |
|
|
828
|
-
| `name` | `string` |
|
|
829
|
-
| `width` | `number` |
|
|
830
|
-
| `height` | `number` |
|
|
831
|
-
| `data` | `ArrayBuffer` |
|
|
832
|
-
| `format?` | `ImagePixelFormat` |
|
|
833
|
-
| `compressionQuality?` | `number` |
|
|
849
|
+
| Name | Type | Description |
|
|
850
|
+
| :------ | :------ | :------ |
|
|
851
|
+
| `name` | `string` | 贴图名字 |
|
|
852
|
+
| `width` | `number` | 宽度 |
|
|
853
|
+
| `height` | `number` | 高度 |
|
|
854
|
+
| `data` | `ArrayBuffer` | 图片数据 |
|
|
855
|
+
| `format?` | `ImagePixelFormat` | 图片像素格式 |
|
|
856
|
+
| `compressionQuality?` | `number` | 压缩品质 |
|
|
834
857
|
|
|
835
858
|
#### Returns
|
|
836
859
|
|
|
@@ -842,11 +865,13 @@ ___
|
|
|
842
865
|
|
|
843
866
|
▸ **insertMarker**(`position`): [`Marker`](Longan.Marker.md)
|
|
844
867
|
|
|
868
|
+
插入点
|
|
869
|
+
|
|
845
870
|
#### Parameters
|
|
846
871
|
|
|
847
|
-
| Name | Type |
|
|
848
|
-
| :------ | :------ |
|
|
849
|
-
| `position` | `ArrayLike`<`number`\> |
|
|
872
|
+
| Name | Type | Description |
|
|
873
|
+
| :------ | :------ | :------ |
|
|
874
|
+
| `position` | `ArrayLike`<`number`\> | 点位置 |
|
|
850
875
|
|
|
851
876
|
#### Returns
|
|
852
877
|
|
|
@@ -909,29 +934,35 @@ ___
|
|
|
909
934
|
|
|
910
935
|
▸ **insertPolyCylinder**(`points`, `radii`, `cap`): `PolyCylinder`
|
|
911
936
|
|
|
937
|
+
插入多段圆柱
|
|
938
|
+
|
|
912
939
|
#### Parameters
|
|
913
940
|
|
|
914
|
-
| Name | Type |
|
|
915
|
-
| :------ | :------ |
|
|
916
|
-
| `points` | `ArrayLike`<`number`\> |
|
|
917
|
-
| `radii` | `ArrayLike`<`number`\> |
|
|
918
|
-
| `cap` | `CylinderCap` |
|
|
941
|
+
| Name | Type | Description |
|
|
942
|
+
| :------ | :------ | :------ |
|
|
943
|
+
| `points` | `ArrayLike`<`number`\> | 多段圆柱的中心点的列表 |
|
|
944
|
+
| `radii` | `ArrayLike`<`number`\> | 每个中心点所处截面的半径的列表 |
|
|
945
|
+
| `cap` | `CylinderCap` | 首尾两个截面的封面 |
|
|
919
946
|
|
|
920
947
|
#### Returns
|
|
921
948
|
|
|
922
949
|
`PolyCylinder`
|
|
923
950
|
|
|
951
|
+
几何对象.
|
|
952
|
+
|
|
924
953
|
___
|
|
925
954
|
|
|
926
955
|
### insertPolyline
|
|
927
956
|
|
|
928
957
|
▸ **insertPolyline**(`points`): [`Polyline`](Longan.Polyline.md)
|
|
929
958
|
|
|
959
|
+
插入多段线
|
|
960
|
+
|
|
930
961
|
#### Parameters
|
|
931
962
|
|
|
932
|
-
| Name | Type |
|
|
933
|
-
| :------ | :------ |
|
|
934
|
-
| `points` | `ArrayLike`<`number`\> |
|
|
963
|
+
| Name | Type | Description |
|
|
964
|
+
| :------ | :------ | :------ |
|
|
965
|
+
| `points` | `ArrayLike`<`number`\> | 多段线的点数组 |
|
|
935
966
|
|
|
936
967
|
#### Returns
|
|
937
968
|
|
|
@@ -943,35 +974,43 @@ ___
|
|
|
943
974
|
|
|
944
975
|
▸ **insertShell**(`points`, `indexes`): [`Shell`](Longan.Shell.md)
|
|
945
976
|
|
|
977
|
+
插入shell
|
|
978
|
+
|
|
946
979
|
#### Parameters
|
|
947
980
|
|
|
948
|
-
| Name | Type |
|
|
949
|
-
| :------ | :------ |
|
|
950
|
-
| `points` | `ArrayLike`<`number`\> |
|
|
951
|
-
| `indexes` | `ArrayLike`<`number`\> |
|
|
981
|
+
| Name | Type | Description |
|
|
982
|
+
| :------ | :------ | :------ |
|
|
983
|
+
| `points` | `ArrayLike`<`number`\> | 顶点 |
|
|
984
|
+
| `indexes` | `ArrayLike`<`number`\> | 索引 |
|
|
952
985
|
|
|
953
986
|
#### Returns
|
|
954
987
|
|
|
955
988
|
[`Shell`](Longan.Shell.md)
|
|
956
989
|
|
|
990
|
+
几何对象
|
|
991
|
+
|
|
957
992
|
___
|
|
958
993
|
|
|
959
994
|
### insertSphere
|
|
960
995
|
|
|
961
|
-
▸ **insertSphere**(`center`, `radius`, `curveTessNum
|
|
996
|
+
▸ **insertSphere**(`center`, `radius`, `curveTessNum?`): [`Shell`](Longan.Shell.md)
|
|
997
|
+
|
|
998
|
+
插入球体
|
|
962
999
|
|
|
963
1000
|
#### Parameters
|
|
964
1001
|
|
|
965
|
-
| Name | Type |
|
|
966
|
-
| :------ | :------ |
|
|
967
|
-
| `center` | `Float64Array` |
|
|
968
|
-
| `radius` | `number` |
|
|
969
|
-
| `curveTessNum` | `number` |
|
|
1002
|
+
| Name | Type | Default value | Description |
|
|
1003
|
+
| :------ | :------ | :------ | :------ |
|
|
1004
|
+
| `center` | `Float64Array` | `undefined` | 中心点 |
|
|
1005
|
+
| `radius` | `number` | `undefined` | 半径 |
|
|
1006
|
+
| `curveTessNum` | `number` | `20` | 离散精度 |
|
|
970
1007
|
|
|
971
1008
|
#### Returns
|
|
972
1009
|
|
|
973
1010
|
[`Shell`](Longan.Shell.md)
|
|
974
1011
|
|
|
1012
|
+
几何对象
|
|
1013
|
+
|
|
975
1014
|
___
|
|
976
1015
|
|
|
977
1016
|
### insertStripe
|
|
@@ -999,17 +1038,21 @@ ___
|
|
|
999
1038
|
|
|
1000
1039
|
▸ **insertTriangularShell**(`points`, `indexes`): [`TriangularShell`](Longan.TriangularShell.md)
|
|
1001
1040
|
|
|
1041
|
+
插入TriangularShell
|
|
1042
|
+
|
|
1002
1043
|
#### Parameters
|
|
1003
1044
|
|
|
1004
|
-
| Name | Type |
|
|
1005
|
-
| :------ | :------ |
|
|
1006
|
-
| `points` | `ArrayLike`<`number`\> |
|
|
1007
|
-
| `indexes` | `ArrayLike`<`number`\> |
|
|
1045
|
+
| Name | Type | Description |
|
|
1046
|
+
| :------ | :------ | :------ |
|
|
1047
|
+
| `points` | `ArrayLike`<`number`\> | 顶点 |
|
|
1048
|
+
| `indexes` | `ArrayLike`<`number`\> | TriangularShell的索引 |
|
|
1008
1049
|
|
|
1009
1050
|
#### Returns
|
|
1010
1051
|
|
|
1011
1052
|
[`TriangularShell`](Longan.TriangularShell.md)
|
|
1012
1053
|
|
|
1054
|
+
几何对象
|
|
1055
|
+
|
|
1013
1056
|
___
|
|
1014
1057
|
|
|
1015
1058
|
### insertVectorText
|
|
@@ -1119,21 +1162,25 @@ ___
|
|
|
1119
1162
|
|
|
1120
1163
|
▸ **rotateByShell**(`points`, `indexes`, `rotateOrigin`, `rotateAxis`, `options?`, `isDouble?`): [`Shell`](Longan.Shell.md)
|
|
1121
1164
|
|
|
1165
|
+
通过定义多边形创建旋转体
|
|
1166
|
+
|
|
1122
1167
|
#### Parameters
|
|
1123
1168
|
|
|
1124
|
-
| Name | Type | Default value |
|
|
1125
|
-
| :------ | :------ | :------ |
|
|
1126
|
-
| `points` | `ArrayLike`<`number`\> | `undefined` |
|
|
1127
|
-
| `indexes` | `ArrayLike`<`number`\> | `undefined` |
|
|
1128
|
-
| `rotateOrigin` | `ArrayLike`<`number`\> | `undefined` |
|
|
1129
|
-
| `rotateAxis` | `ArrayLike`<`number`\> | `undefined` |
|
|
1130
|
-
| `options` | `string` | `""` |
|
|
1131
|
-
| `isDouble` | `boolean` | `false` |
|
|
1169
|
+
| Name | Type | Default value | Description |
|
|
1170
|
+
| :------ | :------ | :------ | :------ |
|
|
1171
|
+
| `points` | `ArrayLike`<`number`\> | `undefined` | 多边形顶点列表 |
|
|
1172
|
+
| `indexes` | `ArrayLike`<`number`\> | `undefined` | 多边形索引 |
|
|
1173
|
+
| `rotateOrigin` | `ArrayLike`<`number`\> | `undefined` | 旋转轴的起点 |
|
|
1174
|
+
| `rotateAxis` | `ArrayLike`<`number`\> | `undefined` | 旋转法向 |
|
|
1175
|
+
| `options` | `string` | `""` | 选项 |
|
|
1176
|
+
| `isDouble` | `boolean` | `false` | 是否插入double类型数据 |
|
|
1132
1177
|
|
|
1133
1178
|
#### Returns
|
|
1134
1179
|
|
|
1135
1180
|
[`Shell`](Longan.Shell.md)
|
|
1136
1181
|
|
|
1182
|
+
几何对象
|
|
1183
|
+
|
|
1137
1184
|
___
|
|
1138
1185
|
|
|
1139
1186
|
### setIndex
|