t3d-ez.gl 0.0.1

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 (223) hide show
  1. package/dist/core/Controls/controlsLibs/FirstControls.cjs.js +1 -0
  2. package/dist/core/Controls/controlsLibs/FirstControls.esm.js +1 -0
  3. package/dist/core/Controls/index.cjs.js +1 -0
  4. package/dist/core/Controls/index.esm.js +1 -0
  5. package/dist/core/DynamicSky/index.cjs.js +1 -0
  6. package/dist/core/DynamicSky/index.esm.js +1 -0
  7. package/dist/core/Lights/Builders/DirectionalLightBuilder.cjs.js +1 -0
  8. package/dist/core/Lights/Builders/DirectionalLightBuilder.esm.js +1 -0
  9. package/dist/core/Lights/Builders/PointLightBuilder.cjs.js +1 -0
  10. package/dist/core/Lights/Builders/PointLightBuilder.esm.js +1 -0
  11. package/dist/core/Lights/index.cjs.js +1 -0
  12. package/dist/core/Lights/index.esm.js +1 -0
  13. package/dist/core/Map/extrudeMap.cjs.js +1 -0
  14. package/dist/core/Map/extrudeMap.esm.js +1 -0
  15. package/dist/core/Map/index.cjs.js +1 -0
  16. package/dist/core/Map/index.esm.js +1 -0
  17. package/dist/core/MarkerHtmlUI/index.cjs.js +1 -0
  18. package/dist/core/MarkerHtmlUI/index.esm.js +1 -0
  19. package/dist/core/Materials/FresnelMaterial.cjs.js +1 -0
  20. package/dist/core/Materials/FresnelMaterial.esm.js +1 -0
  21. package/dist/core/Materials/GradationMaterial.cjs.js +1 -0
  22. package/dist/core/Materials/GradationMaterial.esm.js +1 -0
  23. package/dist/core/Materials/index.cjs.js +1 -0
  24. package/dist/core/Materials/index.esm.js +1 -0
  25. package/dist/core/Meshes/Builders/BoxBuilder.cjs.js +1 -0
  26. package/dist/core/Meshes/Builders/BoxBuilder.esm.js +1 -0
  27. package/dist/core/Meshes/Builders/MeshBuilder.cjs.js +1 -0
  28. package/dist/core/Meshes/Builders/MeshBuilder.esm.js +1 -0
  29. package/dist/core/Meshes/Builders/PlaneBuilder.cjs.js +1 -0
  30. package/dist/core/Meshes/Builders/PlaneBuilder.esm.js +1 -0
  31. package/dist/core/Meshes/Builders/SphereBuilder.cjs.js +1 -0
  32. package/dist/core/Meshes/Builders/SphereBuilder.esm.js +1 -0
  33. package/dist/core/Meshes/index.cjs.js +1 -0
  34. package/dist/core/Meshes/index.esm.js +1 -0
  35. package/dist/core/PostProcessor/effects/OutlineEffect.cjs.js +1 -0
  36. package/dist/core/PostProcessor/effects/OutlineEffect.esm.js +1 -0
  37. package/dist/core/PostProcessor/effects/PotateEffect.cjs.js +1 -0
  38. package/dist/core/PostProcessor/effects/PotateEffect.esm.js +1 -0
  39. package/dist/core/PostProcessor/effects/SAOEffect.cjs.js +1 -0
  40. package/dist/core/PostProcessor/effects/SAOEffect.esm.js +1 -0
  41. package/dist/core/PostProcessor/effects/UnrealBloomEffect.cjs.js +1 -0
  42. package/dist/core/PostProcessor/effects/UnrealBloomEffect.esm.js +1 -0
  43. package/dist/core/PostProcessor/index.cjs.js +1 -0
  44. package/dist/core/PostProcessor/index.esm.js +1 -0
  45. package/dist/core/Resource/ResourceManager.cjs.js +1 -0
  46. package/dist/core/Resource/ResourceManager.esm.js +1 -0
  47. package/dist/core/Resource/loaders.cjs.js +1 -0
  48. package/dist/core/Resource/loaders.esm.js +1 -0
  49. package/dist/core/Resource/types.cjs.js +1 -0
  50. package/dist/core/Resource/types.esm.js +1 -0
  51. package/dist/core/WebGLEngine/index.cjs.js +1 -0
  52. package/dist/core/WebGLEngine/index.esm.js +1 -0
  53. package/dist/helpers/InfiniteGridHelper.cjs.js +1 -0
  54. package/dist/helpers/InfiniteGridHelper.esm.js +1 -0
  55. package/dist/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/fsum.cjs.js +1 -0
  56. package/dist/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/fsum.esm.js +1 -0
  57. package/dist/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/merge.cjs.js +1 -0
  58. package/dist/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/merge.esm.js +1 -0
  59. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/cartesian.cjs.js +1 -0
  60. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/cartesian.esm.js +1 -0
  61. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/circle.cjs.js +1 -0
  62. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/circle.esm.js +1 -0
  63. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/antimeridian.cjs.js +1 -0
  64. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/antimeridian.esm.js +1 -0
  65. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/buffer.cjs.js +1 -0
  66. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/buffer.esm.js +1 -0
  67. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/circle.cjs.js +1 -0
  68. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/circle.esm.js +1 -0
  69. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/index.cjs.js +1 -0
  70. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/index.esm.js +1 -0
  71. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/line.cjs.js +1 -0
  72. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/line.esm.js +1 -0
  73. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/rectangle.cjs.js +1 -0
  74. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/rectangle.esm.js +1 -0
  75. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/rejoin.cjs.js +1 -0
  76. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/clip/rejoin.esm.js +1 -0
  77. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/compose.cjs.js +1 -0
  78. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/compose.esm.js +1 -0
  79. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/identity.cjs.js +1 -0
  80. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/identity.esm.js +1 -0
  81. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/math.cjs.js +1 -0
  82. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/math.esm.js +1 -0
  83. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/noop.cjs.js +1 -0
  84. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/noop.esm.js +1 -0
  85. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/bounds.cjs.js +1 -0
  86. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/path/bounds.esm.js +1 -0
  87. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/pointEqual.cjs.js +1 -0
  88. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/pointEqual.esm.js +1 -0
  89. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/polygonContains.cjs.js +1 -0
  90. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/polygonContains.esm.js +1 -0
  91. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/fit.cjs.js +1 -0
  92. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/fit.esm.js +1 -0
  93. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/index.cjs.js +1 -0
  94. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/index.esm.js +1 -0
  95. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/mercator.cjs.js +1 -0
  96. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/mercator.esm.js +1 -0
  97. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/resample.cjs.js +1 -0
  98. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/projection/resample.esm.js +1 -0
  99. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/rotation.cjs.js +1 -0
  100. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/rotation.esm.js +1 -0
  101. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/stream.cjs.js +1 -0
  102. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/stream.esm.js +1 -0
  103. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/transform.cjs.js +1 -0
  104. package/dist/node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/transform.esm.js +1 -0
  105. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/CSSPlugin.cjs.js +1 -0
  106. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/CSSPlugin.esm.js +1 -0
  107. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/gsap-core.cjs.js +1 -0
  108. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/gsap-core.esm.js +1 -0
  109. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/index.cjs.js +1 -0
  110. package/dist/node_modules/.pnpm/gsap@3.14.2/node_modules/gsap/index.esm.js +1 -0
  111. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.cjs.js +1 -0
  112. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.esm.js +1 -0
  113. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.cjs.js +1 -0
  114. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.esm.js +1 -0
  115. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/OrbitControls.cjs.js +1 -0
  116. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/OrbitControls.esm.js +1 -0
  117. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/PointerLockControls.cjs.js +1 -0
  118. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/PointerLockControls.esm.js +1 -0
  119. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/TrackballControls.cjs.js +1 -0
  120. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/controls/TrackballControls.esm.js +1 -0
  121. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/environments/RoomEnvironment.cjs.js +1 -0
  122. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/environments/RoomEnvironment.esm.js +1 -0
  123. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/libs/stats.module.cjs.js +1 -0
  124. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/libs/stats.module.esm.js +1 -0
  125. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/DRACOLoader.cjs.js +1 -0
  126. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/DRACOLoader.esm.js +1 -0
  127. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/GLTFLoader.cjs.js +1 -0
  128. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/GLTFLoader.esm.js +1 -0
  129. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/HDRLoader.cjs.js +1 -0
  130. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/HDRLoader.esm.js +1 -0
  131. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/RGBELoader.cjs.js +1 -0
  132. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/RGBELoader.esm.js +1 -0
  133. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/physics/AmmoPhysics.cjs.js +1 -0
  134. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/physics/AmmoPhysics.esm.js +1 -0
  135. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/EffectComposer.cjs.js +1 -0
  136. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/EffectComposer.esm.js +1 -0
  137. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/MaskPass.cjs.js +1 -0
  138. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/MaskPass.esm.js +1 -0
  139. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/OutlinePass.cjs.js +1 -0
  140. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/OutlinePass.esm.js +1 -0
  141. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/OutputPass.cjs.js +1 -0
  142. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/OutputPass.esm.js +1 -0
  143. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/Pass.cjs.js +1 -0
  144. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/Pass.esm.js +1 -0
  145. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/RenderPass.cjs.js +1 -0
  146. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/RenderPass.esm.js +1 -0
  147. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/SAOPass.cjs.js +1 -0
  148. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/SAOPass.esm.js +1 -0
  149. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/SMAAPass.cjs.js +1 -0
  150. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/SMAAPass.esm.js +1 -0
  151. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.cjs.js +1 -0
  152. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.esm.js +1 -0
  153. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/UnrealBloomPass.cjs.js +1 -0
  154. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/postprocessing/UnrealBloomPass.esm.js +1 -0
  155. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/renderers/CSS3DRenderer.cjs.js +1 -0
  156. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/renderers/CSS3DRenderer.esm.js +1 -0
  157. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/CopyShader.cjs.js +1 -0
  158. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/CopyShader.esm.js +1 -0
  159. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/DepthLimitedBlurShader.cjs.js +1 -0
  160. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/DepthLimitedBlurShader.esm.js +1 -0
  161. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/GammaCorrectionShader.cjs.js +1 -0
  162. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/GammaCorrectionShader.esm.js +1 -0
  163. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/LuminosityHighPassShader.cjs.js +1 -0
  164. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/LuminosityHighPassShader.esm.js +1 -0
  165. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/OutputShader.cjs.js +1 -0
  166. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/OutputShader.esm.js +1 -0
  167. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/SAOShader.cjs.js +1 -0
  168. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/SAOShader.esm.js +1 -0
  169. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/SMAAShader.cjs.js +1 -0
  170. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/shaders/SMAAShader.esm.js +1 -0
  171. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/utils/BufferGeometryUtils.cjs.js +1 -0
  172. package/dist/node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/utils/BufferGeometryUtils.esm.js +1 -0
  173. package/dist/package.json +36 -0
  174. package/dist/public/texture/yun_noise.png +0 -0
  175. package/dist/t3d-ez.gl.cjs.js +1 -0
  176. package/dist/t3d-ez.gl.esm.js +1 -0
  177. package/dist/types/core/Controls/controlsLibs/FirstControls.d.ts +19 -0
  178. package/dist/types/core/Controls/index.d.ts +36 -0
  179. package/dist/types/core/DynamicSky/index.d.ts +140 -0
  180. package/dist/types/core/Lights/Builders/DirectionalLightBuilder.d.ts +12 -0
  181. package/dist/types/core/Lights/Builders/PointLightBuilder.d.ts +14 -0
  182. package/dist/types/core/Lights/index.d.ts +7 -0
  183. package/dist/types/core/Map/extrudeMap.d.ts +19 -0
  184. package/dist/types/core/Map/index.d.ts +20 -0
  185. package/dist/types/core/MarkerHtmlUI/index.d.ts +21 -0
  186. package/dist/types/core/Materials/FresnelMaterial.d.ts +37 -0
  187. package/dist/types/core/Materials/GradationMaterial.d.ts +11 -0
  188. package/dist/types/core/Materials/index.d.ts +7 -0
  189. package/dist/types/core/Meshes/Builders/BoxBuilder.d.ts +20 -0
  190. package/dist/types/core/Meshes/Builders/MeshBuilder.d.ts +6 -0
  191. package/dist/types/core/Meshes/Builders/PlaneBuilder.d.ts +18 -0
  192. package/dist/types/core/Meshes/Builders/SphereBuilder.d.ts +21 -0
  193. package/dist/types/core/Meshes/Builders/index.d.ts +3 -0
  194. package/dist/types/core/Meshes/index.d.ts +9 -0
  195. package/dist/types/core/Physics/index.d.ts +1 -0
  196. package/dist/types/core/PostProcessor/effects/OutlineEffect.d.ts +12 -0
  197. package/dist/types/core/PostProcessor/effects/PotateEffect.d.ts +10 -0
  198. package/dist/types/core/PostProcessor/effects/SAOEffect.d.ts +14 -0
  199. package/dist/types/core/PostProcessor/effects/UnrealBloomEffect.d.ts +24 -0
  200. package/dist/types/core/PostProcessor/effects/index.d.ts +4 -0
  201. package/dist/types/core/PostProcessor/index.d.ts +21 -0
  202. package/dist/types/core/Resource/ResourceManager.d.ts +25 -0
  203. package/dist/types/core/Resource/index.d.ts +3 -0
  204. package/dist/types/core/Resource/loaders.d.ts +6 -0
  205. package/dist/types/core/Resource/types.d.ts +24 -0
  206. package/dist/types/core/WebGLEngine/index.d.ts +43 -0
  207. package/dist/types/core/WebGLEngine/types/index.d.ts +25 -0
  208. package/dist/types/core/index.d.ts +9 -0
  209. package/dist/types/helpers/InfiniteGridHelper.d.ts +5 -0
  210. package/dist/types/helpers/index.d.ts +1 -0
  211. package/dist/types/index.d.ts +11 -0
  212. package/dist/types/types/PostProcessor/index.d.ts +5 -0
  213. package/dist/types/types/index.d.ts +1 -0
  214. package/dist/types/utils/FpsMeter/index.d.ts +16 -0
  215. package/dist/types/utils/Logger.d.ts +10 -0
  216. package/dist/types/utils/index.d.ts +42 -0
  217. package/dist/utils/FpsMeter/index.cjs.js +1 -0
  218. package/dist/utils/FpsMeter/index.esm.js +1 -0
  219. package/dist/utils/Logger.cjs.js +1 -0
  220. package/dist/utils/Logger.esm.js +1 -0
  221. package/dist/utils/index.cjs.js +1 -0
  222. package/dist/utils/index.esm.js +1 -0
  223. package/package.json +36 -0
@@ -0,0 +1 @@
1
+ import"../../../build/three.module.esm.js";import{Matrix4 as t,Vector2 as e}from"../../../build/three.core.esm.js";const n={defines:{NUM_SAMPLES:7,NUM_RINGS:4,DIFFUSE_TEXTURE:0,PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},tDiffuse:{value:null},tNormal:{value:null},size:{value:new e(512,512)},cameraNear:{value:1},cameraFar:{value:100},cameraProjectionMatrix:{value:new t},cameraInverseProjectionMatrix:{value:new t},scale:{value:1},intensity:{value:.1},bias:{value:.5},minResolution:{value:0},kernelRadius:{value:100},randomSeed:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t}",fragmentShader:"\n\t\t#include <common>\n\n\t\tvarying vec2 vUv;\n\n\t\t#if DIFFUSE_TEXTURE == 1\n\t\tuniform sampler2D tDiffuse;\n\t\t#endif\n\n\t\tuniform highp sampler2D tDepth;\n\t\tuniform highp sampler2D tNormal;\n\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\n\t\tuniform float scale;\n\t\tuniform float intensity;\n\t\tuniform float bias;\n\t\tuniform float kernelRadius;\n\t\tuniform float minResolution;\n\t\tuniform vec2 size;\n\t\tuniform float randomSeed;\n\n\t\t// RGBA depth\n\n\t\t#include <packing>\n\n\t\tvec4 getDefaultColor( const in vec2 screenPosition ) {\n\t\t\t#if DIFFUSE_TEXTURE == 1\n\t\t\treturn texture2D( tDiffuse, vUv );\n\t\t\t#else\n\t\t\treturn vec4( 1.0 );\n\t\t\t#endif\n\t\t}\n\n\t\tfloat getDepth( const in vec2 screenPosition ) {\n\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\t\t}\n\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\n\t\tvec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];\n\t\t\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );\n\t\t\tclipPosition *= clipW; // unprojection.\n\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;\n\t\t}\n\n\t\tvec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );\n\t\t}\n\n\t\tfloat scaleDividedByCameraFar;\n\t\tfloat minResolutionMultipliedByCameraFar;\n\n\t\tfloat getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n\t\t\tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n\t\t\tfloat viewDistance = length( viewDelta );\n\t\t\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n\n\t\t\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );\n\t\t}\n\n\t\t// moving costly divides into consts\n\t\tconst float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n\t\tconst float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n\t\tfloat getAmbientOcclusion( const in vec3 centerViewPosition ) {\n\t\t\t// precompute some variables require in getOcclusion.\n\t\t\tscaleDividedByCameraFar = scale / cameraFar;\n\t\t\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;\n\t\t\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );\n\n\t\t\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/\n\t\t\tfloat angle = rand( vUv + randomSeed ) * PI2;\n\t\t\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;\n\t\t\tvec2 radiusStep = radius;\n\n\t\t\tfloat occlusionSum = 0.0;\n\t\t\tfloat weightSum = 0.0;\n\n\t\t\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n\t\t\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;\n\t\t\t\tradius += radiusStep;\n\t\t\t\tangle += ANGLE_STEP;\n\n\t\t\t\tfloat sampleDepth = getDepth( sampleUv );\n\t\t\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfloat sampleViewZ = getViewZ( sampleDepth );\n\t\t\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );\n\t\t\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n\t\t\t\tweightSum += 1.0;\n\t\t\t}\n\n\t\t\tif( weightSum == 0.0 ) discard;\n\n\t\t\treturn occlusionSum * ( intensity / weightSum );\n\t\t}\n\n\t\tvoid main() {\n\t\t\tfloat centerDepth = getDepth( vUv );\n\t\t\tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n\t\t\t\tdiscard;\n\t\t\t}\n\n\t\t\tfloat centerViewZ = getViewZ( centerDepth );\n\t\t\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );\n\n\t\t\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n\n\t\t\tgl_FragColor = getDefaultColor( vUv );\n\t\t\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;\n\t\t}"};export{n as SAOShader};
@@ -0,0 +1 @@
1
+ "use strict";require("../../../build/three.module.cjs.js");var t=require("../../../build/three.core.cjs.js");const e={defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new t.Vector2(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\n\t\tvoid SMAAEdgeDetectionVS( vec2 texcoord ) {\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 ); // WebGL port note: Changed sign in W component\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAAEdgeDetectionVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\n\t\tvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {\n\t\t\tvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\n\n\t\t\t// Calculate color deltas:\n\t\t\tvec4 delta;\n\t\t\tvec3 C = texture2D( colorTex, texcoord ).rgb;\n\n\t\t\tvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;\n\t\t\tvec3 t = abs( C - Cleft );\n\t\t\tdelta.x = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;\n\t\t\tt = abs( C - Ctop );\n\t\t\tdelta.y = max( max( t.r, t.g ), t.b );\n\n\t\t\t// We do the usual threshold:\n\t\t\tvec2 edges = step( threshold, delta.xy );\n\n\t\t\t// Then discard if there is no edge:\n\t\t\tif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\n\t\t\t\tdiscard;\n\n\t\t\t// Calculate right and bottom deltas:\n\t\t\tvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;\n\t\t\tt = abs( C - Cright );\n\t\t\tdelta.z = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;\n\t\t\tt = abs( C - Cbottom );\n\t\t\tdelta.w = max( max( t.r, t.g ), t.b );\n\n\t\t\t// Calculate the maximum delta in the direct neighborhood:\n\t\t\tfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\n\n\t\t\t// Calculate left-left and top-top deltas:\n\t\t\tvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;\n\t\t\tt = abs( C - Cleftleft );\n\t\t\tdelta.z = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;\n\t\t\tt = abs( C - Ctoptop );\n\t\t\tdelta.w = max( max( t.r, t.g ), t.b );\n\n\t\t\t// Calculate the final maximum delta:\n\t\t\tmaxDelta = max( max( maxDelta, delta.z ), delta.w );\n\n\t\t\t// Local contrast adaptation in action:\n\t\t\tedges.xy *= step( 0.5 * maxDelta, delta.xy );\n\n\t\t\treturn vec4( edges, 0.0, 0.0 );\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );\n\n\t\t}"},n={defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new t.Vector2(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\t\tvarying vec2 vPixcoord;\n\n\t\tvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\n\t\t\tvPixcoord = texcoord / resolution;\n\n\t\t\t// We will use these offsets for the searches later on (see @PSEUDO_GATHER4):\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components\n\n\t\t\t// And these for the searches, they indicate the ends of the loops:\n\t\t\tvOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAABlendingWeightCalculationVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\t#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tArea;\n\t\tuniform sampler2D tSearch;\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[3];\n\t\tvarying vec2 vPixcoord;\n\n\t\t#if __VERSION__ == 100\n\t\tvec2 round( vec2 x ) {\n\t\t\treturn sign( x ) * floor( abs( x ) + 0.5 );\n\t\t}\n\t\t#endif\n\n\t\tfloat SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {\n\t\t\t// Not required if searchTex accesses are set to point:\n\t\t\t// float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);\n\t\t\t// e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +\n\t\t\t// e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;\n\t\t\te.r = bias + e.r * scale;\n\t\t\treturn 255.0 * texture2D( searchTex, e, 0.0 ).r;\n\t\t}\n\n\t\tfloat SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\t/**\n\t\t\t\t* @PSEUDO_GATHER4\n\t\t\t\t* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to\n\t\t\t\t* sample between edge, thus fetching four edges in a row.\n\t\t\t\t* Sampling with different offsets in each direction allows to disambiguate\n\t\t\t\t* which edges are active from the four fetched ones.\n\t\t\t\t*/\n\t\t\tvec2 e = vec2( 0.0, 1.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord -= vec2( 2.0, 0.0 ) * resolution;\n\t\t\t\tif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\t// We correct the previous (-0.25, -0.125) offset we applied:\n\t\t\ttexcoord.x += 0.25 * resolution.x;\n\n\t\t\t// The searches are bias by 1, so adjust the coords accordingly:\n\t\t\ttexcoord.x += resolution.x;\n\n\t\t\t// Disambiguate the length added by the last step:\n\t\t\ttexcoord.x += 2.0 * resolution.x; // Undo last step\n\t\t\ttexcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);\n\n\t\t\treturn texcoord.x;\n\t\t}\n\n\t\tfloat SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 0.0, 1.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord += vec2( 2.0, 0.0 ) * resolution;\n\t\t\t\tif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.x -= 0.25 * resolution.x;\n\t\t\ttexcoord.x -= resolution.x;\n\t\t\ttexcoord.x -= 2.0 * resolution.x;\n\t\t\ttexcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );\n\n\t\t\treturn texcoord.x;\n\t\t}\n\n\t\tfloat SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 1.0, 0.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign\n\t\t\t\tif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign\n\n\t\t\treturn texcoord.y;\n\t\t}\n\n\t\tfloat SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 1.0, 0.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign\n\t\t\t\tif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign\n\n\t\t\treturn texcoord.y;\n\t\t}\n\n\t\tvec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {\n\t\t\t// Rounding prevents precision errors of bilinear filtering:\n\t\t\tvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;\n\n\t\t\t// We do a scale and bias for mapping to texel space:\n\t\t\ttexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\n\n\t\t\t// Move to proper place, according to the subpixel offset:\n\t\t\ttexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\n\n\t\t\treturn texture2D( areaTex, texcoord, 0.0 ).rg;\n\t\t}\n\n\t\tvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {\n\t\t\tvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\n\n\t\t\tvec2 e = texture2D( edgesTex, texcoord ).rg;\n\n\t\t\tif ( e.g > 0.0 ) { // Edge at north\n\t\t\t\tvec2 d;\n\n\t\t\t\t// Find the distance to the left:\n\t\t\t\tvec2 coords;\n\t\t\t\tcoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );\n\t\t\t\tcoords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)\n\t\t\t\td.x = coords.x;\n\n\t\t\t\t// Now fetch the left crossing edges, two at a time using bilinear\n\t\t\t\t// filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to\n\t\t\t\t// discern what value each edge has:\n\t\t\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;\n\n\t\t\t\t// Find the distance to the right:\n\t\t\t\tcoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );\n\t\t\t\td.y = coords.x;\n\n\t\t\t\t// We want the distances to be in pixel units (doing this here allow to\n\t\t\t\t// better interleave arithmetic and memory accesses):\n\t\t\t\td = d / resolution.x - pixcoord.x;\n\n\t\t\t\t// SMAAArea below needs a sqrt, as the areas texture is compressed\n\t\t\t\t// quadratically:\n\t\t\t\tvec2 sqrt_d = sqrt( abs( d ) );\n\n\t\t\t\t// Fetch the right crossing edges:\n\t\t\t\tcoords.y -= 1.0 * resolution.y; // WebGL port note: Added\n\t\t\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;\n\n\t\t\t\t// Ok, we know how this pattern looks like, now it is time for getting\n\t\t\t\t// the actual area:\n\t\t\t\tweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );\n\t\t\t}\n\n\t\t\tif ( e.r > 0.0 ) { // Edge at west\n\t\t\t\tvec2 d;\n\n\t\t\t\t// Find the distance to the top:\n\t\t\t\tvec2 coords;\n\n\t\t\t\tcoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );\n\t\t\t\tcoords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;\n\t\t\t\td.x = coords.y;\n\n\t\t\t\t// Fetch the top crossing edges:\n\t\t\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;\n\n\t\t\t\t// Find the distance to the bottom:\n\t\t\t\tcoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );\n\t\t\t\td.y = coords.y;\n\n\t\t\t\t// We want the distances to be in pixel units:\n\t\t\t\td = d / resolution.y - pixcoord.y;\n\n\t\t\t\t// SMAAArea below needs a sqrt, as the areas texture is compressed\n\t\t\t\t// quadratically:\n\t\t\t\tvec2 sqrt_d = sqrt( abs( d ) );\n\n\t\t\t\t// Fetch the bottom crossing edges:\n\t\t\t\tcoords.y -= 1.0 * resolution.y; // WebGL port note: Added\n\t\t\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;\n\n\t\t\t\t// Get the area for this direction:\n\t\t\t\tweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );\n\t\t\t}\n\n\t\t\treturn weights;\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );\n\n\t\t}"},o={uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new t.Vector2(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 2 ];\n\n\t\tvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAANeighborhoodBlendingVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tColor;\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 2 ];\n\n\t\tvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {\n\t\t\t// Fetch the blending weights for current pixel:\n\t\t\tvec4 a;\n\t\t\ta.xz = texture2D( blendTex, texcoord ).xz;\n\t\t\ta.y = texture2D( blendTex, offset[ 1 ].zw ).g;\n\t\t\ta.w = texture2D( blendTex, offset[ 1 ].xy ).a;\n\n\t\t\t// Is there any blending weight with a value greater than 0.0?\n\t\t\tif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\n\t\t\t\treturn texture2D( colorTex, texcoord, 0.0 );\n\t\t\t} else {\n\t\t\t\t// Up to 4 lines can be crossing a pixel (one through each edge). We\n\t\t\t\t// favor blending by choosing the line with the maximum weight for each\n\t\t\t\t// direction:\n\t\t\t\tvec2 offset;\n\t\t\t\toffset.x = a.a > a.b ? a.a : -a.b; // left vs. right\n\t\t\t\toffset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs\n\n\t\t\t\t// Then we go in the direction that has the maximum weight:\n\t\t\t\tif ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical\n\t\t\t\t\toffset.y = 0.0;\n\t\t\t\t} else {\n\t\t\t\t\toffset.x = 0.0;\n\t\t\t\t}\n\n\t\t\t\t// Fetch the opposite color and lerp by hand:\n\t\t\t\tvec4 C = texture2D( colorTex, texcoord, 0.0 );\n\t\t\t\ttexcoord += sign( offset ) * resolution;\n\t\t\t\tvec4 Cop = texture2D( colorTex, texcoord, 0.0 );\n\t\t\t\tfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\n\n\t\t\t\t// WebGL port note: Added gamma correction\n\t\t\t\tC.xyz = pow(C.xyz, vec3(2.2));\n\t\t\t\tCop.xyz = pow(Cop.xyz, vec3(2.2));\n\t\t\t\tvec4 mixed = mix(C, Cop, s);\n\t\t\t\tmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\n\n\t\t\t\treturn mixed;\n\t\t\t}\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );\n\n\t\t}"};exports.SMAABlendShader=o,exports.SMAAEdgesShader=e,exports.SMAAWeightsShader=n;
@@ -0,0 +1 @@
1
+ import"../../../build/three.module.esm.js";import{Vector2 as t}from"../../../build/three.core.esm.js";const e={defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new t(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\n\t\tvoid SMAAEdgeDetectionVS( vec2 texcoord ) {\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 ); // WebGL port note: Changed sign in W component\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAAEdgeDetectionVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\n\t\tvec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {\n\t\t\tvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\n\n\t\t\t// Calculate color deltas:\n\t\t\tvec4 delta;\n\t\t\tvec3 C = texture2D( colorTex, texcoord ).rgb;\n\n\t\t\tvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;\n\t\t\tvec3 t = abs( C - Cleft );\n\t\t\tdelta.x = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;\n\t\t\tt = abs( C - Ctop );\n\t\t\tdelta.y = max( max( t.r, t.g ), t.b );\n\n\t\t\t// We do the usual threshold:\n\t\t\tvec2 edges = step( threshold, delta.xy );\n\n\t\t\t// Then discard if there is no edge:\n\t\t\tif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )\n\t\t\t\tdiscard;\n\n\t\t\t// Calculate right and bottom deltas:\n\t\t\tvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;\n\t\t\tt = abs( C - Cright );\n\t\t\tdelta.z = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;\n\t\t\tt = abs( C - Cbottom );\n\t\t\tdelta.w = max( max( t.r, t.g ), t.b );\n\n\t\t\t// Calculate the maximum delta in the direct neighborhood:\n\t\t\tfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );\n\n\t\t\t// Calculate left-left and top-top deltas:\n\t\t\tvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;\n\t\t\tt = abs( C - Cleftleft );\n\t\t\tdelta.z = max( max( t.r, t.g ), t.b );\n\n\t\t\tvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;\n\t\t\tt = abs( C - Ctoptop );\n\t\t\tdelta.w = max( max( t.r, t.g ), t.b );\n\n\t\t\t// Calculate the final maximum delta:\n\t\t\tmaxDelta = max( max( maxDelta, delta.z ), delta.w );\n\n\t\t\t// Local contrast adaptation in action:\n\t\t\tedges.xy *= step( 0.5 * maxDelta, delta.xy );\n\n\t\t\treturn vec4( edges, 0.0, 0.0 );\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );\n\n\t\t}"},n={defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new t(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 3 ];\n\t\tvarying vec2 vPixcoord;\n\n\t\tvoid SMAABlendingWeightCalculationVS( vec2 texcoord ) {\n\t\t\tvPixcoord = texcoord / resolution;\n\n\t\t\t// We will use these offsets for the searches later on (see @PSEUDO_GATHER4):\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components\n\n\t\t\t// And these for the searches, they indicate the ends of the loops:\n\t\t\tvOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAABlendingWeightCalculationVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\t#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tArea;\n\t\tuniform sampler2D tSearch;\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[3];\n\t\tvarying vec2 vPixcoord;\n\n\t\t#if __VERSION__ == 100\n\t\tvec2 round( vec2 x ) {\n\t\t\treturn sign( x ) * floor( abs( x ) + 0.5 );\n\t\t}\n\t\t#endif\n\n\t\tfloat SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {\n\t\t\t// Not required if searchTex accesses are set to point:\n\t\t\t// float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);\n\t\t\t// e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +\n\t\t\t// e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;\n\t\t\te.r = bias + e.r * scale;\n\t\t\treturn 255.0 * texture2D( searchTex, e, 0.0 ).r;\n\t\t}\n\n\t\tfloat SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\t/**\n\t\t\t\t* @PSEUDO_GATHER4\n\t\t\t\t* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to\n\t\t\t\t* sample between edge, thus fetching four edges in a row.\n\t\t\t\t* Sampling with different offsets in each direction allows to disambiguate\n\t\t\t\t* which edges are active from the four fetched ones.\n\t\t\t\t*/\n\t\t\tvec2 e = vec2( 0.0, 1.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord -= vec2( 2.0, 0.0 ) * resolution;\n\t\t\t\tif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\t// We correct the previous (-0.25, -0.125) offset we applied:\n\t\t\ttexcoord.x += 0.25 * resolution.x;\n\n\t\t\t// The searches are bias by 1, so adjust the coords accordingly:\n\t\t\ttexcoord.x += resolution.x;\n\n\t\t\t// Disambiguate the length added by the last step:\n\t\t\ttexcoord.x += 2.0 * resolution.x; // Undo last step\n\t\t\ttexcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);\n\n\t\t\treturn texcoord.x;\n\t\t}\n\n\t\tfloat SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 0.0, 1.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord += vec2( 2.0, 0.0 ) * resolution;\n\t\t\t\tif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.x -= 0.25 * resolution.x;\n\t\t\ttexcoord.x -= resolution.x;\n\t\t\ttexcoord.x -= 2.0 * resolution.x;\n\t\t\ttexcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );\n\n\t\t\treturn texcoord.x;\n\t\t}\n\n\t\tfloat SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 1.0, 0.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign\n\t\t\t\tif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign\n\n\t\t\treturn texcoord.y;\n\t\t}\n\n\t\tfloat SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n\t\t\tvec2 e = vec2( 1.0, 0.0 );\n\n\t\t\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for\n\t\t\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;\n\t\t\t\ttexcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign\n\t\t\t\tif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;\n\t\t\t}\n\n\t\t\ttexcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign\n\t\t\ttexcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign\n\n\t\t\treturn texcoord.y;\n\t\t}\n\n\t\tvec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {\n\t\t\t// Rounding prevents precision errors of bilinear filtering:\n\t\t\tvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;\n\n\t\t\t// We do a scale and bias for mapping to texel space:\n\t\t\ttexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\n\n\t\t\t// Move to proper place, according to the subpixel offset:\n\t\t\ttexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;\n\n\t\t\treturn texture2D( areaTex, texcoord, 0.0 ).rg;\n\t\t}\n\n\t\tvec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {\n\t\t\tvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );\n\n\t\t\tvec2 e = texture2D( edgesTex, texcoord ).rg;\n\n\t\t\tif ( e.g > 0.0 ) { // Edge at north\n\t\t\t\tvec2 d;\n\n\t\t\t\t// Find the distance to the left:\n\t\t\t\tvec2 coords;\n\t\t\t\tcoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );\n\t\t\t\tcoords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)\n\t\t\t\td.x = coords.x;\n\n\t\t\t\t// Now fetch the left crossing edges, two at a time using bilinear\n\t\t\t\t// filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to\n\t\t\t\t// discern what value each edge has:\n\t\t\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;\n\n\t\t\t\t// Find the distance to the right:\n\t\t\t\tcoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );\n\t\t\t\td.y = coords.x;\n\n\t\t\t\t// We want the distances to be in pixel units (doing this here allow to\n\t\t\t\t// better interleave arithmetic and memory accesses):\n\t\t\t\td = d / resolution.x - pixcoord.x;\n\n\t\t\t\t// SMAAArea below needs a sqrt, as the areas texture is compressed\n\t\t\t\t// quadratically:\n\t\t\t\tvec2 sqrt_d = sqrt( abs( d ) );\n\n\t\t\t\t// Fetch the right crossing edges:\n\t\t\t\tcoords.y -= 1.0 * resolution.y; // WebGL port note: Added\n\t\t\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;\n\n\t\t\t\t// Ok, we know how this pattern looks like, now it is time for getting\n\t\t\t\t// the actual area:\n\t\t\t\tweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );\n\t\t\t}\n\n\t\t\tif ( e.r > 0.0 ) { // Edge at west\n\t\t\t\tvec2 d;\n\n\t\t\t\t// Find the distance to the top:\n\t\t\t\tvec2 coords;\n\n\t\t\t\tcoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );\n\t\t\t\tcoords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;\n\t\t\t\td.x = coords.y;\n\n\t\t\t\t// Fetch the top crossing edges:\n\t\t\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;\n\n\t\t\t\t// Find the distance to the bottom:\n\t\t\t\tcoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );\n\t\t\t\td.y = coords.y;\n\n\t\t\t\t// We want the distances to be in pixel units:\n\t\t\t\td = d / resolution.y - pixcoord.y;\n\n\t\t\t\t// SMAAArea below needs a sqrt, as the areas texture is compressed\n\t\t\t\t// quadratically:\n\t\t\t\tvec2 sqrt_d = sqrt( abs( d ) );\n\n\t\t\t\t// Fetch the bottom crossing edges:\n\t\t\t\tcoords.y -= 1.0 * resolution.y; // WebGL port note: Added\n\t\t\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;\n\n\t\t\t\t// Get the area for this direction:\n\t\t\t\tweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );\n\t\t\t}\n\n\t\t\treturn weights;\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );\n\n\t\t}"},o={uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new t(1/1024,1/512)}},vertexShader:"\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 2 ];\n\n\t\tvoid SMAANeighborhoodBlendingVS( vec2 texcoord ) {\n\t\t\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component\n\t\t\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tSMAANeighborhoodBlendingVS( vUv );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tColor;\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec4 vOffset[ 2 ];\n\n\t\tvec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {\n\t\t\t// Fetch the blending weights for current pixel:\n\t\t\tvec4 a;\n\t\t\ta.xz = texture2D( blendTex, texcoord ).xz;\n\t\t\ta.y = texture2D( blendTex, offset[ 1 ].zw ).g;\n\t\t\ta.w = texture2D( blendTex, offset[ 1 ].xy ).a;\n\n\t\t\t// Is there any blending weight with a value greater than 0.0?\n\t\t\tif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {\n\t\t\t\treturn texture2D( colorTex, texcoord, 0.0 );\n\t\t\t} else {\n\t\t\t\t// Up to 4 lines can be crossing a pixel (one through each edge). We\n\t\t\t\t// favor blending by choosing the line with the maximum weight for each\n\t\t\t\t// direction:\n\t\t\t\tvec2 offset;\n\t\t\t\toffset.x = a.a > a.b ? a.a : -a.b; // left vs. right\n\t\t\t\toffset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs\n\n\t\t\t\t// Then we go in the direction that has the maximum weight:\n\t\t\t\tif ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical\n\t\t\t\t\toffset.y = 0.0;\n\t\t\t\t} else {\n\t\t\t\t\toffset.x = 0.0;\n\t\t\t\t}\n\n\t\t\t\t// Fetch the opposite color and lerp by hand:\n\t\t\t\tvec4 C = texture2D( colorTex, texcoord, 0.0 );\n\t\t\t\ttexcoord += sign( offset ) * resolution;\n\t\t\t\tvec4 Cop = texture2D( colorTex, texcoord, 0.0 );\n\t\t\t\tfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\n\n\t\t\t\t// WebGL port note: Added gamma correction\n\t\t\t\tC.xyz = pow(C.xyz, vec3(2.2));\n\t\t\t\tCop.xyz = pow(Cop.xyz, vec3(2.2));\n\t\t\t\tvec4 mixed = mix(C, Cop, s);\n\t\t\t\tmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));\n\n\t\t\t\treturn mixed;\n\t\t\t}\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );\n\n\t\t}"};export{o as SMAABlendShader,e as SMAAEdgesShader,n as SMAAWeightsShader};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../../../build/three.core.cjs.js");exports.toTrianglesDrawMode=function(t,r){if(r===e.TrianglesDrawMode)return t;if(r===e.TriangleFanDrawMode||r===e.TriangleStripDrawMode){let n=t.getIndex();if(null===n){const e=[],r=t.getAttribute("position");if(void 0===r)return t;for(let t=0;t<r.count;t++)e.push(t);t.setIndex(e),n=t.getIndex()}const s=n.count-2,u=[];if(r===e.TriangleFanDrawMode)for(let e=1;e<=s;e++)u.push(n.getX(0)),u.push(n.getX(e)),u.push(n.getX(e+1));else for(let e=0;e<s;e++)e%2==0?(u.push(n.getX(e)),u.push(n.getX(e+1)),u.push(n.getX(e+2))):(u.push(n.getX(e+2)),u.push(n.getX(e+1)),u.push(n.getX(e)));u.length;const o=t.clone();return o.setIndex(u),o.clearGroups(),o}return t};
@@ -0,0 +1 @@
1
+ import{TrianglesDrawMode as e,TriangleFanDrawMode as t,TriangleStripDrawMode as u}from"../../../build/three.core.esm.js";function s(s,n){if(n===e)return s;if(n===t||n===u){let e=s.getIndex();if(null===e){const t=[],u=s.getAttribute("position");if(void 0===u)return s;for(let e=0;e<u.count;e++)t.push(e);s.setIndex(t),e=s.getIndex()}const u=e.count-2,r=[];if(n===t)for(let t=1;t<=u;t++)r.push(e.getX(0)),r.push(e.getX(t)),r.push(e.getX(t+1));else for(let t=0;t<u;t++)t%2==0?(r.push(e.getX(t)),r.push(e.getX(t+1)),r.push(e.getX(t+2))):(r.push(e.getX(t+2)),r.push(e.getX(t+1)),r.push(e.getX(t)));r.length;const o=s.clone();return o.setIndex(r),o.clearGroups(),o}return s}export{s as toTrianglesDrawMode};
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "t3d-ez.gl",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "./dist/t3d-ez.gl.cjs.js",
6
+ "module": "./dist/t3d-ez.gl.esm.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "import": "./dist/t3d-ez.gl.esm.js"
12
+ }
13
+ },
14
+ "type": "module",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "rollup -c rollup.config.js"
20
+ },
21
+ "keywords": [
22
+ "three",
23
+ "webgl"
24
+ ],
25
+ "author": "hunhunzhang",
26
+ "license": "ISC",
27
+ "packageManager": "pnpm@10.6.5",
28
+ "devDependencies": {
29
+ "@types/d3-geo": "^3.1.0",
30
+ "rollup-plugin-dts": "^6.2.1",
31
+ "rollup-plugin-terser": "^7.0.2"
32
+ },
33
+ "dependencies": {
34
+ "d3-geo": "^3.1.1"
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./utils/index.cjs.js"),r=require("./core/Meshes/index.cjs.js"),s=require("./core/WebGLEngine/index.cjs.js"),o=require("./core/Controls/index.cjs.js"),t=require("./core/Lights/index.cjs.js"),i=require("./core/Resource/ResourceManager.cjs.js"),c=require("./core/Resource/types.cjs.js"),a=require("./core/Resource/loaders.cjs.js"),l=require("./core/Materials/index.cjs.js"),n=require("./core/DynamicSky/index.cjs.js"),u=require("./core/Map/index.cjs.js"),d=require("./node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/physics/AmmoPhysics.cjs.js"),p=require("./core/PostProcessor/index.cjs.js"),j=require("./helpers/InfiniteGridHelper.cjs.js"),x=require("./utils/FpsMeter/index.cjs.js"),f=require("./utils/Logger.cjs.js"),P=require("./core/Meshes/Builders/BoxBuilder.cjs.js"),h=require("./core/Meshes/Builders/SphereBuilder.cjs.js"),m=require("./core/Meshes/Builders/PlaneBuilder.cjs.js"),B=require("./core/Lights/Builders/DirectionalLightBuilder.cjs.js"),M=require("./core/Lights/Builders/PointLightBuilder.cjs.js"),g=require("./node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/GLTFLoader.cjs.js"),q=require("./core/Materials/GradationMaterial.cjs.js"),E=require("./core/Materials/FresnelMaterial.cjs.js"),L=require("./core/PostProcessor/effects/PotateEffect.cjs.js"),y=require("./core/PostProcessor/effects/SAOEffect.cjs.js"),T=require("./core/PostProcessor/effects/OutlineEffect.cjs.js"),S=require("./core/PostProcessor/effects/UnrealBloomEffect.cjs.js");exports.destroyModel=e.destroyModel,exports.disposeApp=e.disposeApp,exports.flyTo=e.flyTo,exports.focusTo=e.focusTo,exports.getContainerElement=e.getContainerElement,exports.loadHdrToScene=e.loadHdrToScene,exports.setDefaultEnvironment=e.setDefaultEnvironment,exports.throttleTimer=e.throttleTimer,exports.MeshBuilder=r.MeshBuilder,exports.PotatoEngine=s.PotatoEngine,Object.defineProperty(exports,"CONTROL_TYPE",{enumerable:!0,get:function(){return o.CONTROL_TYPE}}),exports.ControlsManager=o.ControlsManager,exports.LightBuilder=t.LightBuilder,exports.ResourceManager=i.ResourceManager,exports.RESOURCE_TYPE=c.RESOURCE_TYPE,exports.LoaderMaps=a.LoaderMaps,exports.MaterialsLibrary=l.MaterialsLibrary,exports.DynamicSky=n.DynamicSky,exports.PotatoMap=u.PotatoMap,exports.AmmoPhysics=d.AmmoPhysics,exports.PostProcessor=p.PostProcessor,exports.InfiniteGridHelper=j.InfiniteGridHelper,exports.PerformanceStats=x.PerformanceStats,exports.Logger=f.Logger,exports.BoxBuilder=P.BoxBuilder,exports.SphereBuilder=h.SphereBuilder,exports.PlaneBuilder=m.PlaneBuilder,exports.DirectionalLightBuilder=B.DirectionalLightBuilder,exports.PointLightBuilder=M.PointLightBuilder,exports.GLTFLoader=g.GLTFLoader,exports.GradationMaterial=q.GradationMaterial,exports.FresnelMaterial=E.FresnelMaterial,exports.PotateEffect=L.PotateEffect,exports.SAOEffect=y.SAOEffect,exports.OutlineEffect=T.OutlineEffect,exports.UnrealBloomEffect=S.UnrealBloomEffect;
@@ -0,0 +1 @@
1
+ export{destroyModel,disposeApp,flyTo,focusTo,getContainerElement,loadHdrToScene,setDefaultEnvironment,throttleTimer}from"./utils/index.esm.js";export{MeshBuilder}from"./core/Meshes/index.esm.js";export{PotatoEngine}from"./core/WebGLEngine/index.esm.js";export{CONTROL_TYPE,ControlsManager}from"./core/Controls/index.esm.js";export{LightBuilder}from"./core/Lights/index.esm.js";export{ResourceManager}from"./core/Resource/ResourceManager.esm.js";export{RESOURCE_TYPE}from"./core/Resource/types.esm.js";export{LoaderMaps}from"./core/Resource/loaders.esm.js";export{MaterialsLibrary}from"./core/Materials/index.esm.js";export{DynamicSky}from"./core/DynamicSky/index.esm.js";export{PotatoMap}from"./core/Map/index.esm.js";export{AmmoPhysics}from"./node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/physics/AmmoPhysics.esm.js";export{PostProcessor}from"./core/PostProcessor/index.esm.js";export{InfiniteGridHelper}from"./helpers/InfiniteGridHelper.esm.js";export{PerformanceStats}from"./utils/FpsMeter/index.esm.js";export{Logger}from"./utils/Logger.esm.js";export{BoxBuilder}from"./core/Meshes/Builders/BoxBuilder.esm.js";export{SphereBuilder}from"./core/Meshes/Builders/SphereBuilder.esm.js";export{PlaneBuilder}from"./core/Meshes/Builders/PlaneBuilder.esm.js";export{DirectionalLightBuilder}from"./core/Lights/Builders/DirectionalLightBuilder.esm.js";export{PointLightBuilder}from"./core/Lights/Builders/PointLightBuilder.esm.js";export{GLTFLoader}from"./node_modules/.pnpm/three@0.182.0/node_modules/three/examples/jsm/loaders/GLTFLoader.esm.js";export{GradationMaterial}from"./core/Materials/GradationMaterial.esm.js";export{FresnelMaterial}from"./core/Materials/FresnelMaterial.esm.js";export{PotateEffect}from"./core/PostProcessor/effects/PotateEffect.esm.js";export{SAOEffect}from"./core/PostProcessor/effects/SAOEffect.esm.js";export{OutlineEffect}from"./core/PostProcessor/effects/OutlineEffect.esm.js";export{UnrealBloomEffect}from"./core/PostProcessor/effects/UnrealBloomEffect.esm.js";
@@ -0,0 +1,19 @@
1
+ import { Camera } from "three";
2
+ import { PointerLockControls } from "three/examples/jsm/controls/PointerLockControls.js";
3
+ export declare class FirstControls extends PointerLockControls {
4
+ private raycaster;
5
+ private moveForwardNum;
6
+ private moveBackward;
7
+ private moveLeft;
8
+ private moveRightFlag;
9
+ private canJump;
10
+ private prevTime;
11
+ private velocity;
12
+ private direction;
13
+ velocitySpeed: number;
14
+ objects: never[];
15
+ constructor(camera: Camera, domElement?: HTMLElement);
16
+ update(): void;
17
+ onKeyDown(event: KeyboardEvent): void;
18
+ onKeyUp(event: KeyboardEvent): void;
19
+ }
@@ -0,0 +1,36 @@
1
+ import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
2
+ import { TrackballControls } from "three/examples/jsm/controls/TrackballControls.js";
3
+ import { FirstControls } from "./controlsLibs/FirstControls";
4
+ import { Camera } from "three";
5
+ import { PotatoEngine } from "../WebGLEngine";
6
+ export declare enum CONTROL_TYPE {
7
+ ORBIT = 0,
8
+ TRACKBALL = 1,
9
+ FIRSTPERSON = 2
10
+ }
11
+ type ControlManager = {
12
+ engine: PotatoEngine;
13
+ CONTROL_TYPE: typeof CONTROL_TYPE;
14
+ createControls: (type: CONTROL_TYPE, camera: Camera, domElement: HTMLElement) => OrbitControls;
15
+ initOrbitControls: (camera: Camera, domElement: HTMLElement) => OrbitControls;
16
+ initFirstpersonControls: (camera: Camera, domElement: HTMLElement) => FirstControls;
17
+ initTrackballControls: (camera: Camera, domElement: HTMLElement) => TrackballControls;
18
+ };
19
+ export declare class ControlsManager implements ControlManager {
20
+ engine: PotatoEngine;
21
+ CONTROL_TYPE: typeof CONTROL_TYPE;
22
+ constructor(engine: PotatoEngine);
23
+ /**
24
+ *
25
+ * @param type
26
+ * @example CONTROL_TYPE.ORBIT
27
+ * @param camera
28
+ * @param domElement
29
+ * @returns
30
+ */
31
+ createControls(type: number | undefined, camera: Camera, domElement: HTMLElement): any;
32
+ initOrbitControls(camera: Camera, domElement: HTMLElement): OrbitControls;
33
+ initFirstpersonControls(camera: Camera, domElement: HTMLElement): FirstControls;
34
+ initTrackballControls(camera: Camera, domElement: HTMLElement): TrackballControls;
35
+ }
36
+ export {};
@@ -0,0 +1,140 @@
1
+ import { Mesh, ShaderMaterial, Vector3, Color, PMREMGenerator, WebGLRenderer, Scene } from 'three';
2
+ interface Params {
3
+ uTime: number;
4
+ scale: number;
5
+ mult: number;
6
+ weaken: number;
7
+ THICKNESS: number;
8
+ ABSORPTION: number;
9
+ N_MARCH_STEPS: number;
10
+ N_LIGHT_STEPS: number;
11
+ coverage: number;
12
+ sunSize: number;
13
+ skylineF: number;
14
+ curve: number;
15
+ speed: number;
16
+ xfactor: number;
17
+ yfactor: number;
18
+ zfactor: number;
19
+ turbidity: number;
20
+ rayleigh: number;
21
+ mieCoefficient: number;
22
+ mieDirectionalG: number;
23
+ elevation: number;
24
+ azimuth: number;
25
+ exposure: number;
26
+ distortionScale: number;
27
+ size: number;
28
+ }
29
+ interface ShaderUniforms {
30
+ [key: string]: {
31
+ value: any;
32
+ };
33
+ 'sun_color': {
34
+ value: Color;
35
+ };
36
+ 'sunAngularDiameter': {
37
+ value: number;
38
+ };
39
+ 'Intensity': {
40
+ value: number;
41
+ };
42
+ 'sunPosition': {
43
+ value: Vector3;
44
+ };
45
+ 'mieDirectionalG': {
46
+ value: number;
47
+ };
48
+ 'Exposure': {
49
+ value: number;
50
+ };
51
+ 'skyscale': {
52
+ value: number;
53
+ };
54
+ 'turbidity': {
55
+ value: number;
56
+ };
57
+ 'skylineF': {
58
+ value: number;
59
+ };
60
+ 'rayleigh': {
61
+ value: number;
62
+ };
63
+ 'mieCoefficient': {
64
+ value: number;
65
+ };
66
+ 'skyGlowColor': {
67
+ value: Color;
68
+ };
69
+ 'sunGlowColor': {
70
+ value: Color;
71
+ };
72
+ 'backSkyColor': {
73
+ value: Color;
74
+ };
75
+ 'up': {
76
+ value: Vector3;
77
+ };
78
+ 'map': {
79
+ value: any | null;
80
+ };
81
+ 'uTime': {
82
+ value: number;
83
+ };
84
+ 'weaken': {
85
+ value: number;
86
+ };
87
+ 'THICKNESS': {
88
+ value: number;
89
+ };
90
+ 'N_LIGHT_STEPS': {
91
+ value: number;
92
+ };
93
+ 'curve': {
94
+ value: number;
95
+ };
96
+ 'speed': {
97
+ value: number;
98
+ };
99
+ 'wind': {
100
+ value: Vector3;
101
+ };
102
+ 'coverage': {
103
+ value: number;
104
+ };
105
+ 'ABSORPTION': {
106
+ value: number;
107
+ };
108
+ 'mult': {
109
+ value: number;
110
+ };
111
+ 'N_MARCH_STEPS': {
112
+ value: number;
113
+ };
114
+ 'fogColor': {
115
+ value: Color;
116
+ };
117
+ 'fogDensity': {
118
+ value: number;
119
+ };
120
+ }
121
+ interface SkyOptions {
122
+ renderer: WebGLRenderer;
123
+ scene: Scene;
124
+ url?: string;
125
+ }
126
+ declare class DynamicSky extends Mesh {
127
+ PARAMETERS: Params;
128
+ material: ShaderMaterial;
129
+ SHADER_UNIFORMS: ShaderUniforms;
130
+ sun: Vector3;
131
+ renderer: any;
132
+ scene: any;
133
+ pmremGenerator: PMREMGenerator;
134
+ renderTarget: any;
135
+ isSky: boolean;
136
+ constructor(options: SkyOptions);
137
+ updateSun(): void;
138
+ update(time: number): void;
139
+ }
140
+ export { DynamicSky };
@@ -0,0 +1,12 @@
1
+ import { DirectionalLight, Scene, Color, Vector3 } from "three";
2
+ type optionsType = {
3
+ color?: Color;
4
+ intensity?: number;
5
+ position?: Vector3;
6
+ };
7
+ export declare class DirectionalLightBuilder extends DirectionalLight {
8
+ constructor(name: string | undefined, options: optionsType | undefined, scene: Scene);
9
+ initShadowConfig(): void;
10
+ }
11
+ export declare function createDirectionalLight(name: string | undefined, options: optionsType | undefined, scene: Scene): DirectionalLightBuilder;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { PointLight, Scene, Color, Vector3 } from "three";
2
+ type optionsType = {
3
+ color?: Color;
4
+ intensity?: number;
5
+ position?: Vector3;
6
+ distance?: number;
7
+ decay?: number;
8
+ };
9
+ export declare class PointLightBuilder extends PointLight {
10
+ constructor(name: string | undefined, options: optionsType | undefined, scene: Scene);
11
+ initShadowConfig(): void;
12
+ }
13
+ export declare function createPointLight(name: string | undefined, options: optionsType | undefined, scene: Scene): PointLightBuilder;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DirectionalLightBuilder, createDirectionalLight } from "./Builders/DirectionalLightBuilder";
2
+ import { PointLightBuilder, createPointLight } from "./Builders/PointLightBuilder";
3
+ export declare const LightBuilder: {
4
+ createDirectionalLight: typeof createDirectionalLight;
5
+ createPointLight: typeof createPointLight;
6
+ };
7
+ export { DirectionalLightBuilder, PointLightBuilder };
@@ -0,0 +1,19 @@
1
+ import * as THREE from "three";
2
+ interface IExtrudeConfig {
3
+ steps: number;
4
+ depth: number;
5
+ bevelEnabled: boolean;
6
+ bevelThickness?: number;
7
+ bevelSize?: number;
8
+ bevelOffset?: number;
9
+ bevelSegments?: number;
10
+ }
11
+ export declare const mapMaterial: THREE.MeshPhysicalMaterial;
12
+ export declare function createExtrudeMap(data: {
13
+ features: any[];
14
+ }, extrudeConfig?: IExtrudeConfig): {
15
+ mapAreas: THREE.Group<THREE.Object3DEventMap>;
16
+ boundaryLines: THREE.Group<THREE.Object3DEventMap>;
17
+ mercatorConversion: import("d3-geo").GeoProjection;
18
+ };
19
+ export {};
@@ -0,0 +1,20 @@
1
+ interface IExtrudeConfig {
2
+ steps: number;
3
+ depth: number;
4
+ bevelEnabled: boolean;
5
+ bevelThickness?: number;
6
+ bevelSize?: number;
7
+ bevelOffset?: number;
8
+ bevelSegments?: number;
9
+ }
10
+ export declare class PotatoMap {
11
+ constructor();
12
+ static createExtrudeMap(data: {
13
+ features: any[];
14
+ }, extrudeConfig?: IExtrudeConfig): {
15
+ mapAreas: import("three").Group<import("three").Object3DEventMap>;
16
+ boundaryLines: import("three").Group<import("three").Object3DEventMap>;
17
+ mercatorConversion: import("d3-geo").GeoProjection;
18
+ };
19
+ }
20
+ export {};
@@ -0,0 +1,21 @@
1
+ import { CSS3DRenderer, CSS3DSprite } from "three/examples/jsm/renderers/CSS3DRenderer.js";
2
+ import { PotatoEngine } from "../WebGLEngine/index";
3
+ import { Object3D } from "three";
4
+ export declare class MarkerHtmlUI {
5
+ engine: PotatoEngine;
6
+ css3dRenderer: CSS3DRenderer;
7
+ private box3;
8
+ isRender: boolean;
9
+ constructor(engine: PotatoEngine);
10
+ initCSS3DRenderer(): void;
11
+ render(): void;
12
+ stopRender(): void;
13
+ startRender(): void;
14
+ /**
15
+ * 设备数据标签 marker生成函数
16
+ * @param {*} device
17
+ * @param {*} data
18
+ * @returns
19
+ */
20
+ createMarker(device: Object3D, data: any, title?: string, scale?: number, className?: string): CSS3DSprite;
21
+ }
@@ -0,0 +1,37 @@
1
+ import { Color, ShaderMaterial } from 'three';
2
+ export declare const vertexShaderString = "\n\nvarying vec3 vNormal;\n\n varying vec3 vPositionNormal;\n\n void main()\n\n {\n\n vNormal = normalize( normalMatrix * normal ); // \u8F6C\u6362\u5230\u89C6\u56FE\u7A7A\u95F4\n\n vPositionNormal = normalize(( modelViewMatrix * vec4(position, 1.0) ).xyz);\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }";
3
+ export declare const fragmentShaderString = "\n\nuniform vec3 glowColor;\n\n uniform float b;\n\n uniform float p;\n\n uniform float s;\n\n varying vec3 vNormal;\n\n varying vec3 vPositionNormal;\n\n void main()\n\n {\n\n float a = pow( b + s * abs(dot(vNormal, vPositionNormal)), p );\n\n gl_FragColor = vec4( glowColor, a );\n\n }\n";
4
+ /**
5
+ * s: scale
6
+ * b: bias
7
+ * p: power
8
+ * color: glow color
9
+ */
10
+ export declare const options: {
11
+ uniforms: {
12
+ s: {
13
+ type: string;
14
+ value: number;
15
+ };
16
+ b: {
17
+ type: string;
18
+ value: number;
19
+ };
20
+ p: {
21
+ type: string;
22
+ value: number;
23
+ };
24
+ glowColor: {
25
+ type: string;
26
+ value: Color;
27
+ };
28
+ };
29
+ vertexShader: string;
30
+ fragmentShader: string;
31
+ side: 0;
32
+ blending: 2;
33
+ transparent: boolean;
34
+ depthTest: boolean;
35
+ depthWrite: boolean;
36
+ };
37
+ export declare const FresnelMaterial: ShaderMaterial;
@@ -0,0 +1,11 @@
1
+ import { ShaderMaterial, Color } from "three";
2
+ interface IGradationMaterialParams {
3
+ topColor?: Color | string | number;
4
+ bottomColor?: Color | string | number;
5
+ }
6
+ export declare class GradationMaterial extends ShaderMaterial {
7
+ name: string;
8
+ type: string;
9
+ constructor(params?: IGradationMaterialParams);
10
+ }
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import { GradationMaterial } from "./GradationMaterial";
2
+ import { FresnelMaterial } from "./FresnelMaterial";
3
+ declare const MaterialsLibrary: {
4
+ GradationMaterial: typeof GradationMaterial;
5
+ FresnelMaterial: import("three").ShaderMaterial;
6
+ };
7
+ export { MaterialsLibrary, GradationMaterial, FresnelMaterial };
@@ -0,0 +1,20 @@
1
+ import { Scene, Material } from "three";
2
+ import { MeshBuilder } from "./MeshBuilder";
3
+ type boxMeshType = {
4
+ width?: number;
5
+ height?: number;
6
+ depth?: number;
7
+ widthSegments?: number;
8
+ heightSegments?: number;
9
+ depthSegments?: number;
10
+ material?: Material;
11
+ };
12
+ export declare class BoxBuilder extends MeshBuilder {
13
+ options: boxMeshType;
14
+ type: string;
15
+ constructor(name: string | undefined, options: boxMeshType | undefined, scene: Scene);
16
+ private static createGeometry;
17
+ private static createMaterial;
18
+ }
19
+ export declare function createBox(name: string | undefined, options: boxMeshType | undefined, scene: Scene): BoxBuilder;
20
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Mesh, Material, BufferGeometry } from "three";
2
+ export declare class MeshBuilder extends Mesh {
3
+ constructor(geometry?: BufferGeometry, material?: Material);
4
+ updateMaterial(mat: Material | Material[]): void;
5
+ setMaterialAttribute(attrs: string | {}, value?: any): void;
6
+ }
@@ -0,0 +1,18 @@
1
+ import { Scene, Material } from "three";
2
+ import { MeshBuilder } from "./MeshBuilder";
3
+ type planeMeshType = {
4
+ width?: number;
5
+ height?: number;
6
+ widthSegments?: number;
7
+ heightSegments?: number;
8
+ material?: Material;
9
+ };
10
+ export declare class PlaneBuilder extends MeshBuilder {
11
+ options: planeMeshType;
12
+ type: string;
13
+ constructor(name: string | undefined, options: planeMeshType | undefined, scene: Scene);
14
+ private static createGeometry;
15
+ private static createMaterial;
16
+ }
17
+ export declare function createPlane(name: string | undefined, options: planeMeshType | undefined, scene: Scene): PlaneBuilder;
18
+ export {};
@@ -0,0 +1,21 @@
1
+ import { Scene, Material } from "three";
2
+ import { MeshBuilder } from "./MeshBuilder";
3
+ type boxMeshType = {
4
+ radius?: number;
5
+ widthSegments?: number;
6
+ heightSegments?: number;
7
+ phiStart?: number;
8
+ phiLength?: number;
9
+ thetaStart?: number;
10
+ thetaLength?: number;
11
+ material?: Material;
12
+ };
13
+ export declare class SphereBuilder extends MeshBuilder {
14
+ options: boxMeshType;
15
+ type: string;
16
+ constructor(name: string | undefined, options: boxMeshType | undefined, scene: Scene);
17
+ private static createGeometry;
18
+ private static createMaterial;
19
+ }
20
+ export declare function createSphere(name: string | undefined, options: boxMeshType | undefined, scene: Scene): SphereBuilder;
21
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./BoxBuilder";
2
+ export * from "./SphereBuilder";
3
+ export * from "./PlaneBuilder";
@@ -0,0 +1,9 @@
1
+ import { BoxBuilder, createBox } from "./Builders/index";
2
+ import { SphereBuilder, createSphere } from "./Builders/index";
3
+ import { PlaneBuilder, createPlane } from "./Builders/index";
4
+ export declare const MeshBuilder: {
5
+ createBox: typeof createBox;
6
+ createSphere: typeof createSphere;
7
+ createPlane: typeof createPlane;
8
+ };
9
+ export { BoxBuilder, SphereBuilder, PlaneBuilder };
@@ -0,0 +1 @@
1
+ export * from "three/examples/jsm/physics/AmmoPhysics.js";
@@ -0,0 +1,12 @@
1
+ import { Pass } from "three/examples/jsm/postprocessing/Pass.js";
2
+ import { OutlinePass } from "three/examples/jsm/postprocessing/OutlinePass.js";
3
+ import { PostProcessor } from "..";
4
+ import { PotateEffect } from "./PotateEffect";
5
+ export declare class OutlineEffect extends PotateEffect {
6
+ name: string;
7
+ type: string;
8
+ passes: Map<string, Pass> | null;
9
+ outlinePass: OutlinePass;
10
+ constructor(postProcessor: PostProcessor);
11
+ dispose(): void;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { Pass } from "three/examples/jsm/postprocessing/Pass.js";
2
+ import { PostProcessor } from "..";
3
+ export declare class PotateEffect {
4
+ name: string;
5
+ type: string;
6
+ passes: Map<string, Pass> | null;
7
+ uuid: string;
8
+ constructor(postProcessor: PostProcessor);
9
+ dispose(): void;
10
+ }