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
|
@@ -1,109 +1,108 @@
|
|
|
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 Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
7
|
+
* @author Ludovic Autin <ludovic.autin@gmail.com>
|
|
7
8
|
*/
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.ssaoBlur_frag = void 0;
|
|
10
|
-
exports.ssaoBlur_frag = `
|
|
11
|
-
precision highp float;
|
|
12
|
-
precision highp int;
|
|
13
|
-
precision highp sampler2D;
|
|
14
|
-
|
|
15
|
-
uniform sampler2D tSsaoDepth;
|
|
16
|
-
uniform vec2 uTexSize;
|
|
17
|
-
uniform vec4 uBounds;
|
|
18
|
-
|
|
19
|
-
uniform float uKernel[dOcclusionKernelSize];
|
|
20
|
-
|
|
21
|
-
uniform float uBlurDirectionX;
|
|
22
|
-
uniform float uBlurDirectionY;
|
|
23
|
-
|
|
24
|
-
uniform mat4 uInvProjection;
|
|
25
|
-
uniform float uNear;
|
|
26
|
-
uniform float uFar;
|
|
27
|
-
|
|
28
|
-
#include common
|
|
29
|
-
|
|
30
|
-
float getViewZ(const in float depth) {
|
|
31
|
-
#if dOrthographic == 1
|
|
32
|
-
return orthographicDepthToViewZ(depth, uNear, uFar);
|
|
33
|
-
#else
|
|
34
|
-
return perspectiveDepthToViewZ(depth, uNear, uFar);
|
|
35
|
-
#endif
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
bool isBackground(const in float depth) {
|
|
39
|
-
return depth == 1.0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
bool outsideBounds(const in vec2 p) {
|
|
43
|
-
return p.x < uBounds.x || p.y < uBounds.y || p.x > uBounds.z || p.y > uBounds.w;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
float getPixelSize(const in vec2 coords, const in float depth) {
|
|
47
|
-
vec3 viewPos0 = screenSpaceToViewSpace(vec3(coords, depth), uInvProjection);
|
|
48
|
-
vec3 viewPos1 = screenSpaceToViewSpace(vec3(coords + vec2(1.0, 0.0) / uTexSize, depth), uInvProjection);
|
|
49
|
-
return distance(viewPos0, viewPos1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
void main(void) {
|
|
53
|
-
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
54
|
-
|
|
55
|
-
vec2 packedDepth = texture2D(tSsaoDepth, coords).zw;
|
|
56
|
-
|
|
57
|
-
if (outsideBounds(coords)) {
|
|
58
|
-
gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
float selfDepth = unpackRGToUnitInterval(packedDepth);
|
|
63
|
-
// if background and if second pass
|
|
64
|
-
if (isBackground(selfDepth) && uBlurDirectionY != 0.0) {
|
|
65
|
-
gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
float selfViewZ = getViewZ(selfDepth);
|
|
70
|
-
float pixelSize = getPixelSize(coords, selfDepth);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
float
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
float
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
gl_FragColor = vec4(packUnitIntervalToRG(sum / kernelSum), packedDepth);
|
|
108
|
-
}
|
|
11
|
+
exports.ssaoBlur_frag = `
|
|
12
|
+
precision highp float;
|
|
13
|
+
precision highp int;
|
|
14
|
+
precision highp sampler2D;
|
|
15
|
+
|
|
16
|
+
uniform sampler2D tSsaoDepth;
|
|
17
|
+
uniform vec2 uTexSize;
|
|
18
|
+
uniform vec4 uBounds;
|
|
19
|
+
|
|
20
|
+
uniform float uKernel[dOcclusionKernelSize];
|
|
21
|
+
|
|
22
|
+
uniform float uBlurDirectionX;
|
|
23
|
+
uniform float uBlurDirectionY;
|
|
24
|
+
|
|
25
|
+
uniform mat4 uInvProjection;
|
|
26
|
+
uniform float uNear;
|
|
27
|
+
uniform float uFar;
|
|
28
|
+
|
|
29
|
+
#include common
|
|
30
|
+
|
|
31
|
+
float getViewZ(const in float depth) {
|
|
32
|
+
#if dOrthographic == 1
|
|
33
|
+
return orthographicDepthToViewZ(depth, uNear, uFar);
|
|
34
|
+
#else
|
|
35
|
+
return perspectiveDepthToViewZ(depth, uNear, uFar);
|
|
36
|
+
#endif
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
bool isBackground(const in float depth) {
|
|
40
|
+
return depth == 1.0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
bool outsideBounds(const in vec2 p) {
|
|
44
|
+
return p.x < uBounds.x || p.y < uBounds.y || p.x > uBounds.z || p.y > uBounds.w;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
float getPixelSize(const in vec2 coords, const in float depth) {
|
|
48
|
+
vec3 viewPos0 = screenSpaceToViewSpace(vec3(coords, depth), uInvProjection);
|
|
49
|
+
vec3 viewPos1 = screenSpaceToViewSpace(vec3(coords + vec2(1.0, 0.0) / uTexSize, depth), uInvProjection);
|
|
50
|
+
return distance(viewPos0, viewPos1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void main(void) {
|
|
54
|
+
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
55
|
+
|
|
56
|
+
vec2 packedDepth = texture2D(tSsaoDepth, coords).zw;
|
|
57
|
+
|
|
58
|
+
if (outsideBounds(coords)) {
|
|
59
|
+
gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
float selfDepth = unpackRGToUnitInterval(packedDepth);
|
|
64
|
+
// if background and if second pass
|
|
65
|
+
if (isBackground(selfDepth) && uBlurDirectionY != 0.0) {
|
|
66
|
+
gl_FragColor = vec4(packUnitIntervalToRG(1.0), packedDepth);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
float selfViewZ = getViewZ(selfDepth);
|
|
71
|
+
float pixelSize = getPixelSize(coords, selfDepth);
|
|
72
|
+
// max diff depth between two pixels
|
|
73
|
+
float maxDiffViewZ = 1.0;
|
|
74
|
+
|
|
75
|
+
vec2 offset = vec2(uBlurDirectionX, uBlurDirectionY) / uTexSize;
|
|
76
|
+
|
|
77
|
+
float sum = 0.0;
|
|
78
|
+
float kernelSum = 0.0;
|
|
79
|
+
// only if kernelSize is odd
|
|
80
|
+
for (int i = -dOcclusionKernelSize / 2; i <= dOcclusionKernelSize / 2; i++) {
|
|
81
|
+
if (abs(float(i)) > 1.0 && abs(float(i)) * pixelSize > 0.8) continue;
|
|
82
|
+
|
|
83
|
+
vec2 sampleCoords = coords + float(i) * offset;
|
|
84
|
+
if (outsideBounds(sampleCoords)) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
vec4 sampleSsaoDepth = texture2D(tSsaoDepth, sampleCoords);
|
|
89
|
+
|
|
90
|
+
float sampleDepth = unpackRGToUnitInterval(sampleSsaoDepth.zw);
|
|
91
|
+
if (isBackground(sampleDepth)) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
float sampleViewZ = getViewZ(sampleDepth);
|
|
96
|
+
if (abs(selfViewZ - sampleViewZ) > maxDiffViewZ) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
float kernel = uKernel[int(abs(float(i)))]; // abs is not defined for int in webgl1
|
|
101
|
+
float sampleValue = unpackRGToUnitInterval(sampleSsaoDepth.xy);
|
|
102
|
+
|
|
103
|
+
sum += kernel * sampleValue;
|
|
104
|
+
kernelSum += kernel;
|
|
105
|
+
}
|
|
106
|
+
gl_FragColor = vec4(packUnitIntervalToRG(sum / kernelSum), packedDepth);
|
|
107
|
+
}
|
|
109
108
|
`;
|
|
@@ -1,7 +1,8 @@
|
|
|
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
|
+
* @author Ludovic Autin <ludovic.autin@gmail.com>
|
|
6
7
|
*/
|
|
7
|
-
export declare const ssao_frag = "\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#include common\n\nuniform sampler2D tDepth;\nuniform sampler2D tDepthHalf;\nuniform sampler2D tDepthQuarter;\nuniform vec2 uTexSize;\nuniform vec4 uBounds;\n\nuniform vec3 uSamples[dNSamples];\n\nuniform mat4 uProjection;\nuniform mat4 uInvProjection;\n\n#ifdef dMultiScale\n uniform float uLevelRadius[dLevels];\n uniform float uLevelBias[dLevels];\n uniform float uNearThreshold;\n uniform float uFarThreshold;\n#else\n uniform float uRadius;\n#endif\nuniform float uBias;\n\nfloat smootherstep(float edge0, float edge1, float x) {\n x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);\n}\n\nfloat noise(const in vec2 coords) {\n float a = 12.9898;\n float b = 78.233;\n float c = 43758.5453;\n float dt = dot(coords, vec2(a,b));\n float sn = mod(dt, PI);\n return abs(fract(sin(sn) * c)); // is abs necessary?\n}\n\nvec2 getNoiseVec2(const in vec2 coords) {\n return vec2(noise(coords), noise(coords + vec2(PI, 2.71828)));\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nfloat getDepth(const in vec2 coords) {\n vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));\n #ifdef depthTextureSupport\n return texture2D(tDepth, c).r;\n #else\n return unpackRGBAToDepth(texture2D(tDepth, c));\n #endif\n}\n\n#define dQuarterThreshold 0.1\n#define dHalfThreshold 0.05\n\nfloat getMappedDepth(const in vec2 coords, const in vec2 selfCoords) {\n vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));\n float d = distance(coords, selfCoords);\n #ifdef depthTextureSupport\n if (d > dQuarterThreshold) {\n return texture2D(tDepthQuarter, c).r;\n } else if (d > dHalfThreshold) {\n return texture2D(tDepthHalf, c).r;\n } else {\n return texture2D(tDepth, c).r;\n }\n #else\n if (d > dQuarterThreshold) {\n return unpackRGBAToDepth(texture2D(tDepthQuarter, c));\n } else if (d > dHalfThreshold) {\n return unpackRGBAToDepth(texture2D(tDepthHalf, c));\n } else {\n return unpackRGBAToDepth(texture2D(tDepth, c));\n }\n #endif\n}\n\nvec3
|
|
8
|
+
export declare const ssao_frag = "\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\n\n#include common\n\nuniform sampler2D tDepth;\nuniform sampler2D tDepthHalf;\nuniform sampler2D tDepthQuarter;\nuniform vec2 uTexSize;\nuniform vec4 uBounds;\n\nuniform vec3 uSamples[dNSamples];\n\nuniform mat4 uProjection;\nuniform mat4 uInvProjection;\n\n#ifdef dMultiScale\n uniform float uLevelRadius[dLevels];\n uniform float uLevelBias[dLevels];\n uniform float uNearThreshold;\n uniform float uFarThreshold;\n#else\n uniform float uRadius;\n#endif\nuniform float uBias;\n\nfloat smootherstep(float edge0, float edge1, float x) {\n x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);\n}\n\nfloat noise(const in vec2 coords) {\n float a = 12.9898;\n float b = 78.233;\n float c = 43758.5453;\n float dt = dot(coords, vec2(a,b));\n float sn = mod(dt, PI);\n return abs(fract(sin(sn) * c)); // is abs necessary?\n}\n\nvec2 getNoiseVec2(const in vec2 coords) {\n return vec2(noise(coords), noise(coords + vec2(PI, 2.71828)));\n}\n\nbool isBackground(const in float depth) {\n return depth == 1.0;\n}\n\nfloat getDepth(const in vec2 coords) {\n vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));\n #ifdef depthTextureSupport\n return texture2D(tDepth, c).r;\n #else\n return unpackRGBAToDepth(texture2D(tDepth, c));\n #endif\n}\n\n#define dQuarterThreshold 0.1\n#define dHalfThreshold 0.05\n\nfloat getMappedDepth(const in vec2 coords, const in vec2 selfCoords) {\n vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));\n float d = distance(coords, selfCoords);\n #ifdef depthTextureSupport\n if (d > dQuarterThreshold) {\n return texture2D(tDepthQuarter, c).r;\n } else if (d > dHalfThreshold) {\n return texture2D(tDepthHalf, c).r;\n } else {\n return texture2D(tDepth, c).r;\n }\n #else\n if (d > dQuarterThreshold) {\n return unpackRGBAToDepth(texture2D(tDepthQuarter, c));\n } else if (d > dHalfThreshold) {\n return unpackRGBAToDepth(texture2D(tDepthHalf, c));\n } else {\n return unpackRGBAToDepth(texture2D(tDepth, c));\n }\n #endif\n}\n\n// adapted from https://gist.github.com/bgolus/a07ed65602c009d5e2f753826e8078a0\nvec3 viewNormalAtPixelPositionAccurate(vec2 vpos) {\n // current pixel's depth\n float c = getDepth(vpos);\n\n // get current pixel's view space position\n vec3 viewSpacePos_c = screenSpaceToViewSpace(vec3(vpos, c), uInvProjection);\n\n // get view space position at 1 pixel offsets in each major direction\n vec3 viewSpacePos_l = screenSpaceToViewSpace(vec3(vpos + vec2(-1.0, 0.0) / uTexSize, getDepth(vpos + vec2(-1.0, 0.0) / uTexSize)), uInvProjection);\n vec3 viewSpacePos_r = screenSpaceToViewSpace(vec3(vpos + vec2( 1.0, 0.0) / uTexSize, getDepth(vpos + vec2( 1.0, 0.0) / uTexSize)), uInvProjection);\n vec3 viewSpacePos_d = screenSpaceToViewSpace(vec3(vpos + vec2( 0.0,-1.0) / uTexSize, getDepth(vpos + vec2( 0.0,-1.0) / uTexSize)), uInvProjection);\n vec3 viewSpacePos_u = screenSpaceToViewSpace(vec3(vpos + vec2( 0.0, 1.0) / uTexSize, getDepth(vpos + vec2( 0.0, 1.0) / uTexSize)), uInvProjection);\n\n // get the difference between the current and each offset position\n vec3 l = viewSpacePos_c - viewSpacePos_l;\n vec3 r = viewSpacePos_r - viewSpacePos_c;\n vec3 d = viewSpacePos_c - viewSpacePos_d;\n vec3 u = viewSpacePos_u - viewSpacePos_c;\n\n // get depth values at 1 & 2 pixels offsets from current along the horizontal axis\n vec4 H = vec4(\n getDepth(vpos + vec2(-1.0, 0.0) / uTexSize),\n getDepth(vpos + vec2( 1.0, 0.0) / uTexSize),\n getDepth(vpos + vec2(-2.0, 0.0) / uTexSize),\n getDepth(vpos + vec2( 2.0, 0.0) / uTexSize)\n );\n\n // get depth values at 1 & 2 pixels offsets from current along the vertical axis\n vec4 V = vec4(\n getDepth(vpos + vec2(0.0,-1.0) / uTexSize),\n getDepth(vpos + vec2(0.0, 1.0) / uTexSize),\n getDepth(vpos + vec2(0.0,-2.0) / uTexSize),\n getDepth(vpos + vec2(0.0, 2.0) / uTexSize)\n );\n\n // current pixel's depth difference from slope of offset depth samples\n // differs from original article because we're using non-linear depth values\n // see article's comments\n vec2 he = abs((2.0 * H.xy - H.zw) - c);\n vec2 ve = abs((2.0 * V.xy - V.zw) - c);\n\n // pick horizontal and vertical diff with the smallest depth difference from slopes\n vec3 hDeriv = he.x < he.y ? l : r;\n vec3 vDeriv = ve.x < ve.y ? d : u;\n\n // get view space normal from the cross product of the best derivatives\n vec3 viewNormal = normalize(cross(hDeriv, vDeriv));\n\n return viewNormal;\n}\n\nfloat getPixelSize(const in vec2 coords, const in float depth) {\n vec3 viewPos0 = screenSpaceToViewSpace(vec3(coords, depth), uInvProjection);\n vec3 viewPos1 = screenSpaceToViewSpace(vec3(coords + vec2(1.0, 0.0) / uTexSize, depth), uInvProjection);\n return distance(viewPos0, viewPos1);\n}\n\n// StarCraft II Ambient Occlusion by [Filion and McNaughton 2008]\nvoid main(void) {\n vec2 invTexSize = 1.0 / uTexSize;\n vec2 selfCoords = gl_FragCoord.xy * invTexSize;\n\n float selfDepth = getDepth(selfCoords);\n vec2 selfPackedDepth = packUnitIntervalToRG(selfDepth);\n\n if (isBackground(selfDepth)) {\n gl_FragColor = vec4(packUnitIntervalToRG(1.0), selfPackedDepth);\n return;\n }\n\n vec3 selfViewNormal = viewNormalAtPixelPositionAccurate(selfCoords);\n vec3 selfViewPos = screenSpaceToViewSpace(vec3(selfCoords, selfDepth), uInvProjection);\n\n vec3 randomVec = normalize(vec3(getNoiseVec2(selfCoords) * 2.0 - 1.0, 0.0));\n vec3 tangent = normalize(randomVec - selfViewNormal * dot(randomVec, selfViewNormal));\n vec3 bitangent = cross(selfViewNormal, tangent);\n mat3 TBN = mat3(tangent, bitangent, selfViewNormal);\n\n float occlusion = 0.0;\n #ifdef dMultiScale\n float pixelSize = getPixelSize(selfCoords, selfDepth);\n\n for(int l = 0; l < dLevels; l++) {\n // TODO: smooth transition\n if (pixelSize * uNearThreshold > uLevelRadius[l]) continue;\n if (pixelSize * uFarThreshold < uLevelRadius[l]) continue;\n\n float levelOcclusion = 0.0;\n for(int i = 0; i < dNSamples; i++) {\n // get sample position:\n vec3 sampleViewPos = TBN * uSamples[i];\n sampleViewPos = selfViewPos + sampleViewPos * uLevelRadius[l];\n\n // project sample position:\n vec4 offset = vec4(sampleViewPos, 1.0);\n offset = uProjection * offset;\n offset.xyz = (offset.xyz / offset.w) * 0.5 + 0.5;\n\n // get sample depth:\n float sampleDepth = getMappedDepth(offset.xy, selfCoords);\n float sampleViewZ = screenSpaceToViewSpace(vec3(offset.xy, sampleDepth), uInvProjection).z;\n levelOcclusion += step(sampleViewPos.z + 0.025, sampleViewZ) * smootherstep(0.0, 1.0, uLevelRadius[l] / abs(selfViewPos.z - sampleViewZ)) * uLevelBias[l];\n }\n occlusion = max(occlusion, levelOcclusion);\n }\n #else\n for(int i = 0; i < dNSamples; i++) {\n vec3 sampleViewPos = TBN * uSamples[i];\n sampleViewPos = selfViewPos + sampleViewPos * uRadius;\n\n vec4 offset = vec4(sampleViewPos, 1.0);\n offset = uProjection * offset;\n offset.xyz = (offset.xyz / offset.w) * 0.5 + 0.5;\n\n float sampleDepth = getMappedDepth(offset.xy, selfCoords);\n float sampleViewZ = screenSpaceToViewSpace(vec3(offset.xy, sampleDepth), uInvProjection).z;\n\n occlusion += step(sampleViewPos.z + 0.025, sampleViewZ) * smootherstep(0.0, 1.0, uRadius / abs(selfViewPos.z - sampleViewZ));\n }\n #endif\n occlusion = 1.0 - (uBias * occlusion / float(dNSamples));\n\n vec2 packedOcclusion = packUnitIntervalToRG(clamp(occlusion, 0.01, 1.0));\n\n gl_FragColor = vec4(packedOcclusion, selfPackedDepth);\n}\n";
|
|
@@ -1,183 +1,222 @@
|
|
|
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>
|
|
7
|
+
* @author Ludovic Autin <ludovic.autin@gmail.com>
|
|
7
8
|
*/
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.ssao_frag = void 0;
|
|
10
|
-
exports.ssao_frag = `
|
|
11
|
-
precision highp float;
|
|
12
|
-
precision highp int;
|
|
13
|
-
precision highp sampler2D;
|
|
14
|
-
|
|
15
|
-
#include common
|
|
16
|
-
|
|
17
|
-
uniform sampler2D tDepth;
|
|
18
|
-
uniform sampler2D tDepthHalf;
|
|
19
|
-
uniform sampler2D tDepthQuarter;
|
|
20
|
-
uniform vec2 uTexSize;
|
|
21
|
-
uniform vec4 uBounds;
|
|
22
|
-
|
|
23
|
-
uniform vec3 uSamples[dNSamples];
|
|
24
|
-
|
|
25
|
-
uniform mat4 uProjection;
|
|
26
|
-
uniform mat4 uInvProjection;
|
|
27
|
-
|
|
28
|
-
#ifdef dMultiScale
|
|
29
|
-
uniform float uLevelRadius[dLevels];
|
|
30
|
-
uniform float uLevelBias[dLevels];
|
|
31
|
-
uniform float uNearThreshold;
|
|
32
|
-
uniform float uFarThreshold;
|
|
33
|
-
#else
|
|
34
|
-
uniform float uRadius;
|
|
35
|
-
#endif
|
|
36
|
-
uniform float uBias;
|
|
37
|
-
|
|
38
|
-
float smootherstep(float edge0, float edge1, float x) {
|
|
39
|
-
x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
|
|
40
|
-
return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
float noise(const in vec2 coords) {
|
|
44
|
-
float a = 12.9898;
|
|
45
|
-
float b = 78.233;
|
|
46
|
-
float c = 43758.5453;
|
|
47
|
-
float dt = dot(coords, vec2(a,b));
|
|
48
|
-
float sn = mod(dt, PI);
|
|
49
|
-
return abs(fract(sin(sn) * c)); // is abs necessary?
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
vec2 getNoiseVec2(const in vec2 coords) {
|
|
53
|
-
return vec2(noise(coords), noise(coords + vec2(PI, 2.71828)));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
bool isBackground(const in float depth) {
|
|
57
|
-
return depth == 1.0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
float getDepth(const in vec2 coords) {
|
|
61
|
-
vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));
|
|
62
|
-
#ifdef depthTextureSupport
|
|
63
|
-
return texture2D(tDepth, c).r;
|
|
64
|
-
#else
|
|
65
|
-
return unpackRGBAToDepth(texture2D(tDepth, c));
|
|
66
|
-
#endif
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
#define dQuarterThreshold 0.1
|
|
70
|
-
#define dHalfThreshold 0.05
|
|
71
|
-
|
|
72
|
-
float getMappedDepth(const in vec2 coords, const in vec2 selfCoords) {
|
|
73
|
-
vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));
|
|
74
|
-
float d = distance(coords, selfCoords);
|
|
75
|
-
#ifdef depthTextureSupport
|
|
76
|
-
if (d > dQuarterThreshold) {
|
|
77
|
-
return texture2D(tDepthQuarter, c).r;
|
|
78
|
-
} else if (d > dHalfThreshold) {
|
|
79
|
-
return texture2D(tDepthHalf, c).r;
|
|
80
|
-
} else {
|
|
81
|
-
return texture2D(tDepth, c).r;
|
|
82
|
-
}
|
|
83
|
-
#else
|
|
84
|
-
if (d > dQuarterThreshold) {
|
|
85
|
-
return unpackRGBAToDepth(texture2D(tDepthQuarter, c));
|
|
86
|
-
} else if (d > dHalfThreshold) {
|
|
87
|
-
return unpackRGBAToDepth(texture2D(tDepthHalf, c));
|
|
88
|
-
} else {
|
|
89
|
-
return unpackRGBAToDepth(texture2D(tDepth, c));
|
|
90
|
-
}
|
|
91
|
-
#endif
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
vec3
|
|
106
|
-
vec3
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
11
|
+
exports.ssao_frag = `
|
|
12
|
+
precision highp float;
|
|
13
|
+
precision highp int;
|
|
14
|
+
precision highp sampler2D;
|
|
15
|
+
|
|
16
|
+
#include common
|
|
17
|
+
|
|
18
|
+
uniform sampler2D tDepth;
|
|
19
|
+
uniform sampler2D tDepthHalf;
|
|
20
|
+
uniform sampler2D tDepthQuarter;
|
|
21
|
+
uniform vec2 uTexSize;
|
|
22
|
+
uniform vec4 uBounds;
|
|
23
|
+
|
|
24
|
+
uniform vec3 uSamples[dNSamples];
|
|
25
|
+
|
|
26
|
+
uniform mat4 uProjection;
|
|
27
|
+
uniform mat4 uInvProjection;
|
|
28
|
+
|
|
29
|
+
#ifdef dMultiScale
|
|
30
|
+
uniform float uLevelRadius[dLevels];
|
|
31
|
+
uniform float uLevelBias[dLevels];
|
|
32
|
+
uniform float uNearThreshold;
|
|
33
|
+
uniform float uFarThreshold;
|
|
34
|
+
#else
|
|
35
|
+
uniform float uRadius;
|
|
36
|
+
#endif
|
|
37
|
+
uniform float uBias;
|
|
38
|
+
|
|
39
|
+
float smootherstep(float edge0, float edge1, float x) {
|
|
40
|
+
x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
|
|
41
|
+
return x * x * x * (x * (x * 6.0 - 15.0) + 10.0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
float noise(const in vec2 coords) {
|
|
45
|
+
float a = 12.9898;
|
|
46
|
+
float b = 78.233;
|
|
47
|
+
float c = 43758.5453;
|
|
48
|
+
float dt = dot(coords, vec2(a,b));
|
|
49
|
+
float sn = mod(dt, PI);
|
|
50
|
+
return abs(fract(sin(sn) * c)); // is abs necessary?
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
vec2 getNoiseVec2(const in vec2 coords) {
|
|
54
|
+
return vec2(noise(coords), noise(coords + vec2(PI, 2.71828)));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
bool isBackground(const in float depth) {
|
|
58
|
+
return depth == 1.0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
float getDepth(const in vec2 coords) {
|
|
62
|
+
vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));
|
|
63
|
+
#ifdef depthTextureSupport
|
|
64
|
+
return texture2D(tDepth, c).r;
|
|
65
|
+
#else
|
|
66
|
+
return unpackRGBAToDepth(texture2D(tDepth, c));
|
|
67
|
+
#endif
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#define dQuarterThreshold 0.1
|
|
71
|
+
#define dHalfThreshold 0.05
|
|
72
|
+
|
|
73
|
+
float getMappedDepth(const in vec2 coords, const in vec2 selfCoords) {
|
|
74
|
+
vec2 c = vec2(clamp(coords.x, uBounds.x, uBounds.z), clamp(coords.y, uBounds.y, uBounds.w));
|
|
75
|
+
float d = distance(coords, selfCoords);
|
|
76
|
+
#ifdef depthTextureSupport
|
|
77
|
+
if (d > dQuarterThreshold) {
|
|
78
|
+
return texture2D(tDepthQuarter, c).r;
|
|
79
|
+
} else if (d > dHalfThreshold) {
|
|
80
|
+
return texture2D(tDepthHalf, c).r;
|
|
81
|
+
} else {
|
|
82
|
+
return texture2D(tDepth, c).r;
|
|
83
|
+
}
|
|
84
|
+
#else
|
|
85
|
+
if (d > dQuarterThreshold) {
|
|
86
|
+
return unpackRGBAToDepth(texture2D(tDepthQuarter, c));
|
|
87
|
+
} else if (d > dHalfThreshold) {
|
|
88
|
+
return unpackRGBAToDepth(texture2D(tDepthHalf, c));
|
|
89
|
+
} else {
|
|
90
|
+
return unpackRGBAToDepth(texture2D(tDepth, c));
|
|
91
|
+
}
|
|
92
|
+
#endif
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// adapted from https://gist.github.com/bgolus/a07ed65602c009d5e2f753826e8078a0
|
|
96
|
+
vec3 viewNormalAtPixelPositionAccurate(vec2 vpos) {
|
|
97
|
+
// current pixel's depth
|
|
98
|
+
float c = getDepth(vpos);
|
|
99
|
+
|
|
100
|
+
// get current pixel's view space position
|
|
101
|
+
vec3 viewSpacePos_c = screenSpaceToViewSpace(vec3(vpos, c), uInvProjection);
|
|
102
|
+
|
|
103
|
+
// get view space position at 1 pixel offsets in each major direction
|
|
104
|
+
vec3 viewSpacePos_l = screenSpaceToViewSpace(vec3(vpos + vec2(-1.0, 0.0) / uTexSize, getDepth(vpos + vec2(-1.0, 0.0) / uTexSize)), uInvProjection);
|
|
105
|
+
vec3 viewSpacePos_r = screenSpaceToViewSpace(vec3(vpos + vec2( 1.0, 0.0) / uTexSize, getDepth(vpos + vec2( 1.0, 0.0) / uTexSize)), uInvProjection);
|
|
106
|
+
vec3 viewSpacePos_d = screenSpaceToViewSpace(vec3(vpos + vec2( 0.0,-1.0) / uTexSize, getDepth(vpos + vec2( 0.0,-1.0) / uTexSize)), uInvProjection);
|
|
107
|
+
vec3 viewSpacePos_u = screenSpaceToViewSpace(vec3(vpos + vec2( 0.0, 1.0) / uTexSize, getDepth(vpos + vec2( 0.0, 1.0) / uTexSize)), uInvProjection);
|
|
108
|
+
|
|
109
|
+
// get the difference between the current and each offset position
|
|
110
|
+
vec3 l = viewSpacePos_c - viewSpacePos_l;
|
|
111
|
+
vec3 r = viewSpacePos_r - viewSpacePos_c;
|
|
112
|
+
vec3 d = viewSpacePos_c - viewSpacePos_d;
|
|
113
|
+
vec3 u = viewSpacePos_u - viewSpacePos_c;
|
|
114
|
+
|
|
115
|
+
// get depth values at 1 & 2 pixels offsets from current along the horizontal axis
|
|
116
|
+
vec4 H = vec4(
|
|
117
|
+
getDepth(vpos + vec2(-1.0, 0.0) / uTexSize),
|
|
118
|
+
getDepth(vpos + vec2( 1.0, 0.0) / uTexSize),
|
|
119
|
+
getDepth(vpos + vec2(-2.0, 0.0) / uTexSize),
|
|
120
|
+
getDepth(vpos + vec2( 2.0, 0.0) / uTexSize)
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// get depth values at 1 & 2 pixels offsets from current along the vertical axis
|
|
124
|
+
vec4 V = vec4(
|
|
125
|
+
getDepth(vpos + vec2(0.0,-1.0) / uTexSize),
|
|
126
|
+
getDepth(vpos + vec2(0.0, 1.0) / uTexSize),
|
|
127
|
+
getDepth(vpos + vec2(0.0,-2.0) / uTexSize),
|
|
128
|
+
getDepth(vpos + vec2(0.0, 2.0) / uTexSize)
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
// current pixel's depth difference from slope of offset depth samples
|
|
132
|
+
// differs from original article because we're using non-linear depth values
|
|
133
|
+
// see article's comments
|
|
134
|
+
vec2 he = abs((2.0 * H.xy - H.zw) - c);
|
|
135
|
+
vec2 ve = abs((2.0 * V.xy - V.zw) - c);
|
|
136
|
+
|
|
137
|
+
// pick horizontal and vertical diff with the smallest depth difference from slopes
|
|
138
|
+
vec3 hDeriv = he.x < he.y ? l : r;
|
|
139
|
+
vec3 vDeriv = ve.x < ve.y ? d : u;
|
|
140
|
+
|
|
141
|
+
// get view space normal from the cross product of the best derivatives
|
|
142
|
+
vec3 viewNormal = normalize(cross(hDeriv, vDeriv));
|
|
143
|
+
|
|
144
|
+
return viewNormal;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
float getPixelSize(const in vec2 coords, const in float depth) {
|
|
148
|
+
vec3 viewPos0 = screenSpaceToViewSpace(vec3(coords, depth), uInvProjection);
|
|
149
|
+
vec3 viewPos1 = screenSpaceToViewSpace(vec3(coords + vec2(1.0, 0.0) / uTexSize, depth), uInvProjection);
|
|
150
|
+
return distance(viewPos0, viewPos1);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// StarCraft II Ambient Occlusion by [Filion and McNaughton 2008]
|
|
154
|
+
void main(void) {
|
|
155
|
+
vec2 invTexSize = 1.0 / uTexSize;
|
|
156
|
+
vec2 selfCoords = gl_FragCoord.xy * invTexSize;
|
|
157
|
+
|
|
158
|
+
float selfDepth = getDepth(selfCoords);
|
|
159
|
+
vec2 selfPackedDepth = packUnitIntervalToRG(selfDepth);
|
|
160
|
+
|
|
161
|
+
if (isBackground(selfDepth)) {
|
|
162
|
+
gl_FragColor = vec4(packUnitIntervalToRG(1.0), selfPackedDepth);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
vec3 selfViewNormal = viewNormalAtPixelPositionAccurate(selfCoords);
|
|
167
|
+
vec3 selfViewPos = screenSpaceToViewSpace(vec3(selfCoords, selfDepth), uInvProjection);
|
|
168
|
+
|
|
169
|
+
vec3 randomVec = normalize(vec3(getNoiseVec2(selfCoords) * 2.0 - 1.0, 0.0));
|
|
170
|
+
vec3 tangent = normalize(randomVec - selfViewNormal * dot(randomVec, selfViewNormal));
|
|
171
|
+
vec3 bitangent = cross(selfViewNormal, tangent);
|
|
172
|
+
mat3 TBN = mat3(tangent, bitangent, selfViewNormal);
|
|
173
|
+
|
|
174
|
+
float occlusion = 0.0;
|
|
175
|
+
#ifdef dMultiScale
|
|
176
|
+
float pixelSize = getPixelSize(selfCoords, selfDepth);
|
|
177
|
+
|
|
178
|
+
for(int l = 0; l < dLevels; l++) {
|
|
179
|
+
// TODO: smooth transition
|
|
180
|
+
if (pixelSize * uNearThreshold > uLevelRadius[l]) continue;
|
|
181
|
+
if (pixelSize * uFarThreshold < uLevelRadius[l]) continue;
|
|
182
|
+
|
|
183
|
+
float levelOcclusion = 0.0;
|
|
184
|
+
for(int i = 0; i < dNSamples; i++) {
|
|
185
|
+
// get sample position:
|
|
186
|
+
vec3 sampleViewPos = TBN * uSamples[i];
|
|
187
|
+
sampleViewPos = selfViewPos + sampleViewPos * uLevelRadius[l];
|
|
188
|
+
|
|
189
|
+
// project sample position:
|
|
190
|
+
vec4 offset = vec4(sampleViewPos, 1.0);
|
|
191
|
+
offset = uProjection * offset;
|
|
192
|
+
offset.xyz = (offset.xyz / offset.w) * 0.5 + 0.5;
|
|
193
|
+
|
|
194
|
+
// get sample depth:
|
|
195
|
+
float sampleDepth = getMappedDepth(offset.xy, selfCoords);
|
|
196
|
+
float sampleViewZ = screenSpaceToViewSpace(vec3(offset.xy, sampleDepth), uInvProjection).z;
|
|
197
|
+
levelOcclusion += step(sampleViewPos.z + 0.025, sampleViewZ) * smootherstep(0.0, 1.0, uLevelRadius[l] / abs(selfViewPos.z - sampleViewZ)) * uLevelBias[l];
|
|
198
|
+
}
|
|
199
|
+
occlusion = max(occlusion, levelOcclusion);
|
|
200
|
+
}
|
|
201
|
+
#else
|
|
202
|
+
for(int i = 0; i < dNSamples; i++) {
|
|
203
|
+
vec3 sampleViewPos = TBN * uSamples[i];
|
|
204
|
+
sampleViewPos = selfViewPos + sampleViewPos * uRadius;
|
|
205
|
+
|
|
206
|
+
vec4 offset = vec4(sampleViewPos, 1.0);
|
|
207
|
+
offset = uProjection * offset;
|
|
208
|
+
offset.xyz = (offset.xyz / offset.w) * 0.5 + 0.5;
|
|
209
|
+
|
|
210
|
+
float sampleDepth = getMappedDepth(offset.xy, selfCoords);
|
|
211
|
+
float sampleViewZ = screenSpaceToViewSpace(vec3(offset.xy, sampleDepth), uInvProjection).z;
|
|
212
|
+
|
|
213
|
+
occlusion += step(sampleViewPos.z + 0.025, sampleViewZ) * smootherstep(0.0, 1.0, uRadius / abs(selfViewPos.z - sampleViewZ));
|
|
214
|
+
}
|
|
215
|
+
#endif
|
|
216
|
+
occlusion = 1.0 - (uBias * occlusion / float(dNSamples));
|
|
217
|
+
|
|
218
|
+
vec2 packedOcclusion = packUnitIntervalToRG(clamp(occlusion, 0.01, 1.0));
|
|
219
|
+
|
|
220
|
+
gl_FragColor = vec4(packedOcclusion, selfPackedDepth);
|
|
221
|
+
}
|
|
183
222
|
`;
|