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,575 +0,0 @@
1
- import {Plugin} from "../../viewer/Plugin.js";
2
- import {Annotation} from "./Annotation.js";
3
- import {utils} from "../../viewer/scene/utils.js";
4
- import {math} from "../../viewer/scene/math/math.js";
5
-
6
- const tempVec3a = math.vec3();
7
- const tempVec3b = math.vec3();
8
- const tempVec3c = math.vec3();
9
-
10
- /**
11
- * {@link Viewer} plugin that creates {@link Annotation}s.
12
- *
13
- * [<img src="https://user-images.githubusercontent.com/83100/58403089-26589280-8062-11e9-8652-aed61a4e8c64.gif">](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_clickFlyToPosition)
14
- *
15
- * * [[Example 1: Create annotations with mouse](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_createWithMouse)]
16
- * * [[Example 2: Click annotations to toggle labels](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_clickShowLabels)]
17
- * * [[Example 3: Hover annotations to show labels](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_hoverShowLabels)]
18
- * * [[Example 4: Click annotations to fly to viewpoint](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_clickFlyToPosition)]
19
- * * [[Example 5: Create Annotations with externally-created elements](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_externalElements)]
20
- *
21
- * ## Overview
22
- *
23
- * * An {@link Annotation} is a 3D position with a label attached.
24
- * * Annotations render themselves with HTML elements that float over the canvas; customize the appearance of
25
- * individual Annotations using HTML template; configure default appearance by setting templates on the AnnotationsPlugin.
26
- * * Dynamically insert data values into each Annotation's HTML templates; configure default values on the AnnotationsPlugin.
27
- * * Optionally configure Annotation with externally-created DOM elements for markers and labels; these override templates and data values.
28
- * * Optionally configure Annotations to hide themselves whenever occluded by {@link Entity}s.
29
- * * Optionally configure each Annotation with a position we can jump or fly the {@link Camera} to.
30
- *
31
- * ## Example 1: Loading a model and creating an annotation
32
- *
33
- * In the example below, we'll use an {@link XKTLoaderPlugin} to load a model, and an AnnotationsPlugin
34
- * to create an {@link Annotation} on it.
35
- *
36
- * We'll configure the AnnotationsPlugin with default HTML templates for each Annotation's position (its "marker") and
37
- * label, along with some default data values to insert into them.
38
- *
39
- * When we create our Annotation, we'll give it some specific data values to insert into the templates, overriding some of
40
- * the defaults we configured on the plugin. Note the correspondence between the placeholders in the templates
41
- * and the keys in the values map.
42
- *
43
- * We'll also configure the Annotation to hide itself whenever it's position is occluded by any {@link Entity}s (this is default behavior). The
44
- * {@link Scene} periodically occlusion-tests all Annotations on every 20th "tick" (which represents a rendered frame). We
45
- * can adjust that frequency via property {@link Scene#ticksPerOcclusionTest}.
46
- *
47
- * Finally, we'll query the Annotation's position occlusion/visibility status, and subscribe to change events on those properties.
48
- *
49
- * [[Run example](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_clickShowLabels)]
50
- *
51
- * ````JavaScript
52
- * import {Viewer, XKTLoaderPlugin,AnnotationsPlugin} from "yjkkit-sdk.es.js";
53
- *
54
- * const viewer = new Viewer({
55
- * canvasId: "myCanvas",
56
- * transparent: true
57
- * });
58
- *
59
- * viewer.scene.camera.eye = [-2.37, 18.97, -26.12];
60
- * viewer.scene.camera.look = [10.97, 5.82, -11.22];
61
- * viewer.scene.camera.up = [0.36, 0.83, 0.40];
62
- *
63
- * const xktLoader = new XKTLoaderPlugin(viewer);
64
- *
65
- * const annotations = new AnnotationsPlugin(viewer, {
66
- *
67
- * // Default HTML template for marker position
68
- * markerHTML: "<div class='annotation-marker' style='background-color: {{markerBGColor}};'>{{glyph}}</div>",
69
- *
70
- * // Default HTML template for label
71
- * labelHTML: "<div class='annotation-label' style='background-color: {{labelBGColor}};'>" +
72
- * "<div class='annotation-title'>{{title}}</div><div class='annotation-desc'>{{description}}</div></div>",
73
- *
74
- * // Default values to insert into the marker and label templates
75
- * values: {
76
- * markerBGColor: "red",
77
- * labelBGColor: "red",
78
- * glyph: "X",
79
- * title: "Untitled",
80
- * description: "No description"
81
- * }
82
- * });
83
- *
84
- * const model = xktLoader.load({
85
- * src: "./models/xkt/duplex/geometry.xkt"
86
- * });
87
- *
88
- * model.on("loaded", () => {
89
- *
90
- * const entity = viewer.scene.meshes[""];
91
- *
92
- * // Create an annotation
93
- * const myAnnotation1 = annotations.createAnnotation({
94
- *
95
- * id: "myAnnotation",
96
- *
97
- * entity: viewer.scene.objects["2O2Fr$t4X7Zf8NOew3FLOH"], // Optional, associate with an Entity
98
- *
99
- * worldPos: [0, 0, 0], // 3D World-space position
100
- *
101
- * occludable: true, // Optional, default, makes Annotation invisible when occluded by Entities
102
- * markerShown: true, // Optional, default is true, makes position visible (when not occluded)
103
- * labelShown: true // Optional, default is false, makes label visible (when not occluded)
104
- *
105
- * values: { // Optional, overrides AnnotationPlugin's defaults
106
- * glyph: "A",
107
- * title: "My Annotation",
108
- * description: "This is my annotation."
109
- * }
110
- * });
111
- *
112
- * // Listen for change of the Annotation's 3D World-space position
113
- *
114
- * myAnnotation1.on("worldPos", function(worldPos) {
115
- * //...
116
- * });
117
- *
118
- * // Listen for change of the Annotation's 3D View-space position, which happens
119
- * // when either worldPos was updated or the Camera was moved
120
- *
121
- * myAnnotation1.on("viewPos", function(viewPos) {
122
- * //...
123
- * });
124
- *
125
- * // Listen for change of the Annotation's 2D Canvas-space position, which happens
126
- * // when worldPos or viewPos was updated, or Camera's projection was updated
127
- *
128
- * myAnnotation1.on("canvasPos", function(canvasPos) {
129
- * //...
130
- * });
131
- *
132
- * // Listen for change of Annotation visibility. The Annotation becomes invisible when it falls outside the canvas,
133
- * // or its position is occluded by some Entity. Note that, when not occluded, the position is only
134
- * // shown when Annotation#markerShown is true, and the label is only shown when Annotation#labelShown is true.
135
- *
136
- * myAnnotation1.on("visible", function(visible) { // Marker visibility has changed
137
- * if (visible) {
138
- * this.log("Annotation is visible");
139
- * } else {
140
- * this.log("Annotation is invisible");
141
- * }
142
- * });
143
- *
144
- * // Listen for destruction of the Annotation
145
- *
146
- * myAnnotation1.on("destroyed", () => {
147
- * //...
148
- * });
149
- * });
150
- * ````
151
- *
152
- * Let's query our {@link Annotation}'s current position in the World, View and Canvas coordinate systems:
153
- *
154
- * ````javascript
155
- * const worldPos = myAnnotation.worldPos; // [x,y,z]
156
- * const viewPos = myAnnotation.viewPos; // [x,y,z]
157
- * const canvasPos = myAnnotation.canvasPos; // [x,y]
158
- * ````
159
- *
160
- * We can query it's current visibility, which is ````false```` when its position is occluded by some {@link Entity}:
161
- *
162
- * ````
163
- * const visible = myAnnotation1.visible;
164
- * ````
165
- *
166
- * To listen for change events on our Annotation's position and visibility:
167
- *
168
- * ````javascript
169
- * // World-space position changes when we assign a new value to Annotation#worldPos
170
- * myAnnotation1.on("worldPos", (worldPos) => {
171
- * //...
172
- * });
173
- *
174
- * // View-space position changes when either worldPos was updated or the Camera was moved
175
- * myAnnotation1.on("viewPos", (viewPos) => {
176
- * //...
177
- * });
178
- *
179
- * // Canvas-space position changes when worldPos or viewPos was updated, or Camera's projection was updated
180
- * myAnnotation1.on("canvasPos", (canvasPos) => {
181
- * //...
182
- * });
183
- *
184
- * // Annotation is invisible when its position falls off the canvas or is occluded by some Entity
185
- * myAnnotation1.on("visible", (visible) => {
186
- * //...
187
- * });
188
- * ````
189
- *
190
- * Finally, let's dynamically update the values for a couple of placeholders in our Annotation's label:
191
- *
192
- * ```` javascript
193
- * myAnnotation1.setValues({
194
- * title: "Here's a new title",
195
- * description: "Here's a new description"
196
- * });
197
- * ````
198
- *
199
- *
200
- * ## Example 2: Creating an Annotation with a unique appearance
201
- *
202
- * Now let's create a second {@link Annotation}, this time with its own custom HTML label template, which includes
203
- * an image. In the Annotation's values, we'll also provide a new title and description, custom colors for the marker
204
- * and label, plus a URL for the image in the label template. To render its marker, the Annotation will fall back
205
- * on the AnnotationPlugin's default marker template.
206
- *
207
- * ````javascript
208
- * const myAnnotation2 = annotations.createAnnotation({
209
- *
210
- * id: "myAnnotation2",
211
- *
212
- * worldPos: [-0.163, 1.810, 7.977],
213
- *
214
- * occludable: true,
215
- * markerShown: true,
216
- * labelShown: true,
217
- *
218
- * // Custom label template is the same as the Annotation's, with the addition of an image element
219
- * labelHTML: "<div class='annotation-label' style='background-color: {{labelBGColor}};'>\
220
- * <div class='annotation-title'>{{title}}</div>\
221
- * <div class='annotation-desc'>{{description}}</div>\
222
- * <br><img alt='myImage' width='150px' height='100px' src='{{imageSrc}}'>\
223
- * </div>",
224
- *
225
- * // Custom template values override all the AnnotationPlugin's defaults, and includes an additional value
226
- * // for the image element's URL
227
- * values: {
228
- * glyph: "A3",
229
- * title: "The West wall",
230
- * description: "Annotations can contain<br>custom HTML like this<br>image:",
231
- * markerBGColor: "green",
232
- * labelBGColor: "green",
233
- * imageSrc: "https://yjkkit.io/img/docs/BIMServerLoaderPlugin/schependomlaan.png"
234
- * }
235
- * });
236
- * ````
237
- *
238
- * ## Example 3: Creating an Annotation with a camera position
239
- *
240
- * We can optionally configure each {@link Annotation} with a position to fly or jump the {@link Camera} to.
241
- *
242
- * Let's create another Annotation, this time providing it with ````eye````, ````look```` and ````up```` properties
243
- * indicating a viewpoint on whatever it's annotating:
244
- *
245
- * ````javascript
246
- * const myAnnotation3 = annotations.createAnnotation({
247
- *
248
- * id: "myAnnotation3",
249
- *
250
- * worldPos: [-0.163, 3.810, 7.977],
251
- *
252
- * eye: [0,0,-10],
253
- * look: [-0.163, 3.810, 7.977],
254
- * up: [0,1,0];
255
- *
256
- * occludable: true,
257
- * markerShown: true,
258
- * labelShown: true,
259
- *
260
- * labelHTML: "<div class='annotation-label' style='background-color: {{labelBGColor}};'>\
261
- * <div class='annotation-title'>{{title}}</div>\
262
- * <div class='annotation-desc'>{{description}}</div>\
263
- * <br><img alt='myImage' width='150px' height='100px' src='{{imageSrc}}'>\
264
- * </div>",
265
- *
266
- * values: {
267
- * glyph: "A3",
268
- * title: "The West wall",
269
- * description: "Annotations can contain<br>custom HTML like this<br>image:",
270
- * markerBGColor: "green",
271
- * labelBGColor: "green",
272
- * imageSrc: "https://yjkkit.io/img/docs/BIMServerLoaderPlugin/schependomlaan.png"
273
- * }
274
- * });
275
- * ````
276
- *
277
- * Now we can fly the {@link Camera} to the Annotation's viewpoint, like this:
278
- *
279
- * ````javascript
280
- * viewer.cameraFlight.flyTo(myAnnotation3);
281
- * ````
282
- *
283
- * Or jump the Camera, like this:
284
- *
285
- * ````javascript
286
- * viewer.cameraFlight.jumpTo(myAnnotation3);
287
- * ````
288
- *
289
- * ## Example 4: Creating an Annotation using externally-created DOM elements
290
- *
291
- * Now let's create another {@link Annotation}, this time providing it with pre-existing DOM elements for its marker
292
- * and label. Note that AnnotationsPlugin will ignore any ````markerHTML````, ````labelHTML````
293
- * or ````values```` properties when provide ````markerElementId```` or ````labelElementId````.
294
- *
295
- * ````javascript
296
- * const myAnnotation2 = annotations.createAnnotation({
297
- *
298
- * id: "myAnnotation2",
299
- *
300
- * worldPos: [-0.163, 1.810, 7.977],
301
- *
302
- * occludable: true,
303
- * markerShown: true,
304
- * labelShown: true,
305
- *
306
- * markerElementId: "myMarkerElement",
307
- * labelElementId: "myLabelElement"
308
- * });
309
- * ````
310
- *
311
- * ## Example 5: Creating annotations by clicking on objects
312
- *
313
- * AnnotationsPlugin makes it easy to create {@link Annotation}s on the surfaces of {@link Entity}s as we click on them.
314
- *
315
- * The {@link AnnotationsPlugin#createAnnotation} method can accept a {@link PickResult} returned
316
- * by {@link Scene#pick}, from which it initializes the {@link Annotation}'s {@link Annotation#worldPos} and
317
- * {@link Annotation#entity}. Note that this only works when {@link Scene#pick} was configured to perform a 3D
318
- * surface-intersection pick (see {@link Scene#pick} for more info).
319
- *
320
- * Let's now extend our example to create an Annotation wherever we click on the surface of of our model:
321
- *
322
- * [[Run example](https://yjkkit.github.io/yjkkit-sdk/examples/#annotations_createWithMouse)]
323
- *
324
- * ````javascript
325
- * var i = 1; // Used to create unique Annotation IDs
326
- *
327
- * viewer.scene.input.on("mouseclicked", (coords) => {
328
- *
329
- * var pickRecord = viewer.scene.pick({
330
- * canvasPos: coords,
331
- * pickSurface: true // <<------ This causes picking to find the intersection point on the entity
332
- * });
333
- *
334
- * if (pickRecord) {
335
- *
336
- * const annotation = annotations.createAnnotation({
337
- * id: "myAnnotationOnClick" + i,
338
- * pickRecord: pickRecord,
339
- * occludable: true, // Optional, default is true
340
- * markerShown: true, // Optional, default is true
341
- * labelShown: true, // Optional, default is true
342
- * values: { // HTML template values
343
- * glyph: "A" + i,
344
- * title: "My annotation " + i,
345
- * description: "My description " + i
346
- * },
347
- });
348
- *
349
- * i++;
350
- * }
351
- * });
352
- * ````
353
- *
354
- * Note that when the Annotation is occludable, there is potential for the {@link Annotation#worldPos} to become
355
- * visually embedded within the surface of its Entity when viewed from a distance. This happens as a result of limited
356
- * GPU accuracy GPU accuracy, especially when the near and far view-space clipping planes, specified by {@link Perspective#near}
357
- * and {@link Perspective#far}, or {@link Ortho#near} and {@link Perspective#far}, are far away from each other.
358
- *
359
- * To prevent this, we can offset Annotations from their Entity surfaces by an amount that we set
360
- * on {@link AnnotationsPlugin#surfaceOffset}:
361
- *
362
- * ````javascript
363
- * annotations.surfaceOffset = 0.3; // Default value
364
- * ````
365
- *
366
- * Annotations subsequently created with {@link AnnotationsPlugin#createAnnotation} using a {@link PickResult} will then
367
- * be offset by that amount.
368
- *
369
- * Another thing we can do to prevent this unwanted occlusion is keep the distance between the view-space clipping
370
- * planes to a minimum, which improves the accuracy of the Annotation occlusion test. In general, a good default
371
- * value for ````Perspective#far```` and ````Ortho#far```` is around ````2.000````.
372
- */
373
- class AnnotationsPlugin extends Plugin {
374
-
375
- /**
376
- * @constructor
377
- * @param {Viewer} viewer The Viewer.
378
- * @param {Object} cfg Plugin configuration.
379
- * @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
380
- * @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
381
- * @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
382
- * @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
383
- * @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
384
- * @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
385
- * its {@link Entity} when we create the Annotation by supplying a {@link PickResult} to {@link AnnotationsPlugin#createAnnotation}.
386
- */
387
- constructor(viewer, cfg) {
388
-
389
- super("Annotations", viewer);
390
-
391
- this._labelHTML = cfg.labelHTML || "<div></div>";
392
- this._markerHTML = cfg.markerHTML || "<div></div>";
393
- this._container = cfg.container || document.body;
394
- this._values = cfg.values || {};
395
-
396
- /**
397
- * The {@link Annotation}s created by {@link AnnotationsPlugin#createAnnotation}, each mapped to its {@link Annotation#id}.
398
- * @type {{String:Annotation}}
399
- */
400
- this.annotations = {};
401
-
402
- this.surfaceOffset = cfg.surfaceOffset;
403
- }
404
-
405
- /**
406
- * @private
407
- */
408
- send(name, value) {
409
- switch (name) {
410
- case "clearAnnotations":
411
- this.clear();
412
- break;
413
- }
414
- }
415
-
416
- /**
417
- * Sets the amount by which each {@link Annotation} is offset from the surface of its {@link Entity}, when we
418
- * create the Annotation by supplying a {@link PickResult} to {@link AnnotationsPlugin#createAnnotation}.
419
- *
420
- * See the class comments for more info.
421
- *
422
- * This is ````0.3```` by default.
423
- *
424
- * @param {Number} surfaceOffset The surface offset.
425
- */
426
- set surfaceOffset(surfaceOffset) {
427
- if (surfaceOffset === undefined || surfaceOffset === null) {
428
- surfaceOffset = 0.3;
429
- }
430
- this._surfaceOffset = surfaceOffset;
431
- }
432
-
433
- /**
434
- * Gets the amount by which an {@link Annotation} is offset from the surface of its {@link Entity} when
435
- * created by {@link AnnotationsPlugin#createAnnotation}, when we
436
- * create the Annotation by supplying a {@link PickResult} to {@link AnnotationsPlugin#createAnnotation}.
437
- *
438
- * This is ````0.3```` by default.
439
- *
440
- * @returns {Number} The surface offset.
441
- */
442
- get surfaceOffset() {
443
- return this._surfaceOffset;
444
- }
445
-
446
- /**
447
- * Creates an {@link Annotation}.
448
- *
449
- * The Annotation is then registered by {@link Annotation#id} in {@link AnnotationsPlugin#annotations}.
450
- *
451
- * @param {Object} params Annotation configuration.
452
- * @param {String} params.id Unique ID to assign to {@link Annotation#id}. The Annotation will be registered by this in {@link AnnotationsPlugin#annotations} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
453
- * @param {String} [params.markerElementId] ID of pre-existing DOM element to render the marker. This overrides ````markerHTML```` and does not support ````values```` (data is baked into the label DOM element).
454
- * @param {String} [params.labelElementId] ID of pre-existing DOM element to render the label. This overrides ````labelHTML```` and does not support ````values```` (data is baked into the label DOM element).
455
- * @param {String} [params.markerHTML] HTML text template for the Annotation marker. Defaults to the marker HTML given to the AnnotationsPlugin constructor. Ignored if you provide ````markerElementId````.
456
- * @param {String} [params.labelHTML] HTML text template for the Annotation label. Defaults to the label HTML given to the AnnotationsPlugin constructor. Ignored if you provide ````labelElementId````.
457
- * @param {Number[]} [params.worldPos=[0,0,0]] World-space position of the Annotation marker, assigned to {@link Annotation#worldPos}.
458
- * @param {Entity} [params.entity] Optional {@link Entity} to associate the Annotation with. Causes {@link Annotation#visible} to be ````false```` whenever {@link Entity#visible} is also ````false````.
459
- * @param {PickResult} [params.pickResult] Sets the Annotation's World-space position and direction vector from the given {@link PickResult}'s {@link PickResult#worldPos} and {@link PickResult#worldNormal}, and the Annotation's Entity from {@link PickResult#entity}. Causes ````worldPos```` and ````entity```` parameters to be ignored, if they are also given.
460
- * @param {Boolean} [params.occludable=false] Indicates whether or not the {@link Annotation} marker and label are hidden whenever the marker occluded by {@link Entity}s in the {@link Scene}. The
461
- * {@link Scene} periodically occlusion-tests all Annotations on every 20th "tick" (which represents a rendered frame). We can adjust that frequency via property {@link Scene#ticksPerOcclusionTest}.
462
- * @param {{String:(String|Number)}} [params.values={}] Map of values to insert into the HTML templates for the marker and label. These will be inserted in addition to any values given to the AnnotationsPlugin constructor.
463
- * @param {Boolean} [params.markerShown=true] Whether to initially show the {@link Annotation} marker.
464
- * @param {Boolean} [params.labelShown=false] Whether to initially show the {@link Annotation} label.
465
- * @param {Number[]} [params.eye] Optional World-space position for {@link Camera#eye}, used when this Annotation is associated with a {@link Camera} position.
466
- * @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
467
- * @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
468
- * @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
469
- * @returns {Annotation} The new {@link Annotation}.
470
- */
471
- createAnnotation(params) {
472
- if (this.viewer.scene.components[params.id]) {
473
- this.error("Viewer component with this ID already exists: " + params.id);
474
- delete params.id;
475
- }
476
- var worldPos;
477
- var entity;
478
- params.pickResult = params.pickResult || params.pickRecord;
479
- if (params.pickResult) {
480
- const pickResult = params.pickResult;
481
- if (!pickResult.worldPos || !pickResult.worldNormal) {
482
- this.error("Param 'pickResult' does not have both worldPos and worldNormal");
483
- } else {
484
- const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a);
485
- const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b);
486
- const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c);
487
- worldPos = offsetWorldPos;
488
- entity = pickResult.entity;
489
- }
490
- } else {
491
- worldPos = params.worldPos;
492
- entity = params.entity;
493
- }
494
-
495
- var markerElement = null;
496
- if (params.markerElementId) {
497
- markerElement = document.getElementById(params.markerElementId);
498
- if (!markerElement) {
499
- this.error("Can't find DOM element for 'markerElementId' value '" + params.markerElementId + "' - defaulting to internally-generated empty DIV");
500
- }
501
- }
502
-
503
- var labelElement = null;
504
- if (params.labelElementId) {
505
- labelElement = document.getElementById(params.labelElementId);
506
- if (!labelElement) {
507
- this.error("Can't find DOM element for 'labelElementId' value '" + params.labelElementId + "' - defaulting to internally-generated empty DIV");
508
- }
509
- }
510
-
511
- const annotation = new Annotation(this.viewer.scene, {
512
- id: params.id,
513
- plugin: this,
514
- entity: entity,
515
- worldPos: worldPos,
516
- container: this._container,
517
- markerElement: markerElement,
518
- labelElement: labelElement,
519
- markerHTML: params.markerHTML || this._markerHTML,
520
- labelHTML: params.labelHTML || this._labelHTML,
521
- occludable: params.occludable,
522
- values: utils.apply(params.values, utils.apply(this._values, {})),
523
- markerShown: params.markerShown,
524
- labelShown: params.labelShown,
525
- eye: params.eye,
526
- look: params.look,
527
- up: params.up,
528
- projection: params.projection,
529
- visible: (params.visible !== false)
530
- });
531
- this.annotations[annotation.id] = annotation;
532
- annotation.on("destroyed", () => {
533
- delete this.annotations[annotation.id];
534
- this.fire("annotationDestroyed", annotation.id);
535
- });
536
- this.fire("annotationCreated", annotation.id);
537
- return annotation;
538
- }
539
-
540
- /**
541
- * Destroys an {@link Annotation}.
542
- *
543
- * @param {String} id ID of Annotation to destroy.
544
- */
545
- destroyAnnotation(id) {
546
- var annotation = this.annotations[id];
547
- if (!annotation) {
548
- this.log("Annotation not found: " + id);
549
- return;
550
- }
551
- annotation.destroy();
552
- }
553
-
554
- /**
555
- * Destroys all {@link Annotation}s.
556
- */
557
- clear() {
558
- const ids = Object.keys(this.annotations);
559
- for (var i = 0, len = ids.length; i < len; i++) {
560
- this.destroyAnnotation(ids[i]);
561
- }
562
- }
563
-
564
- /**
565
- * Destroys this AnnotationsPlugin.
566
- *
567
- * Destroys all {@link Annotation}s first.
568
- */
569
- destroy() {
570
- this.clear();
571
- super.destroy();
572
- }
573
- }
574
-
575
- export {AnnotationsPlugin}
@@ -1 +0,0 @@
1
- export * from "./AnnotationsPlugin.js";