opal-js_wrap-three 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (503) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile.lock +4 -4
  4. data/lib/opal/js_wrap/three/version.rb +1 -1
  5. data/lib-opal/js_wrap/three/WebGL.js +102 -0
  6. data/lib-opal/js_wrap/three/animation/AnimationClipCreator.js +116 -0
  7. data/lib-opal/js_wrap/three/animation/CCDIKSolver.js +436 -0
  8. data/lib-opal/js_wrap/three/animation/MMDAnimationHelper.js +941 -0
  9. data/lib-opal/js_wrap/three/animation/MMDPhysics.js +1183 -0
  10. data/lib-opal/js_wrap/three/cameras/CinematicCamera.js +204 -0
  11. data/lib-opal/js_wrap/three/controls/ArcballControls.js +2649 -0
  12. data/lib-opal/js_wrap/three/controls/DragControls.js +234 -0
  13. data/lib-opal/js_wrap/three/controls/FirstPersonControls.js +301 -0
  14. data/lib-opal/js_wrap/three/controls/FlyControls.js +357 -0
  15. data/lib-opal/js_wrap/three/controls/OrbitControls.js +908 -0
  16. data/lib-opal/js_wrap/three/controls/PointerLockControls.js +173 -0
  17. data/lib-opal/js_wrap/three/controls/TrackballControls.js +666 -0
  18. data/lib-opal/js_wrap/three/controls/TransformControls.js +1210 -0
  19. data/lib-opal/js_wrap/three/controls/experimental/CameraControls.js +860 -0
  20. data/lib-opal/js_wrap/three/csm/CSM.js +346 -0
  21. data/lib-opal/js_wrap/three/csm/CSMFrustum.js +123 -0
  22. data/lib-opal/js_wrap/three/csm/CSMHelper.js +197 -0
  23. data/lib-opal/js_wrap/three/csm/CSMShader.js +29 -0
  24. data/lib-opal/js_wrap/three/curves/CurveExtras.js +544 -0
  25. data/lib-opal/js_wrap/three/curves/NURBSCurve.js +122 -0
  26. data/lib-opal/js_wrap/three/curves/NURBSSurface.js +78 -0
  27. data/lib-opal/js_wrap/three/curves/NURBSUtils.js +413 -0
  28. data/lib-opal/js_wrap/three/deprecated/Geometry.js +1373 -0
  29. data/lib-opal/js_wrap/three/effects/AnaglyphEffect.js +113 -0
  30. data/lib-opal/js_wrap/three/effects/AsciiEffect.js +267 -0
  31. data/lib-opal/js_wrap/three/effects/OutlineEffect.js +400 -0
  32. data/lib-opal/js_wrap/three/effects/ParallaxBarrierEffect.js +90 -0
  33. data/lib-opal/js_wrap/three/effects/PeppersGhostEffect.js +160 -0
  34. data/lib-opal/js_wrap/three/effects/StereoEffect.js +63 -0
  35. data/lib-opal/js_wrap/three/environments/DebugEnvironment.js +107 -0
  36. data/lib-opal/js_wrap/three/environments/RoomEnvironment.js +166 -0
  37. data/lib-opal/js_wrap/three/exporters/ColladaExporter.js +442 -0
  38. data/lib-opal/js_wrap/three/exporters/DRACOExporter.js +205 -0
  39. data/lib-opal/js_wrap/three/exporters/GLTFExporter.js +2042 -0
  40. data/lib-opal/js_wrap/three/exporters/MMDExporter.js +189 -0
  41. data/lib-opal/js_wrap/three/exporters/OBJExporter.js +241 -0
  42. data/lib-opal/js_wrap/three/exporters/PLYExporter.js +370 -0
  43. data/lib-opal/js_wrap/three/exporters/STLExporter.js +186 -0
  44. data/lib-opal/js_wrap/three/exporters/USDZExporter.js +402 -0
  45. data/lib-opal/js_wrap/three/geometries/BoxLineGeometry.js +106 -0
  46. data/lib-opal/js_wrap/three/geometries/ConvexGeometry.js +88 -0
  47. data/lib-opal/js_wrap/three/geometries/DecalGeometry.js +302 -0
  48. data/lib-opal/js_wrap/three/geometries/LightningStrike.js +817 -0
  49. data/lib-opal/js_wrap/three/geometries/ParametricGeometries.js +280 -0
  50. data/lib-opal/js_wrap/three/geometries/ParametricGeometry.js +146 -0
  51. data/lib-opal/js_wrap/three/geometries/RoundedBoxGeometry.js +183 -0
  52. data/lib-opal/js_wrap/three/geometries/TeapotGeometry.js +352 -0
  53. data/lib-opal/js_wrap/three/geometries/TextGeometry.js +76 -0
  54. data/lib-opal/js_wrap/three/helpers/LightProbeHelper.js +95 -0
  55. data/lib-opal/js_wrap/three/helpers/PositionalAudioHelper.js +138 -0
  56. data/lib-opal/js_wrap/three/helpers/RectAreaLightHelper.js +115 -0
  57. data/lib-opal/js_wrap/three/helpers/VertexNormalsHelper.js +131 -0
  58. data/lib-opal/js_wrap/three/helpers/VertexTangentsHelper.js +118 -0
  59. data/lib-opal/js_wrap/three/interactive/HTMLMesh.js +307 -0
  60. data/lib-opal/js_wrap/three/interactive/InteractiveGroup.js +138 -0
  61. data/lib-opal/js_wrap/three/interactive/SelectionBox.js +264 -0
  62. data/lib-opal/js_wrap/three/interactive/SelectionHelper.js +88 -0
  63. data/lib-opal/js_wrap/three/libs/OimoPhysics/OimoPhysics.js +46059 -0
  64. data/lib-opal/js_wrap/three/libs/OimoPhysics/index.js +92 -0
  65. data/lib-opal/js_wrap/three/libs/chevrotain.module.min.js +6947 -0
  66. data/lib-opal/js_wrap/three/libs/ecsy.module.js +1999 -0
  67. data/lib-opal/js_wrap/three/libs/fflate.module.js +3002 -0
  68. data/lib-opal/js_wrap/three/libs/flow.module.js +3033 -0
  69. data/lib-opal/js_wrap/three/libs/ktx-parse.module.js +392 -0
  70. data/lib-opal/js_wrap/three/libs/lil-gui.module.min.js +821 -0
  71. data/lib-opal/js_wrap/three/libs/meshopt_decoder.module.js +136 -0
  72. data/lib-opal/js_wrap/three/libs/mmdparser.module.js +11022 -0
  73. data/lib-opal/js_wrap/three/libs/motion-controllers.module.js +589 -0
  74. data/lib-opal/js_wrap/three/libs/opentype.module.min.js +6132 -0
  75. data/lib-opal/js_wrap/three/libs/potpack.module.js +171 -0
  76. data/lib-opal/js_wrap/three/libs/rhino3dm/rhino3dm.js +6781 -0
  77. data/lib-opal/js_wrap/three/libs/rhino3dm/rhino3dm.module.js +6783 -0
  78. data/lib-opal/js_wrap/three/libs/stats.module.js +139 -0
  79. data/lib-opal/js_wrap/three/libs/tween.module.min.js +349 -0
  80. data/lib-opal/js_wrap/three/lights/LightProbeGenerator.js +233 -0
  81. data/lib-opal/js_wrap/three/lights/RectAreaLightUniformsLib.js +75 -0
  82. data/lib-opal/js_wrap/three/lines/Line2.js +66 -0
  83. data/lib-opal/js_wrap/three/lines/LineGeometry.js +122 -0
  84. data/lib-opal/js_wrap/three/lines/LineMaterial.js +227 -0
  85. data/lib-opal/js_wrap/three/lines/LineSegments2.js +312 -0
  86. data/lib-opal/js_wrap/three/lines/LineSegmentsGeometry.js +238 -0
  87. data/lib-opal/js_wrap/three/lines/Wireframe.js +98 -0
  88. data/lib-opal/js_wrap/three/lines/WireframeGeometry2.js +65 -0
  89. data/lib-opal/js_wrap/three/loaders/3DMLoader.js +1230 -0
  90. data/lib-opal/js_wrap/three/loaders/3MFLoader.js +1123 -0
  91. data/lib-opal/js_wrap/three/loaders/AMFLoader.js +445 -0
  92. data/lib-opal/js_wrap/three/loaders/BVHLoader.js +365 -0
  93. data/lib-opal/js_wrap/three/loaders/BasisTextureLoader.js +692 -0
  94. data/lib-opal/js_wrap/three/loaders/ColladaLoader.js +3046 -0
  95. data/lib-opal/js_wrap/three/loaders/DDSLoader.js +264 -0
  96. data/lib-opal/js_wrap/three/loaders/DRACOLoader.js +531 -0
  97. data/lib-opal/js_wrap/three/loaders/EXRLoader.js +1834 -0
  98. data/lib-opal/js_wrap/three/loaders/FBXLoader.js +3125 -0
  99. data/lib-opal/js_wrap/three/loaders/FontLoader.js +201 -0
  100. data/lib-opal/js_wrap/three/loaders/GCodeLoader.js +248 -0
  101. data/lib-opal/js_wrap/three/loaders/GLTFLoader.js +3334 -0
  102. data/lib-opal/js_wrap/three/loaders/HDRCubeTextureLoader.js +144 -0
  103. data/lib-opal/js_wrap/three/loaders/IFCLoader.js +2395 -0
  104. data/lib-opal/js_wrap/three/loaders/KMZLoader.js +142 -0
  105. data/lib-opal/js_wrap/three/loaders/KTX2Loader.js +535 -0
  106. data/lib-opal/js_wrap/three/loaders/KTXLoader.js +202 -0
  107. data/lib-opal/js_wrap/three/loaders/LDrawLoader.js +1737 -0
  108. data/lib-opal/js_wrap/three/loaders/LUT3dlLoader.js +163 -0
  109. data/lib-opal/js_wrap/three/loaders/LUTCubeLoader.js +171 -0
  110. data/lib-opal/js_wrap/three/loaders/LWOLoader.js +831 -0
  111. data/lib-opal/js_wrap/three/loaders/LogLuvLoader.js +713 -0
  112. data/lib-opal/js_wrap/three/loaders/LottieLoader.js +103 -0
  113. data/lib-opal/js_wrap/three/loaders/MD2Loader.js +258 -0
  114. data/lib-opal/js_wrap/three/loaders/MDDLoader.js +116 -0
  115. data/lib-opal/js_wrap/three/loaders/MMDLoader.js +1687 -0
  116. data/lib-opal/js_wrap/three/loaders/MTLLoader.js +465 -0
  117. data/lib-opal/js_wrap/three/loaders/NRRDLoader.js +554 -0
  118. data/lib-opal/js_wrap/three/loaders/NodeMaterialLoader.js +248 -0
  119. data/lib-opal/js_wrap/three/loaders/OBJLoader.js +673 -0
  120. data/lib-opal/js_wrap/three/loaders/PCDLoader.js +322 -0
  121. data/lib-opal/js_wrap/three/loaders/PDBLoader.js +318 -0
  122. data/lib-opal/js_wrap/three/loaders/PLYLoader.js +489 -0
  123. data/lib-opal/js_wrap/three/loaders/PRWMLoader.js +247 -0
  124. data/lib-opal/js_wrap/three/loaders/PVRLoader.js +240 -0
  125. data/lib-opal/js_wrap/three/loaders/RGBELoader.js +462 -0
  126. data/lib-opal/js_wrap/three/loaders/RGBMLoader.js +1169 -0
  127. data/lib-opal/js_wrap/three/loaders/STLLoader.js +345 -0
  128. data/lib-opal/js_wrap/three/loaders/SVGLoader.js +2162 -0
  129. data/lib-opal/js_wrap/three/loaders/TDSLoader.js +982 -0
  130. data/lib-opal/js_wrap/three/loaders/TGALoader.js +444 -0
  131. data/lib-opal/js_wrap/three/loaders/TTFLoader.js +210 -0
  132. data/lib-opal/js_wrap/three/loaders/TiltLoader.js +391 -0
  133. data/lib-opal/js_wrap/three/loaders/VOXLoader.js +272 -0
  134. data/lib-opal/js_wrap/three/loaders/VRMLLoader.js +2685 -0
  135. data/lib-opal/js_wrap/three/loaders/VRMLoader.js +103 -0
  136. data/lib-opal/js_wrap/three/loaders/VTKLoader.js +894 -0
  137. data/lib-opal/js_wrap/three/loaders/XYZLoader.js +136 -0
  138. data/lib-opal/js_wrap/three/loaders/ifc/web-ifc-api.js +60504 -0
  139. data/lib-opal/js_wrap/three/loaders/lwo/IFFParser.js +931 -0
  140. data/lib-opal/js_wrap/three/loaders/lwo/LWO2Parser.js +450 -0
  141. data/lib-opal/js_wrap/three/loaders/lwo/LWO3Parser.js +406 -0
  142. data/lib-opal/js_wrap/three/math/Capsule.js +133 -0
  143. data/lib-opal/js_wrap/three/math/ColorConverter.js +104 -0
  144. data/lib-opal/js_wrap/three/math/ConvexHull.js +924 -0
  145. data/lib-opal/js_wrap/three/math/ImprovedNoise.js +86 -0
  146. data/lib-opal/js_wrap/three/math/Lut.js +170 -0
  147. data/lib-opal/js_wrap/three/math/MeshSurfaceSampler.js +187 -0
  148. data/lib-opal/js_wrap/three/math/OBB.js +345 -0
  149. data/lib-opal/js_wrap/three/math/Octree.js +409 -0
  150. data/lib-opal/js_wrap/three/math/SimplexNoise.js +425 -0
  151. data/lib-opal/js_wrap/three/misc/ConvexObjectBreaker.js +447 -0
  152. data/lib-opal/js_wrap/three/misc/GPUComputationRenderer.js +322 -0
  153. data/lib-opal/js_wrap/three/misc/Gyroscope.js +94 -0
  154. data/lib-opal/js_wrap/three/misc/MD2Character.js +225 -0
  155. data/lib-opal/js_wrap/three/misc/MD2CharacterComplex.js +424 -0
  156. data/lib-opal/js_wrap/three/misc/MorphAnimMesh.js +109 -0
  157. data/lib-opal/js_wrap/three/misc/MorphBlendMesh.js +283 -0
  158. data/lib-opal/js_wrap/three/misc/ProgressiveLightMap.js +324 -0
  159. data/lib-opal/js_wrap/three/misc/RollerCoaster.js +489 -0
  160. data/lib-opal/js_wrap/three/misc/TubePainter.js +158 -0
  161. data/lib-opal/js_wrap/three/misc/Volume.js +427 -0
  162. data/lib-opal/js_wrap/three/misc/VolumeSlice.js +210 -0
  163. data/lib-opal/js_wrap/three/modifiers/CurveModifier.js +291 -0
  164. data/lib-opal/js_wrap/three/modifiers/EdgeSplitModifier.js +308 -0
  165. data/lib-opal/js_wrap/three/modifiers/SimplifyModifier.js +435 -0
  166. data/lib-opal/js_wrap/three/modifiers/TessellateModifier.js +264 -0
  167. data/lib-opal/js_wrap/three/node-editor/NodeEditor.js +402 -0
  168. data/lib-opal/js_wrap/three/node-editor/accessors/NormalEditor.js +80 -0
  169. data/lib-opal/js_wrap/three/node-editor/accessors/PositionEditor.js +80 -0
  170. data/lib-opal/js_wrap/three/node-editor/accessors/UVEditor.js +71 -0
  171. data/lib-opal/js_wrap/three/node-editor/display/BlendEditor.js +78 -0
  172. data/lib-opal/js_wrap/three/node-editor/inputs/ColorEditor.js +111 -0
  173. data/lib-opal/js_wrap/three/node-editor/inputs/FloatEditor.js +69 -0
  174. data/lib-opal/js_wrap/three/node-editor/inputs/SliderEditor.js +97 -0
  175. data/lib-opal/js_wrap/three/node-editor/inputs/Vector2Editor.js +73 -0
  176. data/lib-opal/js_wrap/three/node-editor/inputs/Vector3Editor.js +75 -0
  177. data/lib-opal/js_wrap/three/node-editor/inputs/Vector4Editor.js +77 -0
  178. data/lib-opal/js_wrap/three/node-editor/materials/StandardMaterialEditor.js +121 -0
  179. data/lib-opal/js_wrap/three/node-editor/math/DotEditor.js +76 -0
  180. data/lib-opal/js_wrap/three/node-editor/math/InvertEditor.js +80 -0
  181. data/lib-opal/js_wrap/three/node-editor/math/LimiterEditor.js +85 -0
  182. data/lib-opal/js_wrap/three/node-editor/math/NormalizeEditor.js +69 -0
  183. data/lib-opal/js_wrap/three/node-editor/math/OperatorEditor.js +91 -0
  184. data/lib-opal/js_wrap/three/node-editor/math/PowerEditor.js +73 -0
  185. data/lib-opal/js_wrap/three/node-editor/math/TrigonometryEditor.js +83 -0
  186. data/lib-opal/js_wrap/three/node-editor/procedural/CheckerEditor.js +69 -0
  187. data/lib-opal/js_wrap/three/node-editor/utils/OscillatorEditor.js +87 -0
  188. data/lib-opal/js_wrap/three/node-editor/utils/TimerEditor.js +89 -0
  189. data/lib-opal/js_wrap/three/nodes/Nodes.js +481 -0
  190. data/lib-opal/js_wrap/three/nodes/accessors/CameraNode.js +222 -0
  191. data/lib-opal/js_wrap/three/nodes/accessors/ColorsNode.js +99 -0
  192. data/lib-opal/js_wrap/three/nodes/accessors/LightNode.js +100 -0
  193. data/lib-opal/js_wrap/three/nodes/accessors/NormalNode.js +152 -0
  194. data/lib-opal/js_wrap/three/nodes/accessors/PositionNode.js +163 -0
  195. data/lib-opal/js_wrap/three/nodes/accessors/ReflectNode.js +161 -0
  196. data/lib-opal/js_wrap/three/nodes/accessors/ResolutionNode.js +99 -0
  197. data/lib-opal/js_wrap/three/nodes/accessors/ScreenUVNode.js +101 -0
  198. data/lib-opal/js_wrap/three/nodes/accessors/UVNode.js +105 -0
  199. data/lib-opal/js_wrap/three/nodes/core/AttributeNode.js +106 -0
  200. data/lib-opal/js_wrap/three/nodes/core/ConstNode.js +149 -0
  201. data/lib-opal/js_wrap/three/nodes/core/ExpressionNode.js +57 -0
  202. data/lib-opal/js_wrap/three/nodes/core/FunctionCallNode.js +138 -0
  203. data/lib-opal/js_wrap/three/nodes/core/FunctionNode.js +259 -0
  204. data/lib-opal/js_wrap/three/nodes/core/InputNode.js +124 -0
  205. data/lib-opal/js_wrap/three/nodes/core/Node.js +193 -0
  206. data/lib-opal/js_wrap/three/nodes/core/NodeBuilder.js +782 -0
  207. data/lib-opal/js_wrap/three/nodes/core/NodeFrame.js +69 -0
  208. data/lib-opal/js_wrap/three/nodes/core/NodeLib.js +56 -0
  209. data/lib-opal/js_wrap/three/nodes/core/NodeUniform.js +53 -0
  210. data/lib-opal/js_wrap/three/nodes/core/NodeUtils.js +60 -0
  211. data/lib-opal/js_wrap/three/nodes/core/StructNode.js +131 -0
  212. data/lib-opal/js_wrap/three/nodes/core/TempNode.js +160 -0
  213. data/lib-opal/js_wrap/three/nodes/core/VarNode.js +105 -0
  214. data/lib-opal/js_wrap/three/nodes/effects/BlurNode.js +160 -0
  215. data/lib-opal/js_wrap/three/nodes/effects/ColorAdjustmentNode.js +139 -0
  216. data/lib-opal/js_wrap/three/nodes/effects/LuminanceNode.js +106 -0
  217. data/lib-opal/js_wrap/three/nodes/inputs/BoolNode.js +95 -0
  218. data/lib-opal/js_wrap/three/nodes/inputs/ColorNode.js +99 -0
  219. data/lib-opal/js_wrap/three/nodes/inputs/CubeTextureNode.js +136 -0
  220. data/lib-opal/js_wrap/three/nodes/inputs/FloatNode.js +95 -0
  221. data/lib-opal/js_wrap/three/nodes/inputs/IntNode.js +95 -0
  222. data/lib-opal/js_wrap/three/nodes/inputs/Matrix3Node.js +102 -0
  223. data/lib-opal/js_wrap/three/nodes/inputs/Matrix4Node.js +102 -0
  224. data/lib-opal/js_wrap/three/nodes/inputs/PropertyNode.js +85 -0
  225. data/lib-opal/js_wrap/three/nodes/inputs/RTTNode.js +164 -0
  226. data/lib-opal/js_wrap/three/nodes/inputs/ReflectorNode.js +111 -0
  227. data/lib-opal/js_wrap/three/nodes/inputs/ScreenNode.js +69 -0
  228. data/lib-opal/js_wrap/three/nodes/inputs/TextureNode.js +140 -0
  229. data/lib-opal/js_wrap/three/nodes/inputs/Vector2Node.js +98 -0
  230. data/lib-opal/js_wrap/three/nodes/inputs/Vector3Node.js +99 -0
  231. data/lib-opal/js_wrap/three/nodes/inputs/Vector4Node.js +100 -0
  232. data/lib-opal/js_wrap/three/nodes/materials/BasicNodeMaterial.js +63 -0
  233. data/lib-opal/js_wrap/three/nodes/materials/MeshStandardNodeMaterial.js +63 -0
  234. data/lib-opal/js_wrap/three/nodes/materials/NodeMaterial.js +202 -0
  235. data/lib-opal/js_wrap/three/nodes/materials/PhongNodeMaterial.js +63 -0
  236. data/lib-opal/js_wrap/three/nodes/materials/SpriteNodeMaterial.js +63 -0
  237. data/lib-opal/js_wrap/three/nodes/materials/StandardNodeMaterial.js +63 -0
  238. data/lib-opal/js_wrap/three/nodes/materials/nodes/BasicNode.js +146 -0
  239. data/lib-opal/js_wrap/three/nodes/materials/nodes/MeshStandardNode.js +133 -0
  240. data/lib-opal/js_wrap/three/nodes/materials/nodes/PhongNode.js +273 -0
  241. data/lib-opal/js_wrap/three/nodes/materials/nodes/RawNode.js +101 -0
  242. data/lib-opal/js_wrap/three/nodes/materials/nodes/SpriteNode.js +176 -0
  243. data/lib-opal/js_wrap/three/nodes/materials/nodes/StandardNode.js +397 -0
  244. data/lib-opal/js_wrap/three/nodes/math/CondNode.js +151 -0
  245. data/lib-opal/js_wrap/three/nodes/math/MathNode.js +266 -0
  246. data/lib-opal/js_wrap/three/nodes/math/OperatorNode.js +120 -0
  247. data/lib-opal/js_wrap/three/nodes/misc/BumpMapNode.js +139 -0
  248. data/lib-opal/js_wrap/three/nodes/misc/NormalMapNode.js +122 -0
  249. data/lib-opal/js_wrap/three/nodes/misc/TextureCubeNode.js +107 -0
  250. data/lib-opal/js_wrap/three/nodes/misc/TextureCubeUVNode.js +191 -0
  251. data/lib-opal/js_wrap/three/nodes/postprocessing/NodePass.js +117 -0
  252. data/lib-opal/js_wrap/three/nodes/postprocessing/NodePostProcessing.js +128 -0
  253. data/lib-opal/js_wrap/three/nodes/procedural/CheckerNode.js +104 -0
  254. data/lib-opal/js_wrap/three/nodes/procedural/Fractal3DNode.js +121 -0
  255. data/lib-opal/js_wrap/three/nodes/procedural/Noise2DNode.js +115 -0
  256. data/lib-opal/js_wrap/three/nodes/procedural/Noise3DNode.js +112 -0
  257. data/lib-opal/js_wrap/three/nodes/utils/BypassNode.js +115 -0
  258. data/lib-opal/js_wrap/three/nodes/utils/ColorSpaceNode.js +214 -0
  259. data/lib-opal/js_wrap/three/nodes/utils/JoinNode.js +138 -0
  260. data/lib-opal/js_wrap/three/nodes/utils/MaxMIPLevelNode.js +88 -0
  261. data/lib-opal/js_wrap/three/nodes/utils/RemapNode.js +117 -0
  262. data/lib-opal/js_wrap/three/nodes/utils/SpecularMIPLevelNode.js +121 -0
  263. data/lib-opal/js_wrap/three/nodes/utils/SubSlotNode.js +112 -0
  264. data/lib-opal/js_wrap/three/nodes/utils/SwitchNode.js +129 -0
  265. data/lib-opal/js_wrap/three/nodes/utils/TimerNode.js +126 -0
  266. data/lib-opal/js_wrap/three/nodes/utils/UVTransformNode.js +104 -0
  267. data/lib-opal/js_wrap/three/nodes/utils/VelocityNode.js +181 -0
  268. data/lib-opal/js_wrap/three/objects/Lensflare.js +285 -0
  269. data/lib-opal/js_wrap/three/objects/LightningStorm.js +238 -0
  270. data/lib-opal/js_wrap/three/objects/MarchingCubes.js +667 -0
  271. data/lib-opal/js_wrap/three/objects/Reflector.js +205 -0
  272. data/lib-opal/js_wrap/three/objects/ReflectorForSSRPass.js +288 -0
  273. data/lib-opal/js_wrap/three/objects/ReflectorRTT.js +63 -0
  274. data/lib-opal/js_wrap/three/objects/Refractor.js +243 -0
  275. data/lib-opal/js_wrap/three/objects/ShadowMesh.js +100 -0
  276. data/lib-opal/js_wrap/three/objects/Sky.js +107 -0
  277. data/lib-opal/js_wrap/three/objects/Water.js +246 -0
  278. data/lib-opal/js_wrap/three/objects/Water2.js +238 -0
  279. data/lib-opal/js_wrap/three/offscreen/jank.js +51 -0
  280. data/lib-opal/js_wrap/three/offscreen/offscreen.js +24 -0
  281. data/lib-opal/js_wrap/three/offscreen/scene.js +99 -0
  282. data/lib-opal/js_wrap/three/physics/AmmoPhysics.js +266 -0
  283. data/lib-opal/js_wrap/three/physics/OimoPhysics.js +214 -0
  284. data/lib-opal/js_wrap/three/postprocessing/AdaptiveToneMappingPass.js +307 -0
  285. data/lib-opal/js_wrap/three/postprocessing/AfterimagePass.js +116 -0
  286. data/lib-opal/js_wrap/three/postprocessing/BloomPass.js +132 -0
  287. data/lib-opal/js_wrap/three/postprocessing/BokehPass.js +143 -0
  288. data/lib-opal/js_wrap/three/postprocessing/ClearPass.js +85 -0
  289. data/lib-opal/js_wrap/three/postprocessing/CubeTexturePass.js +104 -0
  290. data/lib-opal/js_wrap/three/postprocessing/DotScreenPass.js +90 -0
  291. data/lib-opal/js_wrap/three/postprocessing/EffectComposer.js +272 -0
  292. data/lib-opal/js_wrap/three/postprocessing/FilmPass.js +91 -0
  293. data/lib-opal/js_wrap/three/postprocessing/GlitchPass.js +140 -0
  294. data/lib-opal/js_wrap/three/postprocessing/HalftonePass.js +108 -0
  295. data/lib-opal/js_wrap/three/postprocessing/LUTPass.js +132 -0
  296. data/lib-opal/js_wrap/three/postprocessing/MaskPass.js +142 -0
  297. data/lib-opal/js_wrap/three/postprocessing/OutlinePass.js +480 -0
  298. data/lib-opal/js_wrap/three/postprocessing/Pass.js +101 -0
  299. data/lib-opal/js_wrap/three/postprocessing/RenderPass.js +109 -0
  300. data/lib-opal/js_wrap/three/postprocessing/SAOPass.js +384 -0
  301. data/lib-opal/js_wrap/three/postprocessing/SMAAPass.js +199 -0
  302. data/lib-opal/js_wrap/three/postprocessing/SSAARenderPass.js +186 -0
  303. data/lib-opal/js_wrap/three/postprocessing/SSAOPass.js +388 -0
  304. data/lib-opal/js_wrap/three/postprocessing/SSRPass.js +537 -0
  305. data/lib-opal/js_wrap/three/postprocessing/SSRrPass.js +481 -0
  306. data/lib-opal/js_wrap/three/postprocessing/SavePass.js +96 -0
  307. data/lib-opal/js_wrap/three/postprocessing/ShaderPass.js +98 -0
  308. data/lib-opal/js_wrap/three/postprocessing/TAARenderPass.js +159 -0
  309. data/lib-opal/js_wrap/three/postprocessing/TexturePass.js +91 -0
  310. data/lib-opal/js_wrap/three/postprocessing/UnrealBloomPass.js +335 -0
  311. data/lib-opal/js_wrap/three/renderers/CSS2DRenderer.js +213 -0
  312. data/lib-opal/js_wrap/three/renderers/CSS3DRenderer.js +277 -0
  313. data/lib-opal/js_wrap/three/renderers/Projector.js +733 -0
  314. data/lib-opal/js_wrap/three/renderers/SVGRenderer.js +470 -0
  315. data/lib-opal/js_wrap/three/renderers/nodes/Nodes.js +531 -0
  316. data/lib-opal/js_wrap/three/renderers/nodes/ShaderNode.js +386 -0
  317. data/lib-opal/js_wrap/three/renderers/nodes/accessors/CameraNode.js +114 -0
  318. data/lib-opal/js_wrap/three/renderers/nodes/accessors/MaterialNode.js +140 -0
  319. data/lib-opal/js_wrap/three/renderers/nodes/accessors/MaterialReferenceNode.js +79 -0
  320. data/lib-opal/js_wrap/three/renderers/nodes/accessors/ModelNode.js +62 -0
  321. data/lib-opal/js_wrap/three/renderers/nodes/accessors/ModelViewProjectionNode.js +80 -0
  322. data/lib-opal/js_wrap/three/renderers/nodes/accessors/NormalNode.js +113 -0
  323. data/lib-opal/js_wrap/three/renderers/nodes/accessors/Object3DNode.js +136 -0
  324. data/lib-opal/js_wrap/three/renderers/nodes/accessors/PointUVNode.js +70 -0
  325. data/lib-opal/js_wrap/three/renderers/nodes/accessors/PositionNode.js +117 -0
  326. data/lib-opal/js_wrap/three/renderers/nodes/accessors/ReferenceNode.js +124 -0
  327. data/lib-opal/js_wrap/three/renderers/nodes/accessors/SkinningNode.js +129 -0
  328. data/lib-opal/js_wrap/three/renderers/nodes/accessors/UVNode.js +77 -0
  329. data/lib-opal/js_wrap/three/renderers/nodes/core/ArrayInputNode.js +74 -0
  330. data/lib-opal/js_wrap/three/renderers/nodes/core/AttributeNode.js +97 -0
  331. data/lib-opal/js_wrap/three/renderers/nodes/core/BypassNode.js +84 -0
  332. data/lib-opal/js_wrap/three/renderers/nodes/core/CodeNode.js +131 -0
  333. data/lib-opal/js_wrap/three/renderers/nodes/core/ContextNode.js +84 -0
  334. data/lib-opal/js_wrap/three/renderers/nodes/core/ExpressionNode.js +81 -0
  335. data/lib-opal/js_wrap/three/renderers/nodes/core/FunctionCallNode.js +123 -0
  336. data/lib-opal/js_wrap/three/renderers/nodes/core/FunctionNode.js +126 -0
  337. data/lib-opal/js_wrap/three/renderers/nodes/core/InputNode.js +103 -0
  338. data/lib-opal/js_wrap/three/renderers/nodes/core/Node.js +120 -0
  339. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeAttribute.js +37 -0
  340. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeBuilder.js +650 -0
  341. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeCode.js +42 -0
  342. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeFrame.js +70 -0
  343. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeFunction.js +55 -0
  344. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeFunctionInput.js +44 -0
  345. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeKeywords.js +117 -0
  346. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeParser.js +46 -0
  347. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeUniform.js +55 -0
  348. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeVar.js +37 -0
  349. data/lib-opal/js_wrap/three/renderers/nodes/core/NodeVary.js +37 -0
  350. data/lib-opal/js_wrap/three/renderers/nodes/core/PropertyNode.js +90 -0
  351. data/lib-opal/js_wrap/three/renderers/nodes/core/TempNode.js +89 -0
  352. data/lib-opal/js_wrap/three/renderers/nodes/core/VarNode.js +101 -0
  353. data/lib-opal/js_wrap/three/renderers/nodes/core/VaryNode.js +101 -0
  354. data/lib-opal/js_wrap/three/renderers/nodes/core/constants.js +42 -0
  355. data/lib-opal/js_wrap/three/renderers/nodes/display/ColorSpaceNode.js +165 -0
  356. data/lib-opal/js_wrap/three/renderers/nodes/display/NormalMapNode.js +120 -0
  357. data/lib-opal/js_wrap/three/renderers/nodes/functions/BSDFs.js +133 -0
  358. data/lib-opal/js_wrap/three/renderers/nodes/inputs/BufferNode.js +78 -0
  359. data/lib-opal/js_wrap/three/renderers/nodes/inputs/ColorNode.js +67 -0
  360. data/lib-opal/js_wrap/three/renderers/nodes/inputs/FloatNode.js +67 -0
  361. data/lib-opal/js_wrap/three/renderers/nodes/inputs/IntNode.js +67 -0
  362. data/lib-opal/js_wrap/three/renderers/nodes/inputs/Matrix3Node.js +67 -0
  363. data/lib-opal/js_wrap/three/renderers/nodes/inputs/Matrix4Node.js +67 -0
  364. data/lib-opal/js_wrap/three/renderers/nodes/inputs/TextureNode.js +120 -0
  365. data/lib-opal/js_wrap/three/renderers/nodes/inputs/Vector2Node.js +67 -0
  366. data/lib-opal/js_wrap/three/renderers/nodes/inputs/Vector3Node.js +67 -0
  367. data/lib-opal/js_wrap/three/renderers/nodes/inputs/Vector4Node.js +67 -0
  368. data/lib-opal/js_wrap/three/renderers/nodes/lights/LightContextNode.js +103 -0
  369. data/lib-opal/js_wrap/three/renderers/nodes/lights/LightNode.js +115 -0
  370. data/lib-opal/js_wrap/three/renderers/nodes/lights/LightsNode.js +117 -0
  371. data/lib-opal/js_wrap/three/renderers/nodes/materials/LineBasicNodeMaterial.js +82 -0
  372. data/lib-opal/js_wrap/three/renderers/nodes/materials/Materials.js +49 -0
  373. data/lib-opal/js_wrap/three/renderers/nodes/materials/MeshBasicNodeMaterial.js +82 -0
  374. data/lib-opal/js_wrap/three/renderers/nodes/materials/MeshStandardNodeMaterial.js +96 -0
  375. data/lib-opal/js_wrap/three/renderers/nodes/materials/PointsNodeMaterial.js +84 -0
  376. data/lib-opal/js_wrap/three/renderers/nodes/math/CondNode.js +98 -0
  377. data/lib-opal/js_wrap/three/renderers/nodes/math/MathNode.js +255 -0
  378. data/lib-opal/js_wrap/three/renderers/nodes/math/OperatorNode.js +163 -0
  379. data/lib-opal/js_wrap/three/renderers/nodes/parsers/GLSLNodeFunction.js +158 -0
  380. data/lib-opal/js_wrap/three/renderers/nodes/parsers/GLSLNodeParser.js +68 -0
  381. data/lib-opal/js_wrap/three/renderers/nodes/parsers/WGSLNodeFunction.js +126 -0
  382. data/lib-opal/js_wrap/three/renderers/nodes/parsers/WGSLNodeParser.js +68 -0
  383. data/lib-opal/js_wrap/three/renderers/nodes/procedural/CheckerNode.js +84 -0
  384. data/lib-opal/js_wrap/three/renderers/nodes/utils/ArrayElementNode.js +79 -0
  385. data/lib-opal/js_wrap/three/renderers/nodes/utils/ConvertNode.js +82 -0
  386. data/lib-opal/js_wrap/three/renderers/nodes/utils/JoinNode.js +88 -0
  387. data/lib-opal/js_wrap/three/renderers/nodes/utils/OscNode.js +105 -0
  388. data/lib-opal/js_wrap/three/renderers/nodes/utils/SplitNode.js +96 -0
  389. data/lib-opal/js_wrap/three/renderers/nodes/utils/SpriteSheetUVNode.js +98 -0
  390. data/lib-opal/js_wrap/three/renderers/nodes/utils/TimerNode.js +93 -0
  391. data/lib-opal/js_wrap/three/renderers/webgl/nodes/SlotNode.js +72 -0
  392. data/lib-opal/js_wrap/three/renderers/webgl/nodes/WebGLNodeBuilder.js +463 -0
  393. data/lib-opal/js_wrap/three/renderers/webgl/nodes/WebGLNodes.js +62 -0
  394. data/lib-opal/js_wrap/three/renderers/webgl/nodes/WebGLPhysicalContextNode.js +95 -0
  395. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPU.js +62 -0
  396. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUAttributes.js +118 -0
  397. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUBackground.js +109 -0
  398. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUBinding.js +52 -0
  399. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUBindings.js +254 -0
  400. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUBufferUtils.js +39 -0
  401. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUComputePipelines.js +82 -0
  402. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUGeometries.js +84 -0
  403. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUInfo.js +86 -0
  404. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUObjects.js +64 -0
  405. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUProgrammableStage.js +46 -0
  406. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUProperties.js +63 -0
  407. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPURenderLists.js +180 -0
  408. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPURenderPipeline.js +662 -0
  409. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPURenderPipelines.js +275 -0
  410. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPURenderer.js +883 -0
  411. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUSampledTexture.js +139 -0
  412. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUSampler.js +76 -0
  413. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUStorageBuffer.js +69 -0
  414. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUTextureRenderer.js +64 -0
  415. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUTextureUtils.js +125 -0
  416. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUTextures.js +681 -0
  417. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUUniform.js +237 -0
  418. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUUniformBuffer.js +90 -0
  419. data/lib-opal/js_wrap/three/renderers/webgpu/WebGPUUniformsGroup.js +294 -0
  420. data/lib-opal/js_wrap/three/renderers/webgpu/constants.js +263 -0
  421. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodeBuilder.js +619 -0
  422. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodeSampledTexture.js +67 -0
  423. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodeSampler.js +71 -0
  424. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodeUniform.js +229 -0
  425. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.js +68 -0
  426. data/lib-opal/js_wrap/three/renderers/webgpu/nodes/WebGPUNodes.js +106 -0
  427. data/lib-opal/js_wrap/three/shaders/ACESFilmicToneMappingShader.js +45 -0
  428. data/lib-opal/js_wrap/three/shaders/AfterimageShader.js +46 -0
  429. data/lib-opal/js_wrap/three/shaders/BasicShader.js +34 -0
  430. data/lib-opal/js_wrap/three/shaders/BleachBypassShader.js +43 -0
  431. data/lib-opal/js_wrap/three/shaders/BlendShader.js +47 -0
  432. data/lib-opal/js_wrap/three/shaders/BokehShader.js +65 -0
  433. data/lib-opal/js_wrap/three/shaders/BokehShader2.js +125 -0
  434. data/lib-opal/js_wrap/three/shaders/BrightnessContrastShader.js +47 -0
  435. data/lib-opal/js_wrap/three/shaders/ColorCorrectionShader.js +47 -0
  436. data/lib-opal/js_wrap/three/shaders/ColorifyShader.js +41 -0
  437. data/lib-opal/js_wrap/three/shaders/ConvolutionShader.js +75 -0
  438. data/lib-opal/js_wrap/three/shaders/CopyShader.js +41 -0
  439. data/lib-opal/js_wrap/three/shaders/DOFMipMapShader.js +49 -0
  440. data/lib-opal/js_wrap/three/shaders/DepthLimitedBlurShader.js +95 -0
  441. data/lib-opal/js_wrap/three/shaders/DigitalGlitch.js +79 -0
  442. data/lib-opal/js_wrap/three/shaders/DotScreenShader.js +52 -0
  443. data/lib-opal/js_wrap/three/shaders/FXAAShader.js +78 -0
  444. data/lib-opal/js_wrap/three/shaders/FilmShader.js +69 -0
  445. data/lib-opal/js_wrap/three/shaders/FocusShader.js +52 -0
  446. data/lib-opal/js_wrap/three/shaders/FreiChenShader.js +44 -0
  447. data/lib-opal/js_wrap/three/shaders/GammaCorrectionShader.js +39 -0
  448. data/lib-opal/js_wrap/three/shaders/GodRaysShader.js +140 -0
  449. data/lib-opal/js_wrap/three/shaders/HalftoneShader.js +77 -0
  450. data/lib-opal/js_wrap/three/shaders/HorizontalBlurShader.js +47 -0
  451. data/lib-opal/js_wrap/three/shaders/HorizontalTiltShiftShader.js +49 -0
  452. data/lib-opal/js_wrap/three/shaders/HueSaturationShader.js +47 -0
  453. data/lib-opal/js_wrap/three/shaders/KaleidoShader.js +50 -0
  454. data/lib-opal/js_wrap/three/shaders/LuminosityHighPassShader.js +52 -0
  455. data/lib-opal/js_wrap/three/shaders/LuminosityShader.js +39 -0
  456. data/lib-opal/js_wrap/three/shaders/MMDToonShader.js +48 -0
  457. data/lib-opal/js_wrap/three/shaders/MirrorShader.js +44 -0
  458. data/lib-opal/js_wrap/three/shaders/NormalMapShader.js +48 -0
  459. data/lib-opal/js_wrap/three/shaders/PixelShader.js +44 -0
  460. data/lib-opal/js_wrap/three/shaders/RGBShiftShader.js +50 -0
  461. data/lib-opal/js_wrap/three/shaders/SAOShader.js +85 -0
  462. data/lib-opal/js_wrap/three/shaders/SMAAShader.js +95 -0
  463. data/lib-opal/js_wrap/three/shaders/SSAOShader.js +113 -0
  464. data/lib-opal/js_wrap/three/shaders/SSRShader.js +126 -0
  465. data/lib-opal/js_wrap/three/shaders/SSRrShader.js +106 -0
  466. data/lib-opal/js_wrap/three/shaders/SepiaShader.js +43 -0
  467. data/lib-opal/js_wrap/three/shaders/SobelOperatorShader.js +44 -0
  468. data/lib-opal/js_wrap/three/shaders/SubsurfaceScatteringShader.js +64 -0
  469. data/lib-opal/js_wrap/three/shaders/TechnicolorShader.js +41 -0
  470. data/lib-opal/js_wrap/three/shaders/ToneMapShader.js +53 -0
  471. data/lib-opal/js_wrap/three/shaders/ToonShader.js +148 -0
  472. data/lib-opal/js_wrap/three/shaders/TriangleBlurShader.js +47 -0
  473. data/lib-opal/js_wrap/three/shaders/UnpackDepthRGBAShader.js +42 -0
  474. data/lib-opal/js_wrap/three/shaders/VerticalBlurShader.js +47 -0
  475. data/lib-opal/js_wrap/three/shaders/VerticalTiltShiftShader.js +49 -0
  476. data/lib-opal/js_wrap/three/shaders/VignetteShader.js +46 -0
  477. data/lib-opal/js_wrap/three/shaders/VolumeShader.js +55 -0
  478. data/lib-opal/js_wrap/three/shaders/WaterRefractionShader.js +46 -0
  479. data/lib-opal/js_wrap/three/textures/FlakesTexture.js +61 -0
  480. data/lib-opal/js_wrap/three/utils/BufferGeometryUtils.js +683 -0
  481. data/lib-opal/js_wrap/three/utils/CameraUtils.js +97 -0
  482. data/lib-opal/js_wrap/three/utils/GPUStatsPanel.js +154 -0
  483. data/lib-opal/js_wrap/three/utils/GeometryCompressionUtils.js +468 -0
  484. data/lib-opal/js_wrap/three/utils/GeometryUtils.js +192 -0
  485. data/lib-opal/js_wrap/three/utils/PackedPhongMaterial.js +77 -0
  486. data/lib-opal/js_wrap/three/utils/RoughnessMipmapper.js +169 -0
  487. data/lib-opal/js_wrap/three/utils/SceneUtils.js +62 -0
  488. data/lib-opal/js_wrap/three/utils/ShadowMapViewer.js +182 -0
  489. data/lib-opal/js_wrap/three/utils/SkeletonUtils.js +400 -0
  490. data/lib-opal/js_wrap/three/utils/UVsDebug.js +132 -0
  491. data/lib-opal/js_wrap/three/utils/WorkerPool.js +130 -0
  492. data/lib-opal/js_wrap/three/webxr/ARButton.js +203 -0
  493. data/lib-opal/js_wrap/three/webxr/OculusHandModel.js +131 -0
  494. data/lib-opal/js_wrap/three/webxr/OculusHandPointerModel.js +328 -0
  495. data/lib-opal/js_wrap/three/webxr/Text2D.js +54 -0
  496. data/lib-opal/js_wrap/three/webxr/VRButton.js +181 -0
  497. data/lib-opal/js_wrap/three/webxr/XRControllerModelFactory.js +266 -0
  498. data/lib-opal/js_wrap/three/webxr/XREstimatedLight.js +221 -0
  499. data/lib-opal/js_wrap/three/webxr/XRHandMeshModel.js +93 -0
  500. data/lib-opal/js_wrap/three/webxr/XRHandModelFactory.js +127 -0
  501. data/lib-opal/js_wrap/three/webxr/XRHandPrimitiveModel.js +85 -0
  502. data/opal-js_wrap-three.gemspec +4 -4
  503. metadata +502 -5
@@ -0,0 +1,821 @@
1
+ (function (global, factory) {
2
+ if (typeof define === "function" && define.amd) {
3
+ define(["exports"], factory);
4
+ } else if (typeof exports !== "undefined") {
5
+ factory(exports);
6
+ } else {
7
+ var mod = {
8
+ exports: {}
9
+ };
10
+ factory(mod.exports);
11
+ global.lilGuiModuleMin = mod.exports;
12
+ }
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
14
+ "use strict";
15
+
16
+ Object.defineProperty(_exports, "__esModule", {
17
+ value: true
18
+ });
19
+ _exports.default = _exports.StringController = _exports.OptionController = _exports.NumberController = _exports.GUI = _exports.FunctionController = _exports.Controller = _exports.ColorController = _exports.BooleanController = void 0;
20
+
21
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
+
23
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
+
25
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
+
27
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
28
+
29
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
30
+
31
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
+
33
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
34
+
35
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
36
+
37
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
38
+
39
+ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
40
+
41
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
42
+
43
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
44
+
45
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
46
+
47
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
48
+
49
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
50
+
51
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
52
+
53
+ /**
54
+ * lil-gui
55
+ * https://lil-gui.georgealways.com
56
+ * @version 0.11.0
57
+ * @author George Michael Brower
58
+ * @license MIT
59
+ */
60
+ var t = /*#__PURE__*/function () {
61
+ function t(e, i, s, r) {
62
+ var n = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "div";
63
+
64
+ _classCallCheck(this, t);
65
+
66
+ this.parent = e, this.object = i, this.property = s, this._disabled = !1, this.initialValue = this.getValue(), this.domElement = document.createElement("div"), this.domElement.classList.add("controller"), this.domElement.classList.add(r), this.$name = document.createElement("div"), this.$name.classList.add("name"), t.nextNameID = t.nextNameID || 0, this.$name.id = "lil-gui-name-" + ++t.nextNameID, this.$widget = document.createElement(n), this.$widget.classList.add("widget"), this.$disable = this.$widget, this.domElement.appendChild(this.$name), this.domElement.appendChild(this.$widget), this.parent.children.push(this), this.parent.controllers.push(this), this.parent.$children.appendChild(this.domElement), this._listenCallback = this._listenCallback.bind(this), this.name(s);
67
+ }
68
+
69
+ _createClass(t, [{
70
+ key: "name",
71
+ value: function name(_t) {
72
+ return this._name = _t, this.$name.innerHTML = _t, this;
73
+ }
74
+ }, {
75
+ key: "onChange",
76
+ value: function onChange(_t2) {
77
+ return this._onChange = _t2, this;
78
+ }
79
+ }, {
80
+ key: "_callOnChange",
81
+ value: function _callOnChange() {
82
+ this.parent._callOnChange(this), void 0 !== this._onChange && this._onChange.call(this, this.getValue());
83
+ }
84
+ }, {
85
+ key: "onFinishChange",
86
+ value: function onFinishChange(_t3) {
87
+ return this.onChange(_t3);
88
+ }
89
+ }, {
90
+ key: "reset",
91
+ value: function reset() {
92
+ return this.setValue(this.initialValue), this;
93
+ }
94
+ }, {
95
+ key: "enable",
96
+ value: function enable() {
97
+ var _t4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
98
+
99
+ return this.disable(!_t4);
100
+ }
101
+ }, {
102
+ key: "disable",
103
+ value: function disable() {
104
+ var _t5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
105
+
106
+ return _t5 === this._disabled || (this._disabled = _t5, this.domElement.classList.toggle("disabled", _t5), _t5 ? this.$disable.setAttribute("disabled", "disabled") : this.$disable.removeAttribute("disabled")), this;
107
+ }
108
+ }, {
109
+ key: "options",
110
+ value: function options(_t6) {
111
+ var e = this.parent.add(this.object, this.property, _t6);
112
+ return e.name(this._name), this.destroy(), e;
113
+ }
114
+ }, {
115
+ key: "min",
116
+ value: function min(_t7) {
117
+ return this;
118
+ }
119
+ }, {
120
+ key: "max",
121
+ value: function max(_t8) {
122
+ return this;
123
+ }
124
+ }, {
125
+ key: "step",
126
+ value: function step(_t9) {
127
+ return this;
128
+ }
129
+ }, {
130
+ key: "listen",
131
+ value: function listen() {
132
+ var _t10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
133
+
134
+ return this._listening = _t10, void 0 !== this._listenCallbackID && (cancelAnimationFrame(this._listenCallbackID), this._listenCallbackID = void 0), this._listening && this._listenCallback(), this;
135
+ }
136
+ }, {
137
+ key: "_listenCallback",
138
+ value: function _listenCallback() {
139
+ this._listenCallbackID = requestAnimationFrame(this._listenCallback);
140
+
141
+ var _t11 = this.getValue();
142
+
143
+ _t11 === this._listenValuePrev && Object(_t11) !== _t11 || this.updateDisplay(), this._listenValuePrev = _t11;
144
+ }
145
+ }, {
146
+ key: "getValue",
147
+ value: function getValue() {
148
+ return this.object[this.property];
149
+ }
150
+ }, {
151
+ key: "setValue",
152
+ value: function setValue(_t12) {
153
+ return this.object[this.property] = _t12, this._callOnChange(), this.updateDisplay(), this;
154
+ }
155
+ }, {
156
+ key: "updateDisplay",
157
+ value: function updateDisplay() {
158
+ return this;
159
+ }
160
+ }, {
161
+ key: "load",
162
+ value: function load(_t13) {
163
+ this.setValue(_t13);
164
+ }
165
+ }, {
166
+ key: "save",
167
+ value: function save() {
168
+ return this.getValue();
169
+ }
170
+ }, {
171
+ key: "destroy",
172
+ value: function destroy() {
173
+ this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.controllers.splice(this.parent.controllers.indexOf(this), 1), this.parent.$children.removeChild(this.domElement);
174
+ }
175
+ }]);
176
+
177
+ return t;
178
+ }();
179
+
180
+ _exports.Controller = t;
181
+
182
+ var e = /*#__PURE__*/function (_t14) {
183
+ _inherits(e, _t14);
184
+
185
+ var _super = _createSuper(e);
186
+
187
+ function e(t, _e, i) {
188
+ var _this;
189
+
190
+ _classCallCheck(this, e);
191
+
192
+ _this = _super.call(this, t, _e, i, "boolean", "label"), _this.$input = document.createElement("input"), _this.$input.setAttribute("type", "checkbox"), _this.$widget.appendChild(_this.$input), _this.$input.addEventListener("change", function () {
193
+ _this.setValue(_this.$input.checked);
194
+ }), _this.$disable = _this.$input, _this.updateDisplay();
195
+ return _this;
196
+ }
197
+
198
+ _createClass(e, [{
199
+ key: "updateDisplay",
200
+ value: function updateDisplay() {
201
+ return this.$input.checked = this.getValue(), this;
202
+ }
203
+ }]);
204
+
205
+ return e;
206
+ }(t);
207
+
208
+ _exports.BooleanController = e;
209
+
210
+ function i(t) {
211
+ var e, i;
212
+ return (e = t.match(/(#|0x)?([a-f0-9]{6})/i)) ? i = e[2] : (e = t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/)) ? i = parseInt(e[1]).toString(16).padStart(2, 0) + parseInt(e[2]).toString(16).padStart(2, 0) + parseInt(e[3]).toString(16).padStart(2, 0) : (e = t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i)) && (i = e[1] + e[1] + e[2] + e[2] + e[3] + e[3]), !!i && "#" + i;
213
+ }
214
+
215
+ var s = {
216
+ isPrimitive: !0,
217
+ match: function match(t) {
218
+ return "string" == typeof t;
219
+ },
220
+ fromHexString: i,
221
+ toHexString: i
222
+ },
223
+ r = {
224
+ isPrimitive: !0,
225
+ match: function match(t) {
226
+ return "number" == typeof t;
227
+ },
228
+ fromHexString: function fromHexString(t) {
229
+ return parseInt(t.substring(1), 16);
230
+ },
231
+ toHexString: function toHexString(t) {
232
+ return "#" + t.toString(16).padStart(6, 0);
233
+ }
234
+ },
235
+ n = {
236
+ isPrimitive: !1,
237
+ match: Array.isArray,
238
+ fromHexString: function fromHexString(t, e) {
239
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
240
+ var s = r.fromHexString(t);
241
+ e[0] = (s >> 16 & 255) / 255 * i, e[1] = (s >> 8 & 255) / 255 * i, e[2] = (255 & s) / 255 * i;
242
+ },
243
+ toHexString: function toHexString(_ref) {
244
+ var _ref2 = _slicedToArray(_ref, 3),
245
+ t = _ref2[0],
246
+ e = _ref2[1],
247
+ i = _ref2[2];
248
+
249
+ var s = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
250
+ return r.toHexString(t * (s = 255 / s) << 16 ^ e * s << 8 ^ i * s << 0);
251
+ }
252
+ },
253
+ l = {
254
+ isPrimitive: !1,
255
+ match: function match(t) {
256
+ return Object(t) === t;
257
+ },
258
+ fromHexString: function fromHexString(t, e) {
259
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
260
+ var s = r.fromHexString(t);
261
+ e.r = (s >> 16 & 255) / 255 * i, e.g = (s >> 8 & 255) / 255 * i, e.b = (255 & s) / 255 * i;
262
+ },
263
+ toHexString: function toHexString(_ref3) {
264
+ var t = _ref3.r,
265
+ e = _ref3.g,
266
+ i = _ref3.b;
267
+ var s = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
268
+ return r.toHexString(t * (s = 255 / s) << 16 ^ e * s << 8 ^ i * s << 0);
269
+ }
270
+ },
271
+ o = [s, r, n, l];
272
+
273
+ var a = /*#__PURE__*/function (_t15) {
274
+ _inherits(a, _t15);
275
+
276
+ var _super2 = _createSuper(a);
277
+
278
+ function a(t, e, s, r) {
279
+ var _this2;
280
+
281
+ _classCallCheck(this, a);
282
+
283
+ var n;
284
+ _this2 = _super2.call(this, t, e, s, "color"), _this2.$input = document.createElement("input"), _this2.$input.setAttribute("type", "color"), _this2.$input.setAttribute("tabindex", -1), _this2.$input.setAttribute("aria-labelledby", _this2.$name.id), _this2.$text = document.createElement("input"), _this2.$text.setAttribute("type", "text"), _this2.$text.setAttribute("spellcheck", "false"), _this2.$text.setAttribute("aria-labelledby", _this2.$name.id), _this2.$display = document.createElement("div"), _this2.$display.classList.add("display"), _this2.$display.appendChild(_this2.$input), _this2.$widget.appendChild(_this2.$display), _this2.$widget.appendChild(_this2.$text), _this2._format = (n = _this2.initialValue, o.find(function (t) {
285
+ return t.match(n);
286
+ })), _this2._rgbScale = r, _this2._initialValueHexString = _this2.save(), _this2._textFocused = !1;
287
+
288
+ var l = function l() {
289
+ _this2._setValueFromHexString(_this2.$input.value);
290
+ };
291
+
292
+ _this2.$input.addEventListener("change", l), _this2.$input.addEventListener("input", l), _this2.$input.addEventListener("focus", function () {
293
+ _this2.$display.classList.add("focus");
294
+ }), _this2.$input.addEventListener("blur", function () {
295
+ _this2.$display.classList.remove("focus");
296
+ }), _this2.$text.addEventListener("input", function () {
297
+ var t = i(_this2.$text.value);
298
+ t && _this2._setValueFromHexString(t);
299
+ }), _this2.$text.addEventListener("focus", function () {
300
+ _this2._textFocused = !0, _this2.$text.select();
301
+ }), _this2.$text.addEventListener("blur", function () {
302
+ _this2._textFocused = !1, _this2.updateDisplay();
303
+ }), _this2.$disable = _this2.$text, _this2.updateDisplay();
304
+ return _this2;
305
+ }
306
+
307
+ _createClass(a, [{
308
+ key: "reset",
309
+ value: function reset() {
310
+ return this._setValueFromHexString(this._initialValueHexString), this;
311
+ }
312
+ }, {
313
+ key: "_setValueFromHexString",
314
+ value: function _setValueFromHexString(t) {
315
+ if (this._format.isPrimitive) {
316
+ var _e2 = this._format.fromHexString(t);
317
+
318
+ this.setValue(_e2);
319
+ } else this._format.fromHexString(t, this.getValue(), this._rgbScale), this._callOnChange(), this.updateDisplay();
320
+ }
321
+ }, {
322
+ key: "save",
323
+ value: function save() {
324
+ return this._format.toHexString(this.getValue(), this._rgbScale);
325
+ }
326
+ }, {
327
+ key: "load",
328
+ value: function load(t) {
329
+ this._setValueFromHexString(t);
330
+ }
331
+ }, {
332
+ key: "updateDisplay",
333
+ value: function updateDisplay() {
334
+ return this.$input.value = this._format.toHexString(this.getValue(), this._rgbScale), this._textFocused || (this.$text.value = this.$input.value.substring(1)), this.$display.style.backgroundColor = this.$input.value, this;
335
+ }
336
+ }]);
337
+
338
+ return a;
339
+ }(t);
340
+
341
+ _exports.ColorController = a;
342
+
343
+ var h = /*#__PURE__*/function (_t16) {
344
+ _inherits(h, _t16);
345
+
346
+ var _super3 = _createSuper(h);
347
+
348
+ function h(t, e, i) {
349
+ var _this3;
350
+
351
+ _classCallCheck(this, h);
352
+
353
+ _this3 = _super3.call(this, t, e, i, "function"), _this3.$button = document.createElement("button"), _this3.$button.appendChild(_this3.$name), _this3.$widget.appendChild(_this3.$button), _this3.$button.addEventListener("click", function (t) {
354
+ t.preventDefault(), _this3.getValue().call(_this3.object);
355
+ }), _this3.$button.addEventListener("touchstart", function () {}), _this3.$disable = _this3.$button;
356
+ return _this3;
357
+ }
358
+
359
+ return _createClass(h);
360
+ }(t);
361
+
362
+ _exports.FunctionController = h;
363
+
364
+ var d = /*#__PURE__*/function (_t17) {
365
+ _inherits(d, _t17);
366
+
367
+ var _super4 = _createSuper(d);
368
+
369
+ function d(t, e, i, s, r, n) {
370
+ var _this4;
371
+
372
+ _classCallCheck(this, d);
373
+
374
+ _this4 = _super4.call(this, t, e, i, "number"), _this4._initInput(), _this4.min(s), _this4.max(r);
375
+ var l = void 0 !== n;
376
+ _this4.step(l ? n : _this4._getImplicitStep(), l), _this4.updateDisplay();
377
+ return _this4;
378
+ }
379
+
380
+ _createClass(d, [{
381
+ key: "min",
382
+ value: function min(t) {
383
+ return this._min = t, this._onUpdateMinMax(), this;
384
+ }
385
+ }, {
386
+ key: "max",
387
+ value: function max(t) {
388
+ return this._max = t, this._onUpdateMinMax(), this;
389
+ }
390
+ }, {
391
+ key: "step",
392
+ value: function step(t) {
393
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
394
+ return this._step = t, this._stepExplicit = e, this;
395
+ }
396
+ }, {
397
+ key: "updateDisplay",
398
+ value: function updateDisplay() {
399
+ var t = this.getValue();
400
+
401
+ if (this._hasSlider) {
402
+ var _e3 = (t - this._min) / (this._max - this._min);
403
+
404
+ this.$fill.style.setProperty("width", 100 * _e3 + "%");
405
+ }
406
+
407
+ return this._inputFocused || (this.$input.value = t), this;
408
+ }
409
+ }, {
410
+ key: "_initInput",
411
+ value: function _initInput() {
412
+ var _this5 = this;
413
+
414
+ this.$input = document.createElement("input"), this.$input.setAttribute("type", "text"), this.$input.setAttribute("inputmode", "numeric"), this.$input.setAttribute("aria-labelledby", this.$name.id), this.$widget.appendChild(this.$input), this.$disable = this.$input;
415
+
416
+ var t = function t(_t18) {
417
+ var e = parseFloat(_this5.$input.value);
418
+ isNaN(e) || (_this5._snapClampSetValue(e + _t18), _this5.$input.value = _this5.getValue());
419
+ };
420
+
421
+ this.$input.addEventListener("focus", function () {
422
+ _this5._inputFocused = !0;
423
+ }), this.$input.addEventListener("input", function () {
424
+ var t = parseFloat(_this5.$input.value);
425
+ isNaN(t) || _this5.setValue(_this5._clamp(t));
426
+ }), this.$input.addEventListener("blur", function () {
427
+ _this5._inputFocused = !1, _this5.updateDisplay();
428
+ }), this.$input.addEventListener("keydown", function (e) {
429
+ "Enter" === e.code && _this5.$input.blur(), "ArrowUp" === e.code && (e.preventDefault(), t(_this5._step * _this5._arrowKeyMultiplier(e))), "ArrowDown" === e.code && (e.preventDefault(), t(-1 * _this5._step * _this5._arrowKeyMultiplier(e)));
430
+ }), this.$input.addEventListener("wheel", function (e) {
431
+ _this5._inputFocused && (e.preventDefault(), t(_this5._normalizeMouseWheel(e) * _this5._step));
432
+ }, {
433
+ passive: !1
434
+ });
435
+ }
436
+ }, {
437
+ key: "_initSlider",
438
+ value: function _initSlider() {
439
+ var _this6 = this;
440
+
441
+ this._hasSlider = !0, this.$slider = document.createElement("div"), this.$slider.classList.add("slider"), this.$fill = document.createElement("div"), this.$fill.classList.add("fill"), this.$slider.appendChild(this.$fill), this.$widget.insertBefore(this.$slider, this.$input), this.domElement.classList.add("hasSlider");
442
+
443
+ var t = function t(_t19) {
444
+ var e = _this6.$slider.getBoundingClientRect();
445
+
446
+ var i = (s = _t19, r = e.left, n = e.right, l = _this6._min, o = _this6._max, (s - r) / (n - r) * (o - l) + l);
447
+ var s, r, n, l, o;
448
+
449
+ _this6._snapClampSetValue(i);
450
+ },
451
+ e = function e(_e4) {
452
+ t(_e4.clientX);
453
+ },
454
+ i = function i() {
455
+ _this6._setActiveStyle(!1), window.removeEventListener("mousemove", e), window.removeEventListener("mouseup", i);
456
+ };
457
+
458
+ this.$slider.addEventListener("mousedown", function (s) {
459
+ t(s.clientX), _this6._setActiveStyle(!0), window.addEventListener("mousemove", e), window.addEventListener("mouseup", i);
460
+ });
461
+ var s,
462
+ r,
463
+ n = !1;
464
+
465
+ var l = function l(e) {
466
+ if (n) {
467
+ var _i2 = e.touches[0].clientX - s,
468
+ _a = e.touches[0].clientY - r;
469
+
470
+ Math.abs(_i2) > Math.abs(_a) ? (e.preventDefault(), t(e.touches[0].clientX), _this6._setActiveStyle(!0), n = !1) : (window.removeEventListener("touchmove", l), window.removeEventListener("touchend", o));
471
+ } else e.preventDefault(), t(e.touches[0].clientX);
472
+ },
473
+ o = function o() {
474
+ _this6._setActiveStyle(!1), window.removeEventListener("touchmove", l), window.removeEventListener("touchend", o);
475
+ };
476
+
477
+ this.$slider.addEventListener("touchstart", function (e) {
478
+ e.touches.length > 1 || (_this6._hasScrollBar ? (s = e.touches[0].clientX, r = e.touches[0].clientY, n = !0) : (e.preventDefault(), t(e.touches[0].clientX), _this6._setActiveStyle(!0), n = !1), window.addEventListener("touchmove", l, {
479
+ passive: !1
480
+ }), window.addEventListener("touchend", o));
481
+ });
482
+ this.$slider.addEventListener("wheel", function (t) {
483
+ if (Math.abs(t.deltaX) < Math.abs(t.deltaY) && _this6._hasScrollBar) return;
484
+ t.preventDefault();
485
+
486
+ var e = _this6._normalizeMouseWheel(t) * _this6._step;
487
+
488
+ _this6._snapClampSetValue(_this6.getValue() + e);
489
+ }, {
490
+ passive: !1
491
+ });
492
+ }
493
+ }, {
494
+ key: "_setActiveStyle",
495
+ value: function _setActiveStyle(t) {
496
+ this.$slider.classList.toggle("active", t), document.body.classList.toggle("lil-gui-slider-active", t);
497
+ }
498
+ }, {
499
+ key: "_getImplicitStep",
500
+ value: function _getImplicitStep() {
501
+ return this._hasMin && this._hasMax ? (this._max - this._min) / 1e3 : .1;
502
+ }
503
+ }, {
504
+ key: "_onUpdateMinMax",
505
+ value: function _onUpdateMinMax() {
506
+ !this._hasSlider && this._hasMin && this._hasMax && (this._stepExplicit || this.step(this._getImplicitStep(), !1), this._initSlider(), this.updateDisplay());
507
+ }
508
+ }, {
509
+ key: "_normalizeMouseWheel",
510
+ value: function _normalizeMouseWheel(t) {
511
+ var e = t.deltaX,
512
+ i = t.deltaY;
513
+ Math.floor(t.deltaY) !== t.deltaY && t.wheelDelta && (e = 0, i = -t.wheelDelta / 120);
514
+ return e + -i;
515
+ }
516
+ }, {
517
+ key: "_arrowKeyMultiplier",
518
+ value: function _arrowKeyMultiplier(t) {
519
+ return this._stepExplicit ? t.shiftKey ? 10 : 1 : t.shiftKey ? 100 : t.altKey ? 1 : 10;
520
+ }
521
+ }, {
522
+ key: "_snap",
523
+ value: function _snap(t) {
524
+ var e = Math.round(t / this._step) * this._step;
525
+
526
+ return parseFloat(e.toPrecision(15));
527
+ }
528
+ }, {
529
+ key: "_clamp",
530
+ value: function _clamp(t) {
531
+ var e = this._hasMin ? this._min : -1 / 0,
532
+ i = this._hasMax ? this._max : 1 / 0;
533
+ return Math.max(e, Math.min(i, t));
534
+ }
535
+ }, {
536
+ key: "_snapClampSetValue",
537
+ value: function _snapClampSetValue(t) {
538
+ this.setValue(this._clamp(this._snap(t)));
539
+ }
540
+ }, {
541
+ key: "_hasScrollBar",
542
+ get: function get() {
543
+ var t = this.parent.root.$children;
544
+ return t.scrollHeight > t.clientHeight;
545
+ }
546
+ }, {
547
+ key: "_hasMin",
548
+ get: function get() {
549
+ return void 0 !== this._min;
550
+ }
551
+ }, {
552
+ key: "_hasMax",
553
+ get: function get() {
554
+ return void 0 !== this._max;
555
+ }
556
+ }]);
557
+
558
+ return d;
559
+ }(t);
560
+
561
+ _exports.NumberController = d;
562
+
563
+ var c = /*#__PURE__*/function (_t20) {
564
+ _inherits(c, _t20);
565
+
566
+ var _super5 = _createSuper(c);
567
+
568
+ function c(t, e, i, s) {
569
+ var _this7;
570
+
571
+ _classCallCheck(this, c);
572
+
573
+ _this7 = _super5.call(this, t, e, i, "option"), _this7.$select = document.createElement("select"), _this7.$select.setAttribute("aria-labelledby", _this7.$name.id), _this7.$display = document.createElement("div"), _this7.$display.classList.add("display"), _this7._values = Array.isArray(s) ? s : Object.values(s), _this7._names = Array.isArray(s) ? s : Object.keys(s), _this7._names.forEach(function (t) {
574
+ var e = document.createElement("option");
575
+ e.innerHTML = t, _this7.$select.appendChild(e);
576
+ }), _this7.$select.addEventListener("change", function () {
577
+ _this7.setValue(_this7._values[_this7.$select.selectedIndex]);
578
+ }), _this7.$select.addEventListener("focus", function () {
579
+ _this7.$display.classList.add("focus");
580
+ }), _this7.$select.addEventListener("blur", function () {
581
+ _this7.$display.classList.remove("focus");
582
+ }), _this7.$widget.appendChild(_this7.$select), _this7.$widget.appendChild(_this7.$display), _this7.$disable = _this7.$select, _this7.updateDisplay();
583
+ return _this7;
584
+ }
585
+
586
+ _createClass(c, [{
587
+ key: "updateDisplay",
588
+ value: function updateDisplay() {
589
+ var t = this.getValue(),
590
+ e = this._values.indexOf(t);
591
+
592
+ return this.$select.selectedIndex = e, this.$display.innerHTML = -1 === e ? t : this._names[e], this;
593
+ }
594
+ }]);
595
+
596
+ return c;
597
+ }(t);
598
+
599
+ _exports.OptionController = c;
600
+
601
+ var u = /*#__PURE__*/function (_t21) {
602
+ _inherits(u, _t21);
603
+
604
+ var _super6 = _createSuper(u);
605
+
606
+ function u(t, e, i) {
607
+ var _this8;
608
+
609
+ _classCallCheck(this, u);
610
+
611
+ _this8 = _super6.call(this, t, e, i, "string"), _this8.$input = document.createElement("input"), _this8.$input.setAttribute("type", "text"), _this8.$input.setAttribute("aria-labelledby", _this8.$name.id), _this8.$input.addEventListener("input", function () {
612
+ _this8.setValue(_this8.$input.value);
613
+ }), _this8.$input.addEventListener("keydown", function (t) {
614
+ "Enter" === t.code && _this8.$input.blur();
615
+ }), _this8.$widget.appendChild(_this8.$input), _this8.$disable = _this8.$input, _this8.updateDisplay();
616
+ return _this8;
617
+ }
618
+
619
+ _createClass(u, [{
620
+ key: "updateDisplay",
621
+ value: function updateDisplay() {
622
+ return this.$input.value = this.getValue(), this;
623
+ }
624
+ }]);
625
+
626
+ return u;
627
+ }(t);
628
+
629
+ _exports.StringController = u;
630
+ var p = !1;
631
+
632
+ var g = /*#__PURE__*/function () {
633
+ function g() {
634
+ var _this9 = this;
635
+
636
+ var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
637
+ t = _ref4.parent,
638
+ _ref4$autoPlace = _ref4.autoPlace,
639
+ e = _ref4$autoPlace === void 0 ? void 0 === t : _ref4$autoPlace,
640
+ _ref4$touchStyles = _ref4.touchStyles,
641
+ i = _ref4$touchStyles === void 0 ? !0 : _ref4$touchStyles,
642
+ s = _ref4.container,
643
+ _ref4$injectStyles = _ref4.injectStyles,
644
+ r = _ref4$injectStyles === void 0 ? !0 : _ref4$injectStyles,
645
+ _ref4$title = _ref4.title,
646
+ n = _ref4$title === void 0 ? "Controls" : _ref4$title,
647
+ l = _ref4.width;
648
+
649
+ _classCallCheck(this, g);
650
+
651
+ if (this.parent = t, this.root = t ? t.root : this, this.children = [], this.controllers = [], this.folders = [], this._closed = !1, this.domElement = document.createElement("div"), this.domElement.classList.add("lil-gui"), this.$title = document.createElement("div"), this.$title.classList.add("title"), this.$title.setAttribute("role", "button"), this.$title.setAttribute("aria-expanded", !0), this.$title.setAttribute("tabindex", 0), this.$title.addEventListener("click", function () {
652
+ return _this9.openAnimated(_this9._closed);
653
+ }), this.$title.addEventListener("keydown", function (t) {
654
+ "Enter" !== t.code && "Space" !== t.code || (t.preventDefault(), _this9.$title.click());
655
+ }), this.$title.addEventListener("touchstart", function () {}), this.$children = document.createElement("div"), this.$children.classList.add("children"), this.domElement.appendChild(this.$title), this.domElement.appendChild(this.$children), this.title(n), this.parent) return this.parent.children.push(this), this.parent.folders.push(this), void this.parent.$children.appendChild(this.domElement);
656
+ this.domElement.classList.add("root"), !p && r && (!function (t) {
657
+ var e = document.createElement("style");
658
+ e.innerHTML = t;
659
+ var i = document.querySelector("head link[rel=stylesheet], head style");
660
+ i ? document.head.insertBefore(e, i) : document.head.appendChild(e);
661
+ }('.lil-gui{font-family:var(--font-family);font-size:var(--font-size);line-height:1;font-weight:normal;font-style:normal;text-align:left;background-color:var(--background-color);color:var(--text-color);user-select:none;-webkit-user-select:none;touch-action:manipulation;--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Lucida Grande","Segoe UI",Roboto,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace,"Droid Sans Fallback";--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(.75*var(--widget-height));--scrollbar-width: 5px}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0}.lil-gui.root{width:var(--width, 245px);display:flex;flex-direction:column}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow:auto}.lil-gui.root>.children::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width);background:var(--background-color)}.lil-gui.root>.children::-webkit-scrollbar-thumb{border-radius:var(--scrollbar-width);background:var(--focus-color)}.lil-gui .lil-gui{--background-color:inherit;--text-color:inherit;--title-background-color:inherit;--title-text-color:inherit;--widget-color:inherit;--hover-color:inherit;--focus-color:inherit;--number-color:inherit;--string-color:inherit;--font-size:inherit;--input-font-size:inherit;--font-family:inherit;--font-family-mono:inherit;--padding:inherit;--spacing:inherit;--widget-height:inherit;--name-width:inherit;--slider-knob-width:inherit;--slider-input-width:inherit;--color-input-width:inherit;--slider-input-min-width:inherit;--color-input-min-width:inherit;--folder-indent:inherit;--widget-padding:inherit;--widget-border-radius:inherit;--checkbox-size:inherit}@media(pointer: coarse){.lil-gui.allow-touch-styles{--widget-height: 28px;--padding: 6px;--spacing: 6px;--font-size: 13px;--input-font-size: 16px;--folder-indent: 10px;--widget-padding: 0 0 0 3px;--scrollbar-width: 7px;--slider-input-min-width: 50px;--color-input-min-width: 65px}}.lil-gui.force-touch-styles{--widget-height: 28px;--padding: 6px;--spacing: 6px;--font-size: 13px;--input-font-size: 16px;--folder-indent: 10px;--widget-padding: 0 0 0 3px;--scrollbar-width: 7px;--slider-input-min-width: 50px;--color-input-min-width: 65px}.lil-gui.autoPlace{max-height:100%;position:fixed;top:0;right:15px;z-index:1001}.lil-gui .controller{display:flex;align-items:center;padding:0 var(--padding);margin:var(--spacing) 0}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none !important}.lil-gui .controller .name{min-width:var(--name-width);flex-shrink:0;white-space:pre;padding-right:var(--spacing);line-height:var(--widget-height)}.lil-gui .controller .widget{position:relative;display:flex;align-items:center;width:100%;min-height:var(--widget-height)}.lil-gui .controller.function .name{line-height:unset;padding:0}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{width:100%;height:var(--widget-height);border-radius:var(--widget-border-radius);position:relative}@media(hover: hover){.lil-gui .controller.color .display:hover:before{content:" ";display:block;position:absolute;border-radius:var(--widget-border-radius);border:1px solid #fff9;left:0;right:0;top:0;bottom:0}}.lil-gui .controller.color input[type=color]{opacity:0;width:100%;height:100%;cursor:pointer}.lil-gui .controller.color input[type=text]{margin-left:var(--spacing);font-family:var(--font-family-mono);min-width:var(--color-input-min-width);width:var(--color-input-width);flex-shrink:0}.lil-gui .controller.option select{opacity:0;position:absolute;width:100%;max-width:100%}.lil-gui .controller.option .display{position:relative;pointer-events:none;border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;word-break:break-all;padding-left:.55em;padding-right:1.75em;background:var(--widget-color)}@media(hover: hover){.lil-gui .controller.option .display.focus{background:var(--focus-color)}}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{font-family:"lil-gui";content:"↕";position:absolute;top:0;right:0;bottom:0;padding-right:.375em}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}@media(hover: hover){.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{margin-left:var(--spacing);width:var(--slider-input-width);min-width:var(--slider-input-min-width);flex-shrink:0}.lil-gui .controller.number .slider{width:100%;height:var(--widget-height);background-color:var(--widget-color);border-radius:var(--widget-border-radius);padding-right:var(--slider-knob-width);overflow:hidden;cursor:ew-resize;touch-action:pan-y}@media(hover: hover){.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{height:100%;border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box}.lil-gui-slider-active .lil-gui{--hover-color: var(--widget-color)}.lil-gui-slider-active *{cursor:ew-resize !important}.lil-gui .title{--title-height: calc(var(--widget-height) + var(--spacing) * 1.25);height:var(--title-height);line-height:calc(var(--title-height) - 4px);font-weight:600;padding:0 var(--padding);-webkit-tap-highlight-color:transparent;cursor:pointer;outline:none;text-decoration-skip:objects}.lil-gui .title:before{font-family:"lil-gui";content:"▾";padding-right:2px;display:inline-block}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}@media(hover: hover){.lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}}.lil-gui.root>.title:focus{text-decoration:none !important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{transform:translateY(-7px);opacity:0}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{transition-duration:300ms;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;pointer-events:none}.lil-gui .children:empty:before{content:"Empty";padding:0 var(--padding);margin:var(--spacing) 0;display:block;height:var(--widget-height);font-style:italic;line-height:var(--widget-height);opacity:.5}.lil-gui.root>.children>.lil-gui>.title{border:0 solid var(--widget-color);border-width:1px 0;transition:border-color 300ms}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;margin-left:var(--folder-indent);border-left:2px solid var(--widget-color)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;border:0;outline:none;font-family:var(--font-family);font-size:var(--input-font-size);border-radius:var(--widget-border-radius);height:var(--widget-height);background:var(--widget-color);color:var(--text-color);width:100%}@media(hover: hover){.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}}.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;height:var(--checkbox-size);width:var(--checkbox-size);border-radius:var(--widget-border-radius);text-align:center}.lil-gui input[type=checkbox]:checked:before{font-family:"lil-gui";content:"✓";font-size:var(--checkbox-size);line-height:var(--checkbox-size)}@media(hover: hover){.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}}.lil-gui button{-webkit-tap-highlight-color:transparent;outline:none;cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);color:var(--text-color);width:100%;height:var(--widget-height);text-transform:none;background:var(--widget-color);border-radius:var(--widget-border-radius);border:1px solid var(--widget-color);text-align:center;line-height:calc(var(--widget-height)*.725)}@media(hover: hover){.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:"lil-gui";src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZ5WI2hlYWQAAAMcAAAAJwAAADZfcj23aGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhjAGJgZWBgZ7RnFRdnVJELCRlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB76woyAHicY2BkYGAA4sklsQ/j+W2+MnAzpDBgAyEMYUCSg4EJxAEAvVwFCgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}'), p = !0), s ? s.appendChild(this.domElement) : e && (this.domElement.classList.add("autoPlace"), document.body.appendChild(this.domElement)), i && this.domElement.classList.add("allow-touch-styles"), l && this.domElement.style.setProperty("--width", l + "px");
662
+ }
663
+
664
+ _createClass(g, [{
665
+ key: "add",
666
+ value: function add(t, i, s, r, n) {
667
+ if (Object(s) === s) return new c(this, t, i, s);
668
+ var l = t[i];
669
+
670
+ switch (typeof l) {
671
+ case "number":
672
+ return new d(this, t, i, s, r, n);
673
+
674
+ case "boolean":
675
+ return new e(this, t, i);
676
+
677
+ case "string":
678
+ return new u(this, t, i);
679
+
680
+ case "function":
681
+ return new h(this, t, i);
682
+ }
683
+
684
+ console.error("Failed to add controller for \"".concat(i, "\""), l, t);
685
+ }
686
+ }, {
687
+ key: "addColor",
688
+ value: function addColor(t, e) {
689
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
690
+ return new a(this, t, e, i);
691
+ }
692
+ }, {
693
+ key: "addFolder",
694
+ value: function addFolder(t) {
695
+ return new g({
696
+ parent: this,
697
+ title: t
698
+ });
699
+ }
700
+ }, {
701
+ key: "load",
702
+ value: function load(t) {
703
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
704
+ if (!("controllers" in t)) throw new Error('Invalid load object. Should contain a "controllers" key.');
705
+ return this.controllers.forEach(function (e) {
706
+ e instanceof h || e._name in t.controllers && e.load(t.controllers[e._name]);
707
+ }), e && t.folders && this.folders.forEach(function (e) {
708
+ e._title in t.folders && e.load(t.folders[e._title]);
709
+ }), this;
710
+ }
711
+ }, {
712
+ key: "save",
713
+ value: function save() {
714
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
715
+ var e = {
716
+ controllers: {},
717
+ folders: {}
718
+ };
719
+ return this.controllers.forEach(function (t) {
720
+ if (!(t instanceof h)) {
721
+ if (t._name in e.controllers) throw new Error("Cannot save GUI with duplicate property \"".concat(t._name, "\""));
722
+ e.controllers[t._name] = t.save();
723
+ }
724
+ }), t && this.folders.forEach(function (t) {
725
+ if (t._title in e.folders) throw new Error("Cannot save GUI with duplicate folder \"".concat(t._title, "\""));
726
+ e.folders[t._title] = t.save();
727
+ }), e;
728
+ }
729
+ }, {
730
+ key: "open",
731
+ value: function open() {
732
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
733
+ return this._closed = !t, this.$title.setAttribute("aria-expanded", !this._closed), this.domElement.classList.toggle("closed", this._closed), this;
734
+ }
735
+ }, {
736
+ key: "close",
737
+ value: function close() {
738
+ return this.open(!1);
739
+ }
740
+ }, {
741
+ key: "openAnimated",
742
+ value: function openAnimated() {
743
+ var _this10 = this;
744
+
745
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
746
+ return this._closed = !t, this.$title.setAttribute("aria-expanded", !this._closed), requestAnimationFrame(function () {
747
+ var e = _this10.$children.clientHeight;
748
+ _this10.$children.style.height = e + "px", _this10.domElement.classList.add("transition");
749
+
750
+ var i = function i(t) {
751
+ t.target === _this10.$children && (_this10.$children.style.height = "", _this10.domElement.classList.remove("transition"), _this10.$children.removeEventListener("transitionend", i));
752
+ };
753
+
754
+ _this10.$children.addEventListener("transitionend", i);
755
+
756
+ var s = t ? _this10.$children.scrollHeight : 0;
757
+ _this10.domElement.classList.toggle("closed", !t), requestAnimationFrame(function () {
758
+ _this10.$children.style.height = s + "px";
759
+ });
760
+ }), this;
761
+ }
762
+ }, {
763
+ key: "title",
764
+ value: function title(t) {
765
+ return this._title = t, this.$title.innerHTML = t, this;
766
+ }
767
+ }, {
768
+ key: "reset",
769
+ value: function reset() {
770
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
771
+ return (t ? this.controllersRecursive() : this.controllers).forEach(function (t) {
772
+ return t.reset();
773
+ }), this;
774
+ }
775
+ }, {
776
+ key: "onChange",
777
+ value: function onChange(t) {
778
+ return this._onChange = t, this;
779
+ }
780
+ }, {
781
+ key: "_callOnChange",
782
+ value: function _callOnChange(t) {
783
+ this.parent && this.parent._callOnChange(t), void 0 !== this._onChange && this._onChange.call(this, {
784
+ object: t.object,
785
+ property: t.property,
786
+ value: t.getValue(),
787
+ controller: t
788
+ });
789
+ }
790
+ }, {
791
+ key: "destroy",
792
+ value: function destroy() {
793
+ this.parent && (this.parent.children.splice(this.parent.children.indexOf(this), 1), this.parent.folders.splice(this.parent.folders.indexOf(this), 1)), this.domElement.parentElement && this.domElement.parentElement.removeChild(this.domElement), Array.from(this.children).forEach(function (t) {
794
+ return t.destroy();
795
+ }), this._onResize && window.removeEventListener("resize", this._onResize);
796
+ }
797
+ }, {
798
+ key: "controllersRecursive",
799
+ value: function controllersRecursive() {
800
+ var t = Array.from(this.controllers);
801
+ return this.folders.forEach(function (e) {
802
+ t = t.concat(e.controllersRecursive());
803
+ }), t;
804
+ }
805
+ }, {
806
+ key: "foldersRecursive",
807
+ value: function foldersRecursive() {
808
+ var t = Array.from(this.folders);
809
+ return this.folders.forEach(function (e) {
810
+ t = t.concat(e.foldersRecursive());
811
+ }), t;
812
+ }
813
+ }]);
814
+
815
+ return g;
816
+ }();
817
+
818
+ _exports.GUI = g;
819
+ var _default = g;
820
+ _exports.default = _default;
821
+ });