molstar 3.6.0 → 3.8.0

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 (410) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -202
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +106 -106
  5. package/build/viewer/molstar.css +1 -1
  6. package/build/viewer/molstar.js +1 -1
  7. package/build/viewer/molstar.js.LICENSE.txt +0 -15
  8. package/lib/apps/docking-viewer/index.html +36 -36
  9. package/lib/apps/viewer/embedded.html +43 -43
  10. package/lib/apps/viewer/index.html +106 -106
  11. package/lib/cli/chem-comp-dict/create-ions.d.ts +2 -1
  12. package/lib/cli/chem-comp-dict/create-ions.js +3 -2
  13. package/lib/cli/cifschema/index.js +1 -1
  14. package/lib/cli/cifschema/util/cif-dic.js +1 -0
  15. package/lib/commonjs/cli/chem-comp-dict/create-ions.d.ts +2 -1
  16. package/lib/commonjs/cli/chem-comp-dict/create-ions.js +3 -2
  17. package/lib/commonjs/cli/cifschema/index.js +1 -1
  18. package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
  19. package/lib/commonjs/examples/alpha-orbitals/index.js +20 -15
  20. package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  21. package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -1
  22. package/lib/commonjs/extensions/anvil/representation.d.ts +4 -4
  23. package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -1
  24. package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
  25. package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
  26. package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
  27. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
  28. package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -5
  29. package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -2
  30. package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -1
  31. package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -1
  32. package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -2
  33. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +0 -2
  34. package/lib/commonjs/mol-canvas3d/passes/draw.js +35 -70
  35. package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -1
  36. package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -1
  37. package/lib/commonjs/mol-canvas3d/passes/pick.js +1 -1
  38. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  39. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +16 -11
  40. package/lib/commonjs/mol-geo/geometry/color-data.d.ts +7 -10
  41. package/lib/commonjs/mol-geo/geometry/color-data.js +7 -4
  42. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
  43. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -2
  44. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
  45. package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +1 -1
  46. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +3 -2
  47. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  48. package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +1 -1
  49. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -2
  50. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
  51. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +15 -4
  52. package/lib/commonjs/mol-geo/geometry/transparency-data.d.ts +1 -1
  53. package/lib/commonjs/mol-geo/geometry/transparency-data.js +3 -1
  54. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +2 -1
  55. package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
  56. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +2 -1
  57. package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
  58. package/lib/commonjs/mol-gl/renderable/schema.d.ts +2 -2
  59. package/lib/commonjs/mol-gl/renderable/schema.js +2 -2
  60. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +2 -1
  61. package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
  62. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +2 -1
  63. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +2 -2
  64. package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
  65. package/lib/commonjs/mol-gl/renderer.js +114 -64
  66. package/lib/commonjs/mol-gl/scene.d.ts +1 -0
  67. package/lib/commonjs/mol-gl/scene.js +26 -1
  68. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  69. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  70. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  71. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  72. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  73. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  74. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  75. package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  76. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  77. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  78. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  79. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  80. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  81. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  82. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  83. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  84. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
  85. package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
  86. package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +3 -2
  87. package/lib/commonjs/mol-gl/shader/outlines.frag.js +3 -2
  88. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  89. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  90. package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +2 -2
  91. package/lib/commonjs/mol-gl/shader/ssao.frag.js +2 -2
  92. package/lib/commonjs/mol-gl/webgl/render-target.d.ts +3 -1
  93. package/lib/commonjs/mol-gl/webgl/render-target.js +3 -1
  94. package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +2 -1
  95. package/lib/commonjs/mol-gl/webgl/renderbuffer.js +8 -1
  96. package/lib/commonjs/mol-gl/webgl/state.d.ts +7 -1
  97. package/lib/commonjs/mol-gl/webgl/state.js +28 -1
  98. package/lib/commonjs/mol-gl/webgl/texture.js +3 -0
  99. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  100. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  101. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  102. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  103. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  104. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.js +1 -1
  105. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  106. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +2 -3
  107. package/lib/commonjs/mol-io/reader/dx/parser.js +1 -1
  108. package/lib/commonjs/mol-io/writer/ligand-encoder.d.ts +4 -2
  109. package/lib/commonjs/mol-io/writer/ligand-encoder.js +9 -4
  110. package/lib/commonjs/mol-io/writer/mol/encoder.js +16 -4
  111. package/lib/commonjs/mol-io/writer/mol2/encoder.js +17 -4
  112. package/lib/commonjs/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  113. package/lib/commonjs/mol-math/geometry/lookup3d/grid.js +3 -3
  114. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  115. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.js +2 -1
  116. package/lib/commonjs/mol-model/structure/model/types/ions.d.ts +2 -2
  117. package/lib/commonjs/mol-model/structure/model/types/ions.js +2 -2
  118. package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
  119. package/lib/commonjs/mol-model/structure/model/types.d.ts +1 -1
  120. package/lib/commonjs/mol-model/structure/model/types.js +43 -41
  121. package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -2
  122. package/lib/commonjs/mol-model-formats/structure/common/property.js +2 -0
  123. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  124. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +2 -2
  125. package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  126. package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  127. package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -3
  128. package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -4
  129. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  130. package/lib/commonjs/mol-plugin/commands.d.ts +1 -1
  131. package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +3 -3
  132. package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
  133. package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +6 -6
  134. package/lib/commonjs/mol-plugin-ui/base.d.ts +3 -1
  135. package/lib/commonjs/mol-plugin-ui/controls/color.d.ts +1 -1
  136. package/lib/commonjs/mol-plugin-ui/controls/common.d.ts +2 -0
  137. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  138. package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +21 -7
  139. package/lib/commonjs/mol-plugin-ui/plugin.d.ts +2 -0
  140. package/lib/commonjs/mol-plugin-ui/plugin.js +2 -2
  141. package/lib/commonjs/mol-plugin-ui/spec.d.ts +1 -0
  142. package/lib/commonjs/mol-plugin-ui/state/common.js +6 -7
  143. package/lib/commonjs/mol-plugin-ui/task.d.ts +2 -21
  144. package/lib/commonjs/mol-plugin-ui/task.js +39 -43
  145. package/lib/commonjs/mol-plugin-ui/viewport/help.d.ts +4 -1
  146. package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -1
  147. package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -1
  148. package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -1
  149. package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -1
  150. package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -1
  151. package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +3 -3
  152. package/lib/commonjs/mol-repr/structure/params.d.ts +4 -4
  153. package/lib/commonjs/mol-repr/structure/registry.d.ts +10 -10
  154. package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -3
  155. package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -3
  156. package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -3
  157. package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -3
  158. package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -3
  159. package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
  160. package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
  161. package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -3
  162. package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -3
  163. package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -3
  164. package/lib/commonjs/mol-repr/structure/units-visual.d.ts +4 -4
  165. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -2
  166. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -2
  167. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  168. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  169. package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  170. package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +2 -2
  171. package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
  172. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
  173. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  174. package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
  175. package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
  176. package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
  177. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -2
  178. package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
  179. package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
  180. package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
  181. package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
  182. package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
  183. package/lib/commonjs/mol-repr/util.d.ts +1 -1
  184. package/lib/commonjs/mol-repr/util.js +1 -1
  185. package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -5
  186. package/lib/commonjs/mol-repr/volume/registry.d.ts +1 -1
  187. package/lib/commonjs/mol-repr/volume/slice.js +1 -1
  188. package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
  189. package/lib/commonjs/mol-theme/color/volume-value.d.ts +3 -2
  190. package/lib/commonjs/mol-theme/color/volume-value.js +1 -3
  191. package/lib/commonjs/mol-theme/color.d.ts +55 -39
  192. package/lib/commonjs/mol-theme/color.js +1 -1
  193. package/lib/commonjs/mol-theme/theme.d.ts +8 -7
  194. package/lib/commonjs/mol-theme/theme.js +1 -1
  195. package/lib/commonjs/servers/model/server/query.js +1 -3
  196. package/lib/commonjs/servers/model/version.d.ts +1 -1
  197. package/lib/commonjs/servers/model/version.js +1 -1
  198. package/lib/examples/alpha-orbitals/index.html +61 -61
  199. package/lib/examples/alpha-orbitals/index.js +20 -15
  200. package/lib/examples/basic-wrapper/index.html +137 -137
  201. package/lib/examples/lighting/index.html +88 -88
  202. package/lib/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  203. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  204. package/lib/extensions/anvil/behavior.d.ts +1 -1
  205. package/lib/extensions/anvil/representation.d.ts +4 -4
  206. package/lib/extensions/cellpack/representation.d.ts +1 -1
  207. package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -3
  208. package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -1
  209. package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -1
  210. package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
  211. package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -5
  212. package/lib/mol-canvas3d/canvas3d.d.ts +2 -2
  213. package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -1
  214. package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -1
  215. package/lib/mol-canvas3d/helper/helper.d.ts +2 -2
  216. package/lib/mol-canvas3d/passes/draw.d.ts +0 -2
  217. package/lib/mol-canvas3d/passes/draw.js +32 -67
  218. package/lib/mol-canvas3d/passes/image.d.ts +1 -1
  219. package/lib/mol-canvas3d/passes/pick.d.ts +1 -1
  220. package/lib/mol-canvas3d/passes/pick.js +1 -1
  221. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  222. package/lib/mol-canvas3d/passes/postprocessing.js +16 -11
  223. package/lib/mol-geo/geometry/color-data.d.ts +7 -10
  224. package/lib/mol-geo/geometry/color-data.js +7 -4
  225. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
  226. package/lib/mol-geo/geometry/cylinders/cylinders.js +3 -2
  227. package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
  228. package/lib/mol-geo/geometry/mesh/mesh.d.ts +1 -1
  229. package/lib/mol-geo/geometry/mesh/mesh.js +3 -2
  230. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  231. package/lib/mol-geo/geometry/spheres/spheres.d.ts +1 -1
  232. package/lib/mol-geo/geometry/spheres/spheres.js +3 -2
  233. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +1 -1
  234. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +15 -4
  235. package/lib/mol-geo/geometry/transparency-data.d.ts +1 -1
  236. package/lib/mol-geo/geometry/transparency-data.js +3 -1
  237. package/lib/mol-gl/renderable/cylinders.d.ts +2 -1
  238. package/lib/mol-gl/renderable/cylinders.js +2 -2
  239. package/lib/mol-gl/renderable/mesh.d.ts +2 -1
  240. package/lib/mol-gl/renderable/mesh.js +2 -2
  241. package/lib/mol-gl/renderable/schema.d.ts +2 -2
  242. package/lib/mol-gl/renderable/schema.js +2 -2
  243. package/lib/mol-gl/renderable/spheres.d.ts +2 -1
  244. package/lib/mol-gl/renderable/spheres.js +2 -2
  245. package/lib/mol-gl/renderable/texture-mesh.d.ts +2 -1
  246. package/lib/mol-gl/renderable/texture-mesh.js +2 -2
  247. package/lib/mol-gl/renderer.d.ts +5 -5
  248. package/lib/mol-gl/renderer.js +114 -64
  249. package/lib/mol-gl/scene.d.ts +1 -0
  250. package/lib/mol-gl/scene.js +26 -1
  251. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  252. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  253. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  254. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  255. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  256. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  257. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
  258. package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
  259. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  260. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  261. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  262. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  263. package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  264. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  265. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  266. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  267. package/lib/mol-gl/shader/image.frag.d.ts +1 -1
  268. package/lib/mol-gl/shader/image.frag.js +1 -1
  269. package/lib/mol-gl/shader/outlines.frag.d.ts +3 -2
  270. package/lib/mol-gl/shader/outlines.frag.js +3 -2
  271. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  272. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  273. package/lib/mol-gl/shader/ssao.frag.d.ts +2 -2
  274. package/lib/mol-gl/shader/ssao.frag.js +2 -2
  275. package/lib/mol-gl/webgl/render-target.d.ts +3 -1
  276. package/lib/mol-gl/webgl/render-target.js +3 -1
  277. package/lib/mol-gl/webgl/renderbuffer.d.ts +2 -1
  278. package/lib/mol-gl/webgl/renderbuffer.js +8 -1
  279. package/lib/mol-gl/webgl/state.d.ts +7 -1
  280. package/lib/mol-gl/webgl/state.js +28 -1
  281. package/lib/mol-gl/webgl/texture.js +3 -0
  282. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  283. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  284. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  285. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  286. package/lib/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  287. package/lib/mol-io/reader/cif/schema/cif-core.js +1 -1
  288. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  289. package/lib/mol-io/reader/cif/schema/mmcif.js +2 -3
  290. package/lib/mol-io/reader/dx/parser.js +1 -1
  291. package/lib/mol-io/writer/ligand-encoder.d.ts +4 -2
  292. package/lib/mol-io/writer/ligand-encoder.js +9 -4
  293. package/lib/mol-io/writer/mol/encoder.js +16 -4
  294. package/lib/mol-io/writer/mol2/encoder.js +17 -4
  295. package/lib/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  296. package/lib/mol-math/geometry/lookup3d/grid.js +3 -3
  297. package/lib/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  298. package/lib/mol-model/structure/model/properties/seconday-structure.js +2 -1
  299. package/lib/mol-model/structure/model/types/ions.d.ts +2 -2
  300. package/lib/mol-model/structure/model/types/ions.js +2 -2
  301. package/lib/mol-model/structure/model/types/saccharides.js +1 -1
  302. package/lib/mol-model/structure/model/types.d.ts +1 -1
  303. package/lib/mol-model/structure/model/types.js +43 -41
  304. package/lib/mol-model-formats/shape/ply.d.ts +2 -2
  305. package/lib/mol-model-formats/structure/common/property.js +2 -0
  306. package/lib/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  307. package/lib/mol-model-formats/structure/property/secondary-structure.js +2 -2
  308. package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -1
  309. package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -1
  310. package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -3
  311. package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -4
  312. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  313. package/lib/mol-plugin/commands.d.ts +1 -1
  314. package/lib/mol-plugin/util/viewport-screenshot.d.ts +3 -3
  315. package/lib/mol-plugin/version.js +2 -2
  316. package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
  317. package/lib/mol-plugin-state/transforms/representation.d.ts +6 -6
  318. package/lib/mol-plugin-ui/base.d.ts +3 -1
  319. package/lib/mol-plugin-ui/controls/color.d.ts +1 -1
  320. package/lib/mol-plugin-ui/controls/common.d.ts +2 -0
  321. package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
  322. package/lib/mol-plugin-ui/hooks/use-behavior.js +20 -7
  323. package/lib/mol-plugin-ui/plugin.d.ts +2 -0
  324. package/lib/mol-plugin-ui/plugin.js +2 -2
  325. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  326. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  327. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  328. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  329. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  330. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  331. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  332. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  333. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  334. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  335. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  336. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  337. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
  338. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  339. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  340. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  341. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  342. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  343. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  344. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  345. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  346. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  347. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  348. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  349. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  350. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  351. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  352. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  353. package/lib/mol-plugin-ui/spec.d.ts +1 -0
  354. package/lib/mol-plugin-ui/state/common.js +7 -8
  355. package/lib/mol-plugin-ui/task.d.ts +2 -21
  356. package/lib/mol-plugin-ui/task.js +40 -46
  357. package/lib/mol-plugin-ui/viewport/help.d.ts +4 -1
  358. package/lib/mol-repr/shape/loci/angle.d.ts +1 -1
  359. package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -1
  360. package/lib/mol-repr/shape/loci/orientation.d.ts +1 -1
  361. package/lib/mol-repr/shape/loci/plane.d.ts +1 -1
  362. package/lib/mol-repr/shape/model/unitcell.d.ts +1 -1
  363. package/lib/mol-repr/structure/complex-visual.d.ts +3 -3
  364. package/lib/mol-repr/structure/params.d.ts +4 -4
  365. package/lib/mol-repr/structure/registry.d.ts +10 -10
  366. package/lib/mol-repr/structure/representation/backbone.d.ts +3 -3
  367. package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -3
  368. package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -3
  369. package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -3
  370. package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -3
  371. package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -3
  372. package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -3
  373. package/lib/mol-repr/structure/representation/orientation.d.ts +3 -3
  374. package/lib/mol-repr/structure/representation/putty.d.ts +3 -3
  375. package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -3
  376. package/lib/mol-repr/structure/units-visual.d.ts +4 -4
  377. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -2
  378. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -2
  379. package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -1
  380. package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -1
  381. package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -1
  382. package/lib/mol-repr/structure/visual/element-sphere.d.ts +2 -2
  383. package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -1
  384. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -4
  385. package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -1
  386. package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -1
  387. package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -1
  388. package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -1
  389. package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -2
  390. package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -2
  391. package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -1
  392. package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -1
  393. package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -1
  394. package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -1
  395. package/lib/mol-repr/util.d.ts +1 -1
  396. package/lib/mol-repr/util.js +1 -1
  397. package/lib/mol-repr/volume/isosurface.d.ts +5 -5
  398. package/lib/mol-repr/volume/registry.d.ts +1 -1
  399. package/lib/mol-repr/volume/slice.js +1 -1
  400. package/lib/mol-script/language/builder.d.ts +0 -1
  401. package/lib/mol-theme/color/volume-value.d.ts +3 -2
  402. package/lib/mol-theme/color/volume-value.js +2 -4
  403. package/lib/mol-theme/color.d.ts +55 -39
  404. package/lib/mol-theme/color.js +1 -1
  405. package/lib/mol-theme/theme.d.ts +8 -7
  406. package/lib/mol-theme/theme.js +1 -1
  407. package/lib/servers/model/server/query.js +1 -3
  408. package/lib/servers/model/version.d.ts +1 -1
  409. package/lib/servers/model/version.js +1 -1
  410. package/package.json +162 -162
@@ -7,30 +7,14 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.DrawPass = void 0;
10
- var tslib_1 = require("tslib");
11
10
  var render_target_1 = require("../../mol-gl/webgl/render-target");
12
- var util_1 = require("../../mol-gl/compute/util");
13
- var schema_1 = require("../../mol-gl/renderable/schema");
14
- var renderable_1 = require("../../mol-gl/renderable");
15
- var shader_code_1 = require("../../mol-gl/shader-code");
16
- var render_item_1 = require("../../mol-gl/webgl/render-item");
17
11
  var mol_util_1 = require("../../mol-util");
18
12
  var linear_algebra_1 = require("../../mol-math/linear-algebra");
19
- var quad_vert_1 = require("../../mol-gl/shader/quad.vert");
20
- var depth_merge_frag_1 = require("../../mol-gl/shader/depth-merge.frag");
21
13
  var stereo_1 = require("../camera/stereo");
22
14
  var wboit_1 = require("./wboit");
23
15
  var postprocessing_1 = require("./postprocessing");
24
16
  var marking_1 = require("./marking");
25
- var util_2 = require("../../mol-gl/compute/util");
26
- var DepthMergeSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tDepthPrimitives: (0, schema_1.TextureSpec)('texture', 'depth', 'ushort', 'nearest'), tDepthVolumes: (0, schema_1.TextureSpec)('texture', 'depth', 'ushort', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dPackedDepth: (0, schema_1.DefineSpec)('boolean') });
27
- var DepthMergeShaderCode = (0, shader_code_1.ShaderCode)('depth-merge', quad_vert_1.quad_vert, depth_merge_frag_1.depthMerge_frag);
28
- function getDepthMergeRenderable(ctx, depthTexturePrimitives, depthTextureVolumes, packedDepth) {
29
- var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tDepthPrimitives: mol_util_1.ValueCell.create(depthTexturePrimitives), tDepthVolumes: mol_util_1.ValueCell.create(depthTextureVolumes), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(depthTexturePrimitives.getWidth(), depthTexturePrimitives.getHeight())), dPackedDepth: mol_util_1.ValueCell.create(packedDepth) });
30
- var schema = tslib_1.__assign({}, DepthMergeSchema);
31
- var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', DepthMergeShaderCode, schema, values);
32
- return (0, renderable_1.createComputeRenderable)(renderItem, values);
33
- }
17
+ var util_1 = require("../../mol-gl/compute/util");
34
18
  var DrawPass = /** @class */ (function () {
35
19
  function DrawPass(webgl, width, height, enableWboit) {
36
20
  this.webgl = webgl;
@@ -48,13 +32,12 @@ var DrawPass = /** @class */ (function () {
48
32
  this.depthTexturePrimitives.define(width, height);
49
33
  this.depthTextureVolumes.define(width, height);
50
34
  }
51
- this.depthMerge = getDepthMergeRenderable(webgl, this.depthTexturePrimitives, this.depthTextureVolumes, this.packedDepth);
52
35
  this.wboit = enableWboit ? new wboit_1.WboitPass(webgl, width, height) : undefined;
53
36
  this.marking = new marking_1.MarkingPass(webgl, width, height);
54
37
  this.postprocessing = new postprocessing_1.PostprocessingPass(webgl, this);
55
38
  this.antialiasing = new postprocessing_1.AntialiasingPass(webgl, this);
56
- this.copyFboTarget = (0, util_2.createCopyRenderable)(webgl, this.colorTarget.texture);
57
- this.copyFboPostprocessing = (0, util_2.createCopyRenderable)(webgl, this.postprocessing.target.texture);
39
+ this.copyFboTarget = (0, util_1.createCopyRenderable)(webgl, this.colorTarget.texture);
40
+ this.copyFboPostprocessing = (0, util_1.createCopyRenderable)(webgl, this.postprocessing.target.texture);
58
41
  }
59
42
  Object.defineProperty(DrawPass.prototype, "wboitEnabled", {
60
43
  get: function () {
@@ -87,7 +70,6 @@ var DrawPass = /** @class */ (function () {
87
70
  else {
88
71
  this.depthTextureVolumes.define(width, height);
89
72
  }
90
- mol_util_1.ValueCell.update(this.depthMerge.values.uTexSize, linear_algebra_1.Vec2.set(this.depthMerge.values.uTexSize.ref.value, width, height));
91
73
  mol_util_1.ValueCell.update(this.copyFboTarget.values.uTexSize, linear_algebra_1.Vec2.set(this.copyFboTarget.values.uTexSize.ref.value, width, height));
92
74
  mol_util_1.ValueCell.update(this.copyFboPostprocessing.values.uTexSize, linear_algebra_1.Vec2.set(this.copyFboPostprocessing.values.uTexSize.ref.value, width, height));
93
75
  if ((_a = this.wboit) === null || _a === void 0 ? void 0 : _a.supported) {
@@ -98,18 +80,6 @@ var DrawPass = /** @class */ (function () {
98
80
  this.antialiasing.setSize(width, height);
99
81
  }
100
82
  };
101
- DrawPass.prototype._depthMerge = function () {
102
- var _a = this.webgl, state = _a.state, gl = _a.gl;
103
- this.depthMerge.update();
104
- this.depthTarget.bind();
105
- state.disable(gl.BLEND);
106
- state.disable(gl.DEPTH_TEST);
107
- state.disable(gl.CULL_FACE);
108
- state.depthMask(false);
109
- state.clearColor(1, 1, 1, 1);
110
- gl.clear(gl.COLOR_BUFFER_BIT);
111
- this.depthMerge.render();
112
- };
113
83
  DrawPass.prototype._renderWboit = function (renderer, camera, scene, transparentBackground, postprocessingProps) {
114
84
  var _a;
115
85
  if (!((_a = this.wboit) === null || _a === void 0 ? void 0 : _a.supported))
@@ -121,32 +91,31 @@ var DrawPass = /** @class */ (function () {
121
91
  this.colorTarget.bind();
122
92
  renderer.clearDepth();
123
93
  renderer.renderWboitOpaque(scene.primitives, camera, null);
124
- // render opaque volumes
125
- this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
126
- this.colorTarget.bind();
127
- renderer.clearDepth();
128
- renderer.renderWboitOpaque(scene.volumes, camera, this.depthTexturePrimitives);
129
- // merge depth of opaque primitives and volumes
130
- this._depthMerge();
131
94
  if (postprocessing_1.PostprocessingPass.isEnabled(postprocessingProps)) {
95
+ if (postprocessing_1.PostprocessingPass.isOutlineEnabled(postprocessingProps)) {
96
+ this.depthTarget.bind();
97
+ renderer.clearDepth(true);
98
+ if (scene.getOpacityAverage() < 1) {
99
+ renderer.renderDepthTransparent(scene.primitives, camera, this.depthTexturePrimitives);
100
+ }
101
+ }
132
102
  this.postprocessing.render(camera, false, transparentBackground, renderer.props.backgroundColor, postprocessingProps);
133
103
  }
134
104
  // render transparent primitives and volumes
135
105
  this.wboit.bind();
136
- renderer.renderWboitTransparent(scene.primitives, camera, this.depthTexture);
137
- renderer.renderWboitTransparent(scene.volumes, camera, this.depthTexture);
106
+ renderer.renderWboitTransparent(scene.primitives, camera, this.depthTexturePrimitives);
107
+ renderer.renderWboitTransparent(scene.volumes, camera, this.depthTexturePrimitives);
138
108
  // evaluate wboit
139
109
  if (postprocessing_1.PostprocessingPass.isEnabled(postprocessingProps)) {
140
- this.depthTexturePrimitives.attachFramebuffer(this.postprocessing.target.framebuffer, 'depth');
141
110
  this.postprocessing.target.bind();
142
111
  }
143
112
  else {
144
- this.depthTexturePrimitives.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
145
113
  this.colorTarget.bind();
146
114
  }
147
115
  this.wboit.render();
148
116
  };
149
117
  DrawPass.prototype._renderBlended = function (renderer, camera, scene, toDrawingBuffer, transparentBackground, postprocessingProps) {
118
+ var _a, _b;
150
119
  if (toDrawingBuffer) {
151
120
  this.drawTarget.bind();
152
121
  }
@@ -163,37 +132,33 @@ var DrawPass = /** @class */ (function () {
163
132
  // extensions.depthTexture is unsupported (i.e. depthTarget is set)
164
133
  if (this.depthTargetPrimitives) {
165
134
  this.depthTargetPrimitives.bind();
166
- renderer.clear(false);
167
- // TODO: this should only render opaque
168
- renderer.renderDepth(scene.primitives, camera, null);
169
- this.colorTarget.bind();
170
- }
171
- // do direct-volume rendering
172
- if (!this.packedDepth) {
173
- this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
174
- renderer.clearDepth(); // from previous frame
175
- }
176
- renderer.renderBlendedVolumeOpaque(scene.volumes, camera, this.depthTexturePrimitives);
177
- // do volume depth pass if extensions.depthTexture is unsupported (i.e. depthTarget is set)
178
- if (this.depthTargetVolumes) {
179
- this.depthTargetVolumes.bind();
180
- renderer.clear(false);
181
- renderer.renderDepth(scene.volumes, camera, this.depthTexturePrimitives);
135
+ renderer.clearDepth(true);
136
+ renderer.renderDepthOpaque(scene.primitives, camera, null);
182
137
  this.colorTarget.bind();
183
138
  }
184
- // merge depths from primitive and volume rendering
185
- this._depthMerge();
186
- this.colorTarget.bind();
187
139
  if (postprocessing_1.PostprocessingPass.isEnabled(postprocessingProps)) {
140
+ if (!this.packedDepth) {
141
+ this.depthTexturePrimitives.detachFramebuffer(this.postprocessing.target.framebuffer, 'depth');
142
+ }
143
+ else {
144
+ (_a = this.colorTarget.depthRenderbuffer) === null || _a === void 0 ? void 0 : _a.detachFramebuffer(this.postprocessing.target.framebuffer);
145
+ }
146
+ if (postprocessing_1.PostprocessingPass.isOutlineEnabled(postprocessingProps)) {
147
+ this.depthTarget.bind();
148
+ renderer.clearDepth(true);
149
+ if (scene.getOpacityAverage() < 1) {
150
+ renderer.renderDepthTransparent(scene.primitives, camera, this.depthTexturePrimitives);
151
+ }
152
+ }
188
153
  this.postprocessing.render(camera, false, transparentBackground, renderer.props.backgroundColor, postprocessingProps);
154
+ if (!this.packedDepth) {
155
+ this.depthTexturePrimitives.attachFramebuffer(this.postprocessing.target.framebuffer, 'depth');
156
+ }
157
+ else {
158
+ (_b = this.colorTarget.depthRenderbuffer) === null || _b === void 0 ? void 0 : _b.attachFramebuffer(this.postprocessing.target.framebuffer);
159
+ }
189
160
  }
190
- renderer.renderBlendedVolumeTransparent(scene.volumes, camera, this.depthTexturePrimitives);
191
- var target = postprocessing_1.PostprocessingPass.isEnabled(postprocessingProps)
192
- ? this.postprocessing.target : this.colorTarget;
193
- if (!this.packedDepth) {
194
- this.depthTexturePrimitives.attachFramebuffer(target.framebuffer, 'depth');
195
- }
196
- target.bind();
161
+ renderer.renderBlendedVolume(scene.volumes, camera, this.depthTexturePrimitives);
197
162
  }
198
163
  renderer.renderBlendedTransparent(scene.primitives, camera, null);
199
164
  };
@@ -60,7 +60,7 @@ export declare const ImageParams: {
60
60
  flipSided: any;
61
61
  flatShaded: any;
62
62
  xrayShaded: any;
63
- allowTransparentBackfaces: any;
63
+ transparentBackfaces: any;
64
64
  bumpFrequency: any;
65
65
  bumpAmplitude: any;
66
66
  quality: any;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
@@ -38,6 +38,7 @@ export declare class PostprocessingPass {
38
38
  private webgl;
39
39
  private drawPass;
40
40
  static isEnabled(props: PostprocessingProps): boolean;
41
+ static isOutlineEnabled(props: PostprocessingProps): boolean;
41
42
  readonly target: RenderTarget;
42
43
  private readonly outlinesTarget;
43
44
  private readonly outlinesRenderable;
@@ -24,9 +24,11 @@ var postprocessing_frag_1 = require("../../mol-gl/shader/postprocessing.frag");
24
24
  var color_1 = require("../../mol-util/color");
25
25
  var fxaa_1 = require("./fxaa");
26
26
  var smaa_1 = require("./smaa");
27
- var OutlinesSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f') });
28
- function getOutlinesRenderable(ctx, depthTexture) {
29
- var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tDepth: mol_util_1.ValueCell.create(depthTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(depthTexture.getWidth(), depthTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5) });
27
+ var OutlinesSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tDepthOpaque: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepthTransparent: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f') });
28
+ function getOutlinesRenderable(ctx, depthTextureOpaque, depthTextureTransparent) {
29
+ var width = depthTextureOpaque.getWidth();
30
+ var height = depthTextureOpaque.getHeight();
31
+ var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tDepthOpaque: mol_util_1.ValueCell.create(depthTextureOpaque), tDepthTransparent: mol_util_1.ValueCell.create(depthTextureTransparent), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(width, height)), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5) });
30
32
  var schema = tslib_1.__assign({}, OutlinesSchema);
31
33
  var shaderCode = (0, shader_code_1.ShaderCode)('outlines', quad_vert_1.quad_vert, outlines_frag_1.outlines_frag);
32
34
  var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
@@ -68,9 +70,9 @@ function getSamples(vectorSamples, nSamples) {
68
70
  }
69
71
  return samples;
70
72
  }
71
- var PostprocessingSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uFogNear: (0, schema_1.UniformSpec)('f'), uFogFar: (0, schema_1.UniformSpec)('f'), uFogColor: (0, schema_1.UniformSpec)('v3'), uOutlineColor: (0, schema_1.UniformSpec)('v3'), uTransparentBackground: (0, schema_1.UniformSpec)('b'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), dOcclusionEnable: (0, schema_1.DefineSpec)('boolean'), uOcclusionOffset: (0, schema_1.UniformSpec)('v2'), dOutlineEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineScale: (0, schema_1.DefineSpec)('number'), uOutlineThreshold: (0, schema_1.UniformSpec)('f') });
72
- function getPostprocessingRenderable(ctx, colorTexture, depthTexture, outlinesTexture, ssaoDepthTexture) {
73
- var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepth: mol_util_1.ValueCell.create(depthTexture), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uOutlineColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(0, 0, 0)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(true), uOcclusionOffset: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(0, 0)), dOutlineEnable: mol_util_1.ValueCell.create(false), dOutlineScale: mol_util_1.ValueCell.create(1), uOutlineThreshold: mol_util_1.ValueCell.create(0.33) });
73
+ var PostprocessingSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepthOpaque: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepthTransparent: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uFogNear: (0, schema_1.UniformSpec)('f'), uFogFar: (0, schema_1.UniformSpec)('f'), uFogColor: (0, schema_1.UniformSpec)('v3'), uOutlineColor: (0, schema_1.UniformSpec)('v3'), uTransparentBackground: (0, schema_1.UniformSpec)('b'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), dOcclusionEnable: (0, schema_1.DefineSpec)('boolean'), uOcclusionOffset: (0, schema_1.UniformSpec)('v2'), dOutlineEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineScale: (0, schema_1.DefineSpec)('number'), uOutlineThreshold: (0, schema_1.UniformSpec)('f') });
74
+ function getPostprocessingRenderable(ctx, colorTexture, depthTextureOpaque, depthTextureTransparent, outlinesTexture, ssaoDepthTexture) {
75
+ var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepthOpaque: mol_util_1.ValueCell.create(depthTextureOpaque), tDepthTransparent: mol_util_1.ValueCell.create(depthTextureTransparent), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uOutlineColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(0, 0, 0)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(true), uOcclusionOffset: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(0, 0)), dOutlineEnable: mol_util_1.ValueCell.create(false), dOutlineScale: mol_util_1.ValueCell.create(1), uOutlineThreshold: mol_util_1.ValueCell.create(0.33) });
74
76
  var schema = tslib_1.__assign({}, PostprocessingSchema);
75
77
  var shaderCode = (0, shader_code_1.ShaderCode)('postprocessing', quad_vert_1.quad_vert, postprocessing_frag_1.postprocessing_frag);
76
78
  var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
@@ -106,7 +108,7 @@ var PostprocessingPass = /** @class */ (function () {
106
108
  this.webgl = webgl;
107
109
  this.drawPass = drawPass;
108
110
  this.occlusionOffset = [0, 0];
109
- var colorTarget = drawPass.colorTarget, depthTexture = drawPass.depthTexture;
111
+ var colorTarget = drawPass.colorTarget, depthTextureTransparent = drawPass.depthTexture, depthTextureOpaque = drawPass.depthTexturePrimitives;
110
112
  var width = colorTarget.getWidth();
111
113
  var height = colorTarget.getHeight();
112
114
  this.nSamples = 1;
@@ -116,7 +118,7 @@ var PostprocessingPass = /** @class */ (function () {
116
118
  // needs to be linear for anti-aliasing pass
117
119
  this.target = webgl.createRenderTarget(width, height, false, 'uint8', 'linear');
118
120
  this.outlinesTarget = webgl.createRenderTarget(width, height, false);
119
- this.outlinesRenderable = getOutlinesRenderable(webgl, depthTexture);
121
+ this.outlinesRenderable = getOutlinesRenderable(webgl, depthTextureOpaque, depthTextureTransparent);
120
122
  this.randomHemisphereVector = [];
121
123
  for (var i = 0; i < 256; i++) {
122
124
  var v = (0, linear_algebra_1.Vec3)();
@@ -133,7 +135,7 @@ var PostprocessingPass = /** @class */ (function () {
133
135
  var sw = Math.floor(width * this.ssaoScale);
134
136
  var sh = Math.floor(height * this.ssaoScale);
135
137
  this.downsampledDepthTarget = webgl.createRenderTarget(sw, sh, false, 'uint8', 'linear');
136
- this.downsampleDepthRenderable = (0, util_1.createCopyRenderable)(webgl, depthTexture);
138
+ this.downsampleDepthRenderable = (0, util_1.createCopyRenderable)(webgl, depthTextureOpaque);
137
139
  this.ssaoDepthTexture = webgl.resources.texture('image-uint8', 'rgba', 'ubyte', 'linear');
138
140
  this.ssaoDepthTexture.define(sw, sh);
139
141
  this.ssaoDepthTexture.attachFramebuffer(this.ssaoFramebuffer, 'color0');
@@ -141,14 +143,17 @@ var PostprocessingPass = /** @class */ (function () {
141
143
  this.ssaoDepthBlurProxyTexture.define(sw, sh);
142
144
  this.ssaoDepthBlurProxyTexture.attachFramebuffer(this.ssaoBlurFirstPassFramebuffer, 'color0');
143
145
  this.ssaoDepthTexture.attachFramebuffer(this.ssaoBlurSecondPassFramebuffer, 'color0');
144
- this.ssaoRenderable = getSsaoRenderable(webgl, this.downsampleFactor === 1 ? depthTexture : this.downsampledDepthTarget.texture);
146
+ this.ssaoRenderable = getSsaoRenderable(webgl, this.downsampleFactor === 1 ? depthTextureOpaque : this.downsampledDepthTarget.texture);
145
147
  this.ssaoBlurFirstPassRenderable = getSsaoBlurRenderable(webgl, this.ssaoDepthTexture, 'horizontal');
146
148
  this.ssaoBlurSecondPassRenderable = getSsaoBlurRenderable(webgl, this.ssaoDepthBlurProxyTexture, 'vertical');
147
- this.renderable = getPostprocessingRenderable(webgl, colorTarget.texture, depthTexture, this.outlinesTarget.texture, this.ssaoDepthTexture);
149
+ this.renderable = getPostprocessingRenderable(webgl, colorTarget.texture, depthTextureOpaque, depthTextureTransparent, this.outlinesTarget.texture, this.ssaoDepthTexture);
148
150
  }
149
151
  PostprocessingPass.isEnabled = function (props) {
150
152
  return props.occlusion.name === 'on' || props.outline.name === 'on';
151
153
  };
154
+ PostprocessingPass.isOutlineEnabled = function (props) {
155
+ return props.outline.name === 'on';
156
+ };
152
157
  PostprocessingPass.prototype.calcSsaoScale = function () {
153
158
  // downscale ssao for high pixel-ratios
154
159
  return Math.min(1, 1 / this.webgl.pixelRatio) * this.downsampleFactor;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -9,9 +9,12 @@ import { TextureImage } from '../../mol-gl/renderable/util';
9
9
  import { Color } from '../../mol-util/color';
10
10
  import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
11
11
  import { LocationIterator } from '../util/location-iterator';
12
- import { ColorTheme } from '../../mol-theme/color';
12
+ import { ColorTheme, ColorVolume } from '../../mol-theme/color';
13
13
  import { Texture } from '../../mol-gl/webgl/texture';
14
- export declare type ColorType = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance' | 'volume' | 'volumeInstance' | 'direct';
14
+ export declare type ColorTypeLocation = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance';
15
+ export declare type ColorTypeGrid = 'volume' | 'volumeInstance';
16
+ export declare type ColorTypeDirect = 'direct';
17
+ export declare type ColorType = ColorTypeLocation | ColorTypeGrid | ColorTypeDirect;
15
18
  export declare type ColorData = {
16
19
  uColor: ValueCell<Vec3>;
17
20
  tColor: ValueCell<TextureImage<Uint8Array>>;
@@ -23,13 +26,7 @@ export declare type ColorData = {
23
26
  dColorType: ValueCell<string>;
24
27
  dUsePalette: ValueCell<boolean>;
25
28
  };
26
- export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any>, colorData?: ColorData): ColorData;
29
+ export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any, any>, colorData?: ColorData): ColorData;
27
30
  export declare function createValueColor(value: Color, colorData?: ColorData): ColorData;
28
31
  export declare function createTextureColor(colors: TextureImage<Uint8Array>, type: ColorType, colorData?: ColorData): ColorData;
29
- interface ColorVolume {
30
- colors: Texture;
31
- dimension: Vec3;
32
- transform: Vec4;
33
- }
34
32
  export declare function createGridColor(grid: ColorVolume, type: ColorType, colorData?: ColorData): ColorData;
35
- export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  * @author David Sehnal <david.sehnal@gmail.com>
@@ -12,7 +12,6 @@ var util_1 = require("../../mol-gl/renderable/util");
12
12
  var color_1 = require("../../mol-util/color");
13
13
  var linear_algebra_1 = require("../../mol-math/linear-algebra");
14
14
  var location_1 = require("../../mol-model/location");
15
- var geometry_1 = require("./geometry");
16
15
  var texture_1 = require("../../mol-gl/webgl/texture");
17
16
  function createColors(locationIt, positionIt, colorTheme, colorData) {
18
17
  var data = _createColors(locationIt, positionIt, colorTheme, colorData);
@@ -27,9 +26,12 @@ function createColors(locationIt, positionIt, colorTheme, colorData) {
27
26
  }
28
27
  exports.createColors = createColors;
29
28
  function _createColors(locationIt, positionIt, colorTheme, colorData) {
30
- switch (geometry_1.Geometry.getGranularity(locationIt, colorTheme.granularity)) {
29
+ switch (colorTheme.granularity) {
31
30
  case 'uniform': return createUniformColor(locationIt, colorTheme.color, colorData);
32
- case 'instance': return createInstanceColor(locationIt, colorTheme.color, colorData);
31
+ case 'instance':
32
+ return locationIt.nonInstanceable
33
+ ? createInstanceColor(locationIt, colorTheme.color, colorData)
34
+ : createGroupColor(locationIt, colorTheme.color, colorData);
33
35
  case 'group': return createGroupColor(locationIt, colorTheme.color, colorData);
34
36
  case 'groupInstance': return createGroupInstanceColor(locationIt, colorTheme.color, colorData);
35
37
  case 'vertex': return createVertexColor(positionIt, colorTheme.color, colorData);
@@ -184,6 +186,7 @@ function createVertexInstanceColor(locationIt, color, colorData) {
184
186
  }
185
187
  return createTextureColor(colors, 'vertexInstance', colorData);
186
188
  }
189
+ //
187
190
  function createGridColor(grid, type, colorData) {
188
191
  var colors = grid.colors, dimension = grid.dimension, transform = grid.transform;
189
192
  var width = colors.getWidth();
@@ -43,15 +43,15 @@ export declare namespace Cylinders {
43
43
  doubleSided: PD.BooleanParam;
44
44
  ignoreLight: PD.BooleanParam;
45
45
  xrayShaded: PD.BooleanParam;
46
- allowTransparentBackfaces: PD.BooleanParam;
46
+ transparentBackfaces: PD.Select<string>;
47
47
  bumpFrequency: PD.Numeric;
48
48
  bumpAmplitude: PD.Numeric;
49
49
  alpha: PD.Numeric;
50
50
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
51
51
  material: PD.Group<PD.Normalize<{
52
52
  metalness: number;
53
- roughness: number;
54
53
  /** Number of cylinders */
54
+ roughness: number;
55
55
  bumpiness: number;
56
56
  }>>;
57
57
  clip: PD.Group<PD.Normalize<{
@@ -110,7 +110,7 @@ var Cylinders;
110
110
  }
111
111
  Cylinders.transform = transform;
112
112
  //
113
- Cylinders.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), sizeAspectRatio: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 3, step: 0.01 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), allowTransparentBackfaces: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
113
+ Cylinders.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), sizeAspectRatio: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 3, step: 0.01 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), transparentBackfaces: param_definition_1.ParamDefinition.Select('off', param_definition_1.ParamDefinition.arrayToOptions(['off', 'on', 'opaque']), base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
114
114
  Cylinders.Utils = {
115
115
  Params: Cylinders.Params,
116
116
  createEmpty: createEmpty,
@@ -156,7 +156,7 @@ var Cylinders;
156
156
  var padding = (0, size_data_1.getMaxSize)(size) * props.sizeFactor;
157
157
  var invariantBoundingSphere = geometry_1.Sphere3D.clone(cylinders.boundingSphere);
158
158
  var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
159
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
159
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), dTransparentBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
160
160
  }
161
161
  function createValuesSimple(cylinders, props, colorValue, sizeValue, transform) {
162
162
  var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
@@ -169,6 +169,7 @@ var Cylinders;
169
169
  mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
170
170
  mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
171
171
  mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
172
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
172
173
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
173
174
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
174
175
  }
@@ -44,6 +44,7 @@ export declare namespace Lines {
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
46
  roughness: number;
47
+ /** Number of lines */
47
48
  bumpiness: number;
48
49
  }>>;
49
50
  clip: PD.Group<PD.Normalize<{
@@ -62,7 +62,7 @@ export declare namespace Mesh {
62
62
  flatShaded: PD.BooleanParam;
63
63
  ignoreLight: PD.BooleanParam;
64
64
  xrayShaded: PD.BooleanParam;
65
- allowTransparentBackfaces: PD.BooleanParam;
65
+ transparentBackfaces: PD.Select<string>;
66
66
  bumpFrequency: PD.Numeric;
67
67
  bumpAmplitude: PD.Numeric;
68
68
  alpha: PD.Numeric;
@@ -554,7 +554,7 @@ var Mesh;
554
554
  }
555
555
  Mesh.smoothEdges = smoothEdges;
556
556
  //
557
- Mesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), allowTransparentBackfaces: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
557
+ Mesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), transparentBackfaces: param_definition_1.ParamDefinition.Select('off', param_definition_1.ParamDefinition.arrayToOptions(['off', 'on', 'opaque']), base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
558
558
  Mesh.Utils = {
559
559
  Params: Mesh.Params,
560
560
  createEmpty: createEmpty,
@@ -596,7 +596,7 @@ var Mesh;
596
596
  var counts = { drawCount: mesh.triangleCount * 3, vertexCount: mesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
597
597
  var invariantBoundingSphere = geometry_1.Sphere3D.clone(mesh.boundingSphere);
598
598
  var boundingSphere = (0, util_3.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
599
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('mesh'), aPosition: mesh.vertexBuffer, aNormal: mesh.normalBuffer, aGroup: mesh.groupBuffer, elements: mesh.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), material), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude), meta: mol_util_1.ValueCell.create(mesh.meta) });
599
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('mesh'), aPosition: mesh.vertexBuffer, aNormal: mesh.normalBuffer, aGroup: mesh.groupBuffer, elements: mesh.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), material), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), dTransparentBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude), meta: mol_util_1.ValueCell.create(mesh.meta) });
600
600
  }
601
601
  function createValuesSimple(mesh, props, colorValue, sizeValue, transform) {
602
602
  var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
@@ -610,6 +610,7 @@ var Mesh;
610
610
  mol_util_1.ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
611
611
  mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
612
612
  mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
613
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
613
614
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
614
615
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
615
616
  }
@@ -43,7 +43,7 @@ export declare namespace Points {
43
43
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
- roughness: number; /** Number of vertices in the point cloud */
46
+ roughness: number;
47
47
  bumpiness: number;
48
48
  }>>;
49
49
  clip: PD.Group<PD.Normalize<{
@@ -34,7 +34,7 @@ export declare namespace Spheres {
34
34
  doubleSided: PD.BooleanParam;
35
35
  ignoreLight: PD.BooleanParam;
36
36
  xrayShaded: PD.BooleanParam;
37
- allowTransparentBackfaces: PD.BooleanParam;
37
+ transparentBackfaces: PD.Select<string>;
38
38
  bumpFrequency: PD.Numeric;
39
39
  bumpAmplitude: PD.Numeric;
40
40
  alpha: PD.Numeric;
@@ -91,7 +91,7 @@ var Spheres;
91
91
  mol_util_1.ValueCell.update(spheres.groupBuffer, groups);
92
92
  return spheres;
93
93
  }
94
- Spheres.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), allowTransparentBackfaces: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
94
+ Spheres.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), transparentBackfaces: param_definition_1.ParamDefinition.Select('off', param_definition_1.ParamDefinition.arrayToOptions(['off', 'on', 'opaque']), base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
95
95
  Spheres.Utils = {
96
96
  Params: Spheres.Params,
97
97
  createEmpty: createEmpty,
@@ -135,7 +135,7 @@ var Spheres;
135
135
  var padding = spheres.boundingSphere.radius ? (0, size_data_1.getMaxSize)(size) * props.sizeFactor : 0;
136
136
  var invariantBoundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), spheres.boundingSphere, padding);
137
137
  var boundingSphere = (0, util_1.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
138
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('spheres'), aPosition: spheres.centerBuffer, aMapping: spheres.mappingBuffer, aGroup: spheres.groupBuffer, elements: spheres.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
138
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('spheres'), aPosition: spheres.centerBuffer, aMapping: spheres.mappingBuffer, aGroup: spheres.groupBuffer, elements: spheres.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), dTransparentBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
139
139
  }
140
140
  function createValuesSimple(spheres, props, colorValue, sizeValue, transform) {
141
141
  var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
@@ -148,6 +148,7 @@ var Spheres;
148
148
  mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
149
149
  mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
150
150
  mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
151
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
151
152
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
152
153
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
153
154
  }
@@ -45,7 +45,7 @@ export declare namespace TextureMesh {
45
45
  flatShaded: PD.BooleanParam;
46
46
  ignoreLight: PD.BooleanParam;
47
47
  xrayShaded: PD.BooleanParam;
48
- allowTransparentBackfaces: PD.BooleanParam;
48
+ transparentBackfaces: PD.Select<string>;
49
49
  bumpFrequency: PD.Numeric;
50
50
  bumpAmplitude: PD.Numeric;
51
51
  alpha: PD.Numeric;
@@ -89,7 +89,7 @@ var TextureMesh;
89
89
  return create(0, 0, vt, gt, nt, bs, textureMesh);
90
90
  }
91
91
  TextureMesh.createEmpty = createEmpty;
92
- TextureMesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), allowTransparentBackfaces: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
92
+ TextureMesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), transparentBackfaces: param_definition_1.ParamDefinition.Select('off', param_definition_1.ParamDefinition.arrayToOptions(['off', 'on', 'opaque']), base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
93
93
  TextureMesh.Utils = {
94
94
  Params: TextureMesh.Params,
95
95
  createEmpty: createEmpty,
@@ -97,8 +97,8 @@ var TextureMesh;
97
97
  createValuesSimple: createValuesSimple,
98
98
  updateValues: updateValues,
99
99
  updateBoundingSphere: updateBoundingSphere,
100
- createRenderableState: base_1.BaseGeometry.createRenderableState,
101
- updateRenderableState: base_1.BaseGeometry.updateRenderableState,
100
+ createRenderableState: createRenderableState,
101
+ updateRenderableState: updateRenderableState,
102
102
  createPositionIterator: function () { return (0, location_iterator_1.LocationIterator)(1, 1, 1, function () { return location_1.NullLocation; }); }
103
103
  };
104
104
  function createValues(textureMesh, transform, locationIt, theme, props) {
@@ -113,7 +113,7 @@ var TextureMesh;
113
113
  var counts = { drawCount: textureMesh.vertexCount, vertexCount: textureMesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
114
114
  var invariantBoundingSphere = geometry_1.Sphere3D.clone(textureMesh.boundingSphere);
115
115
  var boundingSphere = (0, util_1.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
116
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('textureMesh'), uGeoTexDim: textureMesh.geoTextureDim, tPosition: textureMesh.vertexTexture, tGroup: textureMesh.groupTexture, tNormal: textureMesh.normalTexture, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), substance), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude), meta: mol_util_1.ValueCell.create(textureMesh.meta) });
116
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('textureMesh'), uGeoTexDim: textureMesh.geoTextureDim, tPosition: textureMesh.vertexTexture, tGroup: textureMesh.groupTexture, tNormal: textureMesh.normalTexture, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), substance), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), dTransparentBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude), meta: mol_util_1.ValueCell.create(textureMesh.meta) });
117
117
  }
118
118
  function createValuesSimple(textureMesh, props, colorValue, sizeValue, transform) {
119
119
  var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
@@ -127,6 +127,7 @@ var TextureMesh;
127
127
  mol_util_1.ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
128
128
  mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
129
129
  mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
130
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
130
131
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
131
132
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
132
133
  }
@@ -141,4 +142,14 @@ var TextureMesh;
141
142
  mol_util_1.ValueCell.update(values.uInvariantBoundingSphere, linear_algebra_1.Vec4.fromSphere(values.uInvariantBoundingSphere.ref.value, invariantBoundingSphere));
142
143
  }
143
144
  }
145
+ function createRenderableState(props) {
146
+ var state = base_1.BaseGeometry.createRenderableState(props);
147
+ updateRenderableState(state, props);
148
+ return state;
149
+ }
150
+ function updateRenderableState(state, props) {
151
+ base_1.BaseGeometry.updateRenderableState(state, props);
152
+ state.opaque = state.opaque && !props.xrayShaded;
153
+ state.writeDepth = state.opaque;
154
+ }
144
155
  })(TextureMesh = exports.TextureMesh || (exports.TextureMesh = {}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */