csyjk 1.2.2 → 2.2.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.
Files changed (322) hide show
  1. package/{dist/app.js → app.js} +0 -0
  2. package/{dist/index.html → index.html} +0 -0
  3. package/package.json +5 -40
  4. package/{dist/style.css → style.css} +0 -0
  5. package/.babelrc +0 -7
  6. package/.idea/modules.xml +0 -8
  7. package/.idea/xx.iml +0 -12
  8. package/public/gltf.js +0 -2241
  9. package/public/index.html +0 -10
  10. package/src/index.js +0 -3
  11. package/src/lib/gltf/assets/check.jpg +0 -0
  12. package/src/lib/gltf/assets/iconfont/iconfont.css +0 -358
  13. package/src/lib/gltf/assets/iconfont/iconfont.eot +0 -0
  14. package/src/lib/gltf/assets/iconfont/iconfont.js +0 -1
  15. package/src/lib/gltf/assets/iconfont/iconfont.json +0 -604
  16. package/src/lib/gltf/assets/iconfont/iconfont.svg +0 -189
  17. package/src/lib/gltf/assets/iconfont/iconfont.ttf +0 -0
  18. package/src/lib/gltf/assets/iconfont/iconfont.woff +0 -0
  19. package/src/lib/gltf/assets/iconfont/iconfont.woff2 +0 -0
  20. package/src/lib/gltf/assets/yjkkit-sdk/index.js +0 -0
  21. package/src/lib/gltf/assets/yjkkit-sdk/package.json +0 -15
  22. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/ContextMenu.js +0 -863
  23. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/index.js +0 -1
  24. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/index.js +0 -1
  25. package/src/lib/gltf/assets/yjkkit-sdk/src/index.js +0 -3
  26. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +0 -462
  27. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.js +0 -279
  28. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +0 -262
  29. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/index.js +0 -1
  30. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/Annotation.js +0 -362
  31. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +0 -575
  32. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/index.js +0 -1
  33. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +0 -333
  34. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/index.js +0 -1
  35. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +0 -777
  36. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/index.js +0 -1
  37. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +0 -525
  38. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.js +0 -242
  39. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +0 -297
  40. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/index.js +0 -1
  41. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/FastNavPlugin.js +0 -345
  42. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/index.js +0 -1
  43. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +0 -122
  44. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +0 -462
  45. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFPerformanceModelLoader.js +0 -508
  46. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFSceneGraphLoader.js +0 -922
  47. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/index.js +0 -2
  48. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/CubeTextureCanvas.js +0 -273
  49. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/NavCubePlugin.js +0 -687
  50. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/index.js +0 -1
  51. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +0 -145
  52. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJSceneGraphLoader.js +0 -777
  53. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/index.js +0 -1
  54. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLDefaultDataSource.js +0 -33
  55. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +0 -273
  56. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLSceneGraphLoader.js +0 -313
  57. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/index.js +0 -2
  58. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Control.js +0 -1328
  59. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Overview.js +0 -249
  60. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Plane.js +0 -169
  61. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +0 -403
  62. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/index.js +0 -1
  63. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +0 -134
  64. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/index.js +0 -1
  65. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/IFCStoreyPlanObjectStates.js +0 -77
  66. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/Storey.js +0 -61
  67. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyMap.js +0 -57
  68. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +0 -822
  69. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/index.js +0 -1
  70. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/ModelTreeView.js +0 -888
  71. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewNode.js +0 -88
  72. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewPlugin.js +0 -624
  73. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/index.js +0 -1
  74. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/modelValidation.js +0 -87
  75. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js +0 -295
  76. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/index.js +0 -1
  77. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTDefaultDataSource.js +0 -78
  78. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +0 -847
  79. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/index.js +0 -2
  80. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +0 -167
  81. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +0 -228
  82. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +0 -220
  83. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +0 -279
  84. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +0 -244
  85. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +0 -301
  86. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +0 -426
  87. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +0 -479
  88. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/lib/pako.js +0 -6818
  89. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +0 -238
  90. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DSceneGraphLoader.js +0 -1279
  91. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/index.js +0 -1
  92. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/.jshintrc +0 -11
  93. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/deflate.js +0 -2060
  94. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/inflate.js +0 -2155
  95. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/mime-types.js +0 -1002
  96. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/pako/codecs.js +0 -64
  97. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/z-worker.js +0 -153
  98. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-ext.js +0 -267
  99. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-fs.js +0 -553
  100. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip.js +0 -991
  101. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zlib-asm/codecs.js +0 -49
  102. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/index.js +0 -17
  103. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/culling/ObjectCullStates.js +0 -205
  104. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Dot.js +0 -78
  105. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Label.js +0 -97
  106. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Wire.js +0 -95
  107. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Plugin.js +0 -112
  108. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Viewer.js +0 -372
  109. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/index.js +0 -3
  110. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaultColors.js +0 -162
  111. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaults.js +0 -39
  112. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaModel.js +0 -145
  113. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaObject.js +0 -215
  114. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaScene.js +0 -311
  115. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/CameraControl.js +0 -1669
  116. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/cc.js +0 -0
  117. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/CameraUpdater.js +0 -312
  118. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PanController.js +0 -112
  119. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PickController.js +0 -193
  120. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +0 -289
  121. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/cu.js +0 -0
  122. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardAxisViewHandler.js +0 -122
  123. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +0 -186
  124. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MouseMiscHandler.js +0 -68
  125. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +0 -439
  126. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePickHandler.js +0 -361
  127. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +0 -258
  128. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +0 -197
  129. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/mouspan.js +0 -498
  130. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Component.js +0 -908
  131. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Entity.js +0 -475
  132. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/ImagePlane.js +0 -570
  133. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/index.js +0 -1
  134. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/PerformanceModel.js +0 -2623
  135. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/index.js +0 -1
  136. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ENTITY_FLAGS.js +0 -21
  137. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceMesh.js +0 -262
  138. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceNode.js +0 -697
  139. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js +0 -34
  140. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ScratchMemory.js +0 -63
  141. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/compression.js +0 -183
  142. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingBuffer.js +0 -33
  143. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingLayer.js +0 -736
  144. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingRenderers.js +0 -68
  145. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingColorRenderer.js +0 -295
  146. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingSilhouetteRenderer.js +0 -327
  147. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingLayer.js +0 -698
  148. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingRenderers.js +0 -68
  149. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingColorRenderer.js +0 -364
  150. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingSilhouetteRenderer.js +0 -356
  151. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingBuffer.js +0 -33
  152. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingLayer.js +0 -776
  153. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingRenderers.js +0 -113
  154. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingColorRenderer.js +0 -340
  155. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingOcclusionRenderer.js +0 -312
  156. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickDepthRenderer.js +0 -343
  157. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickMeshRenderer.js +0 -331
  158. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingShadowRenderer.js +0 -242
  159. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingSilhouetteRenderer.js +0 -348
  160. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingLayer.js +0 -737
  161. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingRenderers.js +0 -143
  162. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingColorRenderer.js +0 -373
  163. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingDepthRenderer.js +0 -366
  164. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingOcclusionRenderer.js +0 -370
  165. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickDepthRenderer.js +0 -386
  166. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickMeshRenderer.js +0 -376
  167. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingShadowRenderer.js +0 -293
  168. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingSilhouetteRenderer.js +0 -382
  169. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingBuffer.js +0 -37
  170. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingLayer.js +0 -1017
  171. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingRenderers.js +0 -246
  172. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorQualityRenderer.js +0 -809
  173. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorRenderer.js +0 -504
  174. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingDepthRenderer.js +0 -297
  175. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesColorRenderer.js +0 -300
  176. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesRenderer.js +0 -322
  177. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingNormalsRenderer.js +0 -311
  178. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingOcclusionRenderer.js +0 -291
  179. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickDepthRenderer.js +0 -319
  180. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickMeshRenderer.js +0 -305
  181. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickNormalsRenderer.js +0 -300
  182. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingShadowRenderer.js +0 -242
  183. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingSilhouetteRenderer.js +0 -323
  184. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingLayer.js +0 -969
  185. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingRenderers.js +0 -246
  186. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorQualityRenderer.js +0 -859
  187. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorRenderer.js +0 -557
  188. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingDepthRenderer.js +0 -341
  189. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesColorRenderer.js +0 -338
  190. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesRenderer.js +0 -356
  191. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingNormalsRenderer.js +0 -354
  192. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingOcclusionRenderer.js +0 -329
  193. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickDepthRenderer.js +0 -358
  194. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickMeshRenderer.js +0 -349
  195. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickNormalsRenderer.js +0 -363
  196. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingShadowRenderer.js +0 -284
  197. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingSilhouetteRenderer.js +0 -354
  198. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Camera.js +0 -880
  199. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraFlightAnimation.js +0 -669
  200. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPath.js +0 -194
  201. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPathAnimation.js +0 -326
  202. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CustomProjection.js +0 -149
  203. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Frustum.js +0 -316
  204. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Ortho.js +0 -286
  205. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Perspective.js +0 -302
  206. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/index.js +0 -2
  207. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Canvas.js +0 -464
  208. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Spinner.js +0 -323
  209. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/core.js +0 -234
  210. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/Geometry.js +0 -33
  211. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/ReadableGeometry.js +0 -689
  212. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/VBOGeometry.js +0 -327
  213. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxGeometry.js +0 -238
  214. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +0 -106
  215. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +0 -271
  216. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildGridGeometry.js +0 -102
  217. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +0 -168
  218. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildSphereGeometry.js +0 -161
  219. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildTorusGeometry.js +0 -172
  220. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +0 -1721
  221. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/index.js +0 -8
  222. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/index.js +0 -4
  223. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/index.js +0 -2
  224. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/load3DSGeometry.js +0 -103
  225. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +0 -130
  226. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/index.js +0 -18
  227. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/input/Input.js +0 -1475
  228. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/canvas2image.js +0 -218
  229. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/k3d.js +0 -1032
  230. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/AmbientLight.js +0 -175
  231. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/CubeTexture.js +0 -156
  232. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/DirLight.js +0 -314
  233. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Light.js +0 -29
  234. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/LightMap.js +0 -77
  235. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/PointLight.js +0 -395
  236. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/ReflectionMap.js +0 -79
  237. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Shadow.js +0 -138
  238. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/index.js +0 -5
  239. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/Marker.js +0 -382
  240. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/index.js +0 -1
  241. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EdgeMaterial.js +0 -359
  242. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EmphasisMaterial.js +0 -577
  243. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Fresnel.js +0 -222
  244. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LambertMaterial.js +0 -378
  245. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LinesMaterial.js +0 -169
  246. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Material.js +0 -39
  247. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/MetallicMaterial.js +0 -820
  248. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PhongMaterial.js +0 -860
  249. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PointsMaterial.js +0 -320
  250. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/SpecularMaterial.js +0 -807
  251. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Texture.js +0 -522
  252. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/index.js +0 -8
  253. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/Frustum.js +0 -118
  254. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/buildEdgeIndices.js +0 -162
  255. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/geometryCompressionUtils.js +0 -353
  256. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/index.js +0 -1
  257. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/math.js +0 -5302
  258. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/rtcCoords.js +0 -132
  259. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/CameraMemento.js +0 -200
  260. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ModelMemento.js +0 -272
  261. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ObjectsMemento.js +0 -259
  262. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/index.js +0 -3
  263. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/Mesh.js +0 -2165
  264. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawRenderer.js +0 -978
  265. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawShaderSource.js +0 -1566
  266. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesRenderer.js +0 -249
  267. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesShaderSource.js +0 -163
  268. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillRenderer.js +0 -276
  269. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillShaderSource.js +0 -269
  270. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/index.js +0 -1
  271. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionRenderer.js +0 -207
  272. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionShaderSource.js +0 -156
  273. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshRenderer.js +0 -210
  274. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +0 -146
  275. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleRenderer.js +0 -186
  276. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +0 -120
  277. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowRenderer.js +0 -214
  278. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +0 -96
  279. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/metriqs/Metriqs.js +0 -259
  280. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/Node.js +0 -1356
  281. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/index.js +0 -1
  282. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/CubicBezierCurve.js +0 -194
  283. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Curve.js +0 -183
  284. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Path.js +0 -239
  285. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/QuadraticBezierCurve.js +0 -161
  286. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/SplineCurve.js +0 -133
  287. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/index.js +0 -5
  288. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/postfx/SAO.js +0 -547
  289. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/scene/Scene.js +0 -2481
  290. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/SectionPlane.js +0 -194
  291. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/index.js +0 -1
  292. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/Skybox.js +0 -119
  293. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/index.js +0 -1
  294. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/stats.js +0 -45
  295. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Map.js +0 -45
  296. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Queue.js +0 -56
  297. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/index.js +0 -2
  298. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils.js +0 -452
  299. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/viewport/Viewport.js +0 -212
  300. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/ArrayBuf.js +0 -121
  301. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Attribute.js +0 -23
  302. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Drawable.js +0 -270
  303. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/FrameContext.js +0 -259
  304. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/PickResult.js +0 -317
  305. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Pickable.js +0 -69
  306. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Program.js +0 -179
  307. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderBuffer.js +0 -315
  308. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderFlags.js +0 -203
  309. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderState.js +0 -40
  310. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Renderer.js +0 -1300
  311. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Sampler.js +0 -18
  312. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Shader.js +0 -49
  313. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Texture2D.js +0 -217
  314. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +0 -214
  315. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionTester.js +0 -432
  316. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAODepthLimitedBlurRenderer.js +0 -326
  317. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAOOcclusionRenderer.js +0 -375
  318. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/webglEnums.js +0 -61
  319. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webglInfo.js +0 -48
  320. package/src/lib/gltf/gltf.css +0 -392
  321. package/src/lib/gltf/gltf.js +0 -2241
  322. package/webpack.config.js +0 -70
@@ -1,624 +0,0 @@
1
- import {ModelTreeView} from "./ModelTreeView.js";
2
- import {Plugin} from "../../viewer/Plugin.js";
3
-
4
- /**
5
- * @desc A {@link Viewer} plugin that provides an HTML tree view to navigate the IFC elements in models.
6
- * <br>
7
- *
8
- * <a href="https://yjkkit.github.io/yjkkit-sdk/examples/#BIMOffline_XKT_WestRiverSideHospital" style="border: 1px solid black;"><img src="http://yjkkit.io/img/docs/TreeViewPlugin/TreeViewPlugin.png"></a>
9
- *
10
- * [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#BIMOffline_XKT_WestRiverSideHospital)]
11
- *
12
- * ## Overview
13
- *
14
- * * A fast HTML tree view, with zero external dependencies, that works with huge numbers of objects.
15
- * * Each tree node has a checkbox to control the visibility of its object.
16
- * * Has three hierarchy modes: "containment", "types" and "storeys".
17
- * * Automatically contains all models (that have metadata) that are currently in the {@link Scene}.
18
- * * Sorts tree nodes by default - spatially, from top-to-bottom for ````IfcBuildingStorey```` nodes, and alphanumerically for other nodes.
19
- * * Allows custom CSS styling.
20
- * * Use {@link ContextMenu} to create a context menu for the tree nodes.
21
- *
22
- * ## Credits
23
- *
24
- * TreeViewPlugin is based on techniques described in [*Super Fast Tree View in JavaScript*](https://chrissmith.xyz/super-fast-tree-view-in-javascript/) by [Chris Smith](https://twitter.com/chris22smith).
25
- *
26
- * ## Usage
27
- *
28
- * In the example below, we'll add a TreeViewPlugin which, by default, will automatically show the structural
29
- * hierarchy of the IFC elements in each model we load.
30
- *
31
- * Then we'll use an {@link XKTLoaderPlugin} to load the Schependomlaan model from an
32
- * [.xkt file](https://github.com/yjkkit/yjkkit-sdk/tree/master/examples/models/xkt/schependomlaan), along
33
- * with an accompanying JSON [IFC metadata file](https://github.com/yjkkit/yjkkit-sdk/tree/master/examples/metaModels/schependomlaan).
34
- *
35
- * [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#BIMOffline_XKT_Schependomlaan)]
36
- *
37
- * ````javascript
38
- * import {Viewer, XKTLoaderPlugin, TreeViewPlugin} from "yjkkit-sdk.es.js";
39
- *
40
- * const viewer = new Viewer({
41
- * canvasId: "myCanvas",
42
- * transparent: true
43
- * });
44
- *
45
- * viewer.camera.eye = [-2.56, 8.38, 8.27];
46
- * viewer.camera.look = [13.44, 3.31, -14.83];
47
- * viewer.camera.up = [0.10, 0.98, -0.14];
48
- *
49
- * const treeView = new TreeViewPlugin(viewer, {
50
- * containerElement: document.getElementById("myTreeViewContainer")
51
- * });
52
- *
53
- * const xktLoader = new XKTLoaderPlugin(viewer);
54
- *
55
- * const model = xktLoader.load({
56
- * id: "myModel",
57
- * src: "./models/xkt/Schependomlaan.xkt",
58
- * edges: true
59
- * });
60
- * ````
61
- *
62
- * ## Manually Adding Models
63
- *
64
- * Instead of adding models automatically, we can control which models appear in our TreeViewPlugin by adding them manually.
65
- *
66
- * In the next example, we'll configure the TreeViewPlugin to not add models automatically. Then, once the model
67
- * has loaded, we'll add it manually using {@link TreeViewPlugin#addModel}.
68
- *
69
- * ````javascript
70
- * const treeView = new TreeViewPlugin(viewer, {
71
- * containerElement: document.getElementById("myTreeViewContainer"),
72
- * autoAddModels: false // <<---------------- Don't auto-add models
73
- * });
74
- *
75
- * const xktLoader = new XKTLoaderPlugin(viewer);
76
- *
77
- * const model = xktLoader.load({
78
- * id: "myModel",
79
- * src: "./models/xkt/Schependomlaan.xkt",
80
- * edges: true
81
- * });
82
- *
83
- * model.on("loaded", () => {
84
- * treeView.addModel(model.id);
85
- * });
86
- * ````
87
- *
88
- * Adding models manually also allows us to set some options for the model. For example, the ````rootName```` option allows us to provide a custom name for
89
- * the root node, which is sometimes desirable when the model's "IfcProject" element's name is not suitable:
90
- *
91
- * ````javascript
92
- * model.on("loaded", () => {
93
- * treeView.addModel(model.id, {
94
- * rootName: "Schependomlaan Model"
95
- * });
96
- * });
97
- * ````
98
- *
99
- * ## Initially Expanding the Hierarchy
100
- *
101
- * We can also configure TreeViewPlugin to initially expand each model's nodes to a given depth.
102
- *
103
- * Let's automatically expand the first three nodes from the root, for every model added:
104
- *
105
- * ````javascript
106
- * const treeView = new TreeViewPlugin(viewer, {
107
- * containerElement: document.getElementById("myTreeViewContainer"),
108
- * autoExpandDepth: 3
109
- * });
110
- * ````
111
- *
112
- * ## Showing a Node by ID
113
- *
114
- * We can show a given node using its ID. This causes the TreeViewPlugin to collapse, then expand and scroll the node into view, then highlight the node.
115
- *
116
- * See the documentation for the {@link TreeViewPlugin#showNode} method for more information, including how to define a custom highlighted appearance for the node using CSS.
117
- *
118
- * Let's make the TreeViewPlugin show the node corresponding to whatever object {@link Entity} that we pick:
119
- *
120
- * ````javascript
121
- * viewer.cameraControl.on("picked", function (e) {
122
- * var objectId = e.entity.id;
123
- * treeView.showNode(objectId);
124
- * });
125
- * ````
126
- *
127
- * This will de-highlight any node that was previously shown by this method.
128
- *
129
- * Note that this method only works if the picked {@link Entity} is an object that belongs to a model that's represented in the TreeViewPlugin.
130
- *
131
- * ## Customizing Appearance
132
- *
133
- * We can customize the appearance of our TreeViewPlugin by defining custom CSS for its HTML
134
- * elements. See our example's [source code](https://github.com/yjkkit/yjkkit-sdk/blob/master/examples/BIMOffline_XKT_Schependomlaan.html)
135
- * for an example of custom CSS rules.
136
- *
137
- * ## Model Hierarchies
138
- *
139
- * TreeViewPlugin has three hierarchies for organizing its nodes:
140
- *
141
- * * "containment" - organizes the tree nodes to indicate the containment hierarchy of the {@link MetaObject}s.
142
- * * "types" - groups nodes by their IFC types.
143
- * * "storeys" - groups nodes within their ````IfcBuildingStoreys````, and sub-groups them by their IFC types.
144
- *
145
- * <br>
146
- * The table below shows what the hierarchies look like:
147
- * <br>
148
- *
149
- * | 1. Containment Hierarchy | 2. Types Hierarchy | 3. Storeys Hierarchy |
150
- * |---|---|---|
151
- * | <img src="http://yjkkit.io/img/docs/TreeViewPlugin/structureMode.png"> | <img src="http://yjkkit.io/img/docs/TreeViewPlugin/typesMode.png"> | <img src="http://yjkkit.io/img/docs/TreeViewPlugin/storeysMode.png"> |
152
- * <br>
153
- *
154
- * Let's create a TreeViewPlugin that groups nodes by their building stories and IFC types:
155
- *
156
- * ````javascript
157
- * const treeView = new TreeViewPlugin(viewer, {
158
- * containerElement: document.getElementById("myTreeViewContainer"),
159
- * hierarchy: "stories"
160
- * });
161
- * ````
162
- *
163
- * ## Sorting Nodes
164
- *
165
- * TreeViewPlugin sorts its tree nodes by default. For a "storeys" hierarchy, it orders ````IfcBuildingStorey```` nodes
166
- * spatially, with the node for the highest story at the top, down to the lowest at the bottom.
167
- *
168
- * For all the hierarchy types ("containment", "classes" and "storeys"), TreeViewPlugin sorts the other node types
169
- * alphanumerically on their titles.
170
- *
171
- * If for some reason you need to prevent sorting, create your TreeViewPlugin with the option disabled, like so:
172
- *
173
- * ````javascript
174
- * const treeView = new TreeViewPlugin(viewer, {
175
- * containerElement: document.getElementById("myTreeViewContainer"),
176
- * hierarchy: "stories",
177
- * sortNodes: false // <<------ Disable node sorting
178
- * });
179
- * ````
180
- *
181
- * Note that, for all hierarchy modes, node sorting is only done for each model at the time that it is added to the TreeViewPlugin, and will not
182
- * update dynamically if we later transform the {@link Entity}s corresponding to the nodes.
183
- *
184
- * ## Pruning empty nodes
185
- *
186
- * Sometimes a model contains subtrees of objects that don't have any geometry. These are models whose
187
- * {@link MetaModel} contains trees of {@link MetaObject}s that don't have any {@link Entity}s in the {@link Scene}.
188
- *
189
- * For these models, the tree view would contain nodes that don't do anything in the Scene when we interact with them,
190
- * which is undesirable.
191
- *
192
- * By default, TreeViewPlugin will not create nodes for those objects. However, we can override that behaviour if we want
193
- * to have nodes for those objects (perhaps for debugging the model):
194
- *
195
- * ````javascript
196
- * const treeView = new TreeViewPlugin(viewer, {
197
- * containerElement: document.getElementById("myTreeViewContainer"),
198
- * hierarchy: "stories",
199
- * pruneEmptyNodes: false // <<------ Create nodes for object subtrees without geometry
200
- * });
201
- * ````
202
- *
203
- * ## Context Menu
204
- *
205
- * TreeViewPlugin fires a "contextmenu" event whenever we right-click on a tree node.
206
- *
207
- * The event contains:
208
- *
209
- * * ````event```` - the original [contextmenu](https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event) [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
210
- * * ````viewer```` - the {@link Viewer}
211
- * * ````treeViewPlugin```` - the TreeViewPlugin
212
- * * ````treeViewNode```` - the {@link TreeViewNode} representing the tree node
213
- *<br><br>
214
- *
215
- * Let's use {@link ContextMenu} to show a simple context menu for the node we clicked.
216
- *
217
- * [[Run an example](https://yjkkit.github.io/yjkkit-sdk/examples/#ContextMenu_Canvas_TreeViewPlugin_Custom)]
218
- *
219
- * ````javascript
220
- * import {ContextMenu} from "../src/extras/ContextMenu/ContextMenu.js";
221
- *
222
- * const treeViewContextMenu = new ContextMenu({
223
- * items: [
224
- * [
225
- * [
226
- * {
227
- * title: "Hide",
228
- * doAction: function (context) {
229
- * context.treeViewPlugin.withNodeTree(context.treeViewNode, (treeViewNode) => {
230
- * if (treeViewNode.objectId) {
231
- * const entity = context.viewer.scene.objects[treeViewNode.objectId];
232
- * if (entity) {
233
- * entity.visible = false;
234
- * }
235
- * }
236
- * });
237
- * }
238
- * },
239
- * {
240
- * title: "Hide all",
241
- * doAction: function (context) {
242
- * context.viewer.scene.setObjectsVisible(context.viewer.scene.visibleObjectIds, false);
243
- * }
244
- * }
245
- * ],
246
- * [
247
- * {
248
- * title: "Show",
249
- * doAction: function (context) {
250
- * context.treeViewPlugin.withNodeTree(context.treeViewNode, (treeViewNode) => {
251
- * if (treeViewNode.objectId) {
252
- * const entity = context.viewer.scene.objects[treeViewNode.objectId];
253
- * if (entity) {
254
- * entity.visible = true;
255
- * entity.xrayed = false;
256
- * entity.selected = false;
257
- * }
258
- * }
259
- * });
260
- * }
261
- * },
262
- * {
263
- * title: "Show all",
264
- * doAction: function (context) {
265
- * const scene = context.viewer.scene;
266
- * scene.setObjectsVisible(scene.objectIds, true);
267
- * scene.setObjectsXRayed(scene.xrayedObjectIds, false);
268
- * scene.setObjectsSelected(scene.selectedObjectIds, false);
269
- * }
270
- * }
271
- * ]
272
- * ]
273
- * ]
274
- * });
275
- *
276
- * treeView.on("contextmenu", (e) => {
277
- *
278
- * const event = e.event; // MouseEvent
279
- * const viewer = e.viewer; // Viewer
280
- * const treeViewPlugin = e.treeViewPlugin; // TreeViewPlugin
281
- * const treeViewNode = e.treeViewNode; // TreeViewNode
282
- *
283
- * treeViewContextMenu.show(e.event.pageX, e.event.pageY);
284
- *
285
- * treeViewContextMenu.context = {
286
- * viewer: e.viewer,
287
- * treeViewPlugin: e.treeViewPlugin,
288
- * treeViewNode: e.treeViewNode
289
- * };
290
- * });
291
- * ````
292
- *
293
- * ## Clicking Node Titles
294
- *
295
- * TreeViewPlugin fires a "nodeTitleClicked" event whenever we left-click on a tree node.
296
- *
297
- * Like the "contextmenu" event, this event contains:
298
- *
299
- * * ````event```` - the original [click](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
300
- * * ````viewer```` - the {@link Viewer}
301
- * * ````treeViewPlugin```` - the TreeViewPlugin
302
- * * ````treeViewNode```` - the {@link TreeViewNode} representing the tree node
303
- *<br><br>
304
- *
305
- * Let's register a callback to isolate and fit-to-view the {@link Entity}(s) represented by the node. This callback is
306
- * going to X-ray all the other Entitys, fly the camera to fit the Entity(s) for the clicked node, then hide the other Entitys.
307
- *
308
- * [[Run an example](https://yjkkit.github.io/yjkkit-sdk/examples/#ContextMenu_Canvas_TreeViewPlugin_Custom)]
309
- *
310
- * ````javascript
311
- * treeView.on("nodeTitleClicked", (e) => {
312
- * const scene = viewer.scene;
313
- * const objectIds = [];
314
- * e.treeViewPlugin.withNodeTree(e.treeViewNode, (treeViewNode) => {
315
- * if (treeViewNode.objectId) {
316
- * objectIds.push(treeViewNode.objectId);
317
- * }
318
- * });
319
- * scene.setObjectsXRayed(scene.objectIds, true);
320
- * scene.setObjectsVisible(scene.objectIds, true);
321
- * scene.setObjectsXRayed(objectIds, false);
322
- * viewer.cameraFlight.flyTo({
323
- * aabb: scene.getAABB(objectIds),
324
- * duration: 0.5
325
- * }, () => {
326
- * setTimeout(function () {
327
- * scene.setObjectsVisible(scene.xrayedObjectIds, false);
328
- * scene.setObjectsXRayed(scene.xrayedObjectIds, false);
329
- * }, 500);
330
- * });
331
- * });
332
- * ````
333
- *
334
- * To make the cursor change to a pointer when we hover over the node titles, and also to make the titles change to blue, we'll also define this CSS for the ````<span>```` elements
335
- * that represent the titles of our TreeViewPlugin nodes:
336
- *
337
- * ````css
338
- * #treeViewContainer ul li span:hover {
339
- * color: blue;
340
- * cursor: pointer;
341
- * }
342
- * ````
343
- *
344
- * @class TreeViewPlugin
345
- */
346
- class TreeViewPlugin extends Plugin {
347
-
348
- /**
349
- * @constructor
350
- *
351
- * @param {Viewer} viewer The Viewer.
352
- * @param {*} cfg Plugin configuration.
353
- * @param {HTMLElement} cfg.containerElement DOM element to contain the TreeViewPlugin.
354
- * @param {Boolean} [cfg.autoAddModels=true] When ````true```` (default), will automatically add each model as it's created. Set this ````false```` if you want to manually add models using {@link TreeViewPlugin#addModel} instead.
355
- * @param {Number} [cfg.autoExpandDepth] Optional depth to which to initially expand the tree.
356
- * @param {String} [cfg.hierarchy="containment"] How to organize the tree nodes: "containment", "storeys" or "types". See the class documentation for details.
357
- * @param {Boolean} [cfg.sortNodes=true] When true, will sort the children of each node. For a "storeys" hierarchy, the
358
- * ````IfcBuildingStorey```` nodes will be ordered spatially, from the highest storey down to the lowest, on the
359
- * vertical World axis. For all hierarchy types, other node types will be ordered in the ascending alphanumeric order of their titles.
360
- * @param {Boolean} [cfg.pruneEmptyNodes=true] When true, will not contain nodes that don't have content in the {@link Scene}. These are nodes whose {@link MetaObject}s don't have {@link Entity}s.
361
- */
362
- constructor(viewer, cfg = {}) {
363
-
364
- super("TreeViewPlugin", viewer);
365
-
366
- if (!cfg.containerElement) {
367
- this.error("Config expected: containerElement");
368
- return;
369
- }
370
-
371
- this._containerElement = cfg.containerElement;
372
- this._modelTreeViews = {};
373
- this._autoAddModels = (cfg.autoAddModels !== false);
374
- this._autoExpandDepth = (cfg.autoExpandDepth || 0);
375
- this._sortNodes = (cfg.sortNodes !== false);
376
- this._pruneEmptyNodes = (cfg.pruneEmptyNodes !== false);
377
-
378
- if (this._autoAddModels) {
379
- const modelIds = Object.keys(this.viewer.metaScene.metaModels);
380
- for (let i = 0, len = modelIds.length; i < len; i++) {
381
- const modelId = modelIds[i];
382
- this.addModel(modelId);
383
- }
384
- this.viewer.scene.on("modelLoaded", (modelId) => {
385
- if (this.viewer.metaScene.metaModels[modelId]) {
386
- this.addModel(modelId);
387
- }
388
- });
389
- }
390
-
391
- this.hierarchy = cfg.hierarchy;
392
- }
393
-
394
- /**
395
- * Returns the map of {@link ModelTreeView}s.
396
- *
397
- * Each ModelTreeView is mapped to the ID of its model.
398
- *
399
- * @return {*|{}}
400
- */
401
- get modelTreeViews() {
402
- return this._modelTreeViews;
403
- }
404
-
405
- /**
406
- * Sets how the nodes are organized within this tree view.
407
- *
408
- * Accepted values are:
409
- *
410
- * * "containment" - organizes the nodes to indicate the containment hierarchy of the IFC objects.
411
- * * "types" - groups the nodes within their IFC types.
412
- * * "storeys" - groups the nodes within ````IfcBuildingStoreys```` and sub-groups them by their IFC types.
413
- *
414
- * <br>
415
- * This can be updated dynamically.
416
- *
417
- * Default value is "containment".
418
- *
419
- * @type {String}
420
- */
421
- set hierarchy(hierarchy) {
422
- hierarchy = hierarchy || "containment";
423
- if (hierarchy !== "containment" && hierarchy !== "storeys" && hierarchy !== "types") {
424
- this.error("Unsupported value for `hierarchy' - defaulting to 'containment'");
425
- hierarchy = "containment";
426
- }
427
- this._hierarchy = hierarchy;
428
- for (let modelId in this._modelTreeViews) {
429
- if (this._modelTreeViews.hasOwnProperty(modelId)) {
430
- this._modelTreeViews[modelId].setHierarchy(this._hierarchy);
431
- }
432
- }
433
- }
434
-
435
- /**
436
- * Gets how the nodes are organized within this tree view.
437
- *
438
- * @type {String}
439
- */
440
- get hierarchy() {
441
- return this._hierarchy;
442
- }
443
-
444
- /**
445
- * Adds a model to this tree view.
446
- *
447
- * The model will be automatically removed when destroyed.
448
- *
449
- * To automatically add each model as it's created, instead of manually calling this method each time,
450
- * provide a ````autoAddModels: true```` to the TreeViewPlugin constructor.
451
- *
452
- * @param {String} modelId ID of a model {@link Entity} in {@link Scene#models}.
453
- * @param {Object} [options] Options for model in the tree view.
454
- * @param {String} [options.rootName] Optional display name for the root node. Ordinary, for "containment"
455
- * and "storeys" hierarchy types, the tree would derive the root node name from the model's "IfcProject" element
456
- * name. This option allows to override that name when it is not suitable as a display name.
457
- * @returns {ModelTreeView} ModelTreeView for the newly-added model. If this method succeeded in adding the model,
458
- * then {@link ModelTreeView#valid} will equal ````true````. Otherwise, that property will be ````false````
459
- * and {@link ModelTreeView#errors} will contain error messages.
460
- */
461
- addModel(modelId, options = {}) {
462
- if (!this._containerElement) {
463
- return;
464
- }
465
- const model = this.viewer.scene.models[modelId];
466
- if (!model) {
467
- throw "Model not found: " + modelId;
468
- }
469
- const metaModel = this.viewer.metaScene.metaModels[modelId];
470
- if (!metaModel) {
471
- this.error("MetaModel not found: " + modelId);
472
- return;
473
- }
474
- if (this._modelTreeViews[modelId]) {
475
- this.warn("Model already added: " + modelId);
476
- return;
477
- }
478
- const modelTreeView = new ModelTreeView(this.viewer, this, model, metaModel, {
479
- containerElement: this._containerElement,
480
- autoExpandDepth: this._autoExpandDepth,
481
- hierarchy: this._hierarchy,
482
- sortNodes: this._sortNodes,
483
- pruneEmptyNodes: this._pruneEmptyNodes,
484
- rootName: options.rootName
485
- });
486
- this._modelTreeViews[modelId] = modelTreeView;
487
- model.on("destroyed", () => {
488
- this.removeModel(model.id);
489
- });
490
- return modelTreeView;
491
- }
492
-
493
- /**
494
- * Removes a model from this tree view.
495
- *
496
- * @param {String} modelId ID of a model {@link Entity} in {@link Scene#models}.
497
- */
498
- removeModel(modelId) {
499
- if (!this._containerElement) {
500
- return;
501
- }
502
- const modelTreeView = this._modelTreeViews[modelId];
503
- if (!modelTreeView) {
504
- this.warn("Model not added: " + modelId);
505
- return;
506
- }
507
- modelTreeView.destroy();
508
- delete this._modelTreeViews[modelId];
509
- }
510
-
511
- /**
512
- * Collapses all trees within this tree view.
513
- */
514
- collapse() {
515
- for (let modelId in this._modelTreeViews) {
516
- if (this._modelTreeViews.hasOwnProperty(modelId)) {
517
- const modelTreeView = this._modelTreeViews[modelId];
518
- modelTreeView.collapse();
519
- }
520
- }
521
- }
522
-
523
- /**
524
- * Highlights the tree view node that represents the given object {@link Entity}.
525
- *
526
- * This causes the tree view to collapse, then expand to reveal the node, then highlight the node.
527
- *
528
- * If a node is previously highlighted, de-highlights that node and collapses the tree first.
529
- *
530
- * Note that if the TreeViewPlugin was configured with ````pruneEmptyNodes: true```` (default configuration), then the
531
- * node won't exist in the tree if it has no Entitys in the {@link Scene}. in that case, nothing will happen.
532
- *
533
- * Within the DOM, the node is represented by an ````<li>```` element. This method will add a ````.highlighted-node```` class to
534
- * the element to make it appear highlighted, removing that class when de-highlighting it again. See the CSS rules
535
- * in the TreeViewPlugin examples for an example of that class.
536
- *
537
- * @param {String} objectId ID of the {@link Entity}.
538
- */
539
- showNode(objectId) {
540
- this.unShowNode();
541
- const metaObject = this.viewer.metaScene.metaObjects[objectId];
542
- if (!metaObject) {
543
- this.error("MetaObject not found: " + objectId);
544
- return;
545
- }
546
- const metaModel = metaObject.metaModel;
547
- const modelId = metaModel.id;
548
- const modelTreeView = this._modelTreeViews[modelId];
549
- if (!modelTreeView) {
550
- this.error("Object not in this TreeView: " + objectId);
551
- return;
552
- }
553
- modelTreeView.showNode(objectId);
554
- }
555
-
556
- /**
557
- * De-highlights the node previously shown with {@link TreeViewPlugin#showNode}.
558
- *
559
- * Does nothing if no node is currently shown.
560
- *
561
- * If the node is currently scrolled into view, keeps the node in view.
562
- */
563
- unShowNode() {
564
- for (let modelId in this._modelTreeViews) {
565
- if (this._modelTreeViews.hasOwnProperty(modelId)) {
566
- const modelTreeView = this._modelTreeViews[modelId];
567
- modelTreeView.unShowNode();
568
- }
569
- }
570
- }
571
-
572
- /**
573
- * Expands the tree to the given depth.
574
- *
575
- * Collapses the tree first.
576
- *
577
- * @param {Number} depth Depth to expand to.
578
- */
579
- expandToDepth(depth) {
580
- for (let modelId in this._modelTreeViews) {
581
- if (this._modelTreeViews.hasOwnProperty(modelId)) {
582
- const modelTreeView = this._modelTreeViews[modelId];
583
- modelTreeView.collapse();
584
- modelTreeView.expandToDepth(depth);
585
- }
586
- }
587
- }
588
-
589
- /**
590
- * Iterates over a subtree of the tree view's {@link TreeViewNode}s, calling the given callback for each
591
- * node in depth-first pre-order.
592
- *
593
- * @param {TreeViewNode} node Root of the subtree.
594
- * @param {Function} callback Callback called at each {@link TreeViewNode}, with the TreeViewNode given as the argument.
595
- */
596
- withNodeTree(node, callback) {
597
- callback(node);
598
- const children = node.children;
599
- if (!children) {
600
- return;
601
- }
602
- for (let i = 0, len = children.length; i < len; i++) {
603
- this.withNodeTree(children[i], callback);
604
- }
605
- }
606
-
607
- /**
608
- * Destroys this TreeViewPlugin.
609
- */
610
- destroy() {
611
- if (!this._containerElement) {
612
- return;
613
- }
614
- for (let modelId in this._modelTreeViews) {
615
- if (this._modelTreeViews.hasOwnProperty(modelId)) {
616
- this._modelTreeViews[modelId].destroy();
617
- }
618
- }
619
- this._modelTreeViews = {};
620
- super.destroy();
621
- }
622
- }
623
-
624
- export {TreeViewPlugin};
@@ -1 +0,0 @@
1
- export * from "./TreeViewPlugin.js";