@xtctwins/tctwins-core 1.1.19 → 1.1.21
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 +4 -4
- package/dist/tctwins-core.es5.js +27557 -27494
- package/dist/tctwins-core.min.es5.js +4 -4
- package/package.json +84 -84
- package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
- package/types/extras/ContextMenu/index.d.ts +1 -1
- package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
- package/types/extras/PointerCircle/index.d.ts +1 -1
- package/types/extras/PointerLens/PointerLens.d.ts +146 -146
- package/types/extras/index.d.ts +3 -3
- package/types/index.d.ts +3 -3
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
- package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
- package/types/plugins/FastNavPlugin/index.d.ts +1 -1
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
- package/types/plugins/NavCubePlugin/index.d.ts +1 -1
- package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
- package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
- package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
- package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
- package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/index.d.ts +30 -30
- package/types/viewer/Configs.d.ts +46 -46
- package/types/viewer/Plugin.d.ts +69 -69
- package/types/viewer/Viewer.d.ts +282 -282
- package/types/viewer/index.d.ts +6 -6
- package/types/viewer/localization/LocaleService.d.ts +183 -183
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
- package/types/viewer/metadata/MetaModel.d.ts +94 -102
- package/types/viewer/metadata/MetaObject.d.ts +74 -74
- package/types/viewer/metadata/MetaScene.d.ts +135 -135
- package/types/viewer/metadata/Property.d.ts +29 -29
- package/types/viewer/metadata/PropertySet.d.ts +31 -31
- package/types/viewer/metadata/index.d.ts +6 -6
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
- package/types/viewer/scene/Component.d.ts +155 -155
- package/types/viewer/scene/Entity.d.ts +401 -401
- package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
- package/types/viewer/scene/camera/Camera.d.ts +364 -364
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
- package/types/viewer/scene/camera/Frustum.d.ts +166 -166
- package/types/viewer/scene/camera/Ortho.d.ts +115 -115
- package/types/viewer/scene/camera/Perspective.d.ts +136 -136
- package/types/viewer/scene/camera/index.d.ts +4 -4
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
- package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
- package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
- package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
- package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
- package/types/viewer/scene/geometry/index.d.ts +2 -2
- package/types/viewer/scene/index.d.ts +23 -23
- package/types/viewer/scene/input/input.d.ts +69 -69
- package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
- package/types/viewer/scene/lights/DirLight.d.ts +25 -25
- package/types/viewer/scene/lights/Light.d.ts +3 -3
- package/types/viewer/scene/lights/PointLight.d.ts +30 -30
- package/types/viewer/scene/lights/index.d.ts +2 -2
- package/types/viewer/scene/marker/Marker.d.ts +136 -136
- package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
- package/types/viewer/scene/marker/index.d.ts +2 -2
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
- package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
- package/types/viewer/scene/materials/Material.d.ts +3 -3
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
- package/types/viewer/scene/materials/Texture.d.ts +260 -260
- package/types/viewer/scene/materials/index.d.ts +6 -6
- package/types/viewer/scene/math/Frustum.d.ts +41 -41
- package/types/viewer/scene/math/index.d.ts +1 -1
- package/types/viewer/scene/math/math.d.ts +104 -104
- package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
- package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
- package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
- package/types/viewer/scene/mementos/index.d.ts +3 -3
- package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
- package/types/viewer/scene/mesh/index.d.ts +1 -1
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
- package/types/viewer/scene/models/SceneModel.d.ts +757 -762
- package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
- package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
- package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
- package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
- package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
- package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
- package/types/viewer/scene/models/index.d.ts +7 -7
- package/types/viewer/scene/nodes/Node.d.ts +664 -664
- package/types/viewer/scene/nodes/index.d.ts +1 -1
- package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
- package/types/viewer/scene/postfx/SAO.d.ts +209 -209
- package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
- package/types/viewer/scene/stats.d.ts +40 -40
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
- package/types/viewer/scene/viewport/index.d.ts +1 -1
- package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
- package/types/viewer/scene/webgl/index.d.ts +1 -1
- package/dist/tctwins-core.umd.js +0 -37
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { Entity, IFCObjectDefaults, Plugin, SceneModel, Viewer } from "../../viewer";
|
|
2
|
-
|
|
3
|
-
export declare interface IGLTFDefaultDataSource {
|
|
4
|
-
/**
|
|
5
|
-
* Gets metamodel JSON.
|
|
6
|
-
*
|
|
7
|
-
* @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
|
|
8
|
-
* @param {Function(*)} ok Fired on successful loading of the metamodel JSON asset.
|
|
9
|
-
* @param {Function(*)} error Fired on error while loading the metamodel JSON asset.
|
|
10
|
-
*/
|
|
11
|
-
getMetaModel(metaModelSrc: string | number, ok: Function, error: Function): void;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Gets glTF JSON.
|
|
15
|
-
*
|
|
16
|
-
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
17
|
-
* @param {Function} ok Fired on successful loading of the glTF JSON asset.
|
|
18
|
-
* @param {Function} error Fired on error while loading the glTF JSON asset.
|
|
19
|
-
*/
|
|
20
|
-
getGLTF(glTFSrc: string | number, ok: Function, error: Function): void;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Gets glTF binary attachment.
|
|
24
|
-
*
|
|
25
|
-
* Note that this method requires the source of the glTF JSON asset. This is because the binary attachment
|
|
26
|
-
* source could be relative to the glTF source, IE. it may not be a global ID.
|
|
27
|
-
*
|
|
28
|
-
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
29
|
-
* @param {String|Number} binarySrc Identifies the glTF binary asset.
|
|
30
|
-
* @param {Function} ok Fired on successful loading of the glTF binary asset.
|
|
31
|
-
* @param {Function} error Fired on error while loading the glTF binary asset.
|
|
32
|
-
*/
|
|
33
|
-
getArrayBuffer(glTFSrc: string | number, binarySrc: string | number, ok: Function, error: Function): void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare type GLTFLoaderPluginConfiguration = {
|
|
37
|
-
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
38
|
-
id?: string;
|
|
39
|
-
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
40
|
-
objectDefaults?: IFCObjectDefaults;
|
|
41
|
-
/** A custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments. Defaults to an instance of {@link GLTFDefaultDataSource}, which loads over HTTP. */
|
|
42
|
-
dataSource?: IGLTFDefaultDataSource;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export declare type LoadGLTFModel = {
|
|
46
|
-
/** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
|
|
47
|
-
id?: string;
|
|
48
|
-
/** Path to a glTF file, as an alternative to the ````gltf```` parameter. */
|
|
49
|
-
src?: string;
|
|
50
|
-
/** glTF JSON, as an alternative to the ````src```` parameter. */
|
|
51
|
-
gltf?: any;
|
|
52
|
-
/** Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.*/
|
|
53
|
-
metaModelSrc?: string;
|
|
54
|
-
/** JSON model metadata, as an alternative to the ````metaModelSrc```` parameter. */
|
|
55
|
-
metaModelData?: any;
|
|
56
|
-
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
57
|
-
objectDefaults?: object;
|
|
58
|
-
/** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
59
|
-
includeTypes?: string[];
|
|
60
|
-
/** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
61
|
-
excludeTypes?: string[];
|
|
62
|
-
/** Whether or not xeokit renders the model with edges emphasized. */
|
|
63
|
-
edges?: boolean;
|
|
64
|
-
/** The double-precision World-space origin of the model's coordinates. */
|
|
65
|
-
origin?: number[];
|
|
66
|
-
/** The single-precision position, relative to ````origin````. */
|
|
67
|
-
position?: number[];
|
|
68
|
-
/** The model's scale. */
|
|
69
|
-
scale?: number[];
|
|
70
|
-
/** The model's orientation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
|
|
71
|
-
rotation?: number[];
|
|
72
|
-
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
|
|
73
|
-
matrix?: number[];
|
|
74
|
-
/** When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces. */
|
|
75
|
-
backfaces?: number[];
|
|
76
|
-
/** When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn. */
|
|
77
|
-
edgeThreshold?: number[];
|
|
78
|
-
/** Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering. */
|
|
79
|
-
performance?: boolean;
|
|
80
|
-
/** When true, generate a single MetaObject that represents the entire glTF model, and a MetaObject for each entity within it. */
|
|
81
|
-
autoMetaModel?: boolean;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
|
|
86
|
-
*/
|
|
87
|
-
export declare class GLTFLoaderPlugin extends Plugin {
|
|
88
|
-
/**
|
|
89
|
-
* @constructor
|
|
90
|
-
*
|
|
91
|
-
* @param {Viewer} viewer The Viewer.
|
|
92
|
-
* @param {IGLTFDefaultDataSource} cfg Plugin configuration.
|
|
93
|
-
* @param {String} [cfg.id="GLTFLoader"]
|
|
94
|
-
* @param {Object} [cfg.objectDefaults]
|
|
95
|
-
* @param {Object} [cfg.dataSource]
|
|
96
|
-
*/
|
|
97
|
-
constructor(viewer: Viewer, cfg?: GLTFLoaderPluginConfiguration);
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
101
|
-
*
|
|
102
|
-
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
103
|
-
*
|
|
104
|
-
* @type {Object}
|
|
105
|
-
*/
|
|
106
|
-
set dataSource(arg: IGLTFDefaultDataSource);
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
110
|
-
*
|
|
111
|
-
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
112
|
-
*
|
|
113
|
-
* @type {Object}
|
|
114
|
-
*/
|
|
115
|
-
get dataSource(): IGLTFDefaultDataSource;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
119
|
-
*
|
|
120
|
-
* Default value is {@link IFCObjectDefaults}.
|
|
121
|
-
*
|
|
122
|
-
* @type {IFCObjectDefaults}
|
|
123
|
-
*/
|
|
124
|
-
set objectDefaults(arg: IFCObjectDefaults);
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
128
|
-
*
|
|
129
|
-
* Default value is {@link IFCObjectDefaults}.
|
|
130
|
-
*
|
|
131
|
-
* @type {IFCObjectDefaults}
|
|
132
|
-
*/
|
|
133
|
-
get objectDefaults(): IFCObjectDefaults;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.
|
|
137
|
-
*
|
|
138
|
-
* @param {LoadGLTFModel} params Loading parameters.
|
|
139
|
-
* @returns {SceneModel} SceneModel representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
140
|
-
*/
|
|
141
|
-
load(params: LoadGLTFModel): SceneModel;
|
|
142
|
-
}
|
|
1
|
+
import { Entity, IFCObjectDefaults, Plugin, SceneModel, Viewer } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare interface IGLTFDefaultDataSource {
|
|
4
|
+
/**
|
|
5
|
+
* Gets metamodel JSON.
|
|
6
|
+
*
|
|
7
|
+
* @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
|
|
8
|
+
* @param {Function(*)} ok Fired on successful loading of the metamodel JSON asset.
|
|
9
|
+
* @param {Function(*)} error Fired on error while loading the metamodel JSON asset.
|
|
10
|
+
*/
|
|
11
|
+
getMetaModel(metaModelSrc: string | number, ok: Function, error: Function): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets glTF JSON.
|
|
15
|
+
*
|
|
16
|
+
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
17
|
+
* @param {Function} ok Fired on successful loading of the glTF JSON asset.
|
|
18
|
+
* @param {Function} error Fired on error while loading the glTF JSON asset.
|
|
19
|
+
*/
|
|
20
|
+
getGLTF(glTFSrc: string | number, ok: Function, error: Function): void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Gets glTF binary attachment.
|
|
24
|
+
*
|
|
25
|
+
* Note that this method requires the source of the glTF JSON asset. This is because the binary attachment
|
|
26
|
+
* source could be relative to the glTF source, IE. it may not be a global ID.
|
|
27
|
+
*
|
|
28
|
+
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
29
|
+
* @param {String|Number} binarySrc Identifies the glTF binary asset.
|
|
30
|
+
* @param {Function} ok Fired on successful loading of the glTF binary asset.
|
|
31
|
+
* @param {Function} error Fired on error while loading the glTF binary asset.
|
|
32
|
+
*/
|
|
33
|
+
getArrayBuffer(glTFSrc: string | number, binarySrc: string | number, ok: Function, error: Function): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare type GLTFLoaderPluginConfiguration = {
|
|
37
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
40
|
+
objectDefaults?: IFCObjectDefaults;
|
|
41
|
+
/** A custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments. Defaults to an instance of {@link GLTFDefaultDataSource}, which loads over HTTP. */
|
|
42
|
+
dataSource?: IGLTFDefaultDataSource;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type LoadGLTFModel = {
|
|
46
|
+
/** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
|
|
47
|
+
id?: string;
|
|
48
|
+
/** Path to a glTF file, as an alternative to the ````gltf```` parameter. */
|
|
49
|
+
src?: string;
|
|
50
|
+
/** glTF JSON, as an alternative to the ````src```` parameter. */
|
|
51
|
+
gltf?: any;
|
|
52
|
+
/** Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.*/
|
|
53
|
+
metaModelSrc?: string;
|
|
54
|
+
/** JSON model metadata, as an alternative to the ````metaModelSrc```` parameter. */
|
|
55
|
+
metaModelData?: any;
|
|
56
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
57
|
+
objectDefaults?: object;
|
|
58
|
+
/** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
59
|
+
includeTypes?: string[];
|
|
60
|
+
/** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
61
|
+
excludeTypes?: string[];
|
|
62
|
+
/** Whether or not xeokit renders the model with edges emphasized. */
|
|
63
|
+
edges?: boolean;
|
|
64
|
+
/** The double-precision World-space origin of the model's coordinates. */
|
|
65
|
+
origin?: number[];
|
|
66
|
+
/** The single-precision position, relative to ````origin````. */
|
|
67
|
+
position?: number[];
|
|
68
|
+
/** The model's scale. */
|
|
69
|
+
scale?: number[];
|
|
70
|
+
/** The model's orientation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
|
|
71
|
+
rotation?: number[];
|
|
72
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
|
|
73
|
+
matrix?: number[];
|
|
74
|
+
/** When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces. */
|
|
75
|
+
backfaces?: number[];
|
|
76
|
+
/** When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn. */
|
|
77
|
+
edgeThreshold?: number[];
|
|
78
|
+
/** Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering. */
|
|
79
|
+
performance?: boolean;
|
|
80
|
+
/** When true, generate a single MetaObject that represents the entire glTF model, and a MetaObject for each entity within it. */
|
|
81
|
+
autoMetaModel?: boolean;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
|
|
86
|
+
*/
|
|
87
|
+
export declare class GLTFLoaderPlugin extends Plugin {
|
|
88
|
+
/**
|
|
89
|
+
* @constructor
|
|
90
|
+
*
|
|
91
|
+
* @param {Viewer} viewer The Viewer.
|
|
92
|
+
* @param {IGLTFDefaultDataSource} cfg Plugin configuration.
|
|
93
|
+
* @param {String} [cfg.id="GLTFLoader"]
|
|
94
|
+
* @param {Object} [cfg.objectDefaults]
|
|
95
|
+
* @param {Object} [cfg.dataSource]
|
|
96
|
+
*/
|
|
97
|
+
constructor(viewer: Viewer, cfg?: GLTFLoaderPluginConfiguration);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
101
|
+
*
|
|
102
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
103
|
+
*
|
|
104
|
+
* @type {Object}
|
|
105
|
+
*/
|
|
106
|
+
set dataSource(arg: IGLTFDefaultDataSource);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
110
|
+
*
|
|
111
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
112
|
+
*
|
|
113
|
+
* @type {Object}
|
|
114
|
+
*/
|
|
115
|
+
get dataSource(): IGLTFDefaultDataSource;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
119
|
+
*
|
|
120
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
121
|
+
*
|
|
122
|
+
* @type {IFCObjectDefaults}
|
|
123
|
+
*/
|
|
124
|
+
set objectDefaults(arg: IFCObjectDefaults);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
128
|
+
*
|
|
129
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
130
|
+
*
|
|
131
|
+
* @type {IFCObjectDefaults}
|
|
132
|
+
*/
|
|
133
|
+
get objectDefaults(): IFCObjectDefaults;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.
|
|
137
|
+
*
|
|
138
|
+
* @param {LoadGLTFModel} params Loading parameters.
|
|
139
|
+
* @returns {SceneModel} SceneModel representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
140
|
+
*/
|
|
141
|
+
load(params: LoadGLTFModel): SceneModel;
|
|
142
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./GLTFLoaderPlugin";
|
|
1
|
+
export * from "./GLTFLoaderPlugin";
|