molstar 4.0.1 → 4.2.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.
- package/LICENSE +20 -20
- package/README.md +197 -197
- package/build/viewer/embedded.html +52 -52
- package/build/viewer/index.html +129 -129
- package/build/viewer/molstar.js +1 -1
- package/build/viewer/molstar.js.LICENSE.txt +0 -9
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.d.ts +8 -8
- package/lib/apps/mesoscale-explorer/behavior/camera.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/behavior/select.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/cellpack/model.d.ts +2 -2
- package/lib/apps/mesoscale-explorer/data/cellpack/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/cellpack/preset.js +5 -5
- package/lib/apps/mesoscale-explorer/data/generic/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/generic/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/mmcif/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/mmcif/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/petworld/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/petworld/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/state.d.ts +19 -10
- package/lib/apps/mesoscale-explorer/data/state.js +14 -2
- package/lib/apps/mesoscale-explorer/index.html +100 -100
- package/lib/apps/mesoscale-explorer/style.scss +33 -33
- package/lib/apps/mesoscale-explorer/ui/entities.d.ts +19 -13
- package/lib/apps/mesoscale-explorer/ui/entities.js +23 -4
- package/lib/apps/viewer/app.d.ts +30 -24
- package/lib/apps/viewer/app.js +6 -6
- package/lib/apps/viewer/embedded.html +52 -52
- package/lib/apps/viewer/index.html +129 -129
- package/lib/cli/chem-comp-dict/create-ions.js +9 -9
- package/lib/cli/chem-comp-dict/create-saccharides.js +9 -9
- package/lib/cli/chem-comp-dict/util.d.ts +112 -112
- package/lib/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/cli/cifschema/util/generate.js +12 -12
- package/lib/cli/lipid-params/index.js +9 -9
- package/lib/cli/mvs/mvs-print-schema.d.ts +1 -0
- package/lib/cli/mvs/mvs-print-schema.js +1 -0
- package/lib/cli/mvs/mvs-render.d.ts +1 -0
- package/lib/cli/mvs/mvs-render.js +1 -0
- package/lib/cli/mvs/mvs-validate.d.ts +1 -0
- package/lib/cli/mvs/mvs-validate.js +1 -0
- package/lib/commonjs/apps/docking-viewer/viewport.d.ts +8 -8
- package/lib/commonjs/apps/mesoscale-explorer/behavior/camera.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/behavior/select.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/cellpack/model.d.ts +2 -2
- package/lib/commonjs/apps/mesoscale-explorer/data/cellpack/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/cellpack/preset.js +5 -5
- package/lib/commonjs/apps/mesoscale-explorer/data/generic/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/generic/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/mmcif/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/mmcif/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/petworld/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/petworld/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/state.d.ts +19 -10
- package/lib/commonjs/apps/mesoscale-explorer/data/state.js +15 -3
- package/lib/commonjs/apps/mesoscale-explorer/ui/entities.d.ts +19 -13
- package/lib/commonjs/apps/mesoscale-explorer/ui/entities.js +22 -3
- package/lib/commonjs/apps/viewer/app.d.ts +30 -24
- package/lib/commonjs/apps/viewer/app.js +6 -6
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +9 -9
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.js +9 -9
- package/lib/commonjs/cli/chem-comp-dict/util.d.ts +112 -112
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/cli/cifschema/util/generate.js +12 -12
- package/lib/commonjs/cli/lipid-params/index.js +9 -9
- package/lib/commonjs/cli/mvs/mvs-print-schema.d.ts +1 -0
- package/lib/commonjs/cli/mvs/mvs-print-schema.js +1 -0
- package/lib/commonjs/cli/mvs/mvs-render.d.ts +1 -0
- package/lib/commonjs/cli/mvs/mvs-render.js +1 -0
- package/lib/commonjs/cli/mvs/mvs-validate.d.ts +1 -0
- package/lib/commonjs/cli/mvs/mvs-validate.js +1 -0
- package/lib/commonjs/examples/alpha-orbitals/example-data.js +160 -160
- package/lib/commonjs/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
- package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +2 -2
- package/lib/commonjs/extensions/anvil/behavior.d.ts +10 -9
- package/lib/commonjs/extensions/anvil/representation.d.ts +5 -0
- package/lib/commonjs/extensions/assembly-symmetry/behavior.d.ts +2 -1
- package/lib/commonjs/extensions/assembly-symmetry/prop.js +24 -24
- package/lib/commonjs/extensions/assembly-symmetry/representation.d.ts +1 -0
- package/lib/commonjs/extensions/backgrounds/index.d.ts +2 -2
- package/lib/commonjs/extensions/backgrounds/index.js +2 -1
- package/lib/commonjs/extensions/dnatco/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +10 -10
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.js +5 -5
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/commonjs/extensions/dnatco/ntc-tube/behavior.d.ts +10 -10
- package/lib/commonjs/extensions/dnatco/ntc-tube/behavior.js +5 -5
- package/lib/commonjs/extensions/dnatco/ntc-tube/representation.d.ts +3 -0
- package/lib/commonjs/extensions/g3d/format.d.ts +6 -6
- package/lib/commonjs/extensions/geo-export/glb-exporter.d.ts +1 -1
- package/lib/commonjs/extensions/geo-export/glb-exporter.js +6 -4
- package/lib/commonjs/extensions/geo-export/index.d.ts +1 -1
- package/lib/commonjs/extensions/geo-export/usdz-exporter.js +41 -41
- package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +2 -3
- package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.d.ts +2 -2
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +9 -9
- package/lib/commonjs/extensions/model-export/index.d.ts +1 -1
- package/lib/commonjs/extensions/mp4-export/index.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/camera.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/camera.js +29 -2
- package/lib/commonjs/extensions/mvs/components/annotation-label/representation.d.ts +4 -0
- package/lib/commonjs/extensions/mvs/components/annotation-label/visual.d.ts +1 -0
- package/lib/commonjs/extensions/mvs/components/custom-label/representation.d.ts +4 -2
- package/lib/commonjs/extensions/mvs/components/custom-label/visual.d.ts +1 -0
- package/lib/commonjs/extensions/mvs/components/formats.d.ts +6 -4
- package/lib/commonjs/extensions/mvs/components/formats.js +2 -1
- package/lib/commonjs/extensions/mvs/load-helpers.d.ts +1 -1
- package/lib/commonjs/extensions/mvs/load.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/load.js +12 -6
- package/lib/commonjs/extensions/mvs/tree/mvs/mvs-builder.d.ts +2 -8
- package/lib/commonjs/extensions/pdbe/structure-quality-report/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +22 -22
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/commonjs/extensions/sb-ncbr/partial-charges/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/sb-ncbr/partial-charges/preset.d.ts +4 -4
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.d.ts +1 -1
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.d.ts +5 -5
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.d.ts +1 -1
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.d.ts +2 -2
- package/lib/commonjs/extensions/volumes-and-segmentations/global-state.d.ts +2 -2
- package/lib/commonjs/extensions/volumes-and-segmentations/helpers.d.ts +1 -1
- package/lib/commonjs/extensions/volumes-and-segmentations/index.d.ts +1 -1
- package/lib/commonjs/extensions/wwpdb/ccd/behavior.d.ts +1 -1
- package/lib/commonjs/extensions/wwpdb/ccd/representation.d.ts +4 -4
- package/lib/commonjs/extensions/zenodo/index.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +14 -2
- package/lib/commonjs/mol-canvas3d/canvas3d.js +2 -2
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/background.d.ts +6 -1
- package/lib/commonjs/mol-canvas3d/passes/background.js +13 -1
- package/lib/commonjs/mol-canvas3d/passes/bloom.d.ts +37 -0
- package/lib/commonjs/mol-canvas3d/passes/bloom.js +272 -0
- package/lib/commonjs/mol-canvas3d/passes/dpoit.js +4 -2
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +11 -7
- package/lib/commonjs/mol-canvas3d/passes/draw.js +29 -3
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +6 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +31 -5
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +35 -40
- package/lib/commonjs/mol-geo/geometry/base.d.ts +3 -1
- package/lib/commonjs/mol-geo/geometry/base.js +4 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -1
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +4 -1
- package/lib/commonjs/mol-geo/geometry/emissive-data.d.ts +26 -0
- package/lib/commonjs/mol-geo/geometry/emissive-data.js +80 -0
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/image/image.js +4 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +3 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +4 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +36 -2
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +11 -4
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +3 -2
- package/lib/commonjs/mol-geo/geometry/points/points.js +4 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +7 -3
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/text/text.js +4 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +34 -2
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +14 -4
- package/lib/commonjs/mol-geo/util/location-iterator.d.ts +5 -2
- package/lib/commonjs/mol-geo/util/location-iterator.js +8 -3
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +24 -1
- package/lib/commonjs/mol-gl/renderable/schema.js +15 -2
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable.js +2 -2
- package/lib/commonjs/mol-gl/renderer.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderer.js +58 -49
- package/lib/commonjs/mol-gl/scene.d.ts +3 -1
- package/lib/commonjs/mol-gl/scene.js +26 -1
- package/lib/commonjs/mol-gl/shader/background.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/background.frag.js +95 -94
- package/lib/commonjs/mol-gl/shader/background.vert.js +11 -11
- package/lib/commonjs/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
- package/lib/commonjs/mol-gl/shader/bloom/blur.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/blur.frag.js +32 -0
- package/lib/commonjs/mol-gl/shader/bloom/composite.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/composite.frag.js +37 -0
- package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.js +56 -0
- package/lib/commonjs/mol-gl/shader/cas.frag.js +144 -144
- package/lib/commonjs/mol-gl/shader/chunks/apply-fog.glsl.js +31 -31
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +78 -70
- package/lib/commonjs/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
- package/lib/commonjs/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -112
- package/lib/commonjs/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +112 -123
- package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
- package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.js +20 -0
- package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +7 -7
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +60 -51
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -92
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +104 -104
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +150 -149
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +61 -61
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +234 -234
- package/lib/commonjs/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
- package/lib/commonjs/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
- package/lib/commonjs/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
- package/lib/commonjs/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
- package/lib/commonjs/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
- package/lib/commonjs/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
- package/lib/commonjs/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
- package/lib/commonjs/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
- package/lib/commonjs/mol-gl/shader/compose.frag.js +12 -12
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
- package/lib/commonjs/mol-gl/shader/copy.frag.js +11 -11
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +267 -264
- package/lib/commonjs/mol-gl/shader/cylinders.vert.js +89 -89
- package/lib/commonjs/mol-gl/shader/depth-merge.frag.js +23 -23
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +362 -356
- package/lib/commonjs/mol-gl/shader/direct-volume.vert.js +41 -41
- package/lib/commonjs/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
- package/lib/commonjs/mol-gl/shader/evaluate-wboit.frag.js +17 -17
- package/lib/commonjs/mol-gl/shader/fxaa.frag.js +228 -228
- package/lib/commonjs/mol-gl/shader/gaussian-density.frag.js +49 -49
- package/lib/commonjs/mol-gl/shader/gaussian-density.vert.js +27 -27
- package/lib/commonjs/mol-gl/shader/hi-z.frag.js +18 -18
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/image.frag.js +170 -161
- package/lib/commonjs/mol-gl/shader/image.vert.js +21 -21
- package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/lines.frag.js +43 -40
- package/lib/commonjs/mol-gl/shader/lines.vert.js +117 -117
- package/lib/commonjs/mol-gl/shader/marching-cubes/active-voxels.frag.js +70 -70
- package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.frag.js +311 -311
- package/lib/commonjs/mol-gl/shader/marking/edge.frag.js +28 -28
- package/lib/commonjs/mol-gl/shader/marking/overlay.frag.js +26 -26
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +66 -63
- package/lib/commonjs/mol-gl/shader/mesh.vert.js +49 -49
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +95 -95
- package/lib/commonjs/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/points.frag.js +60 -56
- package/lib/commonjs/mol-gl/shader/points.vert.js +38 -38
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +150 -150
- package/lib/commonjs/mol-gl/shader/quad.vert.js +10 -10
- package/lib/commonjs/mol-gl/shader/shadows.frag.js +123 -123
- package/lib/commonjs/mol-gl/shader/smaa/blend.frag.js +56 -56
- package/lib/commonjs/mol-gl/shader/smaa/blend.vert.js +25 -25
- package/lib/commonjs/mol-gl/shader/smaa/edges.frag.js +66 -66
- package/lib/commonjs/mol-gl/shader/smaa/edges.vert.js +26 -26
- package/lib/commonjs/mol-gl/shader/smaa/weights.frag.js +206 -206
- package/lib/commonjs/mol-gl/shader/smaa/weights.vert.js +32 -32
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +149 -143
- package/lib/commonjs/mol-gl/shader/spheres.vert.js +132 -132
- package/lib/commonjs/mol-gl/shader/ssao-blur.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/ssao-blur.frag.js +99 -100
- package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/ssao.frag.js +213 -174
- package/lib/commonjs/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/text.frag.js +86 -84
- package/lib/commonjs/mol-gl/shader/text.vert.js +85 -85
- package/lib/commonjs/mol-gl/shader/util/grid3d-template.frag.js +46 -46
- package/lib/commonjs/mol-gl/shader-code.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader-code.js +24 -18
- package/lib/commonjs/mol-gl/webgl/compat.js +12 -12
- package/lib/commonjs/mol-gl/webgl/render-item.d.ts +3 -2
- package/lib/commonjs/mol-gl/webgl/render-item.js +1 -1
- package/lib/commonjs/mol-io/common/binary-cif/array-encoder.d.ts +1 -1
- package/lib/commonjs/mol-io/common/binary-cif/array-encoder.js +5 -2
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd-extras.d.ts +4 -4
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/commonjs/mol-io/reader/cif.d.ts +1 -1
- package/lib/commonjs/mol-io/writer/cif/encoder/binary.d.ts +1 -1
- package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +10 -2
- package/lib/commonjs/mol-math/linear-algebra/3d/mat3.d.ts +3 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/mat3.js +8 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/vec3.d.ts +6 -0
- package/lib/commonjs/mol-math/linear-algebra/3d/vec3.js +20 -0
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/properties.d.ts +2 -2
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.d.ts +9 -6
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +7 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +10 -6
- package/lib/commonjs/mol-model/structure/structure/unit.d.ts +2 -2
- package/lib/commonjs/mol-model/structure/structure/unit.js +5 -2
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +118 -118
- package/lib/commonjs/mol-model-formats/structure/common/component.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +4 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +6 -3
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/commonjs/mol-plugin/behavior/behavior.d.ts +6 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/camera.d.ts +3 -3
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/accessible-surface-area.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/interactions.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/secondary-structure.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/valence-model.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/integrative/cross-link-restraint.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/sifts-mapping.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/structure-info.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +4 -4
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/behavior.d.ts +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -208
- package/lib/commonjs/mol-plugin/config.d.ts +5 -0
- package/lib/commonjs/mol-plugin/context.d.ts +2 -2
- package/lib/commonjs/mol-plugin/state.d.ts +6 -6
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +3 -3
- package/lib/commonjs/mol-plugin-state/actions/structure.js +3 -5
- package/lib/commonjs/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/builder/data.d.ts +4 -4
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +27 -27
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +5 -5
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +42 -42
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +4 -4
- package/lib/commonjs/mol-plugin-state/builder/structure.d.ts +7 -7
- package/lib/commonjs/mol-plugin-state/formats/coordinates.d.ts +8 -8
- package/lib/commonjs/mol-plugin-state/formats/shape.d.ts +8 -8
- package/lib/commonjs/mol-plugin-state/formats/topology.d.ts +12 -12
- package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +33 -33
- package/lib/commonjs/mol-plugin-state/helpers/structure-emissive.d.ts +12 -0
- package/lib/commonjs/mol-plugin-state/helpers/structure-emissive.js +69 -0
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +3 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +9 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.d.ts +341 -9
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.js +32 -19
- package/lib/commonjs/mol-plugin-state/manager/structure/selection.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/manager/volume/hierarchy.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/objects.d.ts +32 -32
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +33 -8
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +121 -6
- package/lib/commonjs/mol-plugin-state/transforms/shape.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/transforms/volume.d.ts +16 -8
- package/lib/commonjs/mol-plugin-state/transforms/volume.js +51 -2
- package/lib/commonjs/mol-plugin-ui/state/apply-action.d.ts +2 -2
- package/lib/commonjs/mol-plugin-ui/state/update-transform.d.ts +3 -3
- package/lib/commonjs/mol-repr/representation.d.ts +6 -2
- package/lib/commonjs/mol-repr/representation.js +12 -2
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/complex-representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/complex-representation.js +7 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +8 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.js +5 -1
- package/lib/commonjs/mol-repr/structure/params.d.ts +8 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +14 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/units-representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/units-representation.js +9 -3
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +9 -1
- package/lib/commonjs/mol-repr/structure/units-visual.js +5 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/visual.d.ts +6 -1
- package/lib/commonjs/mol-repr/visual.js +55 -1
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +6 -0
- package/lib/commonjs/mol-repr/volume/registry.d.ts +4 -0
- package/lib/commonjs/mol-repr/volume/representation.d.ts +2 -1
- package/lib/commonjs/mol-repr/volume/representation.js +9 -2
- package/lib/commonjs/mol-repr/volume/segment.d.ts +5 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +3 -0
- package/lib/commonjs/mol-script/language/symbol-table/core.d.ts +3 -3
- package/lib/commonjs/mol-state/tree/immutable.d.ts +1 -1
- package/lib/commonjs/mol-state/tree/transient.d.ts +2 -2
- package/lib/commonjs/mol-theme/color/external-volume.d.ts +3 -1
- package/lib/commonjs/mol-theme/color/external-volume.js +8 -2
- package/lib/commonjs/mol-theme/color.d.ts +1 -0
- package/lib/commonjs/mol-theme/emissive.d.ts +40 -0
- package/lib/commonjs/mol-theme/emissive.js +137 -0
- package/lib/commonjs/mol-theme/substance.d.ts +1 -1
- package/lib/commonjs/mol-theme/substance.js +2 -2
- package/lib/commonjs/mol-theme/transparency.d.ts +0 -1
- package/lib/commonjs/mol-util/input/input-observer.js +2 -0
- package/lib/commonjs/mol-util/set.d.ts +1 -1
- package/lib/commonjs/mol-util/set.js +17 -1
- package/lib/commonjs/servers/common/swagger-ui/indexTemplate.js +66 -66
- package/lib/commonjs/servers/volume/config.js +5 -5
- package/lib/examples/alpha-orbitals/example-data.js +160 -160
- package/lib/examples/alpha-orbitals/index.html +72 -72
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/alpha-orbitals/gpu/shader.frag.js +136 -136
- package/lib/extensions/alpha-orbitals/transforms.d.ts +2 -2
- package/lib/extensions/anvil/behavior.d.ts +10 -9
- package/lib/extensions/anvil/representation.d.ts +5 -0
- package/lib/extensions/assembly-symmetry/behavior.d.ts +2 -1
- package/lib/extensions/assembly-symmetry/prop.js +24 -24
- package/lib/extensions/assembly-symmetry/representation.d.ts +1 -0
- package/lib/extensions/backgrounds/index.d.ts +2 -2
- package/lib/extensions/backgrounds/index.js +2 -1
- package/lib/extensions/dnatco/behavior.d.ts +1 -1
- package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +10 -10
- package/lib/extensions/dnatco/confal-pyramids/behavior.js +5 -5
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/extensions/dnatco/ntc-tube/behavior.d.ts +10 -10
- package/lib/extensions/dnatco/ntc-tube/behavior.js +5 -5
- package/lib/extensions/dnatco/ntc-tube/representation.d.ts +3 -0
- package/lib/extensions/g3d/format.d.ts +6 -6
- package/lib/extensions/geo-export/glb-exporter.d.ts +1 -1
- package/lib/extensions/geo-export/glb-exporter.js +6 -4
- package/lib/extensions/geo-export/index.d.ts +1 -1
- package/lib/extensions/geo-export/usdz-exporter.js +41 -41
- package/lib/extensions/meshes/mesh-extension.d.ts +2 -3
- package/lib/extensions/meshes/mesh-streaming/behavior.d.ts +1 -1
- package/lib/extensions/meshes/mesh-streaming/server-info.d.ts +2 -2
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +9 -9
- package/lib/extensions/model-export/index.d.ts +1 -1
- package/lib/extensions/mp4-export/index.d.ts +1 -1
- package/lib/extensions/mvs/behavior.d.ts +1 -1
- package/lib/extensions/mvs/camera.d.ts +2 -0
- package/lib/extensions/mvs/camera.js +27 -1
- package/lib/extensions/mvs/components/annotation-label/representation.d.ts +4 -0
- package/lib/extensions/mvs/components/annotation-label/visual.d.ts +1 -0
- package/lib/extensions/mvs/components/custom-label/representation.d.ts +4 -2
- package/lib/extensions/mvs/components/custom-label/visual.d.ts +1 -0
- package/lib/extensions/mvs/components/formats.d.ts +6 -4
- package/lib/extensions/mvs/components/formats.js +2 -1
- package/lib/extensions/mvs/load-helpers.d.ts +1 -1
- package/lib/extensions/mvs/load.d.ts +2 -0
- package/lib/extensions/mvs/load.js +13 -7
- package/lib/extensions/mvs/tree/mvs/mvs-builder.d.ts +2 -8
- package/lib/extensions/pdbe/structure-quality-report/behavior.d.ts +1 -1
- package/lib/extensions/rcsb/validation-report/behavior.d.ts +22 -22
- package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/extensions/sb-ncbr/partial-charges/behavior.d.ts +1 -1
- package/lib/extensions/sb-ncbr/partial-charges/preset.d.ts +4 -4
- package/lib/extensions/volumes-and-segmentations/entry-meshes.d.ts +1 -1
- package/lib/extensions/volumes-and-segmentations/entry-root.d.ts +5 -5
- package/lib/extensions/volumes-and-segmentations/entry-segmentation.d.ts +1 -1
- package/lib/extensions/volumes-and-segmentations/entry-state.d.ts +2 -2
- package/lib/extensions/volumes-and-segmentations/global-state.d.ts +2 -2
- package/lib/extensions/volumes-and-segmentations/helpers.d.ts +1 -1
- package/lib/extensions/volumes-and-segmentations/index.d.ts +1 -1
- package/lib/extensions/wwpdb/ccd/behavior.d.ts +1 -1
- package/lib/extensions/wwpdb/ccd/representation.d.ts +4 -4
- package/lib/extensions/zenodo/index.d.ts +1 -1
- package/lib/mol-canvas3d/canvas3d.d.ts +14 -2
- package/lib/mol-canvas3d/canvas3d.js +2 -2
- package/lib/mol-canvas3d/controls/trackball.js +1 -1
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -0
- package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/mol-canvas3d/passes/background.d.ts +6 -1
- package/lib/mol-canvas3d/passes/background.js +14 -2
- package/lib/mol-canvas3d/passes/bloom.d.ts +37 -0
- package/lib/mol-canvas3d/passes/bloom.js +268 -0
- package/lib/mol-canvas3d/passes/dpoit.js +4 -2
- package/lib/mol-canvas3d/passes/draw.d.ts +11 -7
- package/lib/mol-canvas3d/passes/draw.js +30 -4
- package/lib/mol-canvas3d/passes/image.d.ts +6 -0
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +31 -5
- package/lib/mol-canvas3d/passes/postprocessing.js +33 -39
- package/lib/mol-geo/geometry/base.d.ts +3 -1
- package/lib/mol-geo/geometry/base.js +4 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -1
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +2 -1
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +4 -1
- package/lib/mol-geo/geometry/emissive-data.d.ts +26 -0
- package/lib/mol-geo/geometry/emissive-data.js +72 -0
- package/lib/mol-geo/geometry/image/image.d.ts +2 -1
- package/lib/mol-geo/geometry/image/image.js +4 -1
- package/lib/mol-geo/geometry/lines/lines.d.ts +3 -2
- package/lib/mol-geo/geometry/lines/lines.js +4 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +2 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +34 -1
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/mol-geo/geometry/mesh/mesh.js +11 -4
- package/lib/mol-geo/geometry/points/points.d.ts +3 -2
- package/lib/mol-geo/geometry/points/points.js +4 -1
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +2 -2
- package/lib/mol-geo/geometry/spheres/spheres.js +7 -3
- package/lib/mol-geo/geometry/text/text.d.ts +2 -1
- package/lib/mol-geo/geometry/text/text.js +4 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +2 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +32 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +3 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +14 -4
- package/lib/mol-geo/util/location-iterator.d.ts +5 -2
- package/lib/mol-geo/util/location-iterator.js +8 -3
- package/lib/mol-gl/renderable/cylinders.d.ts +10 -0
- package/lib/mol-gl/renderable/direct-volume.d.ts +10 -0
- package/lib/mol-gl/renderable/image.d.ts +10 -0
- package/lib/mol-gl/renderable/lines.d.ts +10 -0
- package/lib/mol-gl/renderable/mesh.d.ts +10 -0
- package/lib/mol-gl/renderable/points.d.ts +10 -0
- package/lib/mol-gl/renderable/schema.d.ts +24 -1
- package/lib/mol-gl/renderable/schema.js +14 -1
- package/lib/mol-gl/renderable/spheres.d.ts +10 -0
- package/lib/mol-gl/renderable/text.d.ts +10 -0
- package/lib/mol-gl/renderable/texture-mesh.d.ts +10 -0
- package/lib/mol-gl/renderable.d.ts +1 -1
- package/lib/mol-gl/renderable.js +2 -2
- package/lib/mol-gl/renderer.d.ts +2 -1
- package/lib/mol-gl/renderer.js +58 -49
- package/lib/mol-gl/scene.d.ts +3 -1
- package/lib/mol-gl/scene.js +26 -1
- package/lib/mol-gl/shader/background.frag.d.ts +1 -1
- package/lib/mol-gl/shader/background.frag.js +95 -94
- package/lib/mol-gl/shader/background.vert.js +11 -11
- package/lib/mol-gl/shader/blend-back-dpoit.frag.js +13 -13
- package/lib/mol-gl/shader/bloom/blur.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/blur.frag.js +29 -0
- package/lib/mol-gl/shader/bloom/composite.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/composite.frag.js +34 -0
- package/lib/mol-gl/shader/bloom/luminosity.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/luminosity.frag.js +53 -0
- package/lib/mol-gl/shader/cas.frag.js +144 -144
- package/lib/mol-gl/shader/chunks/apply-fog.glsl.js +31 -31
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +12 -12
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +78 -70
- package/lib/mol-gl/shader/chunks/apply-marker-color.glsl.js +16 -16
- package/lib/mol-gl/shader/chunks/assign-clipping-varying.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +140 -112
- package/lib/mol-gl/shader/chunks/assign-group.glsl.js +6 -6
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +112 -123
- package/lib/mol-gl/shader/chunks/assign-position.glsl.js +14 -14
- package/lib/mol-gl/shader/chunks/assign-size.glsl.js +18 -18
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +12 -12
- package/lib/mol-gl/shader/chunks/check-transparency.glsl.d.ts +1 -0
- package/lib/mol-gl/shader/chunks/check-transparency.glsl.js +17 -0
- package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +7 -7
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +5 -5
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +60 -51
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +122 -92
- package/lib/mol-gl/shader/chunks/common-clip.glsl.js +104 -104
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +150 -149
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +61 -61
- package/lib/mol-gl/shader/chunks/common.glsl.js +234 -234
- package/lib/mol-gl/shader/chunks/dpoit-write.glsl.js +62 -62
- package/lib/mol-gl/shader/chunks/fade-lod.glsl.js +42 -42
- package/lib/mol-gl/shader/chunks/float-to-rgba.glsl.js +39 -39
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +127 -127
- package/lib/mol-gl/shader/chunks/matrix-scale.glsl.js +5 -5
- package/lib/mol-gl/shader/chunks/normal-frag-params.glsl.js +2 -2
- package/lib/mol-gl/shader/chunks/read-from-texture.glsl.js +14 -14
- package/lib/mol-gl/shader/chunks/rgba-to-float.glsl.js +84 -84
- package/lib/mol-gl/shader/chunks/size-vert-params.glsl.js +11 -11
- package/lib/mol-gl/shader/chunks/texture3d-from-1d-trilinear.glsl.js +23 -23
- package/lib/mol-gl/shader/chunks/texture3d-from-2d-linear.glsl.js +17 -17
- package/lib/mol-gl/shader/chunks/texture3d-from-2d-nearest.glsl.js +8 -8
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +25 -25
- package/lib/mol-gl/shader/compose.frag.js +12 -12
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.frag.js +23 -23
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +43 -43
- package/lib/mol-gl/shader/compute/color-smoothing/normalize.frag.js +15 -15
- package/lib/mol-gl/shader/copy.frag.js +11 -11
- package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.frag.js +267 -264
- package/lib/mol-gl/shader/cylinders.vert.js +89 -89
- package/lib/mol-gl/shader/depth-merge.frag.js +23 -23
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +362 -356
- package/lib/mol-gl/shader/direct-volume.vert.js +41 -41
- package/lib/mol-gl/shader/evaluate-dpoit.frag.js +10 -10
- package/lib/mol-gl/shader/evaluate-wboit.frag.js +17 -17
- package/lib/mol-gl/shader/fxaa.frag.js +228 -228
- package/lib/mol-gl/shader/gaussian-density.frag.js +49 -49
- package/lib/mol-gl/shader/gaussian-density.vert.js +27 -27
- package/lib/mol-gl/shader/hi-z.frag.js +18 -18
- package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.js +58 -58
- package/lib/mol-gl/shader/histogram-pyramid/sum.frag.js +19 -19
- package/lib/mol-gl/shader/image.frag.d.ts +2 -2
- package/lib/mol-gl/shader/image.frag.js +170 -161
- package/lib/mol-gl/shader/image.vert.js +21 -21
- package/lib/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/mol-gl/shader/lines.frag.js +43 -40
- package/lib/mol-gl/shader/lines.vert.js +117 -117
- package/lib/mol-gl/shader/marching-cubes/active-voxels.frag.js +70 -70
- package/lib/mol-gl/shader/marching-cubes/isosurface.frag.js +311 -311
- package/lib/mol-gl/shader/marking/edge.frag.js +28 -28
- package/lib/mol-gl/shader/marking/overlay.frag.js +26 -26
- package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/mol-gl/shader/mesh.frag.js +66 -63
- package/lib/mol-gl/shader/mesh.vert.js +49 -49
- package/lib/mol-gl/shader/outlines.frag.js +95 -95
- package/lib/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/mol-gl/shader/points.frag.js +60 -56
- package/lib/mol-gl/shader/points.vert.js +38 -38
- package/lib/mol-gl/shader/postprocessing.frag.js +150 -150
- package/lib/mol-gl/shader/quad.vert.js +10 -10
- package/lib/mol-gl/shader/shadows.frag.js +123 -123
- package/lib/mol-gl/shader/smaa/blend.frag.js +56 -56
- package/lib/mol-gl/shader/smaa/blend.vert.js +25 -25
- package/lib/mol-gl/shader/smaa/edges.frag.js +66 -66
- package/lib/mol-gl/shader/smaa/edges.vert.js +26 -26
- package/lib/mol-gl/shader/smaa/weights.frag.js +206 -206
- package/lib/mol-gl/shader/smaa/weights.vert.js +32 -32
- package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.frag.js +149 -143
- package/lib/mol-gl/shader/spheres.vert.js +132 -132
- package/lib/mol-gl/shader/ssao-blur.frag.d.ts +3 -2
- package/lib/mol-gl/shader/ssao-blur.frag.js +99 -100
- package/lib/mol-gl/shader/ssao.frag.d.ts +3 -2
- package/lib/mol-gl/shader/ssao.frag.js +213 -174
- package/lib/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/mol-gl/shader/text.frag.js +86 -84
- package/lib/mol-gl/shader/text.vert.js +85 -85
- package/lib/mol-gl/shader/util/grid3d-template.frag.js +46 -46
- package/lib/mol-gl/shader-code.d.ts +1 -1
- package/lib/mol-gl/shader-code.js +24 -18
- package/lib/mol-gl/webgl/compat.js +12 -12
- package/lib/mol-gl/webgl/render-item.d.ts +3 -2
- package/lib/mol-gl/webgl/render-item.js +1 -1
- package/lib/mol-io/common/binary-cif/array-encoder.d.ts +1 -1
- package/lib/mol-io/common/binary-cif/array-encoder.js +5 -2
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd-extras.d.ts +4 -4
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/mol-io/reader/cif.d.ts +1 -1
- package/lib/mol-io/writer/cif/encoder/binary.d.ts +1 -1
- package/lib/mol-io/writer/cif/encoder/binary.js +10 -2
- package/lib/mol-math/linear-algebra/3d/mat3.d.ts +3 -1
- package/lib/mol-math/linear-algebra/3d/mat3.js +8 -1
- package/lib/mol-math/linear-algebra/3d/vec3.d.ts +6 -0
- package/lib/mol-math/linear-algebra/3d/vec3.js +20 -0
- package/lib/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/mol-model/structure/structure/properties.d.ts +2 -2
- package/lib/mol-model/structure/structure/unit/bonds/data.d.ts +9 -6
- package/lib/mol-model/structure/structure/unit/bonds/data.js +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +7 -4
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +10 -6
- package/lib/mol-model/structure/structure/unit.d.ts +2 -2
- package/lib/mol-model/structure/structure/unit.js +5 -2
- package/lib/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/mol-model-formats/structure/basic/schema.d.ts +118 -118
- package/lib/mol-model-formats/structure/common/component.d.ts +2 -2
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +4 -1
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +6 -3
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/mol-plugin/behavior/behavior.d.ts +6 -6
- package/lib/mol-plugin/behavior/dynamic/camera.d.ts +3 -3
- package/lib/mol-plugin/behavior/dynamic/custom-props/computed/accessible-surface-area.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/computed/interactions.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/computed/secondary-structure.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/computed/valence-model.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/integrative/cross-link-restraint.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/sequence/sifts-mapping.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/structure-info.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +4 -4
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/behavior.d.ts +2 -2
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -2
- package/lib/mol-plugin/commands.d.ts +1 -208
- package/lib/mol-plugin/config.d.ts +5 -0
- package/lib/mol-plugin/context.d.ts +2 -2
- package/lib/mol-plugin/state.d.ts +6 -6
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/structure.d.ts +3 -3
- package/lib/mol-plugin-state/actions/structure.js +3 -5
- package/lib/mol-plugin-state/actions/volume.d.ts +1 -1
- package/lib/mol-plugin-state/builder/data.d.ts +4 -4
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +27 -27
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +5 -5
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +42 -42
- package/lib/mol-plugin-state/builder/structure/representation.d.ts +4 -4
- package/lib/mol-plugin-state/builder/structure.d.ts +7 -7
- package/lib/mol-plugin-state/formats/coordinates.d.ts +8 -8
- package/lib/mol-plugin-state/formats/shape.d.ts +8 -8
- package/lib/mol-plugin-state/formats/topology.d.ts +12 -12
- package/lib/mol-plugin-state/formats/volume.d.ts +33 -33
- package/lib/mol-plugin-state/helpers/structure-emissive.d.ts +12 -0
- package/lib/mol-plugin-state/helpers/structure-emissive.js +64 -0
- package/lib/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
- package/lib/mol-plugin-state/manager/structure/component.d.ts +3 -1
- package/lib/mol-plugin-state/manager/structure/component.js +9 -1
- package/lib/mol-plugin-state/manager/structure/measurement.d.ts +341 -9
- package/lib/mol-plugin-state/manager/structure/measurement.js +32 -19
- package/lib/mol-plugin-state/manager/structure/selection.d.ts +1 -1
- package/lib/mol-plugin-state/manager/volume/hierarchy.d.ts +1 -1
- package/lib/mol-plugin-state/objects.d.ts +32 -32
- package/lib/mol-plugin-state/transforms/representation.d.ts +33 -8
- package/lib/mol-plugin-state/transforms/representation.js +120 -5
- package/lib/mol-plugin-state/transforms/shape.d.ts +1 -1
- package/lib/mol-plugin-state/transforms/volume.d.ts +16 -8
- package/lib/mol-plugin-state/transforms/volume.js +51 -2
- package/lib/mol-plugin-ui/skin/base/base.scss +37 -37
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +445 -445
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +663 -663
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +194 -194
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +88 -88
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/state/apply-action.d.ts +2 -2
- package/lib/mol-plugin-ui/state/update-transform.d.ts +3 -3
- package/lib/mol-repr/representation.d.ts +6 -2
- package/lib/mol-repr/representation.js +12 -2
- package/lib/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +1 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +1 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +1 -0
- package/lib/mol-repr/structure/complex-representation.d.ts +1 -1
- package/lib/mol-repr/structure/complex-representation.js +7 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +8 -1
- package/lib/mol-repr/structure/complex-visual.js +5 -1
- package/lib/mol-repr/structure/params.d.ts +8 -0
- package/lib/mol-repr/structure/registry.d.ts +14 -0
- package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
- package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/mol-repr/structure/representation/label.d.ts +3 -0
- package/lib/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/orientation.d.ts +3 -0
- package/lib/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +3 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -0
- package/lib/mol-repr/structure/units-representation.d.ts +1 -1
- package/lib/mol-repr/structure/units-representation.js +9 -3
- package/lib/mol-repr/structure/units-visual.d.ts +9 -1
- package/lib/mol-repr/structure/units-visual.js +5 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/label-text.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +2 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
- package/lib/mol-repr/visual.d.ts +6 -1
- package/lib/mol-repr/visual.js +57 -3
- package/lib/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/mol-repr/volume/isosurface.d.ts +6 -0
- package/lib/mol-repr/volume/registry.d.ts +4 -0
- package/lib/mol-repr/volume/representation.d.ts +2 -1
- package/lib/mol-repr/volume/representation.js +9 -2
- package/lib/mol-repr/volume/segment.d.ts +5 -0
- package/lib/mol-repr/volume/slice.d.ts +3 -0
- package/lib/mol-script/language/symbol-table/core.d.ts +3 -3
- package/lib/mol-state/tree/immutable.d.ts +1 -1
- package/lib/mol-state/tree/transient.d.ts +2 -2
- package/lib/mol-theme/color/external-volume.d.ts +3 -1
- package/lib/mol-theme/color/external-volume.js +8 -2
- package/lib/mol-theme/color.d.ts +1 -0
- package/lib/mol-theme/emissive.d.ts +40 -0
- package/lib/mol-theme/emissive.js +134 -0
- package/lib/mol-theme/substance.d.ts +1 -1
- package/lib/mol-theme/substance.js +2 -2
- package/lib/mol-theme/transparency.d.ts +0 -1
- package/lib/mol-util/input/input-observer.js +2 -0
- package/lib/mol-util/set.d.ts +1 -1
- package/lib/mol-util/set.js +17 -1
- package/lib/servers/common/swagger-ui/indexTemplate.js +66 -66
- package/lib/servers/volume/config.js +5 -5
- package/package.json +195 -193
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
|
+
*
|
|
5
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
|
+
*
|
|
7
|
+
* Partially adapted from three.js, The MIT License, Copyright © 2010-2024 three.js authors
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.BloomPass = exports.BloomParams = void 0;
|
|
11
|
+
const util_1 = require("../../mol-gl/compute/util");
|
|
12
|
+
const renderable_1 = require("../../mol-gl/renderable");
|
|
13
|
+
const schema_1 = require("../../mol-gl/renderable/schema");
|
|
14
|
+
const shader_code_1 = require("../../mol-gl/shader-code");
|
|
15
|
+
const render_item_1 = require("../../mol-gl/webgl/render-item");
|
|
16
|
+
const texture_1 = require("../../mol-gl/webgl/texture");
|
|
17
|
+
const linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
18
|
+
const mol_util_1 = require("../../mol-util");
|
|
19
|
+
const param_definition_1 = require("../../mol-util/param-definition");
|
|
20
|
+
const quad_vert_1 = require("../../mol-gl/shader/quad.vert");
|
|
21
|
+
const debug_1 = require("../../mol-util/debug");
|
|
22
|
+
const composite_frag_1 = require("../../mol-gl/shader/bloom/composite.frag");
|
|
23
|
+
const luminosity_frag_1 = require("../../mol-gl/shader/bloom/luminosity.frag");
|
|
24
|
+
const blur_frag_1 = require("../../mol-gl/shader/bloom/blur.frag");
|
|
25
|
+
const memoize_1 = require("../../mol-util/memoize");
|
|
26
|
+
const MipCount = 5;
|
|
27
|
+
exports.BloomParams = {
|
|
28
|
+
strength: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 3, step: 0.1 }),
|
|
29
|
+
radius: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }),
|
|
30
|
+
threshold: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }, { description: 'Luminosity threshold', hideIf: p => p.mode === 'emissive' }),
|
|
31
|
+
mode: param_definition_1.ParamDefinition.Select('emissive', [['luminosity', 'Luminosity'], ['emissive', 'Emissive']]),
|
|
32
|
+
};
|
|
33
|
+
class BloomPass {
|
|
34
|
+
static isEnabled(props) {
|
|
35
|
+
return props.bloom.name === 'on';
|
|
36
|
+
}
|
|
37
|
+
constructor(webgl, width, height) {
|
|
38
|
+
this.webgl = webgl;
|
|
39
|
+
this.horizontalBlurTargets = [];
|
|
40
|
+
this.verticalBlurTargets = [];
|
|
41
|
+
this.emissiveTarget = webgl.createRenderTarget(width, height, true, 'uint8', 'linear', 'rgba');
|
|
42
|
+
this.luminosityTarget = webgl.createRenderTarget(width, height, false, 'uint8', 'linear');
|
|
43
|
+
this.compositeTarget = webgl.createRenderTarget(width, height, false, 'uint8', 'linear');
|
|
44
|
+
let blurWidth = Math.round(width / 2);
|
|
45
|
+
let blurHeight = Math.round(height / 2);
|
|
46
|
+
for (let i = 0; i < MipCount; ++i) {
|
|
47
|
+
this.horizontalBlurTargets[i] = webgl.createRenderTarget(blurWidth, blurHeight, false, 'uint8', 'linear');
|
|
48
|
+
this.verticalBlurTargets[i] = webgl.createRenderTarget(blurWidth, blurHeight, false, 'uint8', 'linear');
|
|
49
|
+
blurWidth = Math.round(blurWidth / 2);
|
|
50
|
+
blurHeight = Math.round(blurHeight / 2);
|
|
51
|
+
}
|
|
52
|
+
const nullTexture = (0, texture_1.createNullTexture)();
|
|
53
|
+
this.luminosityRenderable = getLuminosityRenderable(webgl, nullTexture, nullTexture, nullTexture);
|
|
54
|
+
this.blurRenderable = getBlurRenderable(webgl, nullTexture);
|
|
55
|
+
this.compositeRenderable = getCompositeRenderable(webgl, width, height, this.verticalBlurTargets[0].texture, this.verticalBlurTargets[1].texture, this.verticalBlurTargets[2].texture, this.verticalBlurTargets[3].texture, this.verticalBlurTargets[4].texture);
|
|
56
|
+
this.copyRenderable = (0, util_1.createCopyRenderable)(webgl, this.compositeTarget.texture);
|
|
57
|
+
}
|
|
58
|
+
setSize(width, height) {
|
|
59
|
+
const w = this.luminosityTarget.getWidth();
|
|
60
|
+
const h = this.luminosityTarget.getHeight();
|
|
61
|
+
if (width !== w || height !== h) {
|
|
62
|
+
this.emissiveTarget.setSize(width, height);
|
|
63
|
+
this.luminosityTarget.setSize(width, height);
|
|
64
|
+
this.compositeTarget.setSize(width, height);
|
|
65
|
+
let blurWidth = Math.round(width / 2);
|
|
66
|
+
let blurHeight = Math.round(height / 2);
|
|
67
|
+
for (let i = 0; i < MipCount; ++i) {
|
|
68
|
+
this.horizontalBlurTargets[i].setSize(blurWidth, blurHeight);
|
|
69
|
+
this.verticalBlurTargets[i].setSize(blurWidth, blurHeight);
|
|
70
|
+
blurWidth = Math.round(blurWidth / 2);
|
|
71
|
+
blurHeight = Math.round(blurHeight / 2);
|
|
72
|
+
}
|
|
73
|
+
mol_util_1.ValueCell.update(this.luminosityRenderable.values.uTexSizeInv, linear_algebra_1.Vec2.set(this.compositeRenderable.values.uTexSizeInv.ref.value, 1 / width, 1 / height));
|
|
74
|
+
mol_util_1.ValueCell.update(this.compositeRenderable.values.uTexSizeInv, linear_algebra_1.Vec2.set(this.compositeRenderable.values.uTexSizeInv.ref.value, 1 / width, 1 / height));
|
|
75
|
+
mol_util_1.ValueCell.update(this.copyRenderable.values.uTexSize, linear_algebra_1.Vec2.set(this.copyRenderable.values.uTexSize.ref.value, width, height));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
update(input, emissive, depth, props) {
|
|
79
|
+
let luminosityNeedsUpdate = false;
|
|
80
|
+
if (this.luminosityRenderable.values.tColor.ref.value !== input) {
|
|
81
|
+
mol_util_1.ValueCell.update(this.luminosityRenderable.values.tColor, input);
|
|
82
|
+
luminosityNeedsUpdate = true;
|
|
83
|
+
}
|
|
84
|
+
if (this.luminosityRenderable.values.tEmissive.ref.value !== emissive) {
|
|
85
|
+
mol_util_1.ValueCell.update(this.luminosityRenderable.values.tEmissive, emissive);
|
|
86
|
+
luminosityNeedsUpdate = true;
|
|
87
|
+
}
|
|
88
|
+
if (this.luminosityRenderable.values.tDepth.ref.value !== depth) {
|
|
89
|
+
mol_util_1.ValueCell.update(this.luminosityRenderable.values.tDepth, depth);
|
|
90
|
+
luminosityNeedsUpdate = true;
|
|
91
|
+
}
|
|
92
|
+
if (this.luminosityRenderable.values.dMode.ref.value !== props.mode) {
|
|
93
|
+
mol_util_1.ValueCell.update(this.luminosityRenderable.values.dMode, props.mode);
|
|
94
|
+
luminosityNeedsUpdate = true;
|
|
95
|
+
}
|
|
96
|
+
mol_util_1.ValueCell.updateIfChanged(this.luminosityRenderable.values.uLuminosityThreshold, props.threshold);
|
|
97
|
+
if (luminosityNeedsUpdate) {
|
|
98
|
+
this.luminosityRenderable.update();
|
|
99
|
+
}
|
|
100
|
+
//
|
|
101
|
+
let blurNeedsUpdate = false;
|
|
102
|
+
if (this.blurRenderable.values.tInput.ref.value !== input) {
|
|
103
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.tInput, input);
|
|
104
|
+
blurNeedsUpdate = true;
|
|
105
|
+
}
|
|
106
|
+
if (blurNeedsUpdate) {
|
|
107
|
+
this.blurRenderable.update();
|
|
108
|
+
}
|
|
109
|
+
//
|
|
110
|
+
mol_util_1.ValueCell.update(this.compositeRenderable.values.uBloomRadius, props.radius);
|
|
111
|
+
mol_util_1.ValueCell.update(this.compositeRenderable.values.uBloomStrength, props.strength);
|
|
112
|
+
}
|
|
113
|
+
render(viewport, target) {
|
|
114
|
+
if (debug_1.isTimingMode)
|
|
115
|
+
this.webgl.timer.mark('BloomPass.render');
|
|
116
|
+
const { gl, state } = this.webgl;
|
|
117
|
+
const { x, y, width, height } = viewport;
|
|
118
|
+
state.viewport(x, y, width, height);
|
|
119
|
+
state.scissor(x, y, width, height);
|
|
120
|
+
// printTextureImage(readTexture(this.webgl, this.luminosityRenderable.values.tEmissive.ref.value, new Uint8Array(width * height * 4)), { scale: 0.25, id: 'emissive' });
|
|
121
|
+
state.enable(gl.SCISSOR_TEST);
|
|
122
|
+
state.disable(gl.BLEND);
|
|
123
|
+
state.disable(gl.DEPTH_TEST);
|
|
124
|
+
state.depthMask(false);
|
|
125
|
+
// Extract Bright Areas
|
|
126
|
+
this.luminosityTarget.bind();
|
|
127
|
+
this.luminosityRenderable.render();
|
|
128
|
+
// printTextureImage(readTexture(this.webgl, this.luminosityTarget.texture, new Uint8Array(width * height * 4)), { scale: 0.25, id: 'luminosity' });
|
|
129
|
+
// Blur All the mips progressively
|
|
130
|
+
for (let i = 0; i < MipCount; ++i) {
|
|
131
|
+
const blurWidth = this.horizontalBlurTargets[i].getWidth();
|
|
132
|
+
const blurHeight = this.horizontalBlurTargets[i].getHeight();
|
|
133
|
+
state.viewport(0, 0, blurWidth, blurHeight);
|
|
134
|
+
state.scissor(0, 0, blurWidth, blurHeight);
|
|
135
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.dKernelRadius, BlurKernelSizes[i]);
|
|
136
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.uGaussianCoefficients, getBlurCoefficients(BlurKernelSizes[i]));
|
|
137
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.uTexSizeInv, linear_algebra_1.Vec2.set(this.blurRenderable.values.uTexSizeInv.ref.value, 1 / blurWidth, 1 / blurHeight));
|
|
138
|
+
this.horizontalBlurTargets[i].bind();
|
|
139
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.tInput, i === 0 ? this.luminosityTarget.texture : this.verticalBlurTargets[i - 1].texture);
|
|
140
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.uDirection, BlurDirectionX);
|
|
141
|
+
this.blurRenderable.update();
|
|
142
|
+
this.blurRenderable.render();
|
|
143
|
+
this.verticalBlurTargets[i].bind();
|
|
144
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.tInput, this.horizontalBlurTargets[i].texture);
|
|
145
|
+
mol_util_1.ValueCell.update(this.blurRenderable.values.uDirection, BlurDirectionY);
|
|
146
|
+
this.blurRenderable.update();
|
|
147
|
+
this.blurRenderable.render();
|
|
148
|
+
// printTextureImage(readTexture(this.webgl, this.verticalBlurTargets[i].texture, new Uint8Array(blurWidth * blurHeight * 4)), { scale: 0.25, id: `blur-${i}` });
|
|
149
|
+
}
|
|
150
|
+
state.viewport(x, y, width, height);
|
|
151
|
+
state.scissor(x, y, width, height);
|
|
152
|
+
// Composite All the mips
|
|
153
|
+
this.compositeTarget.bind();
|
|
154
|
+
this.compositeRenderable.update();
|
|
155
|
+
this.compositeRenderable.render();
|
|
156
|
+
// printTextureImage(readTexture(this.webgl, this.compositeTarget.texture, new Uint8Array(width * height * 4)), { scale: 0.25, id: 'composite' });
|
|
157
|
+
if (target) {
|
|
158
|
+
target.bind();
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this.webgl.unbindFramebuffer();
|
|
162
|
+
}
|
|
163
|
+
state.enable(gl.BLEND);
|
|
164
|
+
state.blendFunc(gl.ONE, gl.ONE);
|
|
165
|
+
this.copyRenderable.render();
|
|
166
|
+
if (debug_1.isTimingMode)
|
|
167
|
+
this.webgl.timer.markEnd('BloomPass.render');
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.BloomPass = BloomPass;
|
|
171
|
+
//
|
|
172
|
+
const LuminositySchema = {
|
|
173
|
+
...util_1.QuadSchema,
|
|
174
|
+
tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
175
|
+
tEmissive: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
176
|
+
tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'),
|
|
177
|
+
uTexSizeInv: (0, schema_1.UniformSpec)('v2'),
|
|
178
|
+
uDefaultColor: (0, schema_1.UniformSpec)('v3'),
|
|
179
|
+
uDefaultOpacity: (0, schema_1.UniformSpec)('f'),
|
|
180
|
+
uLuminosityThreshold: (0, schema_1.UniformSpec)('f'),
|
|
181
|
+
uSmoothWidth: (0, schema_1.UniformSpec)('f'),
|
|
182
|
+
dMode: (0, schema_1.DefineSpec)('string', ['luminosity', 'emissive']),
|
|
183
|
+
};
|
|
184
|
+
const LuminosityShaderCode = (0, shader_code_1.ShaderCode)('Bloom Luminosity', quad_vert_1.quad_vert, luminosity_frag_1.luminosity_frag);
|
|
185
|
+
function getLuminosityRenderable(ctx, colorTexture, emissiveTexture, depthTexture) {
|
|
186
|
+
const width = colorTexture.getWidth();
|
|
187
|
+
const height = colorTexture.getHeight();
|
|
188
|
+
const values = {
|
|
189
|
+
...util_1.QuadValues,
|
|
190
|
+
tColor: mol_util_1.ValueCell.create(colorTexture),
|
|
191
|
+
tEmissive: mol_util_1.ValueCell.create(emissiveTexture),
|
|
192
|
+
tDepth: mol_util_1.ValueCell.create(depthTexture),
|
|
193
|
+
uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)),
|
|
194
|
+
uDefaultColor: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec3)()),
|
|
195
|
+
uDefaultOpacity: mol_util_1.ValueCell.create(0),
|
|
196
|
+
uLuminosityThreshold: mol_util_1.ValueCell.create(0),
|
|
197
|
+
uSmoothWidth: mol_util_1.ValueCell.create(1),
|
|
198
|
+
dMode: mol_util_1.ValueCell.create('emissive'),
|
|
199
|
+
};
|
|
200
|
+
const schema = { ...LuminositySchema };
|
|
201
|
+
const renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', LuminosityShaderCode, schema, values);
|
|
202
|
+
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
203
|
+
}
|
|
204
|
+
//
|
|
205
|
+
function _getBlurCoefficients(kernelRadius) {
|
|
206
|
+
const coefficients = [];
|
|
207
|
+
for (let i = 0; i < kernelRadius; ++i) {
|
|
208
|
+
coefficients.push(0.39894 * Math.exp(-0.5 * i * i / (kernelRadius * kernelRadius)) / kernelRadius);
|
|
209
|
+
}
|
|
210
|
+
return coefficients;
|
|
211
|
+
}
|
|
212
|
+
const getBlurCoefficients = (0, memoize_1.memoize1)(_getBlurCoefficients);
|
|
213
|
+
const BlurKernelSizes = [3, 5, 7, 9, 11];
|
|
214
|
+
const BlurDirectionX = linear_algebra_1.Vec2.create(1, 0);
|
|
215
|
+
const BlurDirectionY = linear_algebra_1.Vec2.create(0, 1);
|
|
216
|
+
const BlurSchema = {
|
|
217
|
+
...util_1.QuadSchema,
|
|
218
|
+
tInput: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
219
|
+
uTexSizeInv: (0, schema_1.UniformSpec)('v2'),
|
|
220
|
+
uDirection: (0, schema_1.UniformSpec)('v2'),
|
|
221
|
+
uGaussianCoefficients: (0, schema_1.UniformSpec)('f[]'),
|
|
222
|
+
dKernelRadius: (0, schema_1.DefineSpec)('number'),
|
|
223
|
+
};
|
|
224
|
+
const BlurShaderCode = (0, shader_code_1.ShaderCode)('Bloom Blur', quad_vert_1.quad_vert, blur_frag_1.blur_frag);
|
|
225
|
+
function getBlurRenderable(ctx, inputTexture) {
|
|
226
|
+
const width = inputTexture.getWidth();
|
|
227
|
+
const height = inputTexture.getHeight();
|
|
228
|
+
const values = {
|
|
229
|
+
...util_1.QuadValues,
|
|
230
|
+
tInput: mol_util_1.ValueCell.create(inputTexture),
|
|
231
|
+
uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)),
|
|
232
|
+
uDirection: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec2)()),
|
|
233
|
+
uGaussianCoefficients: mol_util_1.ValueCell.create([]),
|
|
234
|
+
dKernelRadius: mol_util_1.ValueCell.create(BlurKernelSizes[0]),
|
|
235
|
+
};
|
|
236
|
+
const schema = { ...BlurSchema };
|
|
237
|
+
const renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', BlurShaderCode, schema, values);
|
|
238
|
+
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
239
|
+
}
|
|
240
|
+
//
|
|
241
|
+
const CompositeSchema = {
|
|
242
|
+
...util_1.QuadSchema,
|
|
243
|
+
tBlur1: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
244
|
+
tBlur2: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
245
|
+
tBlur3: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
246
|
+
tBlur4: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
247
|
+
tBlur5: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'),
|
|
248
|
+
uTexSizeInv: (0, schema_1.UniformSpec)('v2'),
|
|
249
|
+
uBloomStrength: (0, schema_1.UniformSpec)('f'),
|
|
250
|
+
uBloomRadius: (0, schema_1.UniformSpec)('f'),
|
|
251
|
+
uBloomFactors: (0, schema_1.UniformSpec)('f[]'),
|
|
252
|
+
uBloomTints: (0, schema_1.UniformSpec)('v3[]'),
|
|
253
|
+
};
|
|
254
|
+
const CompositeShaderCode = (0, shader_code_1.ShaderCode)('Bloom Composite', quad_vert_1.quad_vert, composite_frag_1.composite_frag);
|
|
255
|
+
function getCompositeRenderable(ctx, width, height, blurTexture1, blurTexture2, blurTexture3, blurTexture4, blurTexture5) {
|
|
256
|
+
const values = {
|
|
257
|
+
...util_1.QuadValues,
|
|
258
|
+
uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(width, height)),
|
|
259
|
+
tBlur1: mol_util_1.ValueCell.create(blurTexture1),
|
|
260
|
+
tBlur2: mol_util_1.ValueCell.create(blurTexture2),
|
|
261
|
+
tBlur3: mol_util_1.ValueCell.create(blurTexture3),
|
|
262
|
+
tBlur4: mol_util_1.ValueCell.create(blurTexture4),
|
|
263
|
+
tBlur5: mol_util_1.ValueCell.create(blurTexture5),
|
|
264
|
+
uBloomStrength: mol_util_1.ValueCell.create(1),
|
|
265
|
+
uBloomRadius: mol_util_1.ValueCell.create(0),
|
|
266
|
+
uBloomFactors: mol_util_1.ValueCell.create([1.0, 0.8, 0.6, 0.4, 0.2]),
|
|
267
|
+
uBloomTints: mol_util_1.ValueCell.create(new Array(5 * 3).fill(1)),
|
|
268
|
+
};
|
|
269
|
+
const schema = { ...CompositeSchema };
|
|
270
|
+
const renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', CompositeShaderCode, schema, values);
|
|
271
|
+
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
272
|
+
}
|
|
@@ -165,14 +165,16 @@ class DpoitPass {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
static isSupported(webgl) {
|
|
168
|
-
const { extensions: { drawBuffers, textureFloat, colorBufferFloat, blendMinMax } } = webgl;
|
|
169
|
-
if (!textureFloat || !colorBufferFloat || !drawBuffers || !blendMinMax) {
|
|
168
|
+
const { extensions: { drawBuffers, textureFloat, colorBufferFloat, depthTexture, blendMinMax } } = webgl;
|
|
169
|
+
if (!textureFloat || !colorBufferFloat || !depthTexture || !drawBuffers || !blendMinMax) {
|
|
170
170
|
if (debug_1.isDebugMode) {
|
|
171
171
|
const missing = [];
|
|
172
172
|
if (!textureFloat)
|
|
173
173
|
missing.push('textureFloat');
|
|
174
174
|
if (!colorBufferFloat)
|
|
175
175
|
missing.push('colorBufferFloat');
|
|
176
|
+
if (!depthTexture)
|
|
177
|
+
missing.push('depthTexture');
|
|
176
178
|
if (!drawBuffers)
|
|
177
179
|
missing.push('drawBuffers');
|
|
178
180
|
if (!blendMinMax)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2024 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 Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
|
|
@@ -13,9 +13,12 @@ import { Texture } from '../../mol-gl/webgl/texture';
|
|
|
13
13
|
import { Camera } from '../camera';
|
|
14
14
|
import { Helper } from '../helper/helper';
|
|
15
15
|
import { StereoCamera } from '../camera/stereo';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { WboitPass } from './wboit';
|
|
17
|
+
import { DpoitPass } from './dpoit';
|
|
18
|
+
import { AntialiasingPass, PostprocessingPass, PostprocessingProps } from './postprocessing';
|
|
19
|
+
import { MarkingPass, MarkingProps } from './marking';
|
|
18
20
|
import { AssetManager } from '../../mol-util/assets';
|
|
21
|
+
import { BloomPass } from './bloom';
|
|
19
22
|
type Props = {
|
|
20
23
|
postprocessing: PostprocessingProps;
|
|
21
24
|
marking: MarkingProps;
|
|
@@ -40,11 +43,12 @@ export declare class DrawPass {
|
|
|
40
43
|
private depthTargetOpaque;
|
|
41
44
|
private copyFboTarget;
|
|
42
45
|
private copyFboPostprocessing;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
readonly wboit: WboitPass;
|
|
47
|
+
readonly dpoit: DpoitPass;
|
|
48
|
+
readonly marking: MarkingPass;
|
|
46
49
|
readonly postprocessing: PostprocessingPass;
|
|
47
|
-
|
|
50
|
+
readonly antialiasing: AntialiasingPass;
|
|
51
|
+
readonly bloom: BloomPass;
|
|
48
52
|
private transparencyMode;
|
|
49
53
|
setTransparency(transparency: 'wboit' | 'dpoit' | 'blended'): void;
|
|
50
54
|
get transparency(): TransparencyMode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2019-
|
|
3
|
+
* Copyright (c) 2019-2024 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 Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
|
|
@@ -18,13 +18,20 @@ const postprocessing_1 = require("./postprocessing");
|
|
|
18
18
|
const marking_1 = require("./marking");
|
|
19
19
|
const util_1 = require("../../mol-gl/compute/util");
|
|
20
20
|
const debug_1 = require("../../mol-util/debug");
|
|
21
|
+
const bloom_1 = require("./bloom");
|
|
21
22
|
class DrawPass {
|
|
22
23
|
setTransparency(transparency) {
|
|
23
24
|
if (transparency === 'wboit') {
|
|
24
25
|
this.transparencyMode = this.wboit.supported ? 'wboit' : 'blended';
|
|
26
|
+
if (debug_1.isDebugMode && !this.wboit.supported) {
|
|
27
|
+
console.log('Missing "wboit" support, falling back to "blended".');
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
else if (transparency === 'dpoit') {
|
|
27
31
|
this.transparencyMode = this.dpoit.supported ? 'dpoit' : 'blended';
|
|
32
|
+
if (debug_1.isDebugMode && !this.dpoit.supported) {
|
|
33
|
+
console.log('Missing "dpoit" support, falling back to "blended".');
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
else {
|
|
30
37
|
this.transparencyMode = 'blended';
|
|
@@ -52,7 +59,8 @@ class DrawPass {
|
|
|
52
59
|
this.dpoit = new dpoit_1.DpoitPass(webgl, width, height);
|
|
53
60
|
this.marking = new marking_1.MarkingPass(webgl, width, height);
|
|
54
61
|
this.postprocessing = new postprocessing_1.PostprocessingPass(webgl, assetManager, this);
|
|
55
|
-
this.antialiasing = new postprocessing_1.AntialiasingPass(webgl,
|
|
62
|
+
this.antialiasing = new postprocessing_1.AntialiasingPass(webgl, width, height);
|
|
63
|
+
this.bloom = new bloom_1.BloomPass(webgl, width, height);
|
|
56
64
|
this.copyFboTarget = (0, util_1.createCopyRenderable)(webgl, this.colorTarget.texture);
|
|
57
65
|
this.copyFboPostprocessing = (0, util_1.createCopyRenderable)(webgl, this.postprocessing.target.texture);
|
|
58
66
|
this.setTransparency(transparency);
|
|
@@ -85,6 +93,7 @@ class DrawPass {
|
|
|
85
93
|
this.marking.setSize(width, height);
|
|
86
94
|
this.postprocessing.setSize(width, height);
|
|
87
95
|
this.antialiasing.setSize(width, height);
|
|
96
|
+
this.bloom.setSize(width, height);
|
|
88
97
|
}
|
|
89
98
|
_renderDpoit(renderer, camera, scene, iterations, transparentBackground, postprocessingProps) {
|
|
90
99
|
if (!this.dpoit.supported)
|
|
@@ -242,6 +251,7 @@ class DrawPass {
|
|
|
242
251
|
}
|
|
243
252
|
}
|
|
244
253
|
_render(renderer, camera, scene, helper, toDrawingBuffer, transparentBackground, props) {
|
|
254
|
+
var _a;
|
|
245
255
|
const volumeRendering = scene.volumes.renderables.length > 0;
|
|
246
256
|
const postprocessingEnabled = postprocessing_1.PostprocessingPass.isEnabled(props.postprocessing);
|
|
247
257
|
const antialiasingEnabled = postprocessing_1.AntialiasingPass.isEnabled(props.postprocessing);
|
|
@@ -299,7 +309,10 @@ class DrawPass {
|
|
|
299
309
|
renderer.renderBlended(helper.camera.scene, helper.camera.camera);
|
|
300
310
|
}
|
|
301
311
|
if (antialiasingEnabled) {
|
|
302
|
-
|
|
312
|
+
const input = postprocessing_1.PostprocessingPass.isEnabled(props.postprocessing)
|
|
313
|
+
? this.postprocessing.target.texture
|
|
314
|
+
: this.colorTarget.texture;
|
|
315
|
+
this.antialiasing.render(camera, input, toDrawingBuffer, props.postprocessing);
|
|
303
316
|
}
|
|
304
317
|
else if (toDrawingBuffer) {
|
|
305
318
|
this.drawTarget.bind();
|
|
@@ -311,6 +324,19 @@ class DrawPass {
|
|
|
311
324
|
this.copyFboTarget.render();
|
|
312
325
|
}
|
|
313
326
|
}
|
|
327
|
+
if (props.postprocessing.bloom.name === 'on') {
|
|
328
|
+
const emissiveBloom = props.postprocessing.bloom.params.mode === 'emissive';
|
|
329
|
+
if (emissiveBloom && scene.emissiveAverage > 0) {
|
|
330
|
+
this.bloom.emissiveTarget.bind();
|
|
331
|
+
renderer.clear(false, true);
|
|
332
|
+
renderer.update(camera, scene);
|
|
333
|
+
renderer.renderEmissive(scene.primitives, camera, null);
|
|
334
|
+
}
|
|
335
|
+
if (!emissiveBloom || scene.emissiveAverage > 0) {
|
|
336
|
+
this.bloom.update(this.colorTarget.texture, this.bloom.emissiveTarget.texture, ((_a = this.depthTargetOpaque) === null || _a === void 0 ? void 0 : _a.texture) || this.depthTextureOpaque, props.postprocessing.bloom.params);
|
|
337
|
+
this.bloom.render(camera.viewport, toDrawingBuffer ? undefined : this.getColorTarget(props.postprocessing));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
314
340
|
this.webgl.gl.flush();
|
|
315
341
|
}
|
|
316
342
|
render(ctx, props, toDrawingBuffer) {
|
|
@@ -58,6 +58,12 @@ export declare const ImageParams: {
|
|
|
58
58
|
background: PD.Normalize<{
|
|
59
59
|
variant: any;
|
|
60
60
|
}>;
|
|
61
|
+
bloom: PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
62
|
+
strength: any;
|
|
63
|
+
radius: any;
|
|
64
|
+
threshold: any;
|
|
65
|
+
mode: any;
|
|
66
|
+
}>, "on">;
|
|
61
67
|
}>>;
|
|
62
68
|
marking: PD.Group<PD.Normalize<{
|
|
63
69
|
enabled: boolean;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2024 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 Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
|
|
6
6
|
* @author Ludovic Autin <ludovic.autin@gmail.com>
|
|
7
7
|
*/
|
|
8
|
+
import { TextureSpec, Values, UniformSpec, DefineSpec } from '../../mol-gl/renderable/schema';
|
|
8
9
|
import { WebGLContext } from '../../mol-gl/webgl/context';
|
|
10
|
+
import { Texture } from '../../mol-gl/webgl/texture';
|
|
11
|
+
import { ComputeRenderable } from '../../mol-gl/renderable';
|
|
9
12
|
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
10
13
|
import { RenderTarget } from '../../mol-gl/webgl/render-target';
|
|
11
14
|
import { DrawPass } from './draw';
|
|
@@ -14,6 +17,23 @@ import { Color } from '../../mol-util/color';
|
|
|
14
17
|
import { BackgroundPass } from './background';
|
|
15
18
|
import { AssetManager } from '../../mol-util/assets';
|
|
16
19
|
import { Light } from '../../mol-gl/renderer';
|
|
20
|
+
export declare const OutlinesSchema: {
|
|
21
|
+
tDepthOpaque: TextureSpec<"texture">;
|
|
22
|
+
tDepthTransparent: TextureSpec<"texture">;
|
|
23
|
+
uTexSize: UniformSpec<"v2">;
|
|
24
|
+
dOrthographic: DefineSpec<"number">;
|
|
25
|
+
uNear: UniformSpec<"f">;
|
|
26
|
+
uFar: UniformSpec<"f">;
|
|
27
|
+
uInvProjection: UniformSpec<"m4">;
|
|
28
|
+
uOutlineThreshold: UniformSpec<"f">;
|
|
29
|
+
dTransparentOutline: DefineSpec<"boolean">;
|
|
30
|
+
drawCount: import("../../mol-gl/renderable/schema").ValueSpec<"number">;
|
|
31
|
+
instanceCount: import("../../mol-gl/renderable/schema").ValueSpec<"number">;
|
|
32
|
+
aPosition: import("../../mol-gl/renderable/schema").AttributeSpec<"float32">;
|
|
33
|
+
uQuadScale: UniformSpec<"v2">;
|
|
34
|
+
};
|
|
35
|
+
export type OutlinesRenderable = ComputeRenderable<Values<typeof OutlinesSchema>>;
|
|
36
|
+
export declare function getOutlinesRenderable(ctx: WebGLContext, depthTextureOpaque: Texture, depthTextureTransparent: Texture, transparentOutline: boolean): OutlinesRenderable;
|
|
17
37
|
export declare const PostprocessingParams: {
|
|
18
38
|
occlusion: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
19
39
|
samples: number;
|
|
@@ -72,6 +92,7 @@ export declare const PostprocessingParams: {
|
|
|
72
92
|
lightness: any;
|
|
73
93
|
faces: any;
|
|
74
94
|
blur: any;
|
|
95
|
+
rotation: any;
|
|
75
96
|
}>, "skybox"> | PD.NamedParams<PD.Normalize<{
|
|
76
97
|
topColor: any;
|
|
77
98
|
bottomColor: any;
|
|
@@ -79,6 +100,12 @@ export declare const PostprocessingParams: {
|
|
|
79
100
|
coverage: any;
|
|
80
101
|
}>, "horizontalGradient">;
|
|
81
102
|
}>>;
|
|
103
|
+
bloom: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
104
|
+
strength: number;
|
|
105
|
+
radius: number;
|
|
106
|
+
threshold: number;
|
|
107
|
+
mode: "luminosity" | "emissive";
|
|
108
|
+
}>, "on">>;
|
|
82
109
|
};
|
|
83
110
|
export type PostprocessingProps = PD.Values<typeof PostprocessingParams>;
|
|
84
111
|
export declare class PostprocessingPass {
|
|
@@ -115,7 +142,7 @@ export declare class PostprocessingPass {
|
|
|
115
142
|
readonly background: BackgroundPass;
|
|
116
143
|
constructor(webgl: WebGLContext, assetManager: AssetManager, drawPass: DrawPass);
|
|
117
144
|
setSize(width: number, height: number): void;
|
|
118
|
-
|
|
145
|
+
updateState(camera: ICamera, transparentBackground: boolean, backgroundColor: Color, props: PostprocessingProps, light: Light): void;
|
|
119
146
|
private occlusionOffset;
|
|
120
147
|
setOcclusionOffset(x: number, y: number): void;
|
|
121
148
|
private transparentBackground;
|
|
@@ -123,18 +150,17 @@ export declare class PostprocessingPass {
|
|
|
123
150
|
render(camera: ICamera, toDrawingBuffer: boolean, transparentBackground: boolean, backgroundColor: Color, props: PostprocessingProps, light: Light): void;
|
|
124
151
|
}
|
|
125
152
|
export declare class AntialiasingPass {
|
|
126
|
-
private drawPass;
|
|
127
153
|
static isEnabled(props: PostprocessingProps): boolean;
|
|
128
154
|
readonly target: RenderTarget;
|
|
129
155
|
private readonly internalTarget;
|
|
130
156
|
private readonly fxaa;
|
|
131
157
|
private readonly smaa;
|
|
132
158
|
private readonly cas;
|
|
133
|
-
constructor(webgl: WebGLContext,
|
|
159
|
+
constructor(webgl: WebGLContext, width: number, height: number);
|
|
134
160
|
setSize(width: number, height: number): void;
|
|
135
161
|
private _renderFxaa;
|
|
136
162
|
private _renderSmaa;
|
|
137
163
|
private _renderAntialiasing;
|
|
138
164
|
private _renderCas;
|
|
139
|
-
render(camera: ICamera, toDrawingBuffer: boolean, props: PostprocessingProps): void;
|
|
165
|
+
render(camera: ICamera, input: Texture, toDrawingBuffer: boolean | RenderTarget, props: PostprocessingProps): void;
|
|
140
166
|
}
|