@reall3d/reall3dviewer 2.3.4 → 2.4.0

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.
@@ -0,0 +1,268 @@
1
+ {
2
+ "name": "splat-lod",
3
+ "version": "1.0",
4
+ "watermark": "预设LOD大场景例子",
5
+ "meterScale": 1,
6
+ "isLargeScene": true,
7
+ "mobileLodTargets": [0, 1, 2],
8
+ "mobileLodDistances": [20, 60],
9
+ "mobileLodCacheCount": 6000000,
10
+ "pcLodTargets": [0, 1, 2],
11
+ "pcLodDistances": [20, 60],
12
+ "pcLodCacheCount": 50000000,
13
+ "autoRotate": false,
14
+ "debugMode": true,
15
+ "pointcloudMode": false,
16
+ "maxRenderCountOfMobile": 2180000,
17
+ "maxRenderCountOfPc": 3200000,
18
+ "cameraInfo": {
19
+ "position": [
20
+ -100.55687051028454,
21
+ -275.21493052072054,
22
+ 120.7051414941786
23
+ ],
24
+ "lookUp": [
25
+ 0,
26
+ 0,
27
+ 1
28
+ ],
29
+ "lookAt": [
30
+ 0,
31
+ 0,
32
+ 0
33
+ ]
34
+ },
35
+ "url": "hgd.lod.json",
36
+ "flyPositions": [
37
+ -108.0267890057218,
38
+ -260.3842489678003,
39
+ 144.75817461568374,
40
+ -19.52205644441441,
41
+ -38.242478119468785,
42
+ 25.620346981706728,
43
+ -20.82149782886184,
44
+ -27.918370521382887,
45
+ 28.693125319377465,
46
+ -13.813407069707793,
47
+ -18.521617412183677,
48
+ 19.035605574412507,
49
+ -8.791834113749287,
50
+ -18.521617412183677,
51
+ 12.115612435110556,
52
+ 3.101364992468305,
53
+ -18.521617412183677,
54
+ -4.273845000078193,
55
+ 11.47621589362932,
56
+ -65.48621086159817,
57
+ 21.140631760225315,
58
+ 34.96472213494053,
59
+ -159.36177520751696,
60
+ 96.86136729824639,
61
+ 333.43352373978064,
62
+ -228.71252022836532,
63
+ -46.36595508922573,
64
+ 170.41481824874884,
65
+ -61.22763541039936,
66
+ 0.5545522453384848,
67
+ 131.36543691483584,
68
+ -33.504637867883424,
69
+ 11.793856212138559,
70
+ 100.11996309898186,
71
+ -25.23187866028731,
72
+ 20.417310995259093,
73
+ 79.39654671848976,
74
+ -25.231878660287293,
75
+ 22.711327891615095,
76
+ 54.796807849560324,
77
+ -25.23187866028729,
78
+ 25.43444147362036,
79
+ 24.67961014426064,
80
+ -16.695752378988804,
81
+ 28.76832036397053,
82
+ 22.129138829206553,
83
+ -29.9390938601116,
84
+ 29.050649502322006,
85
+ 36.89892081997215,
86
+ -97.19541020359769,
87
+ -16.421374141534677,
88
+ -23.97715333425279,
89
+ -22.774271077190846,
90
+ 23.856192701347005,
91
+ -31.942335500402464,
92
+ -22.774271077190846,
93
+ 30.227681778481937,
94
+ -28.677501452122417,
95
+ -23.500247061743494,
96
+ 47.0593697438098,
97
+ -31.878016851385645,
98
+ -21.565764121413977,
99
+ 66.70792523467271,
100
+ -24.18965088091377,
101
+ -21.565764121413977,
102
+ 81.64542933355344,
103
+ 59.36190417152859,
104
+ -157.73295374629313,
105
+ 139.09404204265925,
106
+ 49.624853104942616,
107
+ -86.2359388375073,
108
+ 128.38917014128182,
109
+ 32.8129601442474,
110
+ -17.114123429815486,
111
+ 78.45747698755909,
112
+ 20.002544476456606,
113
+ -11.280213675639095,
114
+ 46.858921043775744,
115
+ 12.734939287800358,
116
+ -7.702557695838792,
117
+ 28.932427861475823,
118
+ 3.3234062487843983,
119
+ -7.702557695838786,
120
+ 5.717657867880936,
121
+ 0.16744307402453185,
122
+ -7.7025576958387845,
123
+ -2.0669356629053937,
124
+ -0.17069583755688456,
125
+ -7.7025576958387845,
126
+ -2.900999255489644,
127
+ -15.364721832670707,
128
+ -8.596805312327142,
129
+ -3.9648313284479,
130
+ -25.445836444630558,
131
+ -7.70256047868742,
132
+ -16.082164787694616,
133
+ -22.522611279080337,
134
+ -7.640019161674896,
135
+ -31.044400902825657,
136
+ -7.260380918386751,
137
+ -8.168131304743486,
138
+ -38.70131552088547,
139
+ 9.032441968010762,
140
+ -7.167387501657586,
141
+ -30.090741955322194,
142
+ 40.46646252444726,
143
+ -25.354224157529867,
144
+ -49.15899146785509,
145
+ 111.94138846949242,
146
+ -83.75966524898232,
147
+ 33.91478419404762,
148
+ 60.58136675883066,
149
+ -191.71866397380688,
150
+ 163.01602707624045
151
+ ],
152
+ "flyTargets": [
153
+ 0,
154
+ 0,
155
+ 0,
156
+ 0,
157
+ 0,
158
+ 0,
159
+ 0,
160
+ 0,
161
+ 0,
162
+ 0,
163
+ 0,
164
+ 0,
165
+ 5.02157295595851,
166
+ 0,
167
+ -6.919993139301966,
168
+ 16.9147720621761,
169
+ 0,
170
+ -23.309450574490715,
171
+ 16.9147720621761,
172
+ 0,
173
+ -23.309450574490715,
174
+ 0,
175
+ 0,
176
+ 0,
177
+ 114.22001311102719,
178
+ 3.065044263108974,
179
+ 16.728700841887147,
180
+ 109.60727611290082,
181
+ 3.0650442631089754,
182
+ 18.056351920339104,
183
+ 96.778101336862,
184
+ 3.065044263108978,
185
+ 21.74888148228397,
186
+ 72.43952421365498,
187
+ 3.065044263108985,
188
+ 23.48144836216878,
189
+ 51.716107833162866,
190
+ 3.065044263109001,
191
+ 25.775465258524797,
192
+ 27.11636896423347,
193
+ 3.065044263109005,
194
+ 28.498578840530126,
195
+ 5.34932729839331,
196
+ 3.065044263108999,
197
+ 30.908121767638267,
198
+ -10.155962655355852,
199
+ 3.065044263108997,
200
+ 32.624508510235714,
201
+ -26.704877894453507,
202
+ 3.0650442631089887,
203
+ 34.45642128358471,
204
+ -37.91862656206998,
205
+ -0.797935229193906,
206
+ 35.008221937754065,
207
+ -45.883808728219655,
208
+ -0.7979352291939051,
209
+ 41.379711014889,
210
+ -44.735662415172186,
211
+ -0.797935229193905,
212
+ 41.72717759629294,
213
+ -40.68554088366049,
214
+ -0.7979352291939029,
215
+ 49.59604127410453,
216
+ -32.99717491318861,
217
+ -0.7979352291939037,
218
+ 64.53354537298526,
219
+ 0.6020862756539977,
220
+ -19.179389847092356,
221
+ 24.931289639857074,
222
+ 21.484116358114274,
223
+ 2.2250579758824536,
224
+ 50.51341073414575,
225
+ 19.117143977044446,
226
+ 2.225057975882452,
227
+ 44.67496558605611,
228
+ 10.438245246454938,
229
+ 2.2250579758824576,
230
+ 23.267333376394056,
231
+ 5.704300484315149,
232
+ 2.225057975882461,
233
+ 11.590443080214575,
234
+ -3.7072325547008025,
235
+ 2.2250579758824602,
236
+ -11.624326913380282,
237
+ -6.863195729460669,
238
+ 2.225057975882462,
239
+ -19.40892044416661,
240
+ -7.201334641042085,
241
+ 2.225057975882462,
242
+ -20.24298403675086,
243
+ -7.201334641042085,
244
+ 2.225057975882462,
245
+ -20.24298403675086,
246
+ -7.201334641042085,
247
+ 2.225057975882462,
248
+ -20.24298403675086,
249
+ -7.201334641042085,
250
+ 2.225057975882462,
251
+ -20.24298403675086,
252
+ -7.201334641042085,
253
+ 2.225057975882462,
254
+ -20.24298403675086,
255
+ -7.201334641042085,
256
+ 2.225057975882462,
257
+ -20.24298403675086,
258
+ -7.201334641042085,
259
+ 2.225057975882462,
260
+ -20.24298403675086,
261
+ -7.201334641042085,
262
+ 2.225057975882462,
263
+ -20.24298403675086,
264
+ -7.201334641042085,
265
+ 2.225057975882462,
266
+ -20.24298403675086
267
+ ]
268
+ }
package/dist/pkg.d.ts CHANGED
@@ -130,8 +130,29 @@ export declare interface MetaData {
130
130
  transform?: number[];
131
131
  /** Geolocation (EPSG:4326 WGS 84) */
132
132
  WGS84?: number[];
133
- /** Model URL */
133
+ /** Model URL | lod-meta.json | *.lod.json */
134
134
  url?: string;
135
+ /**
136
+ * Target LOD levels to select from available data levels.
137
+ * For example, if data contains levels 0~6, you may select only three levels [0,1,6] for actual use.
138
+ * Defaults to all available levels in the data.
139
+ */
140
+ pcLodTargets?: number[];
141
+ mobileLodTargets?: number[];
142
+ /**
143
+ * Distance thresholds to switch between LOD levels.
144
+ * Different camera distances determine which LOD level to render.
145
+ * For three LOD levels, define two split points [100,50],
146
+ * meaning: beyond 100 units uses lowest detail, within 50 units uses highest detail.
147
+ */
148
+ pcLodDistances?: number[];
149
+ mobileLodDistances?: number[];
150
+ mobileLodCacheCount?: number;
151
+ pcLodCacheCount?: number;
152
+ /**
153
+ * Environment(skybox) flag. Defaults to false.
154
+ */
155
+ enableEnvironment?: boolean;
135
156
  }
136
157
 
137
158
  /**
@@ -142,6 +163,10 @@ export declare interface ModelOptions {
142
163
  * Model URL
143
164
  */
144
165
  url: string;
166
+ /**
167
+ * Base URL
168
+ */
169
+ baseUrl?: string;
145
170
  /**
146
171
  * Model format (ply | splat | spx | spz | sog | obj), auto-detected by default
147
172
  */
@@ -254,7 +279,7 @@ export declare class Reall3dViewer {
254
279
  */
255
280
  switchDeiplayMode(): void;
256
281
  /**
257
- * 添加场景
282
+ * 添加大场景
258
283
  * @param sceneUrl 场景地址
259
284
  */
260
285
  addScene(sceneUrl: string): Promise<void>;
@@ -442,6 +467,10 @@ export declare interface Reall3dViewerOptions {
442
467
  * Auto play background audio (defaults to false)
443
468
  */
444
469
  autoPlayBgAudio?: boolean;
470
+ /**
471
+ * Environment(skybox) flag. Defaults to false.
472
+ */
473
+ enableEnvironment?: boolean;
445
474
  }
446
475
 
447
476
  /**
@@ -535,7 +564,7 @@ export declare interface SplatMeshOptions {
535
564
  */
536
565
  lightFactor?: number;
537
566
  /**
538
- * Whether to display a watermark; defaults to true
567
+ * Whether to display a watermark; defaults to false
539
568
  */
540
569
  showWatermark?: boolean;
541
570
  /**
@@ -578,6 +607,10 @@ export declare interface SplatMeshOptions {
578
607
  * 最小可渲染透明度
579
608
  */
580
609
  minAlpha?: number;
610
+ /**
611
+ * Environment(skybox) flag. Defaults to false.
612
+ */
613
+ enableEnvironment?: boolean;
581
614
  }
582
615
 
583
616
  /** 过渡效果 */