csyjk 1.1.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. package/.babelrc +7 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/xx.iml +12 -0
  4. package/dist/app.js +43 -0
  5. package/{index.html → dist/index.html} +0 -0
  6. package/{style.css → dist/style.css} +1 -1
  7. package/package.json +40 -5
  8. package/public/gltf.js +2241 -0
  9. package/public/index.html +10 -0
  10. package/src/index.js +3 -0
  11. package/src/lib/gltf/assets/check.jpg +0 -0
  12. package/src/lib/gltf/assets/iconfont/iconfont.css +358 -0
  13. package/src/lib/gltf/assets/iconfont/iconfont.eot +0 -0
  14. package/src/lib/gltf/assets/iconfont/iconfont.js +1 -0
  15. package/src/lib/gltf/assets/iconfont/iconfont.json +604 -0
  16. package/src/lib/gltf/assets/iconfont/iconfont.svg +189 -0
  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 +15 -0
  22. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/ContextMenu.js +863 -0
  23. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/ContextMenu/index.js +1 -0
  24. package/src/lib/gltf/assets/yjkkit-sdk/src/extras/index.js +1 -0
  25. package/src/lib/gltf/assets/yjkkit-sdk/src/index.js +3 -0
  26. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +462 -0
  27. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.js +279 -0
  28. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +262 -0
  29. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AngleMeasurementsPlugin/index.js +1 -0
  30. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/Annotation.js +362 -0
  31. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +575 -0
  32. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AnnotationsPlugin/index.js +1 -0
  33. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +333 -0
  34. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/AxisGizmoPlugin/index.js +1 -0
  35. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +777 -0
  36. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/BCFViewpointsPlugin/index.js +1 -0
  37. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +525 -0
  38. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.js +242 -0
  39. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +297 -0
  40. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/DistanceMeasurementsPlugin/index.js +1 -0
  41. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/FastNavPlugin.js +345 -0
  42. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/FastNavPlugin/index.js +1 -0
  43. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +122 -0
  44. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +462 -0
  45. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFPerformanceModelLoader.js +508 -0
  46. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/GLTFSceneGraphLoader.js +922 -0
  47. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/GLTFLoaderPlugin/index.js +2 -0
  48. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/CubeTextureCanvas.js +273 -0
  49. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/NavCubePlugin.js +687 -0
  50. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/NavCubePlugin/index.js +1 -0
  51. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +145 -0
  52. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/OBJSceneGraphLoader.js +777 -0
  53. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/OBJLoaderPlugin/index.js +1 -0
  54. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLDefaultDataSource.js +33 -0
  55. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +273 -0
  56. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/STLSceneGraphLoader.js +313 -0
  57. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/STLLoaderPlugin/index.js +2 -0
  58. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Control.js +1328 -0
  59. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Overview.js +249 -0
  60. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/Plane.js +169 -0
  61. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +403 -0
  62. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SectionPlanesPlugin/index.js +1 -0
  63. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +134 -0
  64. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/SkyboxesPlugin/index.js +1 -0
  65. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/IFCStoreyPlanObjectStates.js +77 -0
  66. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/Storey.js +61 -0
  67. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyMap.js +57 -0
  68. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +822 -0
  69. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/StoreyViewsPlugin/index.js +1 -0
  70. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/ModelTreeView.js +888 -0
  71. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewNode.js +88 -0
  72. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/TreeViewPlugin.js +624 -0
  73. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/index.js +1 -0
  74. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/TreeViewPlugin/modelValidation.js +87 -0
  75. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js +295 -0
  76. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/ViewCullPlugin/index.js +1 -0
  77. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTDefaultDataSource.js +78 -0
  78. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +847 -0
  79. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/index.js +2 -0
  80. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +167 -0
  81. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +228 -0
  82. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +220 -0
  83. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +279 -0
  84. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +244 -0
  85. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +301 -0
  86. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +426 -0
  87. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +479 -0
  88. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XKTLoaderPlugin/parsers/lib/pako.js +6818 -0
  89. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +238 -0
  90. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/XML3DSceneGraphLoader.js +1279 -0
  91. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/index.js +1 -0
  92. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/.jshintrc +11 -0
  93. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/deflate.js +2060 -0
  94. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/inflate.js +2155 -0
  95. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/mime-types.js +1002 -0
  96. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/pako/codecs.js +64 -0
  97. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/z-worker.js +153 -0
  98. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-ext.js +267 -0
  99. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip-fs.js +553 -0
  100. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zip.js +991 -0
  101. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/XML3DLoaderPlugin/zipjs/zlib-asm/codecs.js +49 -0
  102. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/index.js +17 -0
  103. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/culling/ObjectCullStates.js +205 -0
  104. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Dot.js +78 -0
  105. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Label.js +97 -0
  106. package/src/lib/gltf/assets/yjkkit-sdk/src/plugins/lib/html/Wire.js +95 -0
  107. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Plugin.js +112 -0
  108. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/Viewer.js +372 -0
  109. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/index.js +3 -0
  110. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaultColors.js +162 -0
  111. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/IFCObjectDefaults.js +39 -0
  112. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaModel.js +145 -0
  113. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaObject.js +215 -0
  114. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/metadata/MetaScene.js +311 -0
  115. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/CameraControl.js +1669 -0
  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 +312 -0
  118. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PanController.js +112 -0
  119. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PickController.js +193 -0
  120. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +289 -0
  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 +122 -0
  123. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +186 -0
  124. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MouseMiscHandler.js +68 -0
  125. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +439 -0
  126. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/MousePickHandler.js +361 -0
  127. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +258 -0
  128. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/TouchPickHandler.js +197 -0
  129. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/CameraControl/lib/handlers/mouspan.js +498 -0
  130. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Component.js +908 -0
  131. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/Entity.js +475 -0
  132. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/ImagePlane.js +570 -0
  133. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/ImagePlane/index.js +1 -0
  134. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/PerformanceModel.js +2623 -0
  135. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/index.js +1 -0
  136. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ENTITY_FLAGS.js +21 -0
  137. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceMesh.js +262 -0
  138. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/PerformanceNode.js +697 -0
  139. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js +34 -0
  140. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/ScratchMemory.js +63 -0
  141. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/compression.js +183 -0
  142. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingBuffer.js +33 -0
  143. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingLayer.js +736 -0
  144. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/LinesBatchingRenderers.js +68 -0
  145. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingColorRenderer.js +295 -0
  146. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesBatching/renderers/LinesBatchingSilhouetteRenderer.js +327 -0
  147. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingLayer.js +698 -0
  148. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/LinesInstancingRenderers.js +68 -0
  149. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingColorRenderer.js +364 -0
  150. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/linesInstancing/renderers/LinesInstancingSilhouetteRenderer.js +356 -0
  151. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingBuffer.js +33 -0
  152. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingLayer.js +776 -0
  153. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/PointsBatchingRenderers.js +113 -0
  154. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingColorRenderer.js +340 -0
  155. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingOcclusionRenderer.js +312 -0
  156. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickDepthRenderer.js +343 -0
  157. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingPickMeshRenderer.js +331 -0
  158. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingShadowRenderer.js +242 -0
  159. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsBatching/renderers/PointsBatchingSilhouetteRenderer.js +348 -0
  160. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingLayer.js +737 -0
  161. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/PointsInstancingRenderers.js +143 -0
  162. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingColorRenderer.js +373 -0
  163. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingDepthRenderer.js +366 -0
  164. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingOcclusionRenderer.js +370 -0
  165. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickDepthRenderer.js +386 -0
  166. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingPickMeshRenderer.js +376 -0
  167. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingShadowRenderer.js +293 -0
  168. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/pointsInstancing/renderers/PointsInstancingSilhouetteRenderer.js +382 -0
  169. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingBuffer.js +37 -0
  170. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingLayer.js +1017 -0
  171. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/TrianglesBatchingRenderers.js +246 -0
  172. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorQualityRenderer.js +809 -0
  173. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingColorRenderer.js +504 -0
  174. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingDepthRenderer.js +297 -0
  175. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesColorRenderer.js +300 -0
  176. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingEdgesRenderer.js +322 -0
  177. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingNormalsRenderer.js +311 -0
  178. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingOcclusionRenderer.js +291 -0
  179. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickDepthRenderer.js +319 -0
  180. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickMeshRenderer.js +305 -0
  181. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingPickNormalsRenderer.js +300 -0
  182. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingShadowRenderer.js +242 -0
  183. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesBatching/renderers/TrianglesBatchingSilhouetteRenderer.js +323 -0
  184. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingLayer.js +969 -0
  185. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/TrianglesInstancingRenderers.js +246 -0
  186. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorQualityRenderer.js +859 -0
  187. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingColorRenderer.js +557 -0
  188. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingDepthRenderer.js +341 -0
  189. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesColorRenderer.js +338 -0
  190. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingEdgesRenderer.js +356 -0
  191. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingNormalsRenderer.js +354 -0
  192. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingOcclusionRenderer.js +329 -0
  193. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickDepthRenderer.js +358 -0
  194. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickMeshRenderer.js +349 -0
  195. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingPickNormalsRenderer.js +363 -0
  196. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingShadowRenderer.js +284 -0
  197. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/PerformanceModel/lib/layers/trianglesInstancing/renderers/TrianglesInstancingSilhouetteRenderer.js +354 -0
  198. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Camera.js +880 -0
  199. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraFlightAnimation.js +669 -0
  200. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPath.js +194 -0
  201. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CameraPathAnimation.js +326 -0
  202. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/CustomProjection.js +149 -0
  203. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Frustum.js +316 -0
  204. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Ortho.js +286 -0
  205. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/Perspective.js +302 -0
  206. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/camera/index.js +2 -0
  207. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Canvas.js +464 -0
  208. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/canvas/Spinner.js +323 -0
  209. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/core.js +234 -0
  210. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/Geometry.js +33 -0
  211. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/ReadableGeometry.js +689 -0
  212. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/VBOGeometry.js +327 -0
  213. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxGeometry.js +238 -0
  214. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +106 -0
  215. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +271 -0
  216. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildGridGeometry.js +102 -0
  217. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +168 -0
  218. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildSphereGeometry.js +161 -0
  219. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildTorusGeometry.js +172 -0
  220. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +1721 -0
  221. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/builders/index.js +8 -0
  222. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/index.js +4 -0
  223. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/index.js +2 -0
  224. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/load3DSGeometry.js +103 -0
  225. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +130 -0
  226. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/index.js +18 -0
  227. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/input/Input.js +1475 -0
  228. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/canvas2image.js +218 -0
  229. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/libs/k3d.js +1032 -0
  230. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/AmbientLight.js +175 -0
  231. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/CubeTexture.js +156 -0
  232. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/DirLight.js +314 -0
  233. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Light.js +29 -0
  234. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/LightMap.js +77 -0
  235. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/PointLight.js +395 -0
  236. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/ReflectionMap.js +79 -0
  237. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/Shadow.js +138 -0
  238. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/lights/index.js +5 -0
  239. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/Marker.js +382 -0
  240. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/marker/index.js +1 -0
  241. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EdgeMaterial.js +359 -0
  242. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/EmphasisMaterial.js +577 -0
  243. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Fresnel.js +222 -0
  244. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LambertMaterial.js +378 -0
  245. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/LinesMaterial.js +169 -0
  246. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Material.js +39 -0
  247. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/MetallicMaterial.js +820 -0
  248. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PhongMaterial.js +860 -0
  249. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/PointsMaterial.js +320 -0
  250. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/SpecularMaterial.js +807 -0
  251. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/Texture.js +522 -0
  252. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/materials/index.js +8 -0
  253. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/Frustum.js +118 -0
  254. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/buildEdgeIndices.js +162 -0
  255. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/geometryCompressionUtils.js +353 -0
  256. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/index.js +1 -0
  257. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/math.js +5302 -0
  258. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/math/rtcCoords.js +132 -0
  259. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/CameraMemento.js +200 -0
  260. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ModelMemento.js +272 -0
  261. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/ObjectsMemento.js +259 -0
  262. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mementos/index.js +3 -0
  263. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/Mesh.js +2165 -0
  264. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawRenderer.js +978 -0
  265. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/draw/DrawShaderSource.js +1566 -0
  266. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesRenderer.js +249 -0
  267. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisEdgesShaderSource.js +163 -0
  268. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillRenderer.js +276 -0
  269. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/emphasis/EmphasisFillShaderSource.js +269 -0
  270. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/index.js +1 -0
  271. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionRenderer.js +207 -0
  272. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/occlusion/OcclusionShaderSource.js +156 -0
  273. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshRenderer.js +210 -0
  274. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickMeshShaderSource.js +146 -0
  275. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleRenderer.js +186 -0
  276. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/pick/PickTriangleShaderSource.js +120 -0
  277. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowRenderer.js +214 -0
  278. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/mesh/shadow/ShadowShaderSource.js +96 -0
  279. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/metriqs/Metriqs.js +259 -0
  280. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/Node.js +1356 -0
  281. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/nodes/index.js +1 -0
  282. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/CubicBezierCurve.js +194 -0
  283. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Curve.js +183 -0
  284. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/Path.js +239 -0
  285. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/QuadraticBezierCurve.js +161 -0
  286. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/SplineCurve.js +133 -0
  287. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/paths/index.js +5 -0
  288. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/postfx/SAO.js +547 -0
  289. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/scene/Scene.js +2481 -0
  290. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/SectionPlane.js +194 -0
  291. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/sectionPlane/index.js +1 -0
  292. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/Skybox.js +119 -0
  293. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/skybox/index.js +1 -0
  294. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/stats.js +45 -0
  295. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Map.js +45 -0
  296. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/Queue.js +56 -0
  297. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils/index.js +2 -0
  298. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/utils.js +452 -0
  299. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/viewport/Viewport.js +212 -0
  300. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/ArrayBuf.js +121 -0
  301. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Attribute.js +23 -0
  302. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Drawable.js +270 -0
  303. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/FrameContext.js +259 -0
  304. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/PickResult.js +317 -0
  305. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Pickable.js +69 -0
  306. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Program.js +179 -0
  307. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderBuffer.js +315 -0
  308. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderFlags.js +203 -0
  309. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/RenderState.js +40 -0
  310. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Renderer.js +1300 -0
  311. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Sampler.js +18 -0
  312. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Shader.js +49 -0
  313. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/Texture2D.js +217 -0
  314. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +214 -0
  315. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/occlusion/OcclusionTester.js +432 -0
  316. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAODepthLimitedBlurRenderer.js +326 -0
  317. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/sao/SAOOcclusionRenderer.js +375 -0
  318. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webgl/webglEnums.js +61 -0
  319. package/src/lib/gltf/assets/yjkkit-sdk/src/viewer/scene/webglInfo.js +48 -0
  320. package/src/lib/gltf/gltf.css +392 -0
  321. package/src/lib/gltf/gltf.js +2241 -0
  322. package/webpack.config.js +70 -0
  323. package/app.js +0 -43
@@ -0,0 +1,403 @@
1
+ import {math} from "../../viewer/scene/math/math.js";
2
+ import {Plugin} from "../../viewer/Plugin.js";
3
+ import {SectionPlane} from "../../viewer/scene/sectionPlane/SectionPlane.js";
4
+ import {Control} from "./Control.js";
5
+ import {Overview} from "./Overview.js";
6
+
7
+ const tempAABB = math.AABB3();
8
+ const tempVec3 = math.vec3();
9
+
10
+ /**
11
+ * SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
12
+ *
13
+ * [<img src="https://user-images.githubusercontent.com/83100/57724962-406e9a00-768c-11e9-9f1f-3d178a3ec11f.gif">](https://yjkkit.github.io/yjkkit-sdk/examples/#gizmos_SectionPlanesPlugin)
14
+ *
15
+ * [[Run this example](https://yjkkit.github.io/yjkkit-sdk/examples/#gizmos_SectionPlanesPlugin)]
16
+ *
17
+ * ## Overview
18
+ *
19
+ * * Use the SectionPlanesPlugin to
20
+ * create and edit {@link SectionPlane}s to slice portions off your models and reveal internal structures.
21
+ * * As shown in the screen capture above, SectionPlanesPlugin shows an overview of all your SectionPlanes (on the right, in
22
+ * this example).
23
+ * * Click a plane in the overview to activate a 3D control with which you can interactively
24
+ * reposition its SectionPlane in the main canvas.
25
+ *
26
+ * ## Usage
27
+ *
28
+ * In the example below, we'll use a {@link GLTFLoaderPlugin} to load a model, and a SectionPlanesPlugin
29
+ * to slice it open with two {@link SectionPlane}s. We'll show the overview in the bottom right of the Viewer
30
+ * canvas. Finally, we'll programmatically activate the 3D editing control, so that we can use it to interactively
31
+ * reposition our second SectionPlane.
32
+ *
33
+ * ````JavaScript
34
+ * import {Viewer, GLTFLoaderPlugin, SectionPlanesPlugin} from "yjkkit-sdk.es.js";
35
+ *
36
+ * // Create a Viewer and arrange its Camera
37
+ *
38
+ * const viewer = new Viewer({
39
+ * canvasId: "myCanvas"
40
+ * });
41
+ *
42
+ * viewer.camera.eye = [-5.02, 2.22, 15.09];
43
+ * viewer.camera.look = [4.97, 2.79, 9.89];
44
+ * viewer.camera.up = [-0.05, 0.99, 0.02];
45
+ *
46
+ *
47
+ * // Add a GLTFLoaderPlugin
48
+ *
49
+ * const gltfLoader = new GLTFLoaderPlugin(viewer);
50
+ *
51
+ * // Add a SectionPlanesPlugin, with overview visible
52
+ *
53
+ * const sectionPlanes = new SectionPlanesPlugin(viewer, {
54
+ * overviewCanvasID: "myOverviewCanvas",
55
+ * overviewVisible: true
56
+ * });
57
+ *
58
+ * // Load a model
59
+ *
60
+ * const model = gltfLoader.load({
61
+ * id: "myModel",
62
+ * src: "./models/gltf/schependomlaan/scene.gltf"
63
+ * });
64
+ *
65
+ * // Create a couple of section planes
66
+ * // These will be shown in the overview
67
+ *
68
+ * sectionPlanes.createSectionPlane({
69
+ * id: "mySectionPlane",
70
+ * pos: [1.04, 1.95, 9.74],
71
+ * dir: [1.0, 0.0, 0.0]
72
+ * });
73
+ *
74
+ * sectionPlanes.createSectionPlane({
75
+ * id: "mySectionPlane2",
76
+ * pos: [2.30, 4.46, 14.93],
77
+ * dir: [0.0, -0.09, -0.79]
78
+ * });
79
+ *
80
+ * // Show the SectionPlanePlugin's 3D editing gizmo,
81
+ * // to interactively reposition one of our SectionPlanes
82
+ *
83
+ * sectionPlanes.showControl("mySectionPlane2");
84
+ *
85
+ * const mySectionPlane2 = sectionPlanes.sectionPlanes["mySectionPlane2"];
86
+ *
87
+ * // Programmatically reposition one of our SectionPlanes
88
+ * // This also updates its position as shown in the overview gizmo
89
+ *
90
+ * mySectionPlane2.pos = [11.0, 6.-, -12];
91
+ * mySectionPlane2.dir = [0.4, 0.0, 0.5];
92
+ * ````
93
+ */
94
+ class SectionPlanesPlugin extends Plugin {
95
+
96
+ /**
97
+ * @constructor
98
+ * @param {Viewer} viewer The Viewer.
99
+ * @param {Object} cfg Plugin configuration.
100
+ * @param {String} [cfg.id="SectionPlanes"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
101
+ * @param {String} [cfg.overviewCanvasId] ID of a canvas element to display the overview.
102
+ * @param {String} [cfg.overviewVisible=true] Initial visibility of the overview canvas.
103
+ */
104
+ constructor(viewer, cfg = {}) {
105
+
106
+ super("SectionPlanes", viewer);
107
+
108
+ this._freeControls = [];
109
+ this._sectionPlanes = viewer.scene.sectionPlanes;
110
+ this._controls = {};
111
+ this._shownControlId = null;
112
+
113
+ if (cfg.overviewCanvasId !== null && cfg.overviewCanvasId !== undefined) {
114
+
115
+ const overviewCanvas = document.getElementById(cfg.overviewCanvasId);
116
+
117
+ if (!overviewCanvas) {
118
+ this.warn("Can't find overview canvas: '" + cfg.overviewCanvasId + "' - will create plugin without overview");
119
+
120
+ } else {
121
+
122
+ this._overview = new Overview(this, {
123
+ overviewCanvas: overviewCanvas,
124
+ visible: cfg.overviewVisible,
125
+
126
+ onHoverEnterPlane: ((id) => {
127
+ this._overview.setPlaneHighlighted(id, true);
128
+ }),
129
+
130
+ onHoverLeavePlane: ((id) => {
131
+ this._overview.setPlaneHighlighted(id, false);
132
+ }),
133
+
134
+ onClickedPlane: ((id) => {
135
+ if (this.getShownControl() === id) {
136
+ this.hideControl();
137
+ return;
138
+ }
139
+ this.showControl(id);
140
+ const sectionPlane = this.sectionPlanes[id];
141
+ const sectionPlanePos = sectionPlane.pos;
142
+ tempAABB.set(this.viewer.scene.aabb);
143
+ math.getAABB3Center(tempAABB, tempVec3);
144
+ tempAABB[0] += sectionPlanePos[0] - tempVec3[0];
145
+ tempAABB[1] += sectionPlanePos[1] - tempVec3[1];
146
+ tempAABB[2] += sectionPlanePos[2] - tempVec3[2];
147
+ tempAABB[3] += sectionPlanePos[0] - tempVec3[0];
148
+ tempAABB[4] += sectionPlanePos[1] - tempVec3[1];
149
+ tempAABB[5] += sectionPlanePos[2] - tempVec3[2];
150
+ this.viewer.cameraFlight.flyTo({
151
+ aabb: tempAABB,
152
+ fitFOV: 65
153
+ });
154
+ }),
155
+
156
+ onClickedNothing: (() => {
157
+ this.hideControl();
158
+ })
159
+ });
160
+ }
161
+ }
162
+
163
+ this._onSceneSectionPlaneCreated = viewer.scene.on("sectionPlaneCreated", (sectionPlane) => {
164
+
165
+ // SectionPlane created, either via SectionPlanesPlugin#createSectionPlane(), or by directly
166
+ // instantiating a SectionPlane independently of SectionPlanesPlugin, which can be done
167
+ // by BCFViewpointsPlugin#loadViewpoint().
168
+
169
+ this._sectionPlaneCreated(sectionPlane);
170
+ });
171
+ }
172
+
173
+ /**
174
+ * Sets if the overview canvas is visible.
175
+ *
176
+ * @param {Boolean} visible Whether or not the overview canvas is visible.
177
+ */
178
+ setOverviewVisible(visible) {
179
+ if (this._overview) {
180
+ this._overview.setVisible(visible);
181
+ }
182
+ }
183
+
184
+ /**
185
+ * Gets if the overview canvas is visible.
186
+ *
187
+ * @return {Boolean} True when the overview canvas is visible.
188
+ */
189
+ getOverviewVisible() {
190
+ if (this._overview) {
191
+ return this._overview.getVisible();
192
+ }
193
+ }
194
+
195
+ /**
196
+ * Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
197
+ *
198
+ * @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane#id}.
199
+ */
200
+ get sectionPlanes() {
201
+ return this._sectionPlanes;
202
+ }
203
+
204
+ /**
205
+ * Creates a {@link SectionPlane}.
206
+ *
207
+ * The {@link SectionPlane} will be registered by {@link SectionPlane#id} in {@link SectionPlanesPlugin#sectionPlanes}.
208
+ *
209
+ * @param {Object} params {@link SectionPlane} configuration.
210
+ * @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
211
+ * @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
212
+ * @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
213
+ * @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
214
+ * @returns {SectionPlane} The new {@link SectionPlane}.
215
+ */
216
+ createSectionPlane(params = {}) {
217
+
218
+ if (params.id !== undefined && params.id !== null && this.viewer.scene.components[params.id]) {
219
+ this.error("Viewer component with this ID already exists: " + params.id);
220
+ delete params.id;
221
+ }
222
+
223
+ // Note that SectionPlane constructor fires "sectionPlaneCreated" on the Scene,
224
+ // which SectionPlanesPlugin handles and calls #_sectionPlaneCreated to create gizmo and add to overview canvas.
225
+
226
+ const sectionPlane = new SectionPlane(this.viewer.scene, {
227
+ id: params.id,
228
+ pos: params.pos,
229
+ dir: params.dir,
230
+ active: true || params.active
231
+ });
232
+ return sectionPlane;
233
+ }
234
+
235
+ _sectionPlaneCreated(sectionPlane) {
236
+ const control = (this._freeControls.length > 0) ? this._freeControls.pop() : new Control(this);
237
+ control._setSectionPlane(sectionPlane);
238
+ control.setVisible(false);
239
+ this._controls[sectionPlane.id] = control;
240
+ if (this._overview) {
241
+ this._overview.addSectionPlane(sectionPlane);
242
+ }
243
+ sectionPlane.once("destroyed", () => {
244
+ this._sectionPlaneDestroyed(sectionPlane);
245
+ });
246
+ }
247
+
248
+ /**
249
+ * Inverts the direction of {@link SectionPlane#dir} on every existing SectionPlane.
250
+ *
251
+ * Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
252
+ */
253
+ flipSectionPlanes() {
254
+ const sectionPlanes = this.viewer.scene.sectionPlanes;
255
+ for (let id in sectionPlanes) {
256
+ const sectionPlane = sectionPlanes[id];
257
+ sectionPlane.flipDir();
258
+ }
259
+ }
260
+
261
+ /**
262
+ * Shows the 3D editing gizmo for a {@link SectionPlane}.
263
+ *
264
+ * @param {String} id ID of the {@link SectionPlane}.
265
+ */
266
+ showControl(id) {
267
+ const control = this._controls[id];
268
+ if (!control) {
269
+ this.error("Control not found: " + id);
270
+ return;
271
+ }
272
+ this.hideControl();
273
+ control.setVisible(true);
274
+ if (this._overview) {
275
+ this._overview.setPlaneSelected(id, true);
276
+ }
277
+ this._shownControlId = id;
278
+ }
279
+
280
+ /**
281
+ * Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
282
+ *
283
+ * Returns ````null```` when the editing gizmo is not shown.
284
+ *
285
+ * @returns {String} ID of the the {@link SectionPlane} that the 3D editing gizmo is shown for, if shown, else ````null````.
286
+ */
287
+ getShownControl() {
288
+ return this._shownControlId;
289
+ }
290
+
291
+ /**
292
+ * Hides the 3D {@link SectionPlane} editing gizmo if shown.
293
+ */
294
+ hideControl() {
295
+ for (var id in this._controls) {
296
+ if (this._controls.hasOwnProperty(id)) {
297
+ this._controls[id].setVisible(false);
298
+ if (this._overview) {
299
+ this._overview.setPlaneSelected(id, false);
300
+ }
301
+ }
302
+ }
303
+ this._shownControlId = null;
304
+ }
305
+
306
+ /**
307
+ * Destroys a {@link SectionPlane} created by this SectionPlanesPlugin.
308
+ *
309
+ * @param {String} id ID of the {@link SectionPlane}.
310
+ */
311
+ destroySectionPlane(id) {
312
+ var sectionPlane = this.viewer.scene.sectionPlanes[id];
313
+ if (!sectionPlane) {
314
+ this.error("SectionPlane not found: " + id);
315
+ return;
316
+ }
317
+ this._sectionPlaneDestroyed(sectionPlane);
318
+ sectionPlane.destroy();
319
+
320
+ if (id === this._shownControlId) {
321
+ this._shownControlId = null;
322
+ }
323
+ }
324
+
325
+ _sectionPlaneDestroyed(sectionPlane) {
326
+ if (this._overview) {
327
+ this._overview.removeSectionPlane(sectionPlane);
328
+ }
329
+ const control = this._controls[sectionPlane.id];
330
+ if (!control) {
331
+ return;
332
+ }
333
+ control.setVisible(false);
334
+ control._setSectionPlane(null);
335
+ delete this._controls[sectionPlane.id];
336
+ this._freeControls.push(control);
337
+ }
338
+
339
+ /**
340
+ * Destroys all {@link SectionPlane}s created by this SectionPlanesPlugin.
341
+ */
342
+ clear() {
343
+ const ids = Object.keys(this._sectionPlanes);
344
+ for (var i = 0, len = ids.length; i < len; i++) {
345
+ this.destroySectionPlane(ids[i]);
346
+ }
347
+ }
348
+
349
+ /**
350
+ * @private
351
+ */
352
+ send(name, value) {
353
+ switch (name) {
354
+
355
+ case "snapshotStarting": // Viewer#getSnapshot() about to take snapshot - hide controls
356
+ for (let id in this._controls) {
357
+ if (this._controls.hasOwnProperty(id)) {
358
+ this._controls[id].setCulled(true);
359
+ }
360
+ }
361
+ break;
362
+
363
+ case "snapshotFinished": // Viewer#getSnapshot() finished taking snapshot - show controls again
364
+ for (let id in this._controls) {
365
+ if (this._controls.hasOwnProperty(id)) {
366
+ this._controls[id].setCulled(false);
367
+ }
368
+ }
369
+ break;
370
+
371
+ case "clearSectionPlanes":
372
+ this.clear();
373
+ break;
374
+ }
375
+ }
376
+
377
+ /**
378
+ * Destroys this SectionPlanesPlugin.
379
+ *
380
+ * Also destroys each {@link SectionPlane} created by this SectionPlanesPlugin.
381
+ *
382
+ * Does not destroy the canvas the SectionPlanesPlugin was configured with.
383
+ */
384
+ destroy() {
385
+ this.clear();
386
+ if (this._overview) {
387
+ this._overview.destroy();
388
+ }
389
+ this._destroyFreeControls();
390
+ super.destroy();
391
+ }
392
+
393
+ _destroyFreeControls() {
394
+ var control = this._freeControls.pop();
395
+ while (control) {
396
+ control._destroy();
397
+ control = this._freeControls.pop();
398
+ }
399
+ this.viewer.scene.off(this._onSceneSectionPlaneCreated);
400
+ }
401
+ }
402
+
403
+ export {SectionPlanesPlugin}
@@ -0,0 +1 @@
1
+ export * from "./SectionPlanesPlugin.js";
@@ -0,0 +1,134 @@
1
+ import {Plugin} from "../../viewer/Plugin.js";
2
+ import {Skybox} from "../../viewer/scene/skybox/Skybox.js"
3
+
4
+ /**
5
+ * {@link Viewer} plugin that manages skyboxes
6
+ *
7
+ * @example
8
+ *
9
+ * // Create a Viewer
10
+ * const viewer = new Viewer({
11
+ * canvasId: "myCanvas"
12
+ * });
13
+ *
14
+ * // Add a GLTFModelsPlugin
15
+ * var gltfLoaderPlugin = new GLTFModelsPlugin(viewer, {
16
+ * id: "GLTFModels" // Default value
17
+ * });
18
+ *
19
+ * // Add a SkyboxesPlugin
20
+ * var skyboxesPlugin = new SkyboxesPlugin(viewer, {
21
+ * id: "Skyboxes" // Default value
22
+ * });
23
+ *
24
+ * // Load a glTF model
25
+ * const model = gltfLoaderPlugin.load({
26
+ * id: "myModel",
27
+ * src: "./models/gltf/mygltfmodel.gltf"
28
+ * });
29
+ *
30
+ * // Create three directional World-space lights. "World" means that they will appear as if part
31
+ * // of the world, instead of "View", where they move with the user's head.
32
+ *
33
+ * skyboxesPlugin.createLight({
34
+ * id: "keyLight",
35
+ * dir: [0.8, -0.6, -0.8],
36
+ * color: [1.0, 0.3, 0.3],
37
+ * intensity: 1.0,
38
+ * space: "world"
39
+ * });
40
+ *
41
+ * skyboxesPlugin.createLight({
42
+ * id: "fillLight",
43
+ * dir: [-0.8, -0.4, -0.4],
44
+ * color: [0.3, 1.0, 0.3],
45
+ * intensity: 1.0,
46
+ * space: "world"
47
+ * });
48
+ *
49
+ * skyboxesPlugin.createDirLight({
50
+ * id: "rimLight",
51
+ * dir: [0.2, -0.8, 0.8],
52
+ * color: [0.6, 0.6, 0.6],
53
+ * intensity: 1.0,
54
+ * space: "world"
55
+ * });
56
+ *
57
+ * @class SkyboxesPlugin
58
+ */
59
+ class SkyboxesPlugin extends Plugin {
60
+
61
+ constructor(viewer) {
62
+ super("skyboxes", viewer);
63
+ this.skyboxes = {};
64
+ }
65
+
66
+ /**
67
+ * @private
68
+ */
69
+ send(name, value) {
70
+ switch (name) {
71
+ case "clear":
72
+ this.clear();
73
+ break;
74
+ }
75
+ }
76
+
77
+ /**
78
+ Creates a skybox.
79
+
80
+ @param {String} id Unique ID to assign to the skybox.
81
+ @param {Object} params Skybox configuration.
82
+ @param {Boolean} [params.active=true] Whether the skybox plane is initially active. Only skyboxes while this is true.
83
+ @returns {Skybox} The new skybox.
84
+ */
85
+ createSkybox(id, params) {
86
+ if (this.viewer.scene.components[id]) {
87
+ this.error("Component with this ID already exists: " + id);
88
+ return this;
89
+ }
90
+ var skybox = new Skybox(this.viewer.scene, {
91
+ id: id,
92
+ pos: params.pos,
93
+ dir: params.dir,
94
+ active: true || params.active
95
+ });
96
+ this.skyboxes[id] = skybox;
97
+ return skybox;
98
+ }
99
+
100
+ /**
101
+ Destroys a skybox.
102
+ @param id
103
+ */
104
+ destroySkybox(id) {
105
+ var skybox = this.skyboxes[id];
106
+ if (!skybox) {
107
+ this.error("Skybox not found: " + id);
108
+ return;
109
+ }
110
+ skybox.destroy();
111
+ }
112
+
113
+ /**
114
+ Destroys all skyboxes.
115
+ */
116
+ clear() {
117
+ var ids = Object.keys(this.viewer.scene.skyboxes);
118
+ for (var i = 0, len = ids.length; i < len; i++) {
119
+ this.destroySkybox(ids[i]);
120
+ }
121
+ }
122
+
123
+ /**
124
+ * Destroys this plugin.
125
+ *
126
+ * Clears skyboxes from the Viewer first.
127
+ */
128
+ destroy() {
129
+ this.clear();
130
+ super.clear();
131
+ }
132
+ }
133
+
134
+ export {SkyboxesPlugin}
@@ -0,0 +1 @@
1
+ export * from "./SkyboxesPlugin.js";
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @desc Property states for {@link Entity}s in {@link Storey}s capture by a {@link StoreyViewsPlugin}.
3
+ *
4
+ * @type {{String:Object}}
5
+ */
6
+ const IFCStoreyPlanObjectStates = {
7
+ IfcSlab: {
8
+ visible: true,
9
+ edges: false,
10
+ colorize: [1.0, 1.0, 1.0, 1.0]
11
+ },
12
+ IfcWall: {
13
+ visible: true,
14
+ edges: false,
15
+ colorize: [0.1, 0.1, 0.1, 1.0]
16
+ },
17
+ IfcWallStandardCase: {
18
+ visible: true,
19
+ edges: false,
20
+ colorize: [0.1, 0.1, 0.1, 1.0]
21
+ },
22
+ IfcDoor: {
23
+ visible: true,
24
+ edges: false,
25
+ colorize: [0.5, 0.5, 0.5, 1.0]
26
+ },
27
+ IfcWindow: {
28
+ visible: true,
29
+ edges: false,
30
+ colorize: [0.5, 0.5, 0.5, 1.0]
31
+ },
32
+ IfcColumn: {
33
+ visible: true,
34
+ edges: false,
35
+ colorize: [0.5, 0.5, 0.5, 1.0]
36
+ },
37
+ IfcCurtainWall: {
38
+ visible: true,
39
+ edges: false,
40
+ colorize: [0.5, 0.5, 0.5, 1.0]
41
+ },
42
+ IfcStair: {
43
+ visible: true,
44
+ edges: false,
45
+ colorize: [0.7, 0.7, 0.7, 1.0]
46
+ },
47
+ IfcStairFlight: {
48
+ visible: true,
49
+ edges: false,
50
+ colorize: [0.7, 0.7, 0.7, 1.0]
51
+ },
52
+ IfcRamp: {
53
+ visible: true,
54
+ edges: false,
55
+ colorize: [0.7, 0.7, 0.7, 1.0]
56
+ },
57
+ IfcFurniture: {
58
+ visible: true,
59
+ edges: false,
60
+ colorize: [0.7, 0.7, 0.7, 1.0]
61
+ },
62
+ IfcFooting: {
63
+ visible: true,
64
+ edges: false,
65
+ colorize: [0.7, 0.7, 0.7, 1.0]
66
+ },
67
+ IfcFloor: {
68
+ visible: true,
69
+ edges: false,
70
+ colorize: [1.0, 1.0, 1.0, 1.0]
71
+ },
72
+ DEFAULT: {
73
+ visible: false
74
+ }
75
+ };
76
+
77
+ export {IFCStoreyPlanObjectStates}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @desc Information about an ````IfcBuildingStorey````.
3
+ *
4
+ * These are provided by a {@link StoreyViewsPlugin}.
5
+ */
6
+ class Storey {
7
+
8
+ /**
9
+ * @private
10
+ */
11
+ constructor(plugin, aabb, modelId, storeyId, numObjects) {
12
+
13
+ /**
14
+ * The {@link StoreyViewsPlugin} this Storey belongs to.
15
+ *
16
+ * @property plugin
17
+ * @type {StoreyViewsPlugin}
18
+ */
19
+ this.plugin = plugin;
20
+
21
+ /**
22
+ * ID of the IfcBuildingStorey.
23
+ *
24
+ * This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
25
+ *
26
+ * @property storeyId
27
+ * @type {String}
28
+ */
29
+ this.storeyId = storeyId;
30
+
31
+ /**
32
+ * ID of the model.
33
+ *
34
+ * This matches the ID of the {@link MetaModel} that contains the IfcBuildingStorey's {@link MetaObject}.
35
+ *
36
+ * @property modelId
37
+ * @type {String|Number}
38
+ */
39
+ this.modelId = modelId;
40
+
41
+ /**
42
+ * Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
43
+ *
44
+ * The boundary is a six-element Float32Array containing the min/max extents of the
45
+ * axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
46
+ *
47
+ * @property aabb
48
+ * @type {Number[]}
49
+ */
50
+ this.aabb = aabb.slice();
51
+
52
+ /** Number of {@link Entity}s within the IfcBuildingStorey.
53
+ *
54
+ * @property numObjects
55
+ * @type {Number}
56
+ */
57
+ this.numObjects = numObjects;
58
+ }
59
+ }
60
+
61
+ export {Storey};