ghostos 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/lib/api/leafio/core.d.ts +293 -0
  2. package/lib/api/leafio/leaflake.d.ts +100 -0
  3. package/lib/api/leafio/leaflake.unit.test.d.ts +1 -0
  4. package/lib/api/leafui/elements/bgtag.d.ts +2 -0
  5. package/lib/api/leafui/elements/bgtagyoutube.d.ts +2 -0
  6. package/lib/api/leafui/elements/dropzone.d.ts +1 -0
  7. package/lib/api/leafui/elements/floweditor/GraphQLSetup.d.ts +2 -0
  8. package/lib/api/leafui/elements/floweditor/index.d.ts +1 -0
  9. package/lib/api/leafui/elements/floweditor/leafedge.d.ts +39 -0
  10. package/lib/api/leafui/elements/floweditor/leafgql.d.ts +25 -0
  11. package/lib/api/leafui/elements/floweditor/leafnode.d.ts +13 -0
  12. package/lib/api/leafui/elements/floweditor/leafnode_dualout.d.ts +5 -0
  13. package/lib/api/leafui/elements/floweditor/leafnodetypes/anchorpoint.d.ts +3 -0
  14. package/lib/api/leafui/elements/floweditor/leafnodetypes/context.d.ts +3 -0
  15. package/lib/api/leafui/elements/floweditor/leafnodetypes/datacombine.d.ts +2 -0
  16. package/lib/api/leafui/elements/floweditor/leafnodetypes/datafilter.d.ts +2 -0
  17. package/lib/api/leafui/elements/floweditor/leafnodetypes/debugger.d.ts +3 -0
  18. package/lib/api/leafui/elements/floweditor/leafnodetypes/deck.d.ts +6 -0
  19. package/lib/api/leafui/elements/floweditor/leafnodetypes/index.d.ts +20 -0
  20. package/lib/api/leafui/elements/floweditor/leafnodetypes/leafelement.d.ts +1 -0
  21. package/lib/api/leafui/elements/floweditor/leafnodetypes/nodemenu.d.ts +4 -0
  22. package/lib/api/leafui/elements/floweditor/leafnodetypes/porthandle/context.d.ts +4 -0
  23. package/lib/api/leafui/elements/floweditor/leafnodetypes/porthandle/handler.d.ts +12 -0
  24. package/lib/api/leafui/elements/floweditor/leafnodetypes/porthandle/index.d.ts +5 -0
  25. package/lib/api/leafui/elements/floweditor/leafnodetypes/spell.d.ts +1 -0
  26. package/lib/api/leafui/elements/floweditor/leafnodetypes/styles.d.ts +83 -0
  27. package/lib/api/leafui/elements/floweditor/leafnodetypes/textinput.d.ts +5 -0
  28. package/lib/api/leafui/elements/floweditor/leafnodetypes/uihandlers.d.ts +3 -0
  29. package/lib/api/leafui/elements/floweditor/leafnodetypes/utility.d.ts +2 -0
  30. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-01ed4353.d.ts +6 -0
  31. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-1cfd0ffe.d.ts +59 -0
  32. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-2f0babe4.d.ts +6 -0
  33. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-4e6d5ad0.d.ts +6 -0
  34. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-612ea0fa.d.ts +59 -0
  35. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-940301d1.d.ts +10 -0
  36. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-b881a05d.d.ts +6 -0
  37. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index-fa10fd6d.d.ts +10 -0
  38. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index.d.ts +36 -0
  39. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index2.d.ts +1 -0
  40. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index3.d.ts +1 -0
  41. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/index4.d.ts +1 -0
  42. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useEdges-51dc10fe.d.ts +2 -0
  43. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useEdges-a68c1c54.d.ts +2 -0
  44. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useEdges.d.ts +1 -0
  45. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useNodes-63cbcb3a.d.ts +2 -0
  46. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useNodes-fa9cd400.d.ts +2 -0
  47. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useNodes.d.ts +1 -0
  48. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useReactFlow-9fca72ec.d.ts +4 -0
  49. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useReactFlow-cc33f6cf.d.ts +4 -0
  50. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useReactFlow.d.ts +1 -0
  51. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useUpdateNodeInternals-abf24046.d.ts +2 -0
  52. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useUpdateNodeInternals-b829e86d.d.ts +2 -0
  53. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useUpdateNodeInternals.d.ts +1 -0
  54. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useViewport-706ddc1d.d.ts +2 -0
  55. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useViewport-b9f42fd4.d.ts +2 -0
  56. package/lib/api/leafui/elements/floweditor/lib/react-flow-renderer/useViewport.d.ts +1 -0
  57. package/lib/api/leafui/elements/floweditor/lib/reactflow.11.10.4/core/dist/esm/index.d.mts +300 -0
  58. package/lib/api/leafui/elements/floweditor/sidebar.d.ts +2 -0
  59. package/lib/api/leafui/elements/gnav.d.ts +6 -0
  60. package/lib/api/leafui/elements/graphlabel.d.ts +11 -0
  61. package/lib/api/leafui/elements/iframe.d.ts +16 -0
  62. package/lib/api/leafui/elements/imagelist.d.ts +19 -0
  63. package/lib/api/leafui/elements/leafchart.d.ts +19 -0
  64. package/lib/api/leafui/elements/leafvisualelements.d.ts +1 -0
  65. package/lib/api/leafui/elements/loadspinner.d.ts +1 -0
  66. package/lib/api/leafui/elements/popupmenu.d.ts +3 -0
  67. package/lib/api/leafui/elements/popupwin.d.ts +2 -0
  68. package/lib/api/leafui/elements/screen.d.ts +1 -0
  69. package/lib/api/leafui/elements/set.d.ts +7 -0
  70. package/lib/api/leafui/elements/stateutils.d.ts +2 -0
  71. package/lib/api/leafui/elements/sysmenu.d.ts +5 -0
  72. package/lib/api/leafui/elements/texteditor.d.ts +2 -0
  73. package/lib/api/leafui/elements/textprompt.d.ts +1 -0
  74. package/lib/api/leafui/elements/userprompt.d.ts +10 -0
  75. package/lib/api/leafui/lib/DynScriptLoader.d.ts +8 -0
  76. package/lib/api/leafui/lib/ProjectedMaterial.d.ts +7 -0
  77. package/lib/api/leafui/lib/assets/AssetManager.d.ts +32 -0
  78. package/lib/api/leafui/lib/assets/loadCubeTexture.d.ts +1 -0
  79. package/lib/api/leafui/lib/assets/loadEnvMap.d.ts +1 -0
  80. package/lib/api/leafui/lib/assets/loadTexture.d.ts +1 -0
  81. package/lib/api/leafui/lib/images/leafwebgl.d.ts +9 -0
  82. package/lib/api/leafui/lib/images/processor.d.ts +4 -0
  83. package/lib/api/leafui/lib/images/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts +2 -0
  84. package/lib/api/leafui/lib/images/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts +2 -0
  85. package/lib/api/leafui/lib/images/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts +2 -0
  86. package/lib/api/leafui/lib/images/shaders/ShaderChunk/aomap_fragment.glsl.d.ts +2 -0
  87. package/lib/api/leafui/lib/images/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts +2 -0
  88. package/lib/api/leafui/lib/images/shaders/ShaderChunk/begin_vertex.glsl.d.ts +2 -0
  89. package/lib/api/leafui/lib/images/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts +2 -0
  90. package/lib/api/leafui/lib/images/shaders/ShaderChunk/bsdfs.glsl.d.ts +2 -0
  91. package/lib/api/leafui/lib/images/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts +2 -0
  92. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts +2 -0
  93. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts +2 -0
  94. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts +2 -0
  95. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts +2 -0
  96. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts +2 -0
  97. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts +2 -0
  98. package/lib/api/leafui/lib/images/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts +2 -0
  99. package/lib/api/leafui/lib/images/shaders/ShaderChunk/color_fragment.glsl.d.ts +2 -0
  100. package/lib/api/leafui/lib/images/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts +2 -0
  101. package/lib/api/leafui/lib/images/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts +2 -0
  102. package/lib/api/leafui/lib/images/shaders/ShaderChunk/color_vertex.glsl.d.ts +2 -0
  103. package/lib/api/leafui/lib/images/shaders/ShaderChunk/common.glsl.d.ts +2 -0
  104. package/lib/api/leafui/lib/images/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts +2 -0
  105. package/lib/api/leafui/lib/images/shaders/ShaderChunk/default_fragment.glsl.d.ts +2 -0
  106. package/lib/api/leafui/lib/images/shaders/ShaderChunk/default_vertex.glsl.d.ts +2 -0
  107. package/lib/api/leafui/lib/images/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts +2 -0
  108. package/lib/api/leafui/lib/images/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts +2 -0
  109. package/lib/api/leafui/lib/images/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts +2 -0
  110. package/lib/api/leafui/lib/images/shaders/ShaderChunk/dithering_fragment.glsl.d.ts +2 -0
  111. package/lib/api/leafui/lib/images/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts +2 -0
  112. package/lib/api/leafui/lib/images/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts +2 -0
  113. package/lib/api/leafui/lib/images/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts +2 -0
  114. package/lib/api/leafui/lib/images/shaders/ShaderChunk/encodings_fragment.glsl.d.ts +2 -0
  115. package/lib/api/leafui/lib/images/shaders/ShaderChunk/encodings_pars_fragment.glsl.d.ts +2 -0
  116. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts +2 -0
  117. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_fragment.glsl.d.ts +2 -0
  118. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts +2 -0
  119. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts +2 -0
  120. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts +2 -0
  121. package/lib/api/leafui/lib/images/shaders/ShaderChunk/envmap_vertex.glsl.d.ts +2 -0
  122. package/lib/api/leafui/lib/images/shaders/ShaderChunk/fog_fragment.glsl.d.ts +2 -0
  123. package/lib/api/leafui/lib/images/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts +2 -0
  124. package/lib/api/leafui/lib/images/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts +2 -0
  125. package/lib/api/leafui/lib/images/shaders/ShaderChunk/fog_vertex.glsl.d.ts +2 -0
  126. package/lib/api/leafui/lib/images/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts +2 -0
  127. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lightmap_fragment.glsl.d.ts +2 -0
  128. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts +2 -0
  129. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts +2 -0
  130. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts +2 -0
  131. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts +2 -0
  132. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_lambert_vertex.glsl.d.ts +2 -0
  133. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts +2 -0
  134. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts +2 -0
  135. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts +2 -0
  136. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts +2 -0
  137. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts +2 -0
  138. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts +2 -0
  139. package/lib/api/leafui/lib/images/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts +2 -0
  140. package/lib/api/leafui/lib/images/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts +2 -0
  141. package/lib/api/leafui/lib/images/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts +2 -0
  142. package/lib/api/leafui/lib/images/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts +2 -0
  143. package/lib/api/leafui/lib/images/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts +2 -0
  144. package/lib/api/leafui/lib/images/shaders/ShaderChunk/map_fragment.glsl.d.ts +2 -0
  145. package/lib/api/leafui/lib/images/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts +2 -0
  146. package/lib/api/leafui/lib/images/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts +2 -0
  147. package/lib/api/leafui/lib/images/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts +2 -0
  148. package/lib/api/leafui/lib/images/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts +2 -0
  149. package/lib/api/leafui/lib/images/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts +2 -0
  150. package/lib/api/leafui/lib/images/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts +2 -0
  151. package/lib/api/leafui/lib/images/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts +2 -0
  152. package/lib/api/leafui/lib/images/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts +2 -0
  153. package/lib/api/leafui/lib/images/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts +2 -0
  154. package/lib/api/leafui/lib/images/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts +2 -0
  155. package/lib/api/leafui/lib/images/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts +2 -0
  156. package/lib/api/leafui/lib/images/shaders/ShaderChunk/packing.glsl.d.ts +2 -0
  157. package/lib/api/leafui/lib/images/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts +2 -0
  158. package/lib/api/leafui/lib/images/shaders/ShaderChunk/project_vertex.glsl.d.ts +2 -0
  159. package/lib/api/leafui/lib/images/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts +2 -0
  160. package/lib/api/leafui/lib/images/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts +2 -0
  161. package/lib/api/leafui/lib/images/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts +2 -0
  162. package/lib/api/leafui/lib/images/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts +2 -0
  163. package/lib/api/leafui/lib/images/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts +2 -0
  164. package/lib/api/leafui/lib/images/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts +2 -0
  165. package/lib/api/leafui/lib/images/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts +2 -0
  166. package/lib/api/leafui/lib/images/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts +2 -0
  167. package/lib/api/leafui/lib/images/shaders/ShaderChunk/skinning_vertex.glsl.d.ts +2 -0
  168. package/lib/api/leafui/lib/images/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts +2 -0
  169. package/lib/api/leafui/lib/images/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts +2 -0
  170. package/lib/api/leafui/lib/images/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts +2 -0
  171. package/lib/api/leafui/lib/images/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts +2 -0
  172. package/lib/api/leafui/lib/images/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts +2 -0
  173. package/lib/api/leafui/lib/images/shaders/ShaderChunk/transmissionmap_fragment.glsl.d.ts +2 -0
  174. package/lib/api/leafui/lib/images/shaders/ShaderChunk/transmissionmap_pars_fragment.glsl.d.ts +2 -0
  175. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv2_pars_fragment.glsl.d.ts +2 -0
  176. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv2_pars_vertex.glsl.d.ts +2 -0
  177. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv2_vertex.glsl.d.ts +2 -0
  178. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts +2 -0
  179. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts +2 -0
  180. package/lib/api/leafui/lib/images/shaders/ShaderChunk/uv_vertex.glsl.d.ts +2 -0
  181. package/lib/api/leafui/lib/images/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts +2 -0
  182. package/lib/api/leafui/lib/images/shaders/ShaderChunk.d.ts +260 -0
  183. package/lib/api/leafui/lib/images/shaders/ShaderLib/background_frag.glsl.d.ts +2 -0
  184. package/lib/api/leafui/lib/images/shaders/ShaderLib/background_vert.glsl.d.ts +2 -0
  185. package/lib/api/leafui/lib/images/shaders/ShaderLib/cube_frag.glsl.d.ts +2 -0
  186. package/lib/api/leafui/lib/images/shaders/ShaderLib/cube_vert.glsl.d.ts +2 -0
  187. package/lib/api/leafui/lib/images/shaders/ShaderLib/depth_frag.glsl.d.ts +2 -0
  188. package/lib/api/leafui/lib/images/shaders/ShaderLib/depth_vert.glsl.d.ts +2 -0
  189. package/lib/api/leafui/lib/images/shaders/ShaderLib/distanceRGBA_frag.glsl.d.ts +2 -0
  190. package/lib/api/leafui/lib/images/shaders/ShaderLib/distanceRGBA_vert.glsl.d.ts +2 -0
  191. package/lib/api/leafui/lib/images/shaders/ShaderLib/equirect_frag.glsl.d.ts +2 -0
  192. package/lib/api/leafui/lib/images/shaders/ShaderLib/equirect_vert.glsl.d.ts +2 -0
  193. package/lib/api/leafui/lib/images/shaders/ShaderLib/linedashed_frag.glsl.d.ts +2 -0
  194. package/lib/api/leafui/lib/images/shaders/ShaderLib/linedashed_vert.glsl.d.ts +2 -0
  195. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshbasic_frag.glsl.d.ts +2 -0
  196. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshbasic_vert.glsl.d.ts +2 -0
  197. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshlambert_frag.glsl.d.ts +2 -0
  198. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshlambert_vert.glsl.d.ts +2 -0
  199. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshmatcap_frag.glsl.d.ts +2 -0
  200. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshmatcap_vert.glsl.d.ts +2 -0
  201. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshphong_frag.glsl.d.ts +2 -0
  202. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshphong_vert.glsl.d.ts +2 -0
  203. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshphysical_frag.glsl.d.ts +2 -0
  204. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshphysical_vert.glsl.d.ts +2 -0
  205. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshtoon_frag.glsl.d.ts +2 -0
  206. package/lib/api/leafui/lib/images/shaders/ShaderLib/meshtoon_vert.glsl.d.ts +2 -0
  207. package/lib/api/leafui/lib/images/shaders/ShaderLib/normal_frag.glsl.d.ts +2 -0
  208. package/lib/api/leafui/lib/images/shaders/ShaderLib/normal_vert.glsl.d.ts +2 -0
  209. package/lib/api/leafui/lib/images/shaders/ShaderLib/points_frag.glsl.d.ts +2 -0
  210. package/lib/api/leafui/lib/images/shaders/ShaderLib/points_vert.glsl.d.ts +2 -0
  211. package/lib/api/leafui/lib/images/shaders/ShaderLib/shadow_frag.glsl.d.ts +2 -0
  212. package/lib/api/leafui/lib/images/shaders/ShaderLib/shadow_vert.glsl.d.ts +2 -0
  213. package/lib/api/leafui/lib/images/shaders/ShaderLib/sprite_frag.glsl.d.ts +2 -0
  214. package/lib/api/leafui/lib/images/shaders/ShaderLib/sprite_vert.glsl.d.ts +2 -0
  215. package/lib/api/leafui/lib/images/shaders/ShaderLib/vsm_frag.glsl.d.ts +2 -0
  216. package/lib/api/leafui/lib/images/shaders/ShaderLib/vsm_vert.glsl.d.ts +2 -0
  217. package/lib/api/leafui/lib/images/shaders/ShaderLib.d.ts +7 -0
  218. package/lib/api/leafui/lib/images/shaders/UniformsLib.d.ts +369 -0
  219. package/lib/api/leafui/lib/images/shaders/UniformsUtils.d.ts +9 -0
  220. package/lib/api/leafui/lib/layouts/Vector3.d.ts +17 -0
  221. package/lib/api/leafui/lib/layouts/force-directed-layout.d.ts +40 -0
  222. package/lib/api/leafui/lib/layouts/force-directed-layout.old.d.ts +1 -0
  223. package/lib/api/leafui/lib/sysmenu/DragableContainer.d.ts +1 -0
  224. package/lib/api/leafui/lib/sysmenu/Orbit.d.ts +1 -0
  225. package/lib/api/leafui/lib/sysmenu/Planet.d.ts +1 -0
  226. package/lib/api/leafui/lib/sysmenu/Satellite.d.ts +1 -0
  227. package/lib/api/leafui/lib/sysmenu/index.d.ts +2 -0
  228. package/lib/api/leafui/misc/complexgrid.d.ts +1 -0
  229. package/lib/api/leafui/misc/datepicker.d.ts +1 -0
  230. package/lib/api/leafui/misc/windowprops.d.ts +4 -0
  231. package/lib/api/metamodel.d.ts +179 -0
  232. package/lib/api/parser/breezyforest.d.ts +1 -0
  233. package/lib/api/parser/elements/schema/directus.d.ts +72 -0
  234. package/lib/api/parser/elements/schema/index.d.ts +2 -0
  235. package/lib/api/parser/elements.d.ts +1 -0
  236. package/lib/api/parser/eta.d.ts +55 -0
  237. package/lib/api/parser/eta.spec.d.ts +1 -0
  238. package/lib/api/parser/etatreeforest.d.ts +37 -0
  239. package/lib/api/parser/leaf.d.ts +56 -0
  240. package/lib/api/parser/leaflisp/plispdist/index.d.ts +210 -0
  241. package/lib/api/parser/leaflisp/plispstdlib/index.d.ts +396 -0
  242. package/lib/api/parser/leaflisp/test.d.mts +1 -0
  243. package/lib/api/parser/leaflisp/test.d.ts +1 -0
  244. package/lib/api/parser/leaflisp.d.ts +2 -0
  245. package/lib/api/parser/nodelogic/abstraction/index.d.ts +7 -0
  246. package/lib/api/parser/nodelogic/abstraction/leafanchor.d.ts +4 -0
  247. package/lib/api/parser/nodelogic/abstraction/leafgraph.d.ts +6 -0
  248. package/lib/api/parser/nodelogic/abstraction/leaflambdagraph.d.ts +4 -0
  249. package/lib/api/parser/nodelogic/abstraction/leafloopyspell.d.ts +4 -0
  250. package/lib/api/parser/nodelogic/abstraction/leafloopyspell.spec.d.ts +1 -0
  251. package/lib/api/parser/nodelogic/abstraction/leafspell.d.ts +9 -0
  252. package/lib/api/parser/nodelogic/abstraction/leafspell.spec.d.ts +1 -0
  253. package/lib/api/parser/nodelogic/abstraction/leafspelldef.d.ts +5 -0
  254. package/lib/api/parser/nodelogic/common.d.ts +8 -0
  255. package/lib/api/parser/nodelogic/dataflow/index.d.ts +4 -0
  256. package/lib/api/parser/nodelogic/dataflow/leafchronosflow.d.ts +4 -0
  257. package/lib/api/parser/nodelogic/dataflow/leafgateflow.d.ts +10 -0
  258. package/lib/api/parser/nodelogic/dataflow/leafmixflow.d.ts +4 -0
  259. package/lib/api/parser/nodelogic/dataflow/leafmixflow.spec.d.ts +1 -0
  260. package/lib/api/parser/nodelogic/datautils/bottling.d.ts +11 -0
  261. package/lib/api/parser/nodelogic/datautils/index.d.ts +7 -0
  262. package/lib/api/parser/nodelogic/datautils/leafbottle.d.ts +12 -0
  263. package/lib/api/parser/nodelogic/datautils/leafconfig.d.ts +12 -0
  264. package/lib/api/parser/nodelogic/datautils/leafcrate.d.ts +7 -0
  265. package/lib/api/parser/nodelogic/datautils/leafdelabel.d.ts +7 -0
  266. package/lib/api/parser/nodelogic/datautils/leaflabel.d.ts +15 -0
  267. package/lib/api/parser/nodelogic/datautils/leafunbottle.d.ts +12 -0
  268. package/lib/api/parser/nodelogic/elements/index.d.ts +8 -0
  269. package/lib/api/parser/nodelogic/elements/leafdeckclub.d.ts +10 -0
  270. package/lib/api/parser/nodelogic/elements/leafdeckdiamond.d.ts +10 -0
  271. package/lib/api/parser/nodelogic/elements/leafdeckheart.d.ts +10 -0
  272. package/lib/api/parser/nodelogic/elements/leafdeckspade.d.ts +10 -0
  273. package/lib/api/parser/nodelogic/elements/leafelement.d.ts +21 -0
  274. package/lib/api/parser/nodelogic/elements/leafelement.spec.d.ts +1 -0
  275. package/lib/api/parser/nodelogic/elements/leafgnav.d.ts +4 -0
  276. package/lib/api/parser/nodelogic/elements/leafpopupview.d.ts +4 -0
  277. package/lib/api/parser/nodelogic/elements/library/directus.d.ts +13 -0
  278. package/lib/api/parser/nodelogic/elements/library/editor.d.ts +17 -0
  279. package/lib/api/parser/nodelogic/elements/library/form.d.ts +17 -0
  280. package/lib/api/parser/nodelogic/elements/library/gnav.d.ts +17 -0
  281. package/lib/api/parser/nodelogic/elements/library/href.d.ts +14 -0
  282. package/lib/api/parser/nodelogic/elements/library/html.d.ts +17 -0
  283. package/lib/api/parser/nodelogic/elements/library/http.d.ts +17 -0
  284. package/lib/api/parser/nodelogic/elements/library/image.d.ts +13 -0
  285. package/lib/api/parser/nodelogic/elements/library/index.d.ts +25 -0
  286. package/lib/api/parser/nodelogic/elements/library/mediainput.d.ts +14 -0
  287. package/lib/api/parser/nodelogic/elements/library/mediaplayer.d.ts +20 -0
  288. package/lib/api/parser/nodelogic/elements/library/midi.d.ts +17 -0
  289. package/lib/api/parser/nodelogic/elements/library/openai.d.ts +17 -0
  290. package/lib/api/parser/nodelogic/elements/library/popup.d.ts +14 -0
  291. package/lib/api/parser/nodelogic/elements/library/prompt.d.ts +17 -0
  292. package/lib/api/parser/nodelogic/elements/library/rancher.d.ts +13 -0
  293. package/lib/api/parser/nodelogic/elements/library/sound.d.ts +17 -0
  294. package/lib/api/parser/nodelogic/elements/library/sound_lib.d.ts +10 -0
  295. package/lib/api/parser/nodelogic/elements/library/text.d.ts +13 -0
  296. package/lib/api/parser/nodelogic/elements/library/wizardryelements.d.ts +1 -0
  297. package/lib/api/parser/nodelogic/io/index.d.ts +5 -0
  298. package/lib/api/parser/nodelogic/io/leafinflowport.d.ts +10 -0
  299. package/lib/api/parser/nodelogic/io/leafinflowport.spec.d.ts +1 -0
  300. package/lib/api/parser/nodelogic/io/leafmemoryio.d.ts +53 -0
  301. package/lib/api/parser/nodelogic/io/leafmemoryio.spec.d.ts +1 -0
  302. package/lib/api/parser/nodelogic/io/leafoutflowport.d.ts +10 -0
  303. package/lib/api/parser/nodelogic/io/leafoutflowport.spec.d.ts +1 -0
  304. package/lib/api/parser/nodelogic/io/leafradioRX.d.ts +4 -0
  305. package/lib/api/parser/nodelogic/io/leafradioTX.d.ts +4 -0
  306. package/lib/api/parser/nodelogic/io/leafscreenio.d.ts +10 -0
  307. package/lib/api/parser/nodelogic/wizardry/index.d.ts +2 -0
  308. package/lib/api/parser/nodelogic/wizardry/leaflisp.d.ts +22 -0
  309. package/lib/api/parser/nodelogic/wizardry/leaflisp.unit.test.d.ts +1 -0
  310. package/lib/api/parser/nodelogic/wizardry/leaflisp2.unit.test.d.ts +1 -0
  311. package/lib/api/parser/nodelogic/wizardry/leaflisphelp.d.ts +1 -0
  312. package/lib/api/parser/predicates.d.ts +15 -0
  313. package/lib/api/utils/crypto.d.ts +6 -0
  314. package/lib/api/utils/fetchnodedata.d.ts +2 -0
  315. package/lib/api/utils/leafbase64.d.ts +2 -0
  316. package/lib/api/utils/leafdataflow.d.ts +23 -0
  317. package/lib/api/utils/leafdataflow.spec.d.ts +1 -0
  318. package/lib/graphql/client.d.ts +13 -0
  319. package/lib/graphql/events.d.ts +5 -0
  320. package/lib/graphql/utils.d.ts +3 -0
  321. package/lib/index.browser.d.ts +28 -0
  322. package/lib/index.core.d.ts +24 -0
  323. package/lib/index.esm.main.js +1 -1
  324. package/lib/index.ui.d.ts +5 -0
  325. package/lib/microservices/persistentio.d.ts +1 -0
  326. package/lib/microservices/screenio.d.ts +1 -0
  327. package/lib/microservices/volatileio.d.ts +1 -0
  328. package/lib/models/dataflow.d.ts +1 -0
  329. package/package.json +21 -8
  330. /package/lib/{index.cjs.js → index.cjs} +0 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The example data is structured as follows:
3
+ *
4
+ * import image from 'path/to/image.jpg';
5
+ * [etc...]
6
+ *
7
+ * const itemData = [
8
+ * {
9
+ * img: image,
10
+ * title: 'Image',
11
+ * author: 'author',
12
+ * cols: 2,
13
+ * },
14
+ * {
15
+ * [etc...]
16
+ * },
17
+ * ];
18
+ */
19
+ export default function LEAFChart(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export function LEAFVisualElements(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export function LEAFDisplayLoadSpinner(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export function useLEAFPopupMenu({ data }: {
2
+ data: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export function PopupCenterWindow(props: any): import("react/jsx-runtime").JSX.Element;
2
+ export function leafElementPopupCenterWindowLambda(): (props: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ declare const _default: import("react-redux").ConnectedComponent<typeof LEAFUISet, {
2
+ context?: React.Context<import("react-redux").ReactReduxContextValue<any, UnknownAction> | null> | undefined;
3
+ store?: Store;
4
+ }>;
5
+ export default _default;
6
+ declare function LEAFUISet(): any;
7
+ import React from 'react';
@@ -0,0 +1,2 @@
1
+ export function findAddedJSON(obj1: any, obj2: any): any;
2
+ export function findRemovedJSON(obj1: any, obj2: any): any;
@@ -0,0 +1,5 @@
1
+ export function preprocessMenuData(menudata: any, maxMenuCount?: number): any;
2
+ export default SystemMenuComponent;
3
+ declare function SystemMenuComponent({ appprops }: {
4
+ appprops: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export default LEAFTextEditor;
2
+ declare function LEAFTextEditor(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function LEAFUITextPrompt(props: any): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export default UserPromptComponent;
2
+ declare class UserPromptComponent extends React.Component<any, any, any> {
3
+ constructor(props: any);
4
+ state: {
5
+ count: number;
6
+ };
7
+ getTextlabelLUT(): {};
8
+ render(): import("react/jsx-runtime").JSX.Element | undefined;
9
+ }
10
+ import React from 'react';
@@ -0,0 +1,8 @@
1
+ export default class DynamicScriptLoaderService {
2
+ constructor(callback: any);
3
+ scripts: {};
4
+ callback: any;
5
+ setScriptUrlList(script_src_list: any, is_append?: boolean): void;
6
+ load(...scripts: any[]): Promise<any[]>;
7
+ loadScript(name: any): Promise<any>;
8
+ }
@@ -0,0 +1,7 @@
1
+ export function project(mesh: any): void;
2
+ export default class ProjectedMaterial {
3
+ constructor({ camera, texture, color, ...options }?: {
4
+ color?: number | undefined;
5
+ });
6
+ isProjectedMaterial: boolean;
7
+ }
@@ -0,0 +1,32 @@
1
+ export default assets_manager;
2
+ declare const assets_manager: AssetManager;
3
+ declare class AssetManager {
4
+ addProgressListener(fn: any): void;
5
+ queue({ url, type, ...options }: {
6
+ [x: string]: any;
7
+ url: any;
8
+ type: any;
9
+ }): any;
10
+ _getQueued(url: any): any;
11
+ _extractType(url: any): "image" | "audio" | "video" | "json" | "gltf" | "svg";
12
+ get: (url: any) => any;
13
+ getlogs: () => any[];
14
+ getcache: () => {};
15
+ loadSingle({ renderer, ...item }: {
16
+ [x: string]: any;
17
+ renderer: any;
18
+ }): Promise<any>;
19
+ load({ renderer }: {
20
+ renderer: any;
21
+ }): Promise<void>;
22
+ _loadItem({ url, type, renderer, ...options }: {
23
+ [x: string]: any;
24
+ url: any;
25
+ type: any;
26
+ renderer: any;
27
+ }): any;
28
+ log(...text: any[]): void;
29
+ logError(...text: any[]): void;
30
+ groupLog(...text: any[]): void;
31
+ #private;
32
+ }
@@ -0,0 +1 @@
1
+ export default function loadCubeTexture(url: any, options: any): Promise<any>;
@@ -0,0 +1 @@
1
+ export default function loadEnvMap(url: any, options: any): Promise<any>;
@@ -0,0 +1 @@
1
+ export default function loadTexture(url: any, options: any, onTextureLoadingCompleted?: null): Promise<any>;
@@ -0,0 +1,9 @@
1
+ export class LEAFWebGLCubeRenderTarget {
2
+ constructor(size: any, options: any, dummy: any);
3
+ texture: any;
4
+ fromEquirectangularTexture(renderer: any, texture: any): this;
5
+ camera: any;
6
+ mesh: any;
7
+ clear(renderer: any, color: any, depth: any, stencil: any): void;
8
+ isWebGLCubeRenderTarget: boolean;
9
+ }
@@ -0,0 +1,4 @@
1
+ export function mergeImages(sources?: any[], opacities?: any[], options?: {}): Promise<any>;
2
+ export function adjustImageProps(sources?: any[], options?: {}): Promise<any>;
3
+ export function createColorImage(width: any, height: any, color: any, options?: {}): Promise<any>;
4
+ export function colorImages(sources: any[] | undefined, opacities: any[] | undefined, color: any, options?: {}): Promise<any>;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef ALPHATEST\n\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_AOMAP\n\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_AOMAP\n\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvec3 transformed = vec3( position );\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvec3 objectNormal = vec3( normal );\n\n#ifdef USE_TANGENT\n\n\tvec3 objectTangent = vec3( tangent.xyz );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n\n// Analytical approximation of the DFG LUT, one half of the\n// split-sum approximation used in indirect specular lighting.\n// via 'environmentBRDF' from \"Physically Based Shading on Mobile\"\n// https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\nvec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\n\tvec4 r = roughness * c0 + c1;\n\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n\n}\n\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\n\t// based upon Frostbite 3 Moving to Physically-based Rendering\n\t// page 32, equation 26: E[window1]\n\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t// this is intended to be used on spot and point lights who are represented as luminous intensity\n\t// but who must be converted to luminous irradiance for surface lighting calculation\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\n\tif( cutoffDistance > 0.0 ) {\n\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\n\t}\n\n\treturn distanceFalloff;\n\n#else\n\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\n\t}\n\n\treturn 1.0;\n\n#endif\n\n}\n\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\n\treturn RECIPROCAL_PI * diffuseColor;\n\n} // validated\n\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\n\t// Original approximation by Christophe Schlick '94\n\t// float fresnel = pow( 1.0 - dotLH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH '13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n\n} // validated\n\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\n\t// See F_Schlick\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\n\treturn Fr * fresnel + F0;\n\n}\n\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (34)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is \"roughness squared\" in Disney\u2019s reparameterization\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\t// geometry term (normalized) = G(l)\u22C5G(v) / 4(n\u22C5l)(n\u22C5v)\n\t// also see #12151\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\n\treturn 1.0 / ( gl * gv );\n\n} // validated\n\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\tfloat a2 = pow2( alpha );\n\n\t// dotNL and dotNV are explicitly swapped. This is not a mistake.\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\n\treturn 0.5 / max( gv + gl, EPSILON );\n\n}\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is \"roughness squared\" in Disney\u2019s reparameterization\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\n\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n\n}\n\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\n\tfloat alpha = pow2( roughness ); // UE4's roughness\n\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\tfloat D = D_GGX( alpha, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n// Rect Area Light\n\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\n// code: https://github.com/selfshadow/ltc_code/\n\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\tfloat dotNV = saturate( dot( N, V ) );\n\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\treturn uv;\n\n}\n\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\n\t// An approximation of the form factor of a horizon-clipped rectangle.\n\n\tfloat l = length( f );\n\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n\n}\n\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\n\tfloat x = dot( v1, v2 );\n\n\tfloat y = abs( x );\n\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\n\treturn cross( v1, v2 ) * theta_sintheta;\n\n}\n\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\n\t// bail if point is on back side of plane of light\n\t// assumes ccw winding order of light vertices\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\n\t// construct orthonormal basis around N\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\n\n\t// compute transform\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\n\t// transform rect\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\n\t// project rect onto sphere\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\n\t// calculate vector form factor\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\n\t// adjust for horizon clipping\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\n/*\n\t// alternate method of adjusting for horizon clipping (see referece)\n\t// refactoring required\n\tfloat len = length( vectorFormFactor );\n\tfloat z = vectorFormFactor.z / len;\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\t// tabulated horizon-clipped sphere, apparently...\n\tvec2 uv = vec2( z * 0.5 + 0.5, len );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\tfloat scale = texture2D( ltc_2, uv ).w;\n\n\tfloat result = len * scale;\n*/\n\n\treturn vec3( result );\n\n}\n\n// End Rect Area Light\n\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\n\treturn specularColor * brdf.x + brdf.y;\n\n} // validated\n\n// Fdez-Ag\u00FCera's \"Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting\"\n// Approximates multiscattering in order to preserve energy.\n// http://www.jcgt.org/published/0008/01/03/\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; // 1/21\n\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n\n}\n\nfloat G_BlinnPhong_Implicit( /* const in float dotNL, const in float dotNV */ ) {\n\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\n\treturn 0.25;\n\n}\n\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n\n}\n\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\n\t//float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\t//float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\n\tfloat G = G_BlinnPhong_Implicit( /* dotNL, dotNV */ );\n\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n// source: http://simonstechblog.blogspot.ca/2011/12/microfacet-brdf.html\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\n\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n\n#if defined( USE_SHEEN )\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs#L94\nfloat D_Charlie(float roughness, float NoH) {\n\t// Estevez and Kulla 2017, \"Production Friendly Microfacet Sheen BRDF\"\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125); // 2^(-14/2), so sin2h^2 > 0 in fp16\n\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs#L136\nfloat V_Neubelt(float NoV, float NoL) {\n\t// Neubelt and Pettineo 2013, \"Crafting a Next-gen Material Pipeline for The Order: 1886\"\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\n\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n\n}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_BUMPMAP\n\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\n\t// Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen\n\t// http://api.unrealengine.com/attachments/Engine/Rendering/LightingAndShadows/BumpMappingWithoutTangentSpace/mm_sfgrad_bump.pdf\n\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\n\n\tvec2 dHdxy_fwd() {\n\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\n\t\treturn vec2( dBx, dBy );\n\n\t}\n\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\n\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\t\t// normalized\n\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\n\t}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef CLEARCOAT\n\n\tvec3 clearcoatNormal = geometryNormal;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\n\t#ifdef USE_TANGENT\n\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\n\t#else\n\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n\n#ifdef USE_CLEARCOATMAP\n\n\tuniform sampler2D clearcoatMap;\n\n#endif\n\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tuniform sampler2D clearcoatRoughnessMap;\n\n#endif\n\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvec4 plane;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\tbool clipped = true;\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t\tif ( clipped ) discard;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvClipPosition = - mvPosition.xyz;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_COLOR_ALPHA )\n\n\tdiffuseColor *= vColor;\n\n#elif defined( USE_COLOR )\n\n\tdiffuseColor.rgb *= vColor;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_COLOR_ALPHA )\n\n\tvarying vec4 vColor;\n\n#elif defined( USE_COLOR )\n\n\tvarying vec3 vColor;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_COLOR_ALPHA )\n\n\tvarying vec4 vColor;\n\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\n\tvarying vec3 vColor;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_COLOR_ALPHA )\n\n\tvColor = vec4( 1.0 );\n\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\n\tvColor = vec3( 1.0 );\n\n#endif\n\n#ifdef USE_COLOR\n\n\tvColor *= color;\n\n#endif\n\n#ifdef USE_INSTANCING_COLOR\n\n\tvColor.xyz *= instanceColor.xyz;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n\n#ifndef saturate\n// <tonemapping_pars_fragment> may have defined saturate() already\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\n\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\n\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\n\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\n\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n}\n\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t// dir can be either a direction vector or a normal vector\n\t// upper-left 3x3 of matrix is assumed to be orthogonal\n\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n\n}\n\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\n\treturn - distance * planeNormal + point;\n\n}\n\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n\n}\n\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n\n}\n\nmat3 transposeMat3( const in mat3 m ) {\n\n\tmat3 tmp;\n\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\n\treturn tmp;\n\n}\n\n// https://en.wikipedia.org/wiki/Relative_luminance\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\n\treturn dot( weights, color.rgb );\n\n}\n\nbool isPerspectiveMatrix( mat4 m ) {\n\n\treturn m[ 2 ][ 3 ] == - 1.0;\n\n}\n\nvec2 equirectUv( in vec3 dir ) {\n\n\t// dir is assumed to be unit length\n\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\n\treturn vec2( u, v );\n\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\n\t\tvec2 f = fract( uv );\n\n\t\tuv += 0.5 - f;\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\n\t\t}\n\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\n\t\tuv *= texelSize;\n\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\n\t\tuv.x += texelSize;\n\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\n\t\tuv.y += texelSize;\n\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\n\t\tuv.x -= texelSize;\n\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\n\t\tvec3 tm = mix( tl, tr, f.x );\n\n\t\tvec3 bm = mix( bl, br, f.x );\n\n\t\treturn mix( tm, bm, f.y );\n\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= r1 ) {\n\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\n\t\t} else if ( roughness >= r4 ) {\n\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\n\t\t} else if ( roughness >= r5 ) {\n\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\n\t\t} else if ( roughness >= r6 ) {\n\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvoid main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvoid main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvec3 transformedNormal = objectNormal;\n\n#ifdef USE_INSTANCING\n\n\t// this is in lieu of a per-instance normal-matrix\n\t// shear transforms in the instance matrix are not supported\n\n\tmat3 m = mat3( instanceMatrix );\n\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\n\ttransformedNormal = m * transformedNormal;\n\n#endif\n\ntransformedNormal = normalMatrix * transformedNormal;\n\n#ifdef FLIP_SIDED\n\n\ttransformedNormal = - transformedNormal;\n\n#endif\n\n#ifdef USE_TANGENT\n\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\n\t#ifdef FLIP_SIDED\n\n\t\ttransformedTangent = - transformedTangent;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef DITHERING\n\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef DITHERING\n\n\t// based on https://www.shadertoy.com/view/MslGR8\n\tvec3 dithering( vec3 color ) {\n\t\t//Calculate grid position\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\n\t\t//modify shift acording to grid position.\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\n\t\t//shift the color by dither_shift\n\t\treturn color + dither_shift_RGB;\n\t}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tuniform sampler2D emissiveMap;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\ngl_FragColor = linearToOutputTexel( gl_FragColor );\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/\n\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\n\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\n\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\n\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\n\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\n\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\n\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n\t// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );\n}\n\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\n\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\n\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\n\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\t// NOTE: The implementation with min causes the shader to not compile on\n\t// a common Alcatel A502DL in Chrome 78/Android 8.1. Some research suggests \n\t// that the chipset is Mediatek MT6739 w/ IMG PowerVR GE8100 GPU.\n\t// D = min( floor( D ) / 255.0, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\n\n// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html\n\n// M matrix, for encoding\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\n\n// Inverse M matrix, for decoding\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvec3 cameraToFrag;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\n\t\t}\n\n\t\t// Transforming Normal Vectors with the Inverse Transformation\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\n\t\t#else\n\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#else\n\n\t\tvec3 reflectVec = vReflect;\n\n\t#endif\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\n\t#else\n\n\t\tvec4 envColor = vec4( 0.0 );\n\n\t#endif\n\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\n\t\tenvColor = envMapTexelToLinear( envColor );\n\n\t#endif\n\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float reflectivity;\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\n\t#else\n\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_ENVMAP )\n\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\n\tvec3 getLightProbeIndirectIrradiance( /*const in SpecularLightProbe specularLightProbe,*/ const in GeometricContext geometry, const in int maxMIPLevel ) {\n\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\n\t\t\t// TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level\n\t\t\t// of a specular cubemap, or just the default level of a specially created irradiance cubemap.\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\n\t\t\t#else\n\n\t\t\t\t// force the bias high to get the last LOD level as it is the most blurred.\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\n\t\t#else\n\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\n\t\t#endif\n\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\n\t}\n\n\t// Trowbridge-Reitz distribution to Mip level, following the logic of http://casual-effects.blogspot.ca/2011/08/plausible-environment-lighting-in-two.html\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\n\t\t// clamp to allowable LOD ranges.\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\n\t}\n\n\tvec3 getLightProbeIndirectRadiance( /*const in SpecularLightProbe specularLightProbe,*/ const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\n\t\t\t// Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\n\t\t#else\n\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\n\t\t#endif\n\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\n\t\t\t#else\n\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\n\t\t#endif\n\n\t\treturn envMapColor.rgb * envMapIntensity;\n\n\t}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvWorldPosition = worldPosition.xyz;\n\n\t#else\n\n\t\tvec3 cameraToVertex;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\n\t\t}\n\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\n\t\t#else\n\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_FOG\n\n\t#ifdef FOG_EXP2\n\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\n\t#else\n\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\n\t#endif\n\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_FOG\n\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\n\t#ifdef FOG_EXP2\n\n\t\tuniform float fogDensity;\n\n\t#else\n\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_FOG\n\n\tvarying float fogDepth;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_FOG\n\n\tfogDepth = - mvPosition.z;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n\n#ifdef USE_GRADIENTMAP\n\n\tuniform sampler2D gradientMap;\n\n#endif\n\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\n\t// dotNL will be from -1.0 to 1.0\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\n\t#ifdef USE_GRADIENTMAP\n\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\n\t#else\n\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\n\t#endif\n\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_LIGHTMAP\n\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_LIGHTMAP\n\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n/**\n * This is a template that can be used to light a material, it uses pluggable\n * RenderEquations (RE)for specific lighting scenarios.\n *\n * Instructions for use:\n * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined\n * - If you have defined an RE_IndirectSpecular, you need to also provide a Material_LightProbeLOD. <---- ???\n * - Create a material parameter that is to be passed as the third parameter to your lighting functions.\n *\n * TODO:\n * - Add area light support.\n * - Add sphere light support.\n * - Add diffuse light probe (irradiance cubemap) support.\n */\n\nGeometricContext geometry;\n\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n#ifdef CLEARCOAT\n\n\tgeometry.clearcoatNormal = clearcoatNormal;\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tlightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage\n\n\t\t#endif\n\n\t\tirradiance += lightMapIrradiance;\n\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, maxMipLevel );\n\n\t#endif\n\n#endif\n\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\n\tradiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\n\t#ifdef CLEARCOAT\n\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvec3 diffuse = vec3( 1.0 );\n\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\n\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\n\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\n\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\n\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n\n#ifdef DOUBLE_SIDED\n\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n\n#endif\n\n#if NUM_POINT_LIGHTS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if NUM_SPOT_LIGHTS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n/*\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\t// TODO (abelnation): implement\n\n\t}\n\n#endif\n*/\n\n#if NUM_DIR_LIGHTS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if NUM_HEMI_LIGHTS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\n\t\t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nuniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\n\n// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\n\t// normal is assumed to have unit length\n\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\n\treturn result;\n\n}\n\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\n\treturn irradiance;\n\n}\n\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\n\tvec3 irradiance = ambientLightColor;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI;\n\n\t#endif\n\n\treturn irradiance;\n\n}\n\n#if NUM_DIR_LIGHTS > 0\n\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\n\t}\n\n#endif\n\n\n#if NUM_POINT_LIGHTS > 0\n\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n\n#if NUM_SPOT_LIGHTS > 0\n\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\n\t\tif ( angleCos > spotLight.coneCos ) {\n\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\n\t\t} else {\n\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\n\t\t}\n\t}\n\n#endif\n\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\n\t// BRDF approximation Texture is 64x64\n\tuniform sampler2D ltc_1; // RGBA Float\n\tuniform sampler2D ltc_2; // RGBA Float\n\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n\n#endif\n\n\n#if NUM_HEMI_LIGHTS > 0\n\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tirradiance *= PI;\n\n\t\t#endif\n\n\t\treturn irradiance;\n\n\t}\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nBlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n\nstruct BlinnPhongMaterial {\n\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n\n};\n\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI; // punctual light\n\n\t#endif\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n\n}\n\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n\n#define Material_LightProbeLOD( material )\t(0)\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nPhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\n\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\n\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.\nmaterial.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n\n#ifdef REFLECTIVITY\n\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\n#else\n\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n\n#endif\n\n#ifdef CLEARCOAT\n\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\n\t#ifdef USE_CLEARCOATMAP\n\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\n\t#endif\n\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\n\t#endif\n\n\tmaterial.clearcoat = saturate( material.clearcoat ); // Burley clearcoat model\n\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n\n#endif\n\n#ifdef USE_SHEEN\n\n\tmaterial.sheenColor = sheen;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nstruct PhysicalMaterial {\n\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n\n};\n\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\n\n// Clear coat directional hemishperical reflectance (this approximation should be improved)\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n\n}\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction\n\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\n\t\t// LTC Fresnel Approximation by Stephen Hill\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\n\t}\n\n#endif\n\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\n\tvec3 irradiance = dotNL * directLight.color;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI; // punctual light\n\n\t#endif\n\n\t#ifdef CLEARCOAT\n\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tccIrradiance *= PI; // punctual light\n\n\t\t#endif\n\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\n\t#else\n\n\t\tfloat clearcoatDHR = 0.0;\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\n\t#ifdef CLEARCOAT\n\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\n\t#else\n\n\t\tfloat clearcoatDHR = 0.0;\n\n\t#endif\n\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\n\t// Both indirect specular and indirect diffuse light accumulate here\n\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n\n}\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n\nstruct ToonMaterial {\n\n\tvec3 diffuseColor;\n\n};\n\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI; // punctual light\n\n\t#endif\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n\n#define Material_LightProbeLOD( material )\t(0)\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\n\t// Doing a strict comparison with == 1.0 can cause noise artifacts\n\t// on some platforms. See issue #17623.\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_LOGDEPTHBUF\n\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\n\t#else\n\n\t\tuniform float logDepthBufFC;\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_LOGDEPTHBUF\n\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\n\t#else\n\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\n\t\t\tgl_Position.z *= gl_Position.w;\n\n\t\t}\n\n\t#endif\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_MAP\n\n\tvec4 texelColor = texture2D( map, vUv );\n\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\n#endif\n\n#ifdef USE_MAP\n\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\tuniform mat3 uvTransform;\n\n#endif\n\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "\nfloat metalnessFactor = metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n";
2
+ export default _default;