vim-web 0.6.0-dev.9 → 1.0.0-alpha.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.
- package/dist/vim-web.d.ts +13 -103
- package/dist/vim-web.iife.js +94 -252
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +94 -252
- package/dist/vim-web.js.map +1 -1
- package/package.json +2 -1
package/dist/vim-web.d.ts
CHANGED
|
@@ -90,20 +90,6 @@ type RecursivePartial<T> = {
|
|
|
90
90
|
*/
|
|
91
91
|
|
|
92
92
|
type MaterialSettings = {
|
|
93
|
-
/**
|
|
94
|
-
* Use fast simple materials instead of standard Lambert materials
|
|
95
|
-
* - Enables: Significantly faster rendering (no Lambert lighting calculations)
|
|
96
|
-
* - Trade-off: Simpler pseudo-lighting using screen-space derivatives
|
|
97
|
-
* - Useful for: Performance-critical scenarios, large models, lower-end hardware
|
|
98
|
-
* Default: false
|
|
99
|
-
*/
|
|
100
|
-
useFastMaterials: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Default color of standard material
|
|
103
|
-
*/
|
|
104
|
-
standard: {
|
|
105
|
-
color: THREE.Color;
|
|
106
|
-
};
|
|
107
93
|
/**
|
|
108
94
|
* Ghost material options
|
|
109
95
|
*/
|
|
@@ -120,34 +106,14 @@ type MaterialSettings = {
|
|
|
120
106
|
opacity: number;
|
|
121
107
|
};
|
|
122
108
|
/**
|
|
123
|
-
* Section box intersection highlight options
|
|
124
|
-
*/
|
|
125
|
-
section: {
|
|
126
|
-
/**
|
|
127
|
-
* Intersection highlight stroke width.
|
|
128
|
-
* Default: 0.01
|
|
129
|
-
*/
|
|
130
|
-
strokeWidth: number;
|
|
131
|
-
/**
|
|
132
|
-
* Intersection highlight stroke falloff.
|
|
133
|
-
* Default: 0.75
|
|
134
|
-
*/
|
|
135
|
-
strokeFalloff: number;
|
|
136
|
-
/**
|
|
137
|
-
* Intersection highlight stroke color.
|
|
138
|
-
* Default: rgb(246, 246, 246)
|
|
139
|
-
*/
|
|
140
|
-
strokeColor: THREE.Color;
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
109
|
* Selection outline options
|
|
144
110
|
*/
|
|
145
111
|
outline: {
|
|
146
112
|
/**
|
|
147
|
-
* Selection outline
|
|
148
|
-
* Default:
|
|
113
|
+
* Selection outline opacity (0 = invisible, 1 = fully opaque).
|
|
114
|
+
* Default: 1
|
|
149
115
|
*/
|
|
150
|
-
|
|
116
|
+
opacity: number;
|
|
151
117
|
/**
|
|
152
118
|
* Selection outline color.
|
|
153
119
|
* Default: rgb(0, 255, 255)
|
|
@@ -159,6 +125,12 @@ type MaterialSettings = {
|
|
|
159
125
|
* Default: 0.75
|
|
160
126
|
*/
|
|
161
127
|
scale: number;
|
|
128
|
+
/**
|
|
129
|
+
* Outline thickness in pixels (of the outline render target).
|
|
130
|
+
* Higher values sample more pixels per fragment (4 fetches per level).
|
|
131
|
+
* Range: 1-5. Default: 2
|
|
132
|
+
*/
|
|
133
|
+
thickness: number;
|
|
162
134
|
};
|
|
163
135
|
};
|
|
164
136
|
/**
|
|
@@ -169,7 +141,6 @@ type MaterialSettings = {
|
|
|
169
141
|
* @example
|
|
170
142
|
* const viewer = Core.Webgl.createViewer({
|
|
171
143
|
* camera: { orthographic: true, fov: 50 },
|
|
172
|
-
* materials: { useFastMaterials: true }
|
|
173
144
|
* })
|
|
174
145
|
*/
|
|
175
146
|
type ViewerSettings = {
|
|
@@ -310,27 +281,6 @@ type ViewerSettings = {
|
|
|
310
281
|
*/
|
|
311
282
|
color: THREE.Color;
|
|
312
283
|
};
|
|
313
|
-
/**
|
|
314
|
-
* Skybox options
|
|
315
|
-
*/
|
|
316
|
-
skybox: {
|
|
317
|
-
/**
|
|
318
|
-
* Enables/Disables skybox.
|
|
319
|
-
*/
|
|
320
|
-
enable: boolean;
|
|
321
|
-
/**
|
|
322
|
-
* Color for the lower part of the skybox.
|
|
323
|
-
*/
|
|
324
|
-
groundColor: THREE.Color;
|
|
325
|
-
/**
|
|
326
|
-
* Color for the upper part of the skybox.
|
|
327
|
-
*/
|
|
328
|
-
skyColor: THREE.Color;
|
|
329
|
-
/**
|
|
330
|
-
* Controls the gradient transition between the sky and the ground.
|
|
331
|
-
*/
|
|
332
|
-
sharpness: number;
|
|
333
|
-
};
|
|
334
284
|
/**
|
|
335
285
|
* Material options
|
|
336
286
|
*/
|
|
@@ -339,39 +289,6 @@ type ViewerSettings = {
|
|
|
339
289
|
* Axes gizmo options
|
|
340
290
|
*/
|
|
341
291
|
axes: Partial<AxesSettings>;
|
|
342
|
-
/**
|
|
343
|
-
* Skylight (hemisphere light) options
|
|
344
|
-
*/
|
|
345
|
-
skylight: {
|
|
346
|
-
/**
|
|
347
|
-
* Skylight sky Color.
|
|
348
|
-
* Default: THREE.Color(153, 204, 255)
|
|
349
|
-
*/
|
|
350
|
-
skyColor: THREE.Color;
|
|
351
|
-
/**
|
|
352
|
-
* Skylight ground color.
|
|
353
|
-
* Default: THREE.Color(242, 213, 181)
|
|
354
|
-
*/
|
|
355
|
-
groundColor: THREE.Color;
|
|
356
|
-
/**
|
|
357
|
-
* Skylight intensity.
|
|
358
|
-
* Default: 0.8
|
|
359
|
-
*/
|
|
360
|
-
intensity: number;
|
|
361
|
-
};
|
|
362
|
-
/**
|
|
363
|
-
* Sunlight (directional light) options
|
|
364
|
-
* Two Blue-Green lights at odd angles. See defaultViewerSettings.
|
|
365
|
-
*/
|
|
366
|
-
sunlights: {
|
|
367
|
-
followCamera: boolean;
|
|
368
|
-
/** Light position. */
|
|
369
|
-
position: THREE.Vector3;
|
|
370
|
-
/** Light color. */
|
|
371
|
-
color: THREE.Color;
|
|
372
|
-
/** Light intensity. */
|
|
373
|
-
intensity: number;
|
|
374
|
-
}[];
|
|
375
292
|
rendering: {
|
|
376
293
|
/**
|
|
377
294
|
* When true, only renders when changes are detected. When false, renders every frame.
|
|
@@ -446,22 +363,16 @@ interface IMaterials {
|
|
|
446
363
|
readonly modelTransparentMaterial: THREE.Material;
|
|
447
364
|
/** The ghost material used to render hidden/ghosted elements. */
|
|
448
365
|
readonly ghostMaterial: THREE.Material;
|
|
449
|
-
/** Base color tint applied to opaque and transparent model materials. */
|
|
450
|
-
modelColor: THREE.Color;
|
|
451
366
|
/** Opacity of the ghost material (0 = invisible, 1 = fully opaque). */
|
|
452
367
|
ghostOpacity: number;
|
|
453
368
|
/** Color of the ghost material. */
|
|
454
369
|
ghostColor: THREE.Color;
|
|
455
|
-
/**
|
|
456
|
-
|
|
370
|
+
/** Opacity of the selection outline (0 = invisible, 1 = fully opaque). */
|
|
371
|
+
outlineOpacity: number;
|
|
372
|
+
/** Thickness of the selection outline in pixels (of the outline render target). Range: 1-5. */
|
|
373
|
+
outlineThickness: number;
|
|
457
374
|
/** Color of the selection outline post-process effect. */
|
|
458
375
|
outlineColor: THREE.Color;
|
|
459
|
-
/** Width of the stroke rendered where the section box intersects the model. */
|
|
460
|
-
sectionStrokeWidth: number;
|
|
461
|
-
/** Gradient falloff of the section box intersection stroke. */
|
|
462
|
-
sectionStrokeFalloff: number;
|
|
463
|
-
/** Color of the section box intersection stroke. */
|
|
464
|
-
sectionStrokeColor: THREE.Color;
|
|
465
376
|
/** Clipping planes applied to all materials. Set to undefined to disable clipping. */
|
|
466
377
|
clippingPlanes: THREE.Plane[] | undefined;
|
|
467
378
|
/** Applies a full set of material settings from the viewer configuration. */
|
|
@@ -1651,7 +1562,6 @@ interface IWebglRenderer {
|
|
|
1651
1562
|
*/
|
|
1652
1563
|
interface IWebglViewer {
|
|
1653
1564
|
readonly type: 'webgl';
|
|
1654
|
-
readonly settings: ViewerSettings;
|
|
1655
1565
|
readonly renderer: IWebglRenderer;
|
|
1656
1566
|
readonly viewport: IWebglViewport;
|
|
1657
1567
|
readonly selection: IWebglSelection;
|