@xeokit/xeokit-sdk 2.2.4 → 2.2.5-beta-2
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/xeokit-sdk.cjs.js +77 -40
- package/dist/xeokit-sdk.es.js +77 -40
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +4 -2
- package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
- package/types/extras/ContextMenu/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +42 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +85 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +134 -0
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +117 -0
- package/types/plugins/AnnotationsPlugin/index.d.ts +1 -0
- package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
- package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
- package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
- package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +40 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +120 -0
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
- package/types/plugins/FastNavPlugin/index.d.ts +1 -0
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
- package/types/plugins/NavCubePlugin/index.d.ts +1 -0
- package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
- package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
- package/types/plugins/STLLoaderPlugin/index.d.ts +2 -0
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
- package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +173 -0
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +136 -0
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
- package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
- package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/index.d.ts +34 -0
- package/types/viewer/Configs.d.ts +20 -0
- package/types/viewer/Plugin.d.ts +69 -0
- package/types/viewer/Viewer.d.ts +212 -0
- package/types/viewer/index.d.ts +6 -0
- package/types/viewer/localization/LocaleService.d.ts +176 -0
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
- package/types/viewer/metadata/MetaModel.d.ts +65 -0
- package/types/viewer/metadata/MetaObject.d.ts +74 -0
- package/types/viewer/metadata/MetaScene.d.ts +135 -0
- package/types/viewer/metadata/Property.d.ts +29 -0
- package/types/viewer/metadata/PropertySet.d.ts +31 -0
- package/types/viewer/metadata/index.d.ts +6 -0
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +591 -0
- package/types/viewer/scene/Component.d.ts +155 -0
- package/types/viewer/scene/Entity.d.ts +394 -0
- package/types/viewer/scene/PerformanceModel/PerformanceModel.d.ts +605 -0
- package/types/viewer/scene/PerformanceModel/PerformanceNode.d.ts +302 -0
- package/types/viewer/scene/camera/Camera.d.ts +364 -0
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
- package/types/viewer/scene/camera/Frustum.d.ts +166 -0
- package/types/viewer/scene/camera/Ortho.d.ts +115 -0
- package/types/viewer/scene/camera/Perspective.d.ts +136 -0
- package/types/viewer/scene/camera/index.d.ts +4 -0
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
- package/types/viewer/scene/geometry/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +6 -0
- package/types/viewer/scene/marker/Marker.d.ts +136 -0
- package/types/viewer/scene/marker/index.d.ts +1 -0
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
- package/types/viewer/scene/materials/Fresnel.d.ts +149 -0
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
- package/types/viewer/scene/materials/Material.d.ts +3 -0
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
- package/types/viewer/scene/materials/Texture.d.ts +261 -0
- package/types/viewer/scene/materials/index.d.ts +5 -0
- package/types/viewer/scene/math/math.d.ts +36 -0
- package/types/viewer/scene/postfx/SAO.d.ts +209 -0
- package/types/viewer/scene/scene/Scene.d.ts +727 -0
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Viewer } from "../Viewer";
|
|
2
|
+
import { Scene } from "./scene/Scene";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Base class for all xeokit components.
|
|
6
|
+
*/
|
|
7
|
+
export abstract class Component {
|
|
8
|
+
constructor(owner?: any, cfg?: {});
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parent {@link Scene} that contains this Component.
|
|
12
|
+
*
|
|
13
|
+
* @property scene
|
|
14
|
+
* @type {Scene}
|
|
15
|
+
* @final
|
|
16
|
+
*/
|
|
17
|
+
scene: Scene;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The viewer that contains this Scene.
|
|
21
|
+
* @property viewer
|
|
22
|
+
* @type {Viewer}
|
|
23
|
+
*/
|
|
24
|
+
viewer: Viewer;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
Arbitrary, user-defined metadata on this component.
|
|
28
|
+
|
|
29
|
+
@property metadata
|
|
30
|
+
@type Object
|
|
31
|
+
*/
|
|
32
|
+
meta: any;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* ID of this Component, unique within the {@link Scene}.
|
|
36
|
+
*
|
|
37
|
+
* Components are mapped by this ID in {@link Scene#components}.
|
|
38
|
+
*
|
|
39
|
+
* @property id
|
|
40
|
+
* @type {String|Number}
|
|
41
|
+
*/
|
|
42
|
+
id: string | number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The {@link Component} that owns the lifecycle of this Component, if any.
|
|
46
|
+
*
|
|
47
|
+
* When that component is destroyed, this component will be automatically destroyed also.
|
|
48
|
+
*
|
|
49
|
+
* Will be null if this Component has no owner.
|
|
50
|
+
*
|
|
51
|
+
* @property owner
|
|
52
|
+
* @type {Component}
|
|
53
|
+
*/
|
|
54
|
+
get owner(): Component;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Tests if this component is of the given type, or is a subclass of the given type.
|
|
58
|
+
* @type {Boolean}
|
|
59
|
+
*/
|
|
60
|
+
isType(type: any): boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fires an event on this component.
|
|
64
|
+
*
|
|
65
|
+
* Notifies existing subscribers to the event, optionally retains the event to give to
|
|
66
|
+
* any subsequent notifications on the event as they are made.
|
|
67
|
+
*
|
|
68
|
+
* @param {String} event The event type name
|
|
69
|
+
* @param {Object} value The event parameters
|
|
70
|
+
* @param {Boolean} [forget=false] When true, does not retain for subsequent subscribers
|
|
71
|
+
*/
|
|
72
|
+
fire(event: string, value: any, forget?: boolean): void;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Subscribes to an event on this component.
|
|
76
|
+
*
|
|
77
|
+
* The callback is be called with this component as scope.
|
|
78
|
+
*
|
|
79
|
+
* @param {String} event The event
|
|
80
|
+
* @param {Function} callback Called fired on the event
|
|
81
|
+
* @param {Object} [scope=this] Scope for the callback
|
|
82
|
+
* @return {String} Handle to the subscription, which may be used to unsubscribe with {@link #off}.
|
|
83
|
+
*/
|
|
84
|
+
on(event: string, callback: Function, scope?: any): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Cancels an event subscription that was previously made with {@link Component#on} or {@link Component#once}.
|
|
88
|
+
*
|
|
89
|
+
* @param {String} subId Subscription ID
|
|
90
|
+
*/
|
|
91
|
+
off(subId: string): void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Subscribes to the next occurrence of the given event, then un-subscribes as soon as the event is subIdd.
|
|
95
|
+
*
|
|
96
|
+
* This is equivalent to calling {@link Component#on}, and then calling {@link Component#off} inside the callback function.
|
|
97
|
+
*
|
|
98
|
+
* @param {String} event Data event to listen to
|
|
99
|
+
* @param {Function} callback Called when fresh data is available at the event
|
|
100
|
+
* @param {Object} [scope=this] Scope for the callback
|
|
101
|
+
*/
|
|
102
|
+
once(event: string, callback: Function, scope?: any): void;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Returns true if there are any subscribers to the given event on this component.
|
|
106
|
+
*
|
|
107
|
+
* @param {String} event The event
|
|
108
|
+
* @return {Boolean} True if there are any subscribers to the given event on this component.
|
|
109
|
+
*/
|
|
110
|
+
hasSubs(event: string): boolean;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Logs a console debugging message for this component.
|
|
114
|
+
*
|
|
115
|
+
* The console message will have this format: *````[LOG] [<component type> <component id>: <message>````*
|
|
116
|
+
*
|
|
117
|
+
* Also fires the message as a "log" event on the parent {@link Scene}.
|
|
118
|
+
*
|
|
119
|
+
* @param {String} message The message to log
|
|
120
|
+
*/
|
|
121
|
+
log(message: string): void;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Logs a warning for this component to the JavaScript console.
|
|
125
|
+
*
|
|
126
|
+
* The console message will have this format: *````[WARN] [<component type> =<component id>: <message>````*
|
|
127
|
+
*
|
|
128
|
+
* Also fires the message as a "warn" event on the parent {@link Scene}.
|
|
129
|
+
*
|
|
130
|
+
* @param {String} message The message to log
|
|
131
|
+
*/
|
|
132
|
+
warn(message: string): void;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Logs an error for this component to the JavaScript console.
|
|
136
|
+
*
|
|
137
|
+
* The console message will have this format: *````[ERROR] [<component type> =<component id>: <message>````*
|
|
138
|
+
*
|
|
139
|
+
* Also fires the message as an "error" event on the parent {@link Scene}.
|
|
140
|
+
*
|
|
141
|
+
* @param {String} message The message to log
|
|
142
|
+
*/
|
|
143
|
+
error(message: string): void;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Destroys all {@link Component}s that are owned by this. These are Components that were instantiated with
|
|
147
|
+
* this Component as their first constructor argument.
|
|
148
|
+
*/
|
|
149
|
+
clear(): void;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Destroys this component.
|
|
153
|
+
*/
|
|
154
|
+
destroy(): void;
|
|
155
|
+
}
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An abstract 3D scene element that can be individually shown, hidden, selected,
|
|
3
|
+
* highlighted, xrayed, culled, picked, clipped and bounded.
|
|
4
|
+
*
|
|
5
|
+
* @abstract
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export declare abstract class Entity {
|
|
9
|
+
/**
|
|
10
|
+
* Component ID, unique within the {@link Scene}.
|
|
11
|
+
*
|
|
12
|
+
* @type {Number|String}
|
|
13
|
+
* @abstract
|
|
14
|
+
*/
|
|
15
|
+
get id(): string | number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* ID of the corresponding object within the originating system, if any.
|
|
19
|
+
*
|
|
20
|
+
* By default, this has the same value as {@link Entity#id}. When we load a model using {@link XKTLoaderPlugin#load},
|
|
21
|
+
* with {@link XKTLoaderPlugin#globalizeObjectIds} set ````true````, then that plugin will prefix {@link Entity#id}
|
|
22
|
+
* with the model ID, while leaving this property holding the original value of {@link Entity#id}. When loading an
|
|
23
|
+
* IFC model, this property will hold the IFC product ID of the corresponding IFC element.
|
|
24
|
+
*
|
|
25
|
+
* @type {String}
|
|
26
|
+
*/
|
|
27
|
+
get originalSystemId(): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Returns true to indicate that this is an Entity.
|
|
31
|
+
*
|
|
32
|
+
* @returns {Boolean}
|
|
33
|
+
*/
|
|
34
|
+
get isEntity(): boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns ````true```` if this Entity represents a model.
|
|
38
|
+
*
|
|
39
|
+
* When this is ````true````, the Entity will be registered by {@link Entity#id} in {@link Scene#models} and
|
|
40
|
+
* may also have a corresponding {@link MetaModel}.
|
|
41
|
+
*
|
|
42
|
+
* @type {Boolean}
|
|
43
|
+
* @abstract
|
|
44
|
+
*/
|
|
45
|
+
get isModel(): boolean;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Returns ````true```` if this Entity represents an object.
|
|
49
|
+
*
|
|
50
|
+
* When this is ````true````, the Entity will be registered by {@link Entity#id} in {@link Scene#objects} and
|
|
51
|
+
* may also have a corresponding {@link MetaObject}.
|
|
52
|
+
*
|
|
53
|
+
* @type {Boolean}
|
|
54
|
+
* @abstract
|
|
55
|
+
*/
|
|
56
|
+
get isObject(): boolean;
|
|
57
|
+
|
|
58
|
+
/** Returns the parent Entity, if any. */
|
|
59
|
+
get parent(): void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets the 3D World-space origin for this Entity.
|
|
63
|
+
*
|
|
64
|
+
* @type {Float64Array}
|
|
65
|
+
* @abstract
|
|
66
|
+
*/
|
|
67
|
+
set origin(arg: Float64Array);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Gets the 3D World-space origin for this Entity.
|
|
71
|
+
*
|
|
72
|
+
* @type {Float64Array}
|
|
73
|
+
* @abstract
|
|
74
|
+
*/
|
|
75
|
+
get origin(): Float64Array;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* World-space 3D axis-aligned bounding box (AABB) of this Entity.
|
|
79
|
+
*
|
|
80
|
+
* Represented by a six-element Float64Array containing the min/max extents of the
|
|
81
|
+
* axis-aligned volume, ie. ````[xmin, ymin,zmin,xmax,ymax, zmax]````.
|
|
82
|
+
*
|
|
83
|
+
* @type {Float64Array}
|
|
84
|
+
* @abstract
|
|
85
|
+
*/
|
|
86
|
+
get aabb(): number[];
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The approximate number of triangles in this Entity.
|
|
90
|
+
*
|
|
91
|
+
* @type {Number}
|
|
92
|
+
* @abstract
|
|
93
|
+
*/
|
|
94
|
+
get numTriangles(): number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Sets if this Entity is visible.
|
|
98
|
+
*
|
|
99
|
+
* Only rendered when {@link Entity#visible} is ````true```` and {@link Entity#culled} is ````false````.
|
|
100
|
+
*
|
|
101
|
+
* When {@link Entity#isObject} and {@link Entity#visible} are both ````true```` the Entity will be
|
|
102
|
+
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
103
|
+
*
|
|
104
|
+
* @type {Boolean}
|
|
105
|
+
* @abstract
|
|
106
|
+
*/
|
|
107
|
+
set visible(arg: boolean);
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Gets if this Entity is visible.
|
|
111
|
+
*
|
|
112
|
+
* Only rendered when {@link Entity#visible} is ````true```` and {@link Entity#culled} is ````false````.
|
|
113
|
+
*
|
|
114
|
+
* When {@link Entity#isObject} and {@link Entity#visible} are both ````true```` the Entity will be
|
|
115
|
+
* registered by {@link Entity#id} in {@link Scene#visibleObjects}.
|
|
116
|
+
*
|
|
117
|
+
* @type {Boolean}
|
|
118
|
+
* @abstract
|
|
119
|
+
*/
|
|
120
|
+
get visible(): boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Sets if this Entity is xrayed.
|
|
124
|
+
*
|
|
125
|
+
* When {@link Entity#isObject} and {@link Entity#xrayed} are both ````true``` the Entity will be
|
|
126
|
+
* registered by {@link Entity#id} in {@link Scene#xrayedObjects}.
|
|
127
|
+
*
|
|
128
|
+
* @type {Boolean}
|
|
129
|
+
* @abstract
|
|
130
|
+
*/
|
|
131
|
+
set xrayed(arg: boolean);
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Gets if this Entity is xrayed.
|
|
135
|
+
*
|
|
136
|
+
* When {@link Entity#isObject} and {@link Entity#xrayed} are both ````true``` the Entity will be
|
|
137
|
+
* registered by {@link Entity#id} in {@link Scene#xrayedObjects}.
|
|
138
|
+
*
|
|
139
|
+
* @type {Boolean}
|
|
140
|
+
* @abstract
|
|
141
|
+
*/
|
|
142
|
+
get xrayed(): boolean;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Sets if this Entity is highlighted.
|
|
146
|
+
*
|
|
147
|
+
* When {@link Entity#isObject} and {@link Entity#highlighted} are both ````true```` the Entity will be
|
|
148
|
+
* registered by {@link Entity#id} in {@link Scene#highlightedObjects}.
|
|
149
|
+
*
|
|
150
|
+
* @type {Boolean}
|
|
151
|
+
* @abstract
|
|
152
|
+
*/
|
|
153
|
+
set highlighted(arg: boolean);
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Gets if this Entity is highlighted.
|
|
157
|
+
*
|
|
158
|
+
* When {@link Entity#isObject} and {@link Entity#highlighted} are both ````true```` the Entity will be
|
|
159
|
+
* registered by {@link Entity#id} in {@link Scene#highlightedObjects}.
|
|
160
|
+
*
|
|
161
|
+
* @type {Boolean}
|
|
162
|
+
* @abstract
|
|
163
|
+
*/
|
|
164
|
+
get highlighted(): boolean;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Sets if this Entity is selected.
|
|
168
|
+
*
|
|
169
|
+
* When {@link Entity#isObject} and {@link Entity#selected} are both ````true``` the Entity will be
|
|
170
|
+
* registered by {@link Entity#id} in {@link Scene#selectedObjects}.
|
|
171
|
+
*
|
|
172
|
+
* @type {Boolean}
|
|
173
|
+
* @abstract
|
|
174
|
+
*/
|
|
175
|
+
set selected(arg: boolean);
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Gets if this Entity is selected.
|
|
179
|
+
*
|
|
180
|
+
* When {@link Entity#isObject} and {@link Entity#selected} are both ````true``` the Entity will be
|
|
181
|
+
* registered by {@link Entity#id} in {@link Scene#selectedObjects}.
|
|
182
|
+
*
|
|
183
|
+
* @type {Boolean}
|
|
184
|
+
* @abstract
|
|
185
|
+
*/
|
|
186
|
+
get selected(): boolean;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Sets if this Entity's edges are enhanced.
|
|
190
|
+
*
|
|
191
|
+
* @type {Boolean}
|
|
192
|
+
* @abstract
|
|
193
|
+
*/
|
|
194
|
+
set edges(arg: boolean);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Gets if this Entity's edges are enhanced.
|
|
198
|
+
*
|
|
199
|
+
* @type {Boolean}
|
|
200
|
+
* @abstract
|
|
201
|
+
*/
|
|
202
|
+
get edges(): boolean;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Sets if this Entity is culled.
|
|
206
|
+
*
|
|
207
|
+
* Only rendered when {@link Entity#visible} is ````true```` and {@link Entity#culled} is ````false````.
|
|
208
|
+
*
|
|
209
|
+
* @type {Boolean}
|
|
210
|
+
* @abstract
|
|
211
|
+
*/
|
|
212
|
+
set culled(arg: boolean);
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Gets if this Entity is culled.
|
|
216
|
+
*
|
|
217
|
+
* Only rendered when {@link Entity#visible} is ````true```` and {@link Entity#culled} is ````false````.
|
|
218
|
+
*
|
|
219
|
+
* @type {Boolean}
|
|
220
|
+
* @abstract
|
|
221
|
+
*/
|
|
222
|
+
get culled(): boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Sets if this Entity is clippable.
|
|
226
|
+
*
|
|
227
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
|
|
228
|
+
*
|
|
229
|
+
* @type {Boolean}
|
|
230
|
+
* @abstract
|
|
231
|
+
*/
|
|
232
|
+
set clippable(arg: boolean);
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Gets if this Entity is clippable.
|
|
236
|
+
*
|
|
237
|
+
* Clipping is done by the {@link SectionPlane}s in {@link Scene#sectionPlanes}.
|
|
238
|
+
*
|
|
239
|
+
* @type {Boolean}
|
|
240
|
+
* @abstract
|
|
241
|
+
*/
|
|
242
|
+
get clippable(): boolean;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Sets if this Entity is included in boundary calculations.
|
|
246
|
+
*
|
|
247
|
+
* @type {Boolean}
|
|
248
|
+
* @abstract
|
|
249
|
+
*/
|
|
250
|
+
set collidable(arg: boolean);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Gets if this Entity is included in boundary calculations.
|
|
254
|
+
*
|
|
255
|
+
* @type {Boolean}
|
|
256
|
+
* @abstract
|
|
257
|
+
*/
|
|
258
|
+
get collidable(): boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Sets if this Entity is pickable.
|
|
262
|
+
*
|
|
263
|
+
* Picking is done via calls to {@link Scene#pick}.
|
|
264
|
+
*
|
|
265
|
+
* @type {Boolean}
|
|
266
|
+
* @abstract
|
|
267
|
+
*/
|
|
268
|
+
set pickable(arg: boolean);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Gets if this Entity is pickable.
|
|
272
|
+
*
|
|
273
|
+
* Picking is done via calls to {@link Scene#pick}.
|
|
274
|
+
*
|
|
275
|
+
* @type {Boolean}
|
|
276
|
+
* @abstract
|
|
277
|
+
*/
|
|
278
|
+
get pickable(): boolean;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Sets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.
|
|
282
|
+
*
|
|
283
|
+
* Each element of the color is in range ````[0..1]````.
|
|
284
|
+
*
|
|
285
|
+
* @type {Number[]}
|
|
286
|
+
* @abstract
|
|
287
|
+
*/
|
|
288
|
+
set colorize(arg: number[]);
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Gets the Entity's RGB colorize color, multiplies by the Entity's rendered fragment colors.
|
|
292
|
+
*
|
|
293
|
+
* Each element of the color is in range ````[0..1]````.
|
|
294
|
+
*
|
|
295
|
+
* @type {Number[]}
|
|
296
|
+
* @abstract
|
|
297
|
+
*/
|
|
298
|
+
get colorize(): number[];
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Sets the Entity's opacity factor, multiplies by the Entity's rendered fragment alphas.
|
|
302
|
+
*
|
|
303
|
+
* This is a factor in range ````[0..1]````.
|
|
304
|
+
*
|
|
305
|
+
* @type {Number}
|
|
306
|
+
* @abstract
|
|
307
|
+
*/
|
|
308
|
+
set opacity(arg: number);
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Gets the Entity's opacity factor.
|
|
312
|
+
*
|
|
313
|
+
* This is a factor in range ````[0..1]```` which multiplies by the rendered fragment alphas.
|
|
314
|
+
*
|
|
315
|
+
* @type {Number}
|
|
316
|
+
* @abstract
|
|
317
|
+
*/
|
|
318
|
+
get opacity(): number;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Sets if this Entity casts shadows.
|
|
322
|
+
*
|
|
323
|
+
* @type {Boolean}
|
|
324
|
+
* @abstract
|
|
325
|
+
*/
|
|
326
|
+
set castsShadow(arg: boolean);
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Gets if this Entity casts shadows.
|
|
330
|
+
*
|
|
331
|
+
* @type {Boolean}
|
|
332
|
+
* @abstract
|
|
333
|
+
*/
|
|
334
|
+
get castsShadow(): boolean;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Sets if to this Entity can have shadows cast upon it
|
|
338
|
+
*
|
|
339
|
+
* @type {Boolean}
|
|
340
|
+
* @abstract
|
|
341
|
+
*/
|
|
342
|
+
set receivesShadow(arg: boolean);
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Gets if this Entity can have shadows cast upon it
|
|
346
|
+
*
|
|
347
|
+
* @type {Boolean}
|
|
348
|
+
* @abstract
|
|
349
|
+
*/
|
|
350
|
+
get receivesShadow(): boolean;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Gets if this Entity can have Scalable Ambient Obscurance (SAO) applied to it.
|
|
354
|
+
*
|
|
355
|
+
* SAO is configured by {@link SAO}.
|
|
356
|
+
*
|
|
357
|
+
* @type {Boolean}
|
|
358
|
+
* @abstract
|
|
359
|
+
*/
|
|
360
|
+
get saoEnabled(): boolean;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Sets the Entity's 3D World-space offset.
|
|
364
|
+
*
|
|
365
|
+
* Since offsetting Entities comes with memory and rendering overhead on some systems, this feature
|
|
366
|
+
* only works when {@link Viewer} is configured with ````entityOffsetsEnabled: true````.
|
|
367
|
+
*
|
|
368
|
+
* The offset dynamically translates the Entity in World-space, which is useful for creating
|
|
369
|
+
* effects like exploding parts assemblies etc.
|
|
370
|
+
*
|
|
371
|
+
* Default value is ````[0,0,0]````.
|
|
372
|
+
*
|
|
373
|
+
* Provide a null or undefined value to reset to the default value.
|
|
374
|
+
*
|
|
375
|
+
* @abstract
|
|
376
|
+
* @type {Number[]}
|
|
377
|
+
*/
|
|
378
|
+
set offset(arg: number[]);
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Gets the Entity's 3D World-space offset.
|
|
382
|
+
*
|
|
383
|
+
* Default value is ````[0,0,0]````.
|
|
384
|
+
*
|
|
385
|
+
* @abstract
|
|
386
|
+
* @type {Number[]}
|
|
387
|
+
*/
|
|
388
|
+
get offset(): number[];
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Destroys this Entity.
|
|
392
|
+
*/
|
|
393
|
+
destroy(): void;
|
|
394
|
+
}
|