csyjk 1.2.2 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
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,271 +0,0 @@
1
- import {utils} from '../../utils.js';
2
-
3
- /**
4
- * @desc Creates a cylinder-shaped {@link Geometry}.
5
- *
6
- * ## Usage
7
- *
8
- * Creating a {@link Mesh} with a cylinder-shaped {@link ReadableGeometry} :
9
- *
10
- * [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#geometry_builders_buildCylinderGeometry)]
11
- *
12
- * ````javascript
13
- *
14
- * import {Viewer, Mesh, buildCylinderGeometry, ReadableGeometry, PhongMaterial, Texture} from "yjkkit-sdk.es.js";
15
- *
16
- * const viewer = new Viewer({
17
- * canvasId: "myCanvas"
18
- * });
19
- *
20
- * viewer.camera.eye = [0, 0, 5];
21
- * viewer.camera.look = [0, 0, 0];
22
- * viewer.camera.up = [0, 1, 0];
23
- *
24
- * new Mesh(viewer.scene, {
25
- * geometry: new ReadableGeometry(viewer.scene, buildCylinderGeometry({
26
- * center: [0,0,0],
27
- * radiusTop: 2.0,
28
- * radiusBottom: 2.0,
29
- * height: 5.0,
30
- * radialSegments: 20,
31
- * heightSegments: 1,
32
- * openEnded: false
33
- * }),
34
- * material: new PhongMaterial(viewer.scene, {
35
- * diffuseMap: new Texture(viewer.scene, {
36
- * src: "textures/diffuse/uvGrid2.jpg"
37
- * })
38
- * })
39
- * });
40
- * ````
41
- *
42
- * @function buildCylinderGeometry
43
- * @param {*} [cfg] Configs
44
- * @param {String} [cfg.id] Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted.
45
- * @param {Number[]} [cfg.center] 3D point indicating the center position.
46
- * @param {Number} [cfg.radiusTop=1] Radius of top.
47
- * @param {Number} [cfg.radiusBottom=1] Radius of bottom.
48
- * @param {Number} [cfg.height=1] Height.
49
- * @param {Number} [cfg.radialSegments=60] Number of horizontal segments.
50
- * @param {Number} [cfg.heightSegments=1] Number of vertical segments.
51
- * @param {Boolean} [cfg.openEnded=false] Whether or not the cylinder has solid caps on the ends.
52
- * @returns {Object} Configuration for a {@link Geometry} subtype.
53
- */
54
- function buildCylinderGeometry(cfg = {}) {
55
-
56
- let radiusTop = cfg.radiusTop || 1;
57
- if (radiusTop < 0) {
58
- console.error("negative radiusTop not allowed - will invert");
59
- radiusTop *= -1;
60
- }
61
-
62
- let radiusBottom = cfg.radiusBottom || 1;
63
- if (radiusBottom < 0) {
64
- console.error("negative radiusBottom not allowed - will invert");
65
- radiusBottom *= -1;
66
- }
67
-
68
- let height = cfg.height || 1;
69
- if (height < 0) {
70
- console.error("negative height not allowed - will invert");
71
- height *= -1;
72
- }
73
-
74
- let radialSegments = cfg.radialSegments || 32;
75
- if (radialSegments < 0) {
76
- console.error("negative radialSegments not allowed - will invert");
77
- radialSegments *= -1;
78
- }
79
- if (radialSegments < 3) {
80
- radialSegments = 3;
81
- }
82
-
83
- let heightSegments = cfg.heightSegments || 1;
84
- if (heightSegments < 0) {
85
- console.error("negative heightSegments not allowed - will invert");
86
- heightSegments *= -1;
87
- }
88
- if (heightSegments < 1) {
89
- heightSegments = 1;
90
- }
91
-
92
- const openEnded = !!cfg.openEnded;
93
-
94
- let center = cfg.center;
95
- const centerX = center ? center[0] : 0;
96
- const centerY = center ? center[1] : 0;
97
- const centerZ = center ? center[2] : 0;
98
-
99
- const heightHalf = height / 2;
100
- const heightLength = height / heightSegments;
101
- const radialAngle = (2.0 * Math.PI / radialSegments);
102
- const radialLength = 1.0 / radialSegments;
103
- //var nextRadius = this._radiusBottom;
104
- const radiusChange = (radiusTop - radiusBottom) / heightSegments;
105
-
106
- const positions = [];
107
- const normals = [];
108
- const uvs = [];
109
- const indices = [];
110
-
111
- let h;
112
- let i;
113
-
114
- let x;
115
- let z;
116
-
117
- let currentRadius;
118
- let currentHeight;
119
-
120
- let first;
121
- let second;
122
-
123
- let startIndex;
124
- let tu;
125
- let tv;
126
-
127
- // create vertices
128
- const normalY = (90.0 - (Math.atan(height / (radiusBottom - radiusTop))) * 180 / Math.PI) / 90.0;
129
-
130
- for (h = 0; h <= heightSegments; h++) {
131
- currentRadius = radiusTop - h * radiusChange;
132
- currentHeight = heightHalf - h * heightLength;
133
-
134
- for (i = 0; i <= radialSegments; i++) {
135
- x = Math.sin(i * radialAngle);
136
- z = Math.cos(i * radialAngle);
137
-
138
- normals.push(currentRadius * x);
139
- normals.push(normalY); //todo
140
- normals.push(currentRadius * z);
141
-
142
- uvs.push((i * radialLength));
143
- uvs.push(h * 1 / heightSegments);
144
-
145
- positions.push((currentRadius * x) + centerX);
146
- positions.push((currentHeight) + centerY);
147
- positions.push((currentRadius * z) + centerZ);
148
- }
149
- }
150
-
151
- // create faces
152
- for (h = 0; h < heightSegments; h++) {
153
- for (i = 0; i <= radialSegments; i++) {
154
-
155
- first = h * (radialSegments + 1) + i;
156
- second = first + radialSegments;
157
-
158
- indices.push(first);
159
- indices.push(second);
160
- indices.push(second + 1);
161
-
162
- indices.push(first);
163
- indices.push(second + 1);
164
- indices.push(first + 1);
165
- }
166
- }
167
-
168
- // create top cap
169
- if (!openEnded && radiusTop > 0) {
170
- startIndex = (positions.length / 3);
171
-
172
- // top center
173
- normals.push(0.0);
174
- normals.push(1.0);
175
- normals.push(0.0);
176
-
177
- uvs.push(0.5);
178
- uvs.push(0.5);
179
-
180
- positions.push(0 + centerX);
181
- positions.push(heightHalf + centerY);
182
- positions.push(0 + centerZ);
183
-
184
- // top triangle fan
185
- for (i = 0; i <= radialSegments; i++) {
186
- x = Math.sin(i * radialAngle);
187
- z = Math.cos(i * radialAngle);
188
- tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;
189
- tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;
190
-
191
- normals.push(radiusTop * x);
192
- normals.push(1.0);
193
- normals.push(radiusTop * z);
194
-
195
- uvs.push(tu);
196
- uvs.push(tv);
197
-
198
- positions.push((radiusTop * x) + centerX);
199
- positions.push((heightHalf) + centerY);
200
- positions.push((radiusTop * z) + centerZ);
201
- }
202
-
203
- for (i = 0; i < radialSegments; i++) {
204
- center = startIndex;
205
- first = startIndex + 1 + i;
206
-
207
- indices.push(first);
208
- indices.push(first + 1);
209
- indices.push(center);
210
- }
211
- }
212
-
213
- // create bottom cap
214
- if (!openEnded && radiusBottom > 0) {
215
-
216
- startIndex = (positions.length / 3);
217
-
218
- // top center
219
- normals.push(0.0);
220
- normals.push(-1.0);
221
- normals.push(0.0);
222
-
223
- uvs.push(0.5);
224
- uvs.push(0.5);
225
-
226
- positions.push(0 + centerX);
227
- positions.push(0 - heightHalf + centerY);
228
- positions.push(0 + centerZ);
229
-
230
- // top triangle fan
231
- for (i = 0; i <= radialSegments; i++) {
232
-
233
- x = Math.sin(i * radialAngle);
234
- z = Math.cos(i * radialAngle);
235
-
236
- tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;
237
- tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;
238
-
239
- normals.push(radiusBottom * x);
240
- normals.push(-1.0);
241
- normals.push(radiusBottom * z);
242
-
243
- uvs.push(tu);
244
- uvs.push(tv);
245
-
246
- positions.push((radiusBottom * x) + centerX);
247
- positions.push((0 - heightHalf) + centerY);
248
- positions.push((radiusBottom * z) + centerZ);
249
- }
250
-
251
- for (i = 0; i < radialSegments; i++) {
252
-
253
- center = startIndex;
254
- first = startIndex + 1 + i;
255
-
256
- indices.push(center);
257
- indices.push(first + 1);
258
- indices.push(first);
259
- }
260
- }
261
-
262
- return utils.apply(cfg, {
263
- positions: positions,
264
- normals: normals,
265
- uv: uvs,
266
- indices: indices
267
- });
268
- }
269
-
270
-
271
- export {buildCylinderGeometry};
@@ -1,102 +0,0 @@
1
- import {utils} from '../../utils.js';
2
-
3
- /**
4
- * @desc Creates a grid-shaped {@link Geometry}.
5
- *
6
- * ## Usage
7
- *
8
- * Creating a {@link Mesh} with a GridGeometry and a {@link PhongMaterial}:
9
- *
10
- * [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#geometry_builders_buildGridGeometry)]
11
- *
12
- * ````javascript
13
- * import {Viewer, Mesh, buildGridGeometry, VBOGeometry, PhongMaterial, Texture} from "yjkkit-sdk.es.js";
14
- *
15
- * const viewer = new Viewer({
16
- * canvasId: "myCanvas"
17
- * });
18
- *
19
- * viewer.camera.eye = [0, 0, 5];
20
- * viewer.camera.look = [0, 0, 0];
21
- * viewer.camera.up = [0, 1, 0];
22
- *
23
- * new Mesh(viewer.scene, {
24
- * geometry: new VBOGeometry(viewer.scene, buildGridGeometry({
25
- * size: 1000,
26
- * divisions: 500
27
- * })),
28
- * material: new PhongMaterial(viewer.scene, {
29
- * color: [0.0, 0.0, 0.0],
30
- * emissive: [0.4, 0.4, 0.4]
31
- * }),
32
- * position: [0, -1.6, 0]
33
- * });
34
- * ````
35
- *
36
- * @function buildGridGeometry
37
- * @param {*} [cfg] Configs
38
- * @param {String} [cfg.id] Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted.
39
- * @param {Number} [cfg.size=1] Dimension on the X and Z-axis.
40
- * @param {Number} [cfg.divisions=1] Number of divisions on X and Z axis..
41
- * @returns {Object} Configuration for a {@link Geometry} subtype.
42
- */
43
- function buildGridGeometry(cfg = {}) {
44
-
45
- let size = cfg.size || 1;
46
- if (size < 0) {
47
- console.error("negative size not allowed - will invert");
48
- size *= -1;
49
- }
50
-
51
- let divisions = cfg.divisions || 1;
52
- if (divisions < 0) {
53
- console.error("negative divisions not allowed - will invert");
54
- divisions *= -1;
55
- }
56
- if (divisions < 1) {
57
- divisions = 1;
58
- }
59
-
60
- size = size || 10;
61
- divisions = divisions || 10;
62
-
63
- const step = size / divisions;
64
- const halfSize = size / 2;
65
-
66
- const positions = [];
67
- const indices = [];
68
- let l = 0;
69
-
70
- for (let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) {
71
-
72
- positions.push(-halfSize);
73
- positions.push(0);
74
- positions.push(k);
75
-
76
- positions.push(halfSize);
77
- positions.push(0);
78
- positions.push(k);
79
-
80
- positions.push(k);
81
- positions.push(0);
82
- positions.push(-halfSize);
83
-
84
- positions.push(k);
85
- positions.push(0);
86
- positions.push(halfSize);
87
-
88
- indices.push(l++);
89
- indices.push(l++);
90
- indices.push(l++);
91
- indices.push(l++);
92
- }
93
-
94
- return utils.apply(cfg, {
95
- primitive: "lines",
96
- positions: positions,
97
- indices: indices
98
- });
99
- }
100
-
101
-
102
- export {buildGridGeometry};
@@ -1,168 +0,0 @@
1
- import {utils} from '../../utils.js';
2
-
3
- /**
4
- * @desc Creates a plane-shaped {@link Geometry}.
5
- *
6
- * ## Usage
7
- *
8
- * Creating a {@link Mesh} with a PlaneGeometry and a {@link PhongMaterial} with diffuse {@link Texture}:
9
- *
10
- * [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#geometry_builders_buildPlaneGeometry)]
11
- *
12
- * ````javascript
13
- * import {Viewer, Mesh, buildPlaneGeometry, ReadableGeometry, PhongMaterial, Texture} from "yjkkit-sdk.es.js";
14
- *
15
- * const viewer = new Viewer({
16
- * canvasId: "myCanvas"
17
- * });
18
- *
19
- * viewer.camera.eye = [0, 0, 5];
20
- * viewer.camera.look = [0, 0, 0];
21
- * viewer.camera.up = [0, 1, 0];
22
-
23
- * new Mesh(viewer.scene, {
24
- * geometry: new ReadableGeometry(viewer.scene, buildPlaneGeometry({
25
- * center: [0,0,0],
26
- * xSize: 2,
27
- * zSize: 2,
28
- * xSegments: 10,
29
- * zSegments: 10
30
- * }),
31
- * material: new PhongMaterial(viewer.scene, {
32
- * diffuseMap: new Texture(viewer.scene, {
33
- * src: "textures/diffuse/uvGrid2.jpg"
34
- * })
35
- * })
36
- * });
37
- * ````
38
- *
39
- * @function buildPlaneGeometry
40
- * @param {*} [cfg] Configs
41
- * @param {Number[]} [cfg.center] 3D point indicating the center position.
42
- * @param {String} [cfg.id] Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted.
43
- * @param {Number} [cfg.xSize=1] Dimension on the X-axis.
44
- * @param {Number} [cfg.zSize=1] Dimension on the Z-axis.
45
- * @param {Number} [cfg.xSegments=1] Number of segments on the X-axis.
46
- * @param {Number} [cfg.zSegments=1] Number of segments on the Z-axis.
47
- * @returns {Object} Configuration for a {@link Geometry} subtype.
48
- */
49
- function buildPlaneGeometry(cfg = {}) {
50
-
51
- let xSize = cfg.xSize || 1;
52
- if (xSize < 0) {
53
- console.error("negative xSize not allowed - will invert");
54
- xSize *= -1;
55
- }
56
-
57
- let zSize = cfg.zSize || 1;
58
- if (zSize < 0) {
59
- console.error("negative zSize not allowed - will invert");
60
- zSize *= -1;
61
- }
62
-
63
- let xSegments = cfg.xSegments || 1;
64
- if (xSegments < 0) {
65
- console.error("negative xSegments not allowed - will invert");
66
- xSegments *= -1;
67
- }
68
- if (xSegments < 1) {
69
- xSegments = 1;
70
- }
71
-
72
- let zSegments = cfg.xSegments || 1;
73
- if (zSegments < 0) {
74
- console.error("negative zSegments not allowed - will invert");
75
- zSegments *= -1;
76
- }
77
- if (zSegments < 1) {
78
- zSegments = 1;
79
- }
80
-
81
- const center = cfg.center;
82
- const centerX = center ? center[0] : 0;
83
- const centerY = center ? center[1] : 0;
84
- const centerZ = center ? center[2] : 0;
85
-
86
- const halfWidth = xSize / 2;
87
- const halfHeight = zSize / 2;
88
-
89
- const planeX = Math.floor(xSegments) || 1;
90
- const planeZ = Math.floor(zSegments) || 1;
91
-
92
- const planeX1 = planeX + 1;
93
- const planeZ1 = planeZ + 1;
94
-
95
- const segmentWidth = xSize / planeX;
96
- const segmentHeight = zSize / planeZ;
97
-
98
- const positions = new Float32Array(planeX1 * planeZ1 * 3);
99
- const normals = new Float32Array(planeX1 * planeZ1 * 3);
100
- const uvs = new Float32Array(planeX1 * planeZ1 * 2);
101
-
102
- let offset = 0;
103
- let offset2 = 0;
104
-
105
- let iz;
106
- let ix;
107
- let x;
108
- let a;
109
- let b;
110
- let c;
111
- let d;
112
-
113
- for (iz = 0; iz < planeZ1; iz++) {
114
-
115
- const z = iz * segmentHeight - halfHeight;
116
-
117
- for (ix = 0; ix < planeX1; ix++) {
118
-
119
- x = ix * segmentWidth - halfWidth;
120
-
121
- positions[offset] = x + centerX;
122
- positions[offset + 1] = centerY;
123
- positions[offset + 2] = -z + centerZ;
124
-
125
- normals[offset + 2] = -1;
126
-
127
- uvs[offset2] = (ix) / planeX;
128
- uvs[offset2 + 1] = ((planeZ - iz) / planeZ);
129
-
130
- offset += 3;
131
- offset2 += 2;
132
- }
133
- }
134
-
135
- offset = 0;
136
-
137
- const indices = new ((positions.length / 3) > 65535 ? Uint32Array : Uint16Array)(planeX * planeZ * 6);
138
-
139
- for (iz = 0; iz < planeZ; iz++) {
140
-
141
- for (ix = 0; ix < planeX; ix++) {
142
-
143
- a = ix + planeX1 * iz;
144
- b = ix + planeX1 * (iz + 1);
145
- c = (ix + 1) + planeX1 * (iz + 1);
146
- d = (ix + 1) + planeX1 * iz;
147
-
148
- indices[offset] = d;
149
- indices[offset + 1] = b;
150
- indices[offset + 2] = a;
151
-
152
- indices[offset + 3] = d;
153
- indices[offset + 4] = c;
154
- indices[offset + 5] = b;
155
-
156
- offset += 6;
157
- }
158
- }
159
-
160
- return utils.apply(cfg, {
161
- positions: positions,
162
- normals: normals,
163
- uv: uvs,
164
- indices: indices
165
- });
166
- }
167
-
168
- export {buildPlaneGeometry};
@@ -1,161 +0,0 @@
1
- import {utils} from '../../utils.js';
2
-
3
- /**
4
- * @desc Creates a sphere-shaped {@link Geometry}.
5
- *
6
- * ## Usage
7
- *
8
- * Creating a {@link Mesh} with a sphere-shaped {@link ReadableGeometry} :
9
- *
10
- * [[Run this example](http://yjkkit.github.io/yjkkit-sdk/examples/#geometry_builders_buildSphereGeometry)]
11
- *
12
- * ````javascript
13
- * import {Viewer, Mesh, buildSphereGeometry, ReadableGeometry, PhongMaterial, Texture} from "yjkkit-sdk.es.js";
14
- *
15
- * const viewer = new Viewer({
16
- * canvasId: "myCanvas"
17
- * });
18
- *
19
- * viewer.camera.eye = [0, 0, 5];
20
- * viewer.camera.look = [0, 0, 0];
21
- * viewer.camera.up = [0, 1, 0];
22
- *
23
- * new Mesh(viewer.scene, {
24
- * geometry: new ReadableGeometry(viewer.scene, buildSphereGeometry({
25
- * center: [0,0,0],
26
- * radius: 1.5,
27
- * heightSegments: 60,
28
- * widthSegments: 60
29
- * }),
30
- * material: new PhongMaterial(viewer.scene, {
31
- * diffuseMap: new Texture(viewer.scene, {
32
- * src: "textures/diffuse/uvGrid2.jpg"
33
- * })
34
- * })
35
- * });
36
- * ````
37
- *
38
- * @function buildSphereGeometry
39
- * @param {*} [cfg] Configs
40
- * @param {String} [cfg.id] Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted.
41
- * @param {Number[]} [cfg.center] 3D point indicating the center position.
42
- * @param {Number} [cfg.radius=1] Radius.
43
- * @param {Number} [cfg.heightSegments=24] Number of latitudinal bands.
44
- * @param {Number} [cfg.widthSegments=18] Number of longitudinal bands.
45
- * @returns {Object} Configuration for a {@link Geometry} subtype.
46
- */
47
- function buildSphereGeometry(cfg = {}) {
48
-
49
- const lod = cfg.lod || 1;
50
-
51
- const centerX = cfg.center ? cfg.center[0] : 0;
52
- const centerY = cfg.center ? cfg.center[1] : 0;
53
- const centerZ = cfg.center ? cfg.center[2] : 0;
54
-
55
- let radius = cfg.radius || 1;
56
- if (radius < 0) {
57
- console.error("negative radius not allowed - will invert");
58
- radius *= -1;
59
- }
60
-
61
- let heightSegments = cfg.heightSegments || 18;
62
- if (heightSegments < 0) {
63
- console.error("negative heightSegments not allowed - will invert");
64
- heightSegments *= -1;
65
- }
66
- heightSegments = Math.floor(lod * heightSegments);
67
- if (heightSegments < 18) {
68
- heightSegments = 18;
69
- }
70
-
71
- let widthSegments = cfg.widthSegments || 18;
72
- if (widthSegments < 0) {
73
- console.error("negative widthSegments not allowed - will invert");
74
- widthSegments *= -1;
75
- }
76
- widthSegments = Math.floor(lod * widthSegments);
77
- if (widthSegments < 18) {
78
- widthSegments = 18;
79
- }
80
-
81
- const positions = [];
82
- const normals = [];
83
- const uvs = [];
84
- const indices = [];
85
-
86
- let i;
87
- let j;
88
-
89
- let theta;
90
- let sinTheta;
91
- let cosTheta;
92
-
93
- let phi;
94
- let sinPhi;
95
- let cosPhi;
96
-
97
- let x;
98
- let y;
99
- let z;
100
-
101
- let u;
102
- let v;
103
-
104
- let first;
105
- let second;
106
-
107
- for (i = 0; i <= heightSegments; i++) {
108
-
109
- theta = i * Math.PI / heightSegments;
110
- sinTheta = Math.sin(theta);
111
- cosTheta = Math.cos(theta);
112
-
113
- for (j = 0; j <= widthSegments; j++) {
114
-
115
- phi = j * 2 * Math.PI / widthSegments;
116
- sinPhi = Math.sin(phi);
117
- cosPhi = Math.cos(phi);
118
-
119
- x = cosPhi * sinTheta;
120
- y = cosTheta;
121
- z = sinPhi * sinTheta;
122
- u = 1.0 - j / widthSegments;
123
- v = i / heightSegments;
124
-
125
- normals.push(x);
126
- normals.push(y);
127
- normals.push(z);
128
-
129
- uvs.push(u);
130
- uvs.push(v);
131
-
132
- positions.push(centerX + radius * x);
133
- positions.push(centerY + radius * y);
134
- positions.push(centerZ + radius * z);
135
- }
136
- }
137
-
138
- for (i = 0; i < heightSegments; i++) {
139
- for (j = 0; j < widthSegments; j++) {
140
-
141
- first = (i * (widthSegments + 1)) + j;
142
- second = first + widthSegments + 1;
143
-
144
- indices.push(first + 1);
145
- indices.push(second + 1);
146
- indices.push(second);
147
- indices.push(first + 1);
148
- indices.push(second);
149
- indices.push(first);
150
- }
151
- }
152
-
153
- return utils.apply(cfg, {
154
- positions: positions,
155
- normals: normals,
156
- uv: uvs,
157
- indices: indices
158
- });
159
- }
160
-
161
- export {buildSphereGeometry};