molstar 3.7.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 (235) 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.js +1 -1
  6. package/build/viewer/molstar.js.LICENSE.txt +0 -15
  7. package/lib/apps/docking-viewer/index.html +36 -36
  8. package/lib/apps/viewer/embedded.html +43 -43
  9. package/lib/apps/viewer/index.html +106 -106
  10. package/lib/cli/chem-comp-dict/create-ions.d.ts +2 -1
  11. package/lib/cli/chem-comp-dict/create-ions.js +3 -2
  12. package/lib/cli/cifschema/index.js +1 -1
  13. package/lib/cli/cifschema/util/cif-dic.js +1 -0
  14. package/lib/commonjs/cli/chem-comp-dict/create-ions.d.ts +2 -1
  15. package/lib/commonjs/cli/chem-comp-dict/create-ions.js +3 -2
  16. package/lib/commonjs/cli/cifschema/index.js +1 -1
  17. package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
  18. package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  19. package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
  20. package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +0 -2
  21. package/lib/commonjs/mol-canvas3d/passes/draw.js +35 -70
  22. package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -1
  23. package/lib/commonjs/mol-canvas3d/passes/pick.js +1 -1
  24. package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  25. package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +16 -11
  26. package/lib/commonjs/mol-geo/geometry/color-data.d.ts +5 -2
  27. package/lib/commonjs/mol-geo/geometry/color-data.js +7 -17
  28. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  29. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
  30. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
  31. package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
  32. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  33. package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
  34. package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  35. package/lib/commonjs/mol-geo/geometry/transparency-data.d.ts +1 -1
  36. package/lib/commonjs/mol-geo/geometry/transparency-data.js +3 -1
  37. package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -1
  38. package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
  39. package/lib/commonjs/mol-gl/renderable/mesh.d.ts +1 -1
  40. package/lib/commonjs/mol-gl/renderable/mesh.js +1 -1
  41. package/lib/commonjs/mol-gl/renderable/schema.d.ts +2 -2
  42. package/lib/commonjs/mol-gl/renderable/schema.js +2 -2
  43. package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -1
  44. package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
  45. package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +1 -1
  46. package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
  47. package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
  48. package/lib/commonjs/mol-gl/renderer.js +64 -45
  49. package/lib/commonjs/mol-gl/scene.d.ts +1 -0
  50. package/lib/commonjs/mol-gl/scene.js +26 -1
  51. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  52. package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  53. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  54. package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  55. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  56. package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  57. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  58. package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  59. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  60. package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
  61. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  62. package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  63. package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  64. package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
  65. package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
  66. package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
  67. package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +3 -2
  68. package/lib/commonjs/mol-gl/shader/outlines.frag.js +3 -2
  69. package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  70. package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
  71. package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +2 -2
  72. package/lib/commonjs/mol-gl/shader/ssao.frag.js +2 -2
  73. package/lib/commonjs/mol-gl/webgl/render-target.d.ts +3 -1
  74. package/lib/commonjs/mol-gl/webgl/render-target.js +3 -1
  75. package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +2 -1
  76. package/lib/commonjs/mol-gl/webgl/renderbuffer.js +8 -1
  77. package/lib/commonjs/mol-gl/webgl/state.d.ts +7 -1
  78. package/lib/commonjs/mol-gl/webgl/state.js +28 -1
  79. package/lib/commonjs/mol-gl/webgl/texture.js +3 -0
  80. package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
  81. package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
  82. package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  83. package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
  84. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  85. package/lib/commonjs/mol-io/reader/cif/schema/cif-core.js +1 -1
  86. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  87. package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +2 -3
  88. package/lib/commonjs/mol-io/reader/dx/parser.js +1 -1
  89. package/lib/commonjs/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  90. package/lib/commonjs/mol-math/geometry/lookup3d/grid.js +3 -3
  91. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  92. package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.js +2 -1
  93. package/lib/commonjs/mol-model/structure/model/types/ions.d.ts +2 -2
  94. package/lib/commonjs/mol-model/structure/model/types/ions.js +2 -2
  95. package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
  96. package/lib/commonjs/mol-model/structure/model/types.d.ts +1 -1
  97. package/lib/commonjs/mol-model/structure/model/types.js +43 -41
  98. package/lib/commonjs/mol-model-formats/structure/common/property.js +2 -0
  99. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  100. package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +2 -2
  101. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  102. package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
  103. package/lib/commonjs/mol-repr/volume/slice.js +1 -1
  104. package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
  105. package/lib/commonjs/mol-theme/color/volume-value.d.ts +3 -2
  106. package/lib/commonjs/mol-theme/color/volume-value.js +1 -3
  107. package/lib/commonjs/mol-theme/color.d.ts +47 -38
  108. package/lib/commonjs/mol-theme/theme.d.ts +8 -7
  109. package/lib/commonjs/mol-theme/theme.js +1 -1
  110. package/lib/examples/alpha-orbitals/index.html +61 -61
  111. package/lib/examples/basic-wrapper/index.html +137 -137
  112. package/lib/examples/lighting/index.html +88 -88
  113. package/lib/examples/proteopedia-wrapper/coloring.d.ts +20 -5
  114. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  115. package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
  116. package/lib/mol-canvas3d/passes/draw.d.ts +0 -2
  117. package/lib/mol-canvas3d/passes/draw.js +32 -67
  118. package/lib/mol-canvas3d/passes/pick.d.ts +1 -1
  119. package/lib/mol-canvas3d/passes/pick.js +1 -1
  120. package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
  121. package/lib/mol-canvas3d/passes/postprocessing.js +16 -11
  122. package/lib/mol-geo/geometry/color-data.d.ts +5 -2
  123. package/lib/mol-geo/geometry/color-data.js +7 -17
  124. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  125. package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
  126. package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
  127. package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
  128. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  129. package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
  130. package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
  131. package/lib/mol-geo/geometry/transparency-data.d.ts +1 -1
  132. package/lib/mol-geo/geometry/transparency-data.js +3 -1
  133. package/lib/mol-gl/renderable/cylinders.d.ts +1 -1
  134. package/lib/mol-gl/renderable/cylinders.js +1 -1
  135. package/lib/mol-gl/renderable/mesh.d.ts +1 -1
  136. package/lib/mol-gl/renderable/mesh.js +1 -1
  137. package/lib/mol-gl/renderable/schema.d.ts +2 -2
  138. package/lib/mol-gl/renderable/schema.js +2 -2
  139. package/lib/mol-gl/renderable/spheres.d.ts +1 -1
  140. package/lib/mol-gl/renderable/spheres.js +1 -1
  141. package/lib/mol-gl/renderable/texture-mesh.d.ts +1 -1
  142. package/lib/mol-gl/renderable/texture-mesh.js +1 -1
  143. package/lib/mol-gl/renderer.d.ts +5 -5
  144. package/lib/mol-gl/renderer.js +64 -45
  145. package/lib/mol-gl/scene.d.ts +1 -0
  146. package/lib/mol-gl/scene.js +26 -1
  147. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
  148. package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
  149. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
  150. package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
  151. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
  152. package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
  153. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
  154. package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
  155. package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
  156. package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
  157. package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
  158. package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
  159. package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
  160. package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
  161. package/lib/mol-gl/shader/image.frag.d.ts +1 -1
  162. package/lib/mol-gl/shader/image.frag.js +1 -1
  163. package/lib/mol-gl/shader/outlines.frag.d.ts +3 -2
  164. package/lib/mol-gl/shader/outlines.frag.js +3 -2
  165. package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
  166. package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
  167. package/lib/mol-gl/shader/ssao.frag.d.ts +2 -2
  168. package/lib/mol-gl/shader/ssao.frag.js +2 -2
  169. package/lib/mol-gl/webgl/render-target.d.ts +3 -1
  170. package/lib/mol-gl/webgl/render-target.js +3 -1
  171. package/lib/mol-gl/webgl/renderbuffer.d.ts +2 -1
  172. package/lib/mol-gl/webgl/renderbuffer.js +8 -1
  173. package/lib/mol-gl/webgl/state.d.ts +7 -1
  174. package/lib/mol-gl/webgl/state.js +28 -1
  175. package/lib/mol-gl/webgl/texture.js +3 -0
  176. package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
  177. package/lib/mol-io/reader/cif/schema/bird.js +1 -1
  178. package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
  179. package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
  180. package/lib/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
  181. package/lib/mol-io/reader/cif/schema/cif-core.js +1 -1
  182. package/lib/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
  183. package/lib/mol-io/reader/cif/schema/mmcif.js +2 -3
  184. package/lib/mol-io/reader/dx/parser.js +1 -1
  185. package/lib/mol-math/geometry/lookup3d/grid.d.ts +1 -1
  186. package/lib/mol-math/geometry/lookup3d/grid.js +3 -3
  187. package/lib/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
  188. package/lib/mol-model/structure/model/properties/seconday-structure.js +2 -1
  189. package/lib/mol-model/structure/model/types/ions.d.ts +2 -2
  190. package/lib/mol-model/structure/model/types/ions.js +2 -2
  191. package/lib/mol-model/structure/model/types/saccharides.js +1 -1
  192. package/lib/mol-model/structure/model/types.d.ts +1 -1
  193. package/lib/mol-model/structure/model/types.js +43 -41
  194. package/lib/mol-model-formats/structure/common/property.js +2 -0
  195. package/lib/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
  196. package/lib/mol-model-formats/structure/property/secondary-structure.js +2 -2
  197. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
  198. package/lib/mol-plugin/version.js +2 -2
  199. package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
  200. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  201. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  202. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  203. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  204. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  205. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  206. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  207. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  208. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  209. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  210. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  211. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  212. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
  213. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  214. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  215. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  216. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  217. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  218. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  219. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  220. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  221. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  222. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  223. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  224. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  225. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  226. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  227. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  228. package/lib/mol-repr/volume/slice.js +1 -1
  229. package/lib/mol-script/language/builder.d.ts +0 -1
  230. package/lib/mol-theme/color/volume-value.d.ts +3 -2
  231. package/lib/mol-theme/color/volume-value.js +2 -4
  232. package/lib/mol-theme/color.d.ts +47 -38
  233. package/lib/mol-theme/theme.d.ts +8 -7
  234. package/lib/mol-theme/theme.js +1 -1
  235. package/package.json +162 -162
@@ -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;
@@ -11,7 +11,10 @@ import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
11
11
  import { LocationIterator } from '../util/location-iterator';
12
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,7 +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
32
  export declare function createGridColor(grid: ColorVolume, type: ColorType, colorData?: ColorData): ColorData;
@@ -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,27 +26,18 @@ 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);
36
38
  case 'vertexInstance': return createVertexInstanceColor(positionIt, colorTheme.color, colorData);
37
- case 'volume':
38
- if (colorTheme.grid) {
39
- return createGridColor(colorTheme.grid, 'volume', colorData);
40
- }
41
- else {
42
- throw new Error('Grid missing for "volume" color theme');
43
- }
44
- case 'volumeInstance':
45
- if (colorTheme.grid) {
46
- return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
47
- }
48
- else {
49
- throw new Error('Grid missing for "volume" color theme');
50
- }
39
+ case 'volume': return createGridColor(colorTheme.grid, 'volume', colorData);
40
+ case 'volumeInstance': return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
51
41
  case 'direct': return createDirectColor(colorData);
52
42
  }
53
43
  }
@@ -50,8 +50,8 @@ export declare namespace Cylinders {
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<{
@@ -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), dOpaqueBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces === 'opaque'), 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,7 +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.dOpaqueBackfaces, props.transparentBackfaces === 'opaque');
172
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
173
173
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
174
174
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
175
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<{
@@ -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), dOpaqueBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces === 'opaque'), 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,7 +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.dOpaqueBackfaces, props.transparentBackfaces === 'opaque');
613
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
614
614
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
615
615
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
616
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<{
@@ -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), dOpaqueBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces === 'opaque'), 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,7 +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.dOpaqueBackfaces, props.transparentBackfaces === 'opaque');
151
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
152
152
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
153
153
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
154
154
  }
@@ -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), dOpaqueBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces === 'opaque'), 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,7 +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.dOpaqueBackfaces, props.transparentBackfaces === 'opaque');
130
+ mol_util_1.ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
131
131
  mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
132
132
  mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
133
133
  }
@@ -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
  */
@@ -18,6 +18,8 @@ function applyTransparencyValue(array, start, end, value) {
18
18
  }
19
19
  exports.applyTransparencyValue = applyTransparencyValue;
20
20
  function getTransparencyAverage(array, count) {
21
+ if (count === 0 || array.length < count)
22
+ return 0;
21
23
  var sum = 0;
22
24
  for (var i = 0; i < count; ++i) {
23
25
  sum += array[i];
@@ -19,7 +19,7 @@ export declare const CylindersSchema: {
19
19
  uDoubleSided: UniformSpec<"b">;
20
20
  dIgnoreLight: DefineSpec<"boolean">;
21
21
  dXrayShaded: DefineSpec<"boolean">;
22
- dOpaqueBackfaces: DefineSpec<"boolean">;
22
+ dTransparentBackfaces: DefineSpec<"string">;
23
23
  uBumpFrequency: UniformSpec<"f">;
24
24
  uBumpAmplitude: UniformSpec<"f">;
25
25
  uSize: UniformSpec<"f">;
@@ -12,7 +12,7 @@ var render_item_1 = require("../webgl/render-item");
12
12
  var schema_1 = require("./schema");
13
13
  var shader_code_1 = require("../shader-code");
14
14
  var mol_util_1 = require("../../mol-util");
15
- exports.CylindersSchema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aStart: (0, schema_1.AttributeSpec)('float32', 3, 0), aEnd: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 3, 0), aScale: (0, schema_1.AttributeSpec)('float32', 1, 0), aCap: (0, schema_1.AttributeSpec)('float32', 1, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dOpaqueBackfaces: (0, schema_1.DefineSpec)('boolean'), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f') });
15
+ exports.CylindersSchema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aStart: (0, schema_1.AttributeSpec)('float32', 3, 0), aEnd: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 3, 0), aScale: (0, schema_1.AttributeSpec)('float32', 1, 0), aCap: (0, schema_1.AttributeSpec)('float32', 1, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dTransparentBackfaces: (0, schema_1.DefineSpec)('string', ['off', 'on', 'opaque']), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f') });
16
16
  function CylindersRenderable(ctx, id, values, state, materialId, variants) {
17
17
  var schema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.CylindersSchema);
18
18
  var internalValues = {
@@ -17,7 +17,7 @@ export declare const MeshSchema: {
17
17
  readonly dFlipSided: DefineSpec<"boolean">;
18
18
  readonly dIgnoreLight: DefineSpec<"boolean">;
19
19
  readonly dXrayShaded: DefineSpec<"boolean">;
20
- readonly dOpaqueBackfaces: DefineSpec<"boolean">;
20
+ readonly dTransparentBackfaces: DefineSpec<"string">;
21
21
  readonly uBumpFrequency: UniformSpec<"f">;
22
22
  readonly uBumpAmplitude: UniformSpec<"f">;
23
23
  readonly meta: ValueSpec<"unknown">;
@@ -12,7 +12,7 @@ var render_item_1 = require("../webgl/render-item");
12
12
  var schema_1 = require("./schema");
13
13
  var shader_code_1 = require("../shader-code");
14
14
  var mol_util_1 = require("../../mol-util");
15
- exports.MeshSchema = tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), aNormal: (0, schema_1.AttributeSpec)('float32', 3, 0), elements: (0, schema_1.ElementsSpec)('uint32'), dFlatShaded: (0, schema_1.DefineSpec)('boolean'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dFlipSided: (0, schema_1.DefineSpec)('boolean'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dOpaqueBackfaces: (0, schema_1.DefineSpec)('boolean'), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f'), meta: (0, schema_1.ValueSpec)('unknown') });
15
+ exports.MeshSchema = tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), aNormal: (0, schema_1.AttributeSpec)('float32', 3, 0), elements: (0, schema_1.ElementsSpec)('uint32'), dFlatShaded: (0, schema_1.DefineSpec)('boolean'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dFlipSided: (0, schema_1.DefineSpec)('boolean'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dTransparentBackfaces: (0, schema_1.DefineSpec)('string', ['off', 'on', 'opaque']), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f'), meta: (0, schema_1.ValueSpec)('unknown') });
16
16
  function MeshRenderable(ctx, id, values, state, materialId, variants) {
17
17
  var schema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.MeshSchema);
18
18
  var internalValues = {
@@ -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
  */
@@ -119,7 +119,7 @@ export declare const GlobalUniformSchema: {
119
119
  readonly uSelectStrength: UniformSpec<"f">;
120
120
  readonly uMarkerPriority: UniformSpec<"i">;
121
121
  readonly uXrayEdgeFalloff: UniformSpec<"f">;
122
- readonly uRenderWboit: UniformSpec<"b">;
122
+ readonly uRenderMask: UniformSpec<"i">;
123
123
  readonly uMarkingDepthTest: UniformSpec<"b">;
124
124
  readonly uMarkingType: UniformSpec<"i">;
125
125
  readonly uPickType: UniformSpec<"i">;
@@ -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
  */
@@ -105,7 +105,7 @@ exports.GlobalUniformSchema = {
105
105
  uSelectStrength: UniformSpec('f'),
106
106
  uMarkerPriority: UniformSpec('i'),
107
107
  uXrayEdgeFalloff: UniformSpec('f'),
108
- uRenderWboit: UniformSpec('b'),
108
+ uRenderMask: UniformSpec('i'),
109
109
  uMarkingDepthTest: UniformSpec('b'),
110
110
  uMarkingType: UniformSpec('i'),
111
111
  uPickType: UniformSpec('i'),
@@ -16,7 +16,7 @@ export declare const SpheresSchema: {
16
16
  uDoubleSided: UniformSpec<"b">;
17
17
  dIgnoreLight: DefineSpec<"boolean">;
18
18
  dXrayShaded: DefineSpec<"boolean">;
19
- dOpaqueBackfaces: DefineSpec<"boolean">;
19
+ dTransparentBackfaces: DefineSpec<"string">;
20
20
  uBumpFrequency: UniformSpec<"f">;
21
21
  uBumpAmplitude: UniformSpec<"f">;
22
22
  uSize: UniformSpec<"f">;
@@ -12,7 +12,7 @@ var render_item_1 = require("../webgl/render-item");
12
12
  var schema_1 = require("./schema");
13
13
  var shader_code_1 = require("../shader-code");
14
14
  var mol_util_1 = require("../../mol-util");
15
- exports.SpheresSchema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 2, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dOpaqueBackfaces: (0, schema_1.DefineSpec)('boolean'), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f') });
15
+ exports.SpheresSchema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 2, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dTransparentBackfaces: (0, schema_1.DefineSpec)('string', ['off', 'on', 'opaque']), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f') });
16
16
  function SpheresRenderable(ctx, id, values, state, materialId, variants) {
17
17
  var schema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.SpheresSchema);
18
18
  var internalValues = {
@@ -17,7 +17,7 @@ export declare const TextureMeshSchema: {
17
17
  dFlipSided: DefineSpec<"boolean">;
18
18
  dIgnoreLight: DefineSpec<"boolean">;
19
19
  dXrayShaded: DefineSpec<"boolean">;
20
- dOpaqueBackfaces: DefineSpec<"boolean">;
20
+ dTransparentBackfaces: DefineSpec<"string">;
21
21
  uBumpFrequency: UniformSpec<"f">;
22
22
  uBumpAmplitude: UniformSpec<"f">;
23
23
  meta: ValueSpec<"unknown">;
@@ -12,7 +12,7 @@ var render_item_1 = require("../webgl/render-item");
12
12
  var schema_1 = require("./schema");
13
13
  var shader_code_1 = require("../shader-code");
14
14
  var mol_util_1 = require("../../mol-util");
15
- exports.TextureMeshSchema = tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), { uGeoTexDim: (0, schema_1.UniformSpec)('v2', 'buffered'), tPosition: (0, schema_1.TextureSpec)('texture', 'rgb', 'float', 'nearest'), tGroup: (0, schema_1.TextureSpec)('texture', 'alpha', 'float', 'nearest'), tNormal: (0, schema_1.TextureSpec)('texture', 'rgb', 'float', 'nearest'), dFlatShaded: (0, schema_1.DefineSpec)('boolean'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dFlipSided: (0, schema_1.DefineSpec)('boolean'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dOpaqueBackfaces: (0, schema_1.DefineSpec)('boolean'), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f'), meta: (0, schema_1.ValueSpec)('unknown') });
15
+ exports.TextureMeshSchema = tslib_1.__assign(tslib_1.__assign({}, schema_1.BaseSchema), { uGeoTexDim: (0, schema_1.UniformSpec)('v2', 'buffered'), tPosition: (0, schema_1.TextureSpec)('texture', 'rgb', 'float', 'nearest'), tGroup: (0, schema_1.TextureSpec)('texture', 'alpha', 'float', 'nearest'), tNormal: (0, schema_1.TextureSpec)('texture', 'rgb', 'float', 'nearest'), dFlatShaded: (0, schema_1.DefineSpec)('boolean'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dFlipSided: (0, schema_1.DefineSpec)('boolean'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), dTransparentBackfaces: (0, schema_1.DefineSpec)('string', ['off', 'on', 'opaque']), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f'), meta: (0, schema_1.ValueSpec)('unknown') });
16
16
  function TextureMeshRenderable(ctx, id, values, state, materialId, variants) {
17
17
  var schema = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.TextureMeshSchema);
18
18
  var internalValues = {
@@ -7,7 +7,6 @@ import { ICamera } from '../mol-canvas3d/camera';
7
7
  import { Scene } from './scene';
8
8
  import { WebGLContext } from './webgl/context';
9
9
  import { Color } from '../mol-util/color';
10
- import { GraphicsRenderVariant } from './webgl/render-item';
11
10
  import { ParamDefinition as PD } from '../mol-util/param-definition';
12
11
  import { Texture } from './webgl/texture';
13
12
  export interface RendererStats {
@@ -38,17 +37,18 @@ interface Renderer {
38
37
  readonly stats: RendererStats;
39
38
  readonly props: Readonly<RendererProps>;
40
39
  clear: (toBackgroundColor: boolean, ignoreTransparentBackground?: boolean) => void;
41
- clearDepth: () => void;
40
+ clearDepth: (packed?: boolean) => void;
42
41
  update: (camera: ICamera) => void;
43
- renderPick: (group: Scene.Group, camera: ICamera, variant: GraphicsRenderVariant, depthTexture: Texture | null, pickType: PickType) => void;
42
+ renderPick: (group: Scene.Group, camera: ICamera, variant: 'pick' | 'depth', depthTexture: Texture | null, pickType: PickType) => void;
44
43
  renderDepth: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
44
+ renderDepthOpaque: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
45
+ renderDepthTransparent: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
45
46
  renderMarkingDepth: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
46
47
  renderMarkingMask: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
47
48
  renderBlended: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
48
49
  renderBlendedOpaque: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
49
50
  renderBlendedTransparent: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
50
- renderBlendedVolumeOpaque: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
51
- renderBlendedVolumeTransparent: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
51
+ renderBlendedVolume: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
52
52
  renderWboitOpaque: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
53
53
  renderWboitTransparent: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
54
54
  setProps: (props: Partial<RendererProps>) => void;