csyjk 1.2.2 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/{dist/app.js → app.js} +0 -0
- package/{dist/index.html → index.html} +0 -0
- package/package.json +5 -40
- package/{dist/style.css → style.css} +0 -0
- package/.babelrc +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/xx.iml +0 -12
- package/public/gltf.js +0 -2241
- package/public/index.html +0 -10
- package/src/index.js +0 -3
- package/src/lib/gltf/assets/check.jpg +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.css +0 -358
- package/src/lib/gltf/assets/iconfont/iconfont.eot +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.js +0 -1
- package/src/lib/gltf/assets/iconfont/iconfont.json +0 -604
- package/src/lib/gltf/assets/iconfont/iconfont.svg +0 -189
- package/src/lib/gltf/assets/iconfont/iconfont.ttf +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.woff +0 -0
- package/src/lib/gltf/assets/iconfont/iconfont.woff2 +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/index.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/package.json +0 -15
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/ContextMenu.js +0 -863
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/extras/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +0 -462
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.js +0 -279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +0 -262
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/Annotation.js +0 -362
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +0 -575
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +0 -333
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +0 -777
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +0 -525
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +0 -297
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/FastNavPlugin.js +0 -345
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +0 -122
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +0 -462
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFPerformanceModelLoader.js +0 -508
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFSceneGraphLoader.js +0 -922
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/CubeTextureCanvas.js +0 -273
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/NavCubePlugin.js +0 -687
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +0 -145
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJSceneGraphLoader.js +0 -777
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLDefaultDataSource.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +0 -273
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLSceneGraphLoader.js +0 -313
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Control.js +0 -1328
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Overview.js +0 -249
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Plane.js +0 -169
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +0 -403
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +0 -134
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/IFCStoreyPlanObjectStates.js +0 -77
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/Storey.js +0 -61
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyMap.js +0 -57
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +0 -822
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/ModelTreeView.js +0 -888
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewNode.js +0 -88
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewPlugin.js +0 -624
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/modelValidation.js +0 -87
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js +0 -295
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTDefaultDataSource.js +0 -78
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +0 -847
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +0 -167
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +0 -228
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +0 -220
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +0 -279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +0 -244
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +0 -301
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +0 -426
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +0 -479
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/lib/pako.js +0 -6818
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +0 -238
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DSceneGraphLoader.js +0 -1279
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/.jshintrc +0 -11
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/deflate.js +0 -2060
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/inflate.js +0 -2155
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/mime-types.js +0 -1002
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/pako/codecs.js +0 -64
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/z-worker.js +0 -153
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-ext.js +0 -267
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-fs.js +0 -553
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip.js +0 -991
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zlib-asm/codecs.js +0 -49
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/index.js +0 -17
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/culling/ObjectCullStates.js +0 -205
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Dot.js +0 -78
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Label.js +0 -97
- package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Wire.js +0 -95
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Plugin.js +0 -112
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Viewer.js +0 -372
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaultColors.js +0 -162
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaults.js +0 -39
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaModel.js +0 -145
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaObject.js +0 -215
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaScene.js +0 -311
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/CameraControl.js +0 -1669
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/cc.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/CameraUpdater.js +0 -312
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PanController.js +0 -112
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PickController.js +0 -193
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +0 -289
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/cu.js +0 -0
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardAxisViewHandler.js +0 -122
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +0 -186
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MouseMiscHandler.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +0 -439
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePickHandler.js +0 -361
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +0 -258
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +0 -197
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/mouspan.js +0 -498
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Component.js +0 -908
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Entity.js +0 -475
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/ImagePlane.js +0 -570
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/PerformanceModel.js +0 -2623
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ENTITY_FLAGS.js +0 -21
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceMesh.js +0 -262
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceNode.js +0 -697
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js +0 -34
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ScratchMemory.js +0 -63
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/compression.js +0 -183
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingBuffer.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingLayer.js +0 -736
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingRenderers.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingColorRenderer.js +0 -295
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingSilhouetteRenderer.js +0 -327
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingLayer.js +0 -698
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingRenderers.js +0 -68
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingColorRenderer.js +0 -364
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingSilhouetteRenderer.js +0 -356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingBuffer.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingLayer.js +0 -776
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingRenderers.js +0 -113
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingColorRenderer.js +0 -340
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingOcclusionRenderer.js +0 -312
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickDepthRenderer.js +0 -343
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickMeshRenderer.js +0 -331
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingShadowRenderer.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingSilhouetteRenderer.js +0 -348
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingLayer.js +0 -737
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingRenderers.js +0 -143
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingColorRenderer.js +0 -373
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingDepthRenderer.js +0 -366
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingOcclusionRenderer.js +0 -370
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickDepthRenderer.js +0 -386
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickMeshRenderer.js +0 -376
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingShadowRenderer.js +0 -293
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingSilhouetteRenderer.js +0 -382
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingBuffer.js +0 -37
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingLayer.js +0 -1017
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingRenderers.js +0 -246
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorQualityRenderer.js +0 -809
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorRenderer.js +0 -504
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingDepthRenderer.js +0 -297
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesColorRenderer.js +0 -300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesRenderer.js +0 -322
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingNormalsRenderer.js +0 -311
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingOcclusionRenderer.js +0 -291
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickDepthRenderer.js +0 -319
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickMeshRenderer.js +0 -305
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickNormalsRenderer.js +0 -300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingShadowRenderer.js +0 -242
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingSilhouetteRenderer.js +0 -323
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingLayer.js +0 -969
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingRenderers.js +0 -246
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorQualityRenderer.js +0 -859
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorRenderer.js +0 -557
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingDepthRenderer.js +0 -341
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesColorRenderer.js +0 -338
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesRenderer.js +0 -356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingNormalsRenderer.js +0 -354
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingOcclusionRenderer.js +0 -329
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickDepthRenderer.js +0 -358
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickMeshRenderer.js +0 -349
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickNormalsRenderer.js +0 -363
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingShadowRenderer.js +0 -284
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingSilhouetteRenderer.js +0 -354
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Camera.js +0 -880
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraFlightAnimation.js +0 -669
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPath.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPathAnimation.js +0 -326
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CustomProjection.js +0 -149
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Frustum.js +0 -316
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Ortho.js +0 -286
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Perspective.js +0 -302
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Canvas.js +0 -464
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Spinner.js +0 -323
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/core.js +0 -234
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/Geometry.js +0 -33
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/ReadableGeometry.js +0 -689
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/VBOGeometry.js +0 -327
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxGeometry.js +0 -238
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +0 -106
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +0 -271
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildGridGeometry.js +0 -102
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +0 -168
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildSphereGeometry.js +0 -161
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildTorusGeometry.js +0 -172
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +0 -1721
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/index.js +0 -8
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/index.js +0 -4
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/load3DSGeometry.js +0 -103
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +0 -130
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/index.js +0 -18
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/input/Input.js +0 -1475
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/canvas2image.js +0 -218
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/k3d.js +0 -1032
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/AmbientLight.js +0 -175
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/CubeTexture.js +0 -156
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/DirLight.js +0 -314
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Light.js +0 -29
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/LightMap.js +0 -77
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/PointLight.js +0 -395
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/ReflectionMap.js +0 -79
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Shadow.js +0 -138
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/index.js +0 -5
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/Marker.js +0 -382
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EdgeMaterial.js +0 -359
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EmphasisMaterial.js +0 -577
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Fresnel.js +0 -222
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LambertMaterial.js +0 -378
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LinesMaterial.js +0 -169
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Material.js +0 -39
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/MetallicMaterial.js +0 -820
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PhongMaterial.js +0 -860
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PointsMaterial.js +0 -320
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/SpecularMaterial.js +0 -807
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Texture.js +0 -522
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/index.js +0 -8
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/Frustum.js +0 -118
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/buildEdgeIndices.js +0 -162
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/geometryCompressionUtils.js +0 -353
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/math.js +0 -5302
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/rtcCoords.js +0 -132
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/CameraMemento.js +0 -200
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ModelMemento.js +0 -272
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ObjectsMemento.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/index.js +0 -3
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/Mesh.js +0 -2165
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawRenderer.js +0 -978
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawShaderSource.js +0 -1566
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesRenderer.js +0 -249
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesShaderSource.js +0 -163
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillRenderer.js +0 -276
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillShaderSource.js +0 -269
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionRenderer.js +0 -207
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionShaderSource.js +0 -156
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshRenderer.js +0 -210
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +0 -146
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleRenderer.js +0 -186
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +0 -120
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowRenderer.js +0 -214
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +0 -96
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/metriqs/Metriqs.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/Node.js +0 -1356
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/CubicBezierCurve.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Curve.js +0 -183
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Path.js +0 -239
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/QuadraticBezierCurve.js +0 -161
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/SplineCurve.js +0 -133
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/index.js +0 -5
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/postfx/SAO.js +0 -547
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/scene/Scene.js +0 -2481
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/SectionPlane.js +0 -194
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/Skybox.js +0 -119
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/index.js +0 -1
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/stats.js +0 -45
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Map.js +0 -45
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Queue.js +0 -56
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/index.js +0 -2
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils.js +0 -452
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/viewport/Viewport.js +0 -212
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/ArrayBuf.js +0 -121
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Attribute.js +0 -23
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Drawable.js +0 -270
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/FrameContext.js +0 -259
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/PickResult.js +0 -317
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Pickable.js +0 -69
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Program.js +0 -179
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderBuffer.js +0 -315
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderFlags.js +0 -203
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderState.js +0 -40
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Renderer.js +0 -1300
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Sampler.js +0 -18
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Shader.js +0 -49
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Texture2D.js +0 -217
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +0 -214
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionTester.js +0 -432
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAODepthLimitedBlurRenderer.js +0 -326
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAOOcclusionRenderer.js +0 -375
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/webglEnums.js +0 -61
- package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webglInfo.js +0 -48
- package/src/lib/gltf/gltf.css +0 -392
- package/src/lib/gltf/gltf.js +0 -2241
- package/webpack.config.js +0 -70
@@ -1,462 +0,0 @@
|
|
1
|
-
import {utils} from "../../viewer/scene/utils.js"
|
2
|
-
import {PerformanceModel} from "../../viewer/scene/PerformanceModel/PerformanceModel.js";
|
3
|
-
import {Node} from "../../viewer/scene/nodes/Node.js";
|
4
|
-
import {Plugin} from "../../viewer/Plugin.js";
|
5
|
-
import {GLTFSceneGraphLoader} from "./GLTFSceneGraphLoader.js";
|
6
|
-
import {GLTFPerformanceModelLoader} from "./GLTFPerformanceModelLoader.js";
|
7
|
-
import {IFCObjectDefaults} from "../../viewer/metadata/IFCObjectDefaults.js";
|
8
|
-
import {GLTFDefaultDataSource} from "./GLTFDefaultDataSource.js";
|
9
|
-
|
10
|
-
/**
|
11
|
-
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
|
12
|
-
*
|
13
|
-
* * Creates an {@link Entity} representing each model it loads, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}.
|
14
|
-
* * Creates an {@link Entity} for each object within the model, which is indicated by each glTF ````node```` that has a ````name```` attribute. Those Entities will have {@link Entity#isObject} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#objects}.
|
15
|
-
* * When loading, can set the World-space position, scale and rotation of each model within World space, along with initial properties for all the model's {@link Entity}s.
|
16
|
-
*
|
17
|
-
* ## Metadata
|
18
|
-
*
|
19
|
-
* GLTFLoaderPlugin can also load an accompanying JSON metadata file with each model, which creates a {@link MetaModel} corresponding
|
20
|
-
* to the model {@link Entity} and a {@link MetaObject} corresponding to each object {@link Entity}.
|
21
|
-
*
|
22
|
-
* Each {@link MetaObject} has a {@link MetaObject#type}, which indicates the classification of its corresponding {@link Entity}. When loading
|
23
|
-
* metadata, we can also provide GLTFLoaderPlugin with a custom lookup table of initial values to set on the properties of each type of {@link Entity}. By default, GLTFLoaderPlugin
|
24
|
-
* uses its own map of default colors and visibilities for IFC element types.
|
25
|
-
*
|
26
|
-
* ## Quality Setting
|
27
|
-
*
|
28
|
-
* By default, GLTFLoaderPlugin will load a high-performance scene representation that's optimized for low memory usage and
|
29
|
-
* optimal rendering. The high-performance representation renders large numbers of objects efficiently, using geometry
|
30
|
-
* batching and instancing, with simple Lambertian shading that ignores any textures and realistic materials in the glTF.
|
31
|
-
*
|
32
|
-
* Specifying ````performance:false```` to {@link GLTFLoaderPlugin#load} will internally load a heavier scene
|
33
|
-
* representation comprised of {@link Node}, {@link Mesh}, {@link Geometry}, {@link Material} and {@link Texture} components,
|
34
|
-
* that will exactly preserve the materials specified in the glTF. Use this when you want to load a model for a realistic preview,
|
35
|
-
* maybe using PBR etc.
|
36
|
-
*
|
37
|
-
* We tend to use the default ````performance:true```` setting for CAD and BIM models, where structure is more important that
|
38
|
-
* surface appearance.
|
39
|
-
*
|
40
|
-
* Publically, GLTFLoaderPlugin creates the same {@link Entity}s for both levels of performance. Privately, however, it implements
|
41
|
-
* {@link Entity}s using two different sets of concrete subtypes, for its two different internally-managed scene representations.
|
42
|
-
*
|
43
|
-
* ## Usage
|
44
|
-
*
|
45
|
-
* In the example below we'll load the Schependomlaan model from a [glTF file](http://yjkkit.github.io/yjkkit-sdk/examples/models/gltf/schependomlaan/), along
|
46
|
-
* with an accompanying JSON [IFC metadata file](http://yjkkit.github.io/yjkkit-sdk/examples/metaModels/schependomlaan/).
|
47
|
-
*
|
48
|
-
* This will create a bunch of {@link Entity}s that represents the model and its objects, along with a {@link MetaModel} and {@link MetaObject}s
|
49
|
-
* that hold their metadata.
|
50
|
-
*
|
51
|
-
* Since this model contains IFC types, the GLTFLoaderPlugin will set the initial colors of object {@link Entity}s according
|
52
|
-
* to the standard IFC element colors in the GLTFModel's current map. Override that with your own map via property {@link GLTFLoaderPlugin#objectDefaults}.
|
53
|
-
*
|
54
|
-
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/yjkkit/Viewing-an-IFC-Model-with-yjkkit-c373e48bc4094ff5b6e5c5700ff580ee).
|
55
|
-
*
|
56
|
-
* We're leaving ````performance: true```` since our model has many objects and we're not interested in realistic rendering.
|
57
|
-
*
|
58
|
-
* [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
|
59
|
-
*
|
60
|
-
* ````javascript
|
61
|
-
* import {Viewer, GLTFLoaderPlugin} from "yjkkit-sdk.es.js";
|
62
|
-
*
|
63
|
-
* //------------------------------------------------------------------------------------------------------------------
|
64
|
-
* // 1. Create a Viewer,
|
65
|
-
* // 2. Arrange the camera,
|
66
|
-
* // 3. Tweak the selection material (tone it down a bit)
|
67
|
-
* //------------------------------------------------------------------------------------------------------------------
|
68
|
-
*
|
69
|
-
* // 1
|
70
|
-
* const viewer = new Viewer({
|
71
|
-
* canvasId: "myCanvas",
|
72
|
-
* transparent: true
|
73
|
-
* });
|
74
|
-
*
|
75
|
-
* // 2
|
76
|
-
* viewer.camera.orbitPitch(20);
|
77
|
-
* viewer.camera.orbitYaw(-45);
|
78
|
-
*
|
79
|
-
* // 3
|
80
|
-
* viewer.scene.selectedMaterial.fillAlpha = 0.1;
|
81
|
-
*
|
82
|
-
* //------------------------------------------------------------------------------------------------------------------
|
83
|
-
* // 1. Create a glTF loader plugin,
|
84
|
-
* // 2. Load a glTF building model and JSON IFC metadata
|
85
|
-
* // 3. Emphasis the edges to make it look nice
|
86
|
-
* //------------------------------------------------------------------------------------------------------------------
|
87
|
-
*
|
88
|
-
* // 1
|
89
|
-
* const gltfLoader = new GLTFLoaderPlugin(viewer);
|
90
|
-
*
|
91
|
-
* // 2
|
92
|
-
* var model = gltfLoader.load({ // Returns an Entity that represents the model
|
93
|
-
* id: "myModel",
|
94
|
-
* src: "./models/gltf/OTCConferenceCenter/scene.gltf",
|
95
|
-
* metaModelSrc: "./models/gltf/OTCConferenceCenter/metaModel.json", // Creates a MetaModel (see below)
|
96
|
-
* edges: true,
|
97
|
-
* performance: true // Load high-performance scene representation (default is false)
|
98
|
-
* });
|
99
|
-
*
|
100
|
-
* model.on("loaded", () => {
|
101
|
-
*
|
102
|
-
* //--------------------------------------------------------------------------------------------------------------
|
103
|
-
* // 1. Find metadata on the third storey
|
104
|
-
* // 2. Select all the objects in the building's third storey
|
105
|
-
* // 3. Fit the camera to all the objects on the third storey
|
106
|
-
* //--------------------------------------------------------------------------------------------------------------
|
107
|
-
*
|
108
|
-
* // 1
|
109
|
-
* const metaModel = viewer.metaScene.metaModels["myModel"]; // MetaModel with ID "myModel"
|
110
|
-
* const metaObject
|
111
|
-
* = viewer.metaScene.metaObjects["0u4wgLe6n0ABVaiXyikbkA"]; // MetaObject with ID "0u4wgLe6n0ABVaiXyikbkA"
|
112
|
-
*
|
113
|
-
* const name = metaObject.name; // "01 eerste verdieping"
|
114
|
-
* const type = metaObject.type; // "IfcBuildingStorey"
|
115
|
-
* const parent = metaObject.parent; // MetaObject with type "IfcBuilding"
|
116
|
-
* const children = metaObject.children; // Array of child MetaObjects
|
117
|
-
* const objectId = metaObject.id; // "0u4wgLe6n0ABVaiXyikbkA"
|
118
|
-
* const objectIds = viewer.metaScene.getObjectIDsInSubtree(objectId); // IDs of leaf sub-objects
|
119
|
-
* const aabb = viewer.scene.getAABB(objectIds); // Axis-aligned boundary of the leaf sub-objects
|
120
|
-
*
|
121
|
-
* // 2
|
122
|
-
* viewer.scene.setObjectsSelected(objectIds, true);
|
123
|
-
*
|
124
|
-
* // 3
|
125
|
-
* viewer.cameraFlight.flyTo(aabb);
|
126
|
-
* });
|
127
|
-
*
|
128
|
-
* // Find the model Entity by ID
|
129
|
-
* model = viewer.scene.models["myModel"];
|
130
|
-
*
|
131
|
-
* // Destroy the model
|
132
|
-
* model.destroy();
|
133
|
-
* ````
|
134
|
-
*
|
135
|
-
* ## Transforming
|
136
|
-
*
|
137
|
-
* We have the option to rotate, scale and translate each *````.glTF````* model as we load it.
|
138
|
-
*
|
139
|
-
* This lets us load multiple models, or even multiple copies of the same model, and position them apart from each other.
|
140
|
-
*
|
141
|
-
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
142
|
-
* translate it 100 units along its X axis.
|
143
|
-
*
|
144
|
-
* [[Run example](https://yjkkit.github.io/yjkkit-sdk/examples/#loading_glTF_Duplex_transform)]
|
145
|
-
*
|
146
|
-
* ````javascript
|
147
|
-
* const model = gltfLoader.load({
|
148
|
-
* src: "./models/gltf/Duplex/scene.gltf",
|
149
|
-
* metaModelSrc: "./models/gltf/Duplex/Duplex.json",
|
150
|
-
* rotation: [90,0,0],
|
151
|
-
* scale: [0.5, 0.5, 0.5],
|
152
|
-
* position: [100, 0, 0]
|
153
|
-
* });
|
154
|
-
* ````
|
155
|
-
*
|
156
|
-
* ## Including and excluding IFC types
|
157
|
-
*
|
158
|
-
* We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
|
159
|
-
* objects that represent walls.
|
160
|
-
*
|
161
|
-
* [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
|
162
|
-
*
|
163
|
-
* ````javascript
|
164
|
-
* const model = gltfLoader.load({
|
165
|
-
* id: "myModel",
|
166
|
-
* src: "./models/gltf/OTCConferenceCenter/scene.gltf",
|
167
|
-
* metaModelSrc: "./models/gltf/OTCConferenceCenter/metaModel.json",
|
168
|
-
* includeTypes: ["IfcWallStandardCase"]
|
169
|
-
* });
|
170
|
-
* ````
|
171
|
-
*
|
172
|
-
* We can also load only those objects that **don't** have the specified IFC types. In the example below, we'll load only the
|
173
|
-
* objects that do not represent empty space.
|
174
|
-
*
|
175
|
-
* ````javascript
|
176
|
-
* const model = gltfLoader.load({
|
177
|
-
* id: "myModel",
|
178
|
-
* src: "./models/gltf/OTCConferenceCenter/scene.gltf",
|
179
|
-
* metaModelSrc: "./models/gltf/OTCConferenceCenter/metaModel.json",
|
180
|
-
* excludeTypes: ["IfcSpace"]
|
181
|
-
* });
|
182
|
-
* ````
|
183
|
-
* @class GLTFLoaderPlugin
|
184
|
-
*/
|
185
|
-
class GLTFLoaderPlugin extends Plugin {
|
186
|
-
|
187
|
-
/**
|
188
|
-
* @constructor
|
189
|
-
*
|
190
|
-
* @param {Viewer} viewer The Viewer.
|
191
|
-
* @param {Object} cfg Plugin configuration.
|
192
|
-
* @param {String} [cfg.id="GLTFLoader"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
|
193
|
-
* @param {Object} [cfg.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
|
194
|
-
* @param {Object} [cfg.dataSource] 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.
|
195
|
-
*/
|
196
|
-
constructor(viewer, cfg = {}) {
|
197
|
-
|
198
|
-
super("GLTFLoader", viewer, cfg);
|
199
|
-
|
200
|
-
/**
|
201
|
-
* @private
|
202
|
-
*/
|
203
|
-
this._sceneGraphLoader = new GLTFSceneGraphLoader(this, cfg);
|
204
|
-
|
205
|
-
/**
|
206
|
-
* @private
|
207
|
-
*/
|
208
|
-
this._performanceModelLoader = new GLTFPerformanceModelLoader(this, cfg);
|
209
|
-
|
210
|
-
this.dataSource = cfg.dataSource;
|
211
|
-
this.objectDefaults = cfg.objectDefaults;
|
212
|
-
}
|
213
|
-
|
214
|
-
/**
|
215
|
-
* Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
216
|
-
*
|
217
|
-
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
218
|
-
*
|
219
|
-
* @type {Object}
|
220
|
-
*/
|
221
|
-
set dataSource(value) {
|
222
|
-
this._dataSource = value || new GLTFDefaultDataSource();
|
223
|
-
}
|
224
|
-
|
225
|
-
/**
|
226
|
-
* Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
227
|
-
*
|
228
|
-
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
229
|
-
*
|
230
|
-
* @type {Object}
|
231
|
-
*/
|
232
|
-
get dataSource() {
|
233
|
-
return this._dataSource;
|
234
|
-
}
|
235
|
-
|
236
|
-
/**
|
237
|
-
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
238
|
-
*
|
239
|
-
* Default value is {@link IFCObjectDefaults}.
|
240
|
-
*
|
241
|
-
* @type {{String: Object}}
|
242
|
-
*/
|
243
|
-
set objectDefaults(value) {
|
244
|
-
this._objectDefaults = value || IFCObjectDefaults;
|
245
|
-
}
|
246
|
-
|
247
|
-
/**
|
248
|
-
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
249
|
-
*
|
250
|
-
* Default value is {@link IFCObjectDefaults}.
|
251
|
-
*
|
252
|
-
* @type {{String: Object}}
|
253
|
-
*/
|
254
|
-
get objectDefaults() {
|
255
|
-
return this._objectDefaults;
|
256
|
-
}
|
257
|
-
|
258
|
-
/**
|
259
|
-
* Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.
|
260
|
-
*
|
261
|
-
* @param {*} params Loading parameters.
|
262
|
-
* @param {String} [params.id] ID to assign to the root {@link Entity#id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default.
|
263
|
-
* @param {String} [params.src] Path to a glTF file, as an alternative to the ````gltf```` parameter.
|
264
|
-
* @param {*} [params.gltf] glTF JSON, as an alternative to the ````src```` parameter.
|
265
|
-
* @param {String} [params.metaModelSrc] Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.
|
266
|
-
* @param {*} [params.metaModelData] JSON model metadata, as an alternative to the ````metaModelSrc```` parameter.
|
267
|
-
* @param {{String:Object}} [params.objectDefaults] Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}.
|
268
|
-
* @params {String[]} [params.includeTypes] When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|
269
|
-
* @params {String[]} [params.excludeTypes] When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject#type} values in this list.
|
270
|
-
* @param {Boolean} [params.edges=false] Whether or not yjkkit renders the model with edges emphasized.
|
271
|
-
* @param {Number[]} [params.position=[0,0,0]] The model World-space 3D position.
|
272
|
-
* @param {Number[]} [params.scale=[1,1,1]] The model's World-space scale.
|
273
|
-
* @param {Number[]} [params.rotation=[0,0,0]] The model's World-space rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.
|
274
|
-
* @param {Number[]} [params.matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]] The model's world transform matrix. Overrides the position, scale and rotation parameters.
|
275
|
-
* @param {Boolean} [params.backfaces=false] When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces.
|
276
|
-
* @param {Number} [params.edgeThreshold=10] 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.
|
277
|
-
* @params {Boolean} [params.performance=true] 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.
|
278
|
-
* @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}
|
279
|
-
*/
|
280
|
-
load(params = {}) {
|
281
|
-
|
282
|
-
if (params.id && this.viewer.scene.components[params.id]) {
|
283
|
-
this.error("Component with this ID already exists in viewer: " + params.id + " - will autogenerate this ID");
|
284
|
-
delete params.id;
|
285
|
-
}
|
286
|
-
|
287
|
-
const performance = params.performance !== false;
|
288
|
-
|
289
|
-
const model = performance
|
290
|
-
|
291
|
-
// PerformanceModel provides performance-oriented scene representation
|
292
|
-
// converting glTF materials to simple flat-shading without textures
|
293
|
-
|
294
|
-
? new PerformanceModel(this.viewer.scene, utils.apply(params, {
|
295
|
-
isModel: true
|
296
|
-
}))
|
297
|
-
|
298
|
-
// Scene Node graph supports original glTF materials
|
299
|
-
|
300
|
-
: new Node(this.viewer.scene, utils.apply(params, {
|
301
|
-
isModel: true
|
302
|
-
}));
|
303
|
-
|
304
|
-
const modelId = model.id; // In case ID was auto-generated
|
305
|
-
|
306
|
-
if (!params.src && !params.gltf) {
|
307
|
-
this.error("load() param expected: src or gltf");
|
308
|
-
return model; // Return new empty model
|
309
|
-
}
|
310
|
-
|
311
|
-
const loader = performance ? this._performanceModelLoader : this._sceneGraphLoader;
|
312
|
-
|
313
|
-
if (params.metaModelSrc || params.metaModelData) {
|
314
|
-
|
315
|
-
const objectDefaults = params.objectDefaults || this._objectDefaults || IFCObjectDefaults;
|
316
|
-
|
317
|
-
const processMetaModelData = (metaModelData) => {
|
318
|
-
|
319
|
-
this.viewer.metaScene.createMetaModel(modelId, metaModelData, {
|
320
|
-
includeTypes: params.includeTypes,
|
321
|
-
excludeTypes: params.excludeTypes
|
322
|
-
});
|
323
|
-
|
324
|
-
this.viewer.scene.canvas.spinner.processes--;
|
325
|
-
|
326
|
-
var includeTypes;
|
327
|
-
if (params.includeTypes) {
|
328
|
-
includeTypes = {};
|
329
|
-
for (let i = 0, len = params.includeTypes.length; i < len; i++) {
|
330
|
-
includeTypes[params.includeTypes[i]] = true;
|
331
|
-
}
|
332
|
-
}
|
333
|
-
|
334
|
-
var excludeTypes;
|
335
|
-
if (params.excludeTypes) {
|
336
|
-
excludeTypes = {};
|
337
|
-
for (let i = 0, len = params.excludeTypes.length; i < len; i++) {
|
338
|
-
includeTypes[params.excludeTypes[i]] = true;
|
339
|
-
}
|
340
|
-
}
|
341
|
-
|
342
|
-
params.readableGeometry = false;
|
343
|
-
|
344
|
-
params.handleGLTFNode = (modelId, glTFNode, actions) => {
|
345
|
-
|
346
|
-
const name = glTFNode.name;
|
347
|
-
|
348
|
-
if (!name) {
|
349
|
-
return true; // Continue descending this node subtree
|
350
|
-
}
|
351
|
-
|
352
|
-
const nodeId = name;
|
353
|
-
const yjkElementId = glTFNode.ComponentID;
|
354
|
-
const yjkType = glTFNode.type;
|
355
|
-
const FlrID = glTFNode.FlrID;
|
356
|
-
const metaObject = this.viewer.metaScene.metaObjects[nodeId];
|
357
|
-
const type = (metaObject ? metaObject.type : "DEFAULT") || "DEFAULT";
|
358
|
-
|
359
|
-
actions.createEntity = {
|
360
|
-
id: nodeId,
|
361
|
-
yjkElementId:yjkElementId,
|
362
|
-
yjkType:yjkType,
|
363
|
-
FlrID:FlrID,
|
364
|
-
isObject: true // Registers the Entity in Scene#objects
|
365
|
-
};
|
366
|
-
|
367
|
-
const props = objectDefaults[type];
|
368
|
-
|
369
|
-
if (props) { // Set Entity's initial rendering state for recognized type
|
370
|
-
|
371
|
-
if (props.visible === false) {
|
372
|
-
actions.createEntity.visible = false;
|
373
|
-
}
|
374
|
-
|
375
|
-
if (props.colorize) {
|
376
|
-
actions.createEntity.colorize = props.colorize;
|
377
|
-
}
|
378
|
-
|
379
|
-
if (props.pickable === false) {
|
380
|
-
actions.createEntity.pickable = false;
|
381
|
-
}
|
382
|
-
|
383
|
-
if (props.opacity !== undefined && props.opacity !== null) {
|
384
|
-
actions.createEntity.opacity = props.opacity;
|
385
|
-
}
|
386
|
-
}
|
387
|
-
|
388
|
-
return true; // Continue descending this glTF node subtree
|
389
|
-
};
|
390
|
-
|
391
|
-
if (params.src) {
|
392
|
-
loader.load(this, model, params.src, params);
|
393
|
-
} else {
|
394
|
-
loader.parse(this, model, params.gltf, params);
|
395
|
-
}
|
396
|
-
};
|
397
|
-
|
398
|
-
if (params.metaModelSrc) {
|
399
|
-
|
400
|
-
const metaModelSrc = params.metaModelSrc;
|
401
|
-
|
402
|
-
this.viewer.scene.canvas.spinner.processes++;
|
403
|
-
|
404
|
-
this._dataSource.getMetaModel(metaModelSrc, (metaModelData) => {
|
405
|
-
|
406
|
-
this.viewer.scene.canvas.spinner.processes--;
|
407
|
-
|
408
|
-
processMetaModelData(metaModelData);
|
409
|
-
|
410
|
-
}, (errMsg) => {
|
411
|
-
this.error(`load(): Failed to load model metadata for model '${modelId} from '${metaModelSrc}' - ${errMsg}`);
|
412
|
-
this.viewer.scene.canvas.spinner.processes--;
|
413
|
-
});
|
414
|
-
|
415
|
-
} else if (params.metaModelData) {
|
416
|
-
|
417
|
-
processMetaModelData(params.metaModelData);
|
418
|
-
}
|
419
|
-
|
420
|
-
} else {
|
421
|
-
|
422
|
-
params.handleGLTFNode = (modelId, glTFNode, actions) => {
|
423
|
-
|
424
|
-
const name = glTFNode.name;
|
425
|
-
|
426
|
-
if (!name) {
|
427
|
-
return true; // Continue descending this node subtree
|
428
|
-
}
|
429
|
-
|
430
|
-
const id = name;
|
431
|
-
|
432
|
-
actions.createEntity = { // Create an Entity for this glTF scene node
|
433
|
-
id: id,
|
434
|
-
isObject: true // Registers the Entity in Scene#objects
|
435
|
-
};
|
436
|
-
|
437
|
-
return true; // Continue descending this glTF node subtree
|
438
|
-
};
|
439
|
-
|
440
|
-
if (params.src) {
|
441
|
-
loader.load(this, model, params.src, params);
|
442
|
-
} else {
|
443
|
-
loader.parse(this, model, params.gltf, params);
|
444
|
-
}
|
445
|
-
}
|
446
|
-
|
447
|
-
model.once("destroyed", () => {
|
448
|
-
this.viewer.metaScene.destroyMetaModel(modelId);
|
449
|
-
});
|
450
|
-
|
451
|
-
return model;
|
452
|
-
}
|
453
|
-
|
454
|
-
/**
|
455
|
-
* Destroys this GLTFLoaderPlugin.
|
456
|
-
*/
|
457
|
-
destroy() {
|
458
|
-
super.destroy();
|
459
|
-
}
|
460
|
-
}
|
461
|
-
|
462
|
-
export {GLTFLoaderPlugin}
|