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
|
@@ -7,45 +7,45 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.directVolume_vert = void 0;
|
|
10
|
-
exports.directVolume_vert = `
|
|
11
|
-
precision highp float;
|
|
12
|
-
|
|
13
|
-
attribute vec3 aPosition;
|
|
14
|
-
attribute mat4 aTransform;
|
|
15
|
-
attribute float aInstance;
|
|
16
|
-
|
|
17
|
-
uniform mat4 uModelView;
|
|
18
|
-
uniform mat4 uProjection;
|
|
19
|
-
uniform vec4 uInvariantBoundingSphere;
|
|
20
|
-
|
|
21
|
-
varying vec3 vOrigPos;
|
|
22
|
-
varying float vInstance;
|
|
23
|
-
varying vec4 vBoundingSphere;
|
|
24
|
-
varying mat4 vTransform;
|
|
25
|
-
|
|
26
|
-
uniform vec3 uBboxSize;
|
|
27
|
-
uniform vec3 uBboxMin;
|
|
28
|
-
uniform vec3 uBboxMax;
|
|
29
|
-
uniform vec3 uGridDim;
|
|
30
|
-
uniform mat4 uTransform;
|
|
31
|
-
|
|
32
|
-
uniform mat4 uUnitToCartn;
|
|
33
|
-
|
|
34
|
-
void main() {
|
|
35
|
-
vec4 unitCoord = vec4(aPosition + vec3(0.5), 1.0);
|
|
36
|
-
vec4 mvPosition = uModelView * aTransform * uUnitToCartn * unitCoord;
|
|
37
|
-
|
|
38
|
-
vOrigPos = (aTransform * uUnitToCartn * unitCoord).xyz;
|
|
39
|
-
vInstance = aInstance;
|
|
40
|
-
vBoundingSphere = vec4(
|
|
41
|
-
(aTransform * vec4(uInvariantBoundingSphere.xyz, 1.0)).xyz,
|
|
42
|
-
uInvariantBoundingSphere.w
|
|
43
|
-
);
|
|
44
|
-
vTransform = aTransform;
|
|
45
|
-
|
|
46
|
-
gl_Position = uProjection * mvPosition;
|
|
47
|
-
|
|
48
|
-
// move z position to near clip plane (but not too close to get precision issues)
|
|
49
|
-
gl_Position.z = gl_Position.w - 0.01;
|
|
50
|
-
}
|
|
10
|
+
exports.directVolume_vert = `
|
|
11
|
+
precision highp float;
|
|
12
|
+
|
|
13
|
+
attribute vec3 aPosition;
|
|
14
|
+
attribute mat4 aTransform;
|
|
15
|
+
attribute float aInstance;
|
|
16
|
+
|
|
17
|
+
uniform mat4 uModelView;
|
|
18
|
+
uniform mat4 uProjection;
|
|
19
|
+
uniform vec4 uInvariantBoundingSphere;
|
|
20
|
+
|
|
21
|
+
varying vec3 vOrigPos;
|
|
22
|
+
varying float vInstance;
|
|
23
|
+
varying vec4 vBoundingSphere;
|
|
24
|
+
varying mat4 vTransform;
|
|
25
|
+
|
|
26
|
+
uniform vec3 uBboxSize;
|
|
27
|
+
uniform vec3 uBboxMin;
|
|
28
|
+
uniform vec3 uBboxMax;
|
|
29
|
+
uniform vec3 uGridDim;
|
|
30
|
+
uniform mat4 uTransform;
|
|
31
|
+
|
|
32
|
+
uniform mat4 uUnitToCartn;
|
|
33
|
+
|
|
34
|
+
void main() {
|
|
35
|
+
vec4 unitCoord = vec4(aPosition + vec3(0.5), 1.0);
|
|
36
|
+
vec4 mvPosition = uModelView * aTransform * uUnitToCartn * unitCoord;
|
|
37
|
+
|
|
38
|
+
vOrigPos = (aTransform * uUnitToCartn * unitCoord).xyz;
|
|
39
|
+
vInstance = aInstance;
|
|
40
|
+
vBoundingSphere = vec4(
|
|
41
|
+
(aTransform * vec4(uInvariantBoundingSphere.xyz, 1.0)).xyz,
|
|
42
|
+
uInvariantBoundingSphere.w
|
|
43
|
+
);
|
|
44
|
+
vTransform = aTransform;
|
|
45
|
+
|
|
46
|
+
gl_Position = uProjection * mvPosition;
|
|
47
|
+
|
|
48
|
+
// move z position to near clip plane (but not too close to get precision issues)
|
|
49
|
+
gl_Position.z = gl_Position.w - 0.01;
|
|
50
|
+
}
|
|
51
51
|
`;
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.evaluateDpoit_frag = void 0;
|
|
9
|
-
exports.evaluateDpoit_frag = `
|
|
10
|
-
precision highp float;
|
|
11
|
-
|
|
12
|
-
uniform sampler2D tDpoitFrontColor;
|
|
13
|
-
uniform vec2 uTexSize;
|
|
14
|
-
|
|
15
|
-
void main() {
|
|
16
|
-
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
17
|
-
gl_FragColor = texture2D(tDpoitFrontColor, coords);
|
|
18
|
-
}
|
|
9
|
+
exports.evaluateDpoit_frag = `
|
|
10
|
+
precision highp float;
|
|
11
|
+
|
|
12
|
+
uniform sampler2D tDpoitFrontColor;
|
|
13
|
+
uniform vec2 uTexSize;
|
|
14
|
+
|
|
15
|
+
void main() {
|
|
16
|
+
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
17
|
+
gl_FragColor = texture2D(tDpoitFrontColor, coords);
|
|
18
|
+
}
|
|
19
19
|
`;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.evaluateWboit_frag = void 0;
|
|
4
|
-
exports.evaluateWboit_frag = `
|
|
5
|
-
precision highp float;
|
|
6
|
-
|
|
7
|
-
uniform sampler2D tWboitA;
|
|
8
|
-
uniform sampler2D tWboitB;
|
|
9
|
-
uniform vec2 uTexSize;
|
|
10
|
-
|
|
11
|
-
void main() {
|
|
12
|
-
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
13
|
-
|
|
14
|
-
vec4 accum = texture2D(tWboitA, coords);
|
|
15
|
-
float r = 1.0 - accum.a;
|
|
16
|
-
|
|
17
|
-
accum.a = texture2D(tWboitB, coords).r;
|
|
18
|
-
// divisor needs to allow very small values for nice fading
|
|
19
|
-
gl_FragColor = vec4(accum.rgb / clamp(accum.a, 0.00000001, 50000.0), r);
|
|
20
|
-
}
|
|
4
|
+
exports.evaluateWboit_frag = `
|
|
5
|
+
precision highp float;
|
|
6
|
+
|
|
7
|
+
uniform sampler2D tWboitA;
|
|
8
|
+
uniform sampler2D tWboitB;
|
|
9
|
+
uniform vec2 uTexSize;
|
|
10
|
+
|
|
11
|
+
void main() {
|
|
12
|
+
vec2 coords = gl_FragCoord.xy / uTexSize;
|
|
13
|
+
|
|
14
|
+
vec4 accum = texture2D(tWboitA, coords);
|
|
15
|
+
float r = 1.0 - accum.a;
|
|
16
|
+
|
|
17
|
+
accum.a = texture2D(tWboitB, coords).r;
|
|
18
|
+
// divisor needs to allow very small values for nice fading
|
|
19
|
+
gl_FragColor = vec4(accum.rgb / clamp(accum.a, 0.00000001, 50000.0), r);
|
|
20
|
+
}
|
|
21
21
|
`;
|
|
@@ -1,232 +1,232 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fxaa_frag = void 0;
|
|
4
|
-
exports.fxaa_frag = `
|
|
5
|
-
precision highp float;
|
|
6
|
-
precision highp int;
|
|
7
|
-
precision highp sampler2D;
|
|
8
|
-
|
|
9
|
-
uniform sampler2D tColor;
|
|
10
|
-
uniform vec2 uTexSizeInv;
|
|
11
|
-
|
|
12
|
-
// adapted from https://github.com/kosua20/Rendu
|
|
13
|
-
// MIT License Copyright (c) 2017 Simon Rodriguez
|
|
14
|
-
|
|
15
|
-
#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))
|
|
16
|
-
|
|
17
|
-
float rgb2luma(vec3 rgb){
|
|
18
|
-
return sqrt(dot(rgb, vec3(0.299, 0.587, 0.114)));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
float sampleLuma(vec2 uv) {
|
|
22
|
-
return rgb2luma(texture2D(tColor, uv).rgb);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
float sampleLuma(vec2 uv, float uOffset, float vOffset) {
|
|
26
|
-
uv += uTexSizeInv * vec2(uOffset, vOffset);
|
|
27
|
-
return sampleLuma(uv);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
void main(void) {
|
|
31
|
-
vec2 coords = gl_FragCoord.xy * uTexSizeInv;
|
|
32
|
-
vec2 inverseScreenSize = uTexSizeInv;
|
|
33
|
-
|
|
34
|
-
vec4 colorCenter = texture2D(tColor, coords);
|
|
35
|
-
|
|
36
|
-
// Luma at the current fragment
|
|
37
|
-
float lumaCenter = rgb2luma(colorCenter.rgb);
|
|
38
|
-
|
|
39
|
-
// Luma at the four direct neighbours of the current fragment.
|
|
40
|
-
float lumaDown = sampleLuma(coords, 0.0, -1.0);
|
|
41
|
-
float lumaUp = sampleLuma(coords, 0.0, 1.0);
|
|
42
|
-
float lumaLeft = sampleLuma(coords, -1.0, 0.0);
|
|
43
|
-
float lumaRight = sampleLuma(coords, 1.0, 0.0);
|
|
44
|
-
|
|
45
|
-
// Find the maximum and minimum luma around the current fragment.
|
|
46
|
-
float lumaMin = min(lumaCenter, min(min(lumaDown, lumaUp), min(lumaLeft, lumaRight)));
|
|
47
|
-
float lumaMax = max(lumaCenter, max(max(lumaDown, lumaUp), max(lumaLeft, lumaRight)));
|
|
48
|
-
|
|
49
|
-
// Compute the delta.
|
|
50
|
-
float lumaRange = lumaMax - lumaMin;
|
|
51
|
-
|
|
52
|
-
// If the luma variation is lower that a threshold (or if we are in a really dark area),
|
|
53
|
-
// we are not on an edge, don't perform any AA.
|
|
54
|
-
if (lumaRange < max(dEdgeThresholdMin, lumaMax * dEdgeThresholdMax)) {
|
|
55
|
-
gl_FragColor = colorCenter;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Query the 4 remaining corners lumas.
|
|
60
|
-
float lumaDownLeft = sampleLuma(coords, -1.0, -1.0);
|
|
61
|
-
float lumaUpRight = sampleLuma(coords, 1.0, 1.0);
|
|
62
|
-
float lumaUpLeft = sampleLuma(coords, -1.0, 1.0);
|
|
63
|
-
float lumaDownRight = sampleLuma(coords, 1.0, -1.0);
|
|
64
|
-
|
|
65
|
-
// Combine the four edges lumas (using intermediary variables for future computations
|
|
66
|
-
// with the same values).
|
|
67
|
-
float lumaDownUp = lumaDown + lumaUp;
|
|
68
|
-
float lumaLeftRight = lumaLeft + lumaRight;
|
|
69
|
-
|
|
70
|
-
// Same for corners
|
|
71
|
-
float lumaLeftCorners = lumaDownLeft + lumaUpLeft;
|
|
72
|
-
float lumaDownCorners = lumaDownLeft + lumaDownRight;
|
|
73
|
-
float lumaRightCorners = lumaDownRight + lumaUpRight;
|
|
74
|
-
float lumaUpCorners = lumaUpRight + lumaUpLeft;
|
|
75
|
-
|
|
76
|
-
// Compute an estimation of the gradient along the horizontal and vertical axis.
|
|
77
|
-
float edgeHorizontal = abs(-2.0 * lumaLeft + lumaLeftCorners) + abs(-2.0 * lumaCenter + lumaDownUp) * 2.0 + abs(-2.0 * lumaRight + lumaRightCorners);
|
|
78
|
-
float edgeVertical = abs(-2.0 * lumaUp + lumaUpCorners) + abs(-2.0 * lumaCenter + lumaLeftRight) * 2.0 + abs(-2.0 * lumaDown + lumaDownCorners);
|
|
79
|
-
|
|
80
|
-
// Is the local edge horizontal or vertical ?
|
|
81
|
-
bool isHorizontal = (edgeHorizontal >= edgeVertical);
|
|
82
|
-
|
|
83
|
-
// Choose the step size (one pixel) accordingly.
|
|
84
|
-
float stepLength = isHorizontal ? inverseScreenSize.y : inverseScreenSize.x;
|
|
85
|
-
|
|
86
|
-
// Select the two neighboring texels lumas in the opposite direction to the local edge.
|
|
87
|
-
float luma1 = isHorizontal ? lumaDown : lumaLeft;
|
|
88
|
-
float luma2 = isHorizontal ? lumaUp : lumaRight;
|
|
89
|
-
// Compute gradients in this direction.
|
|
90
|
-
float gradient1 = luma1 - lumaCenter;
|
|
91
|
-
float gradient2 = luma2 - lumaCenter;
|
|
92
|
-
|
|
93
|
-
// Which direction is the steepest ?
|
|
94
|
-
bool is1Steepest = abs(gradient1) >= abs(gradient2);
|
|
95
|
-
|
|
96
|
-
// Gradient in the corresponding direction, normalized.
|
|
97
|
-
float gradientScaled = 0.25 * max(abs(gradient1), abs(gradient2));
|
|
98
|
-
|
|
99
|
-
// Average luma in the correct direction.
|
|
100
|
-
float lumaLocalAverage = 0.0;
|
|
101
|
-
if(is1Steepest){
|
|
102
|
-
// Switch the direction
|
|
103
|
-
stepLength = -stepLength;
|
|
104
|
-
lumaLocalAverage = 0.5 * (luma1 + lumaCenter);
|
|
105
|
-
} else {
|
|
106
|
-
lumaLocalAverage = 0.5 * (luma2 + lumaCenter);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Shift UV in the correct direction by half a pixel.
|
|
110
|
-
vec2 currentUv = coords;
|
|
111
|
-
if(isHorizontal){
|
|
112
|
-
currentUv.y += stepLength * 0.5;
|
|
113
|
-
} else {
|
|
114
|
-
currentUv.x += stepLength * 0.5;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Compute offset (for each iteration step) in the right direction.
|
|
118
|
-
vec2 offset = isHorizontal ? vec2(inverseScreenSize.x, 0.0) : vec2(0.0, inverseScreenSize.y);
|
|
119
|
-
// Compute UVs to explore on each side of the edge, orthogonally.
|
|
120
|
-
// The QUALITY allows us to step faster.
|
|
121
|
-
vec2 uv1 = currentUv - offset * QUALITY(0);
|
|
122
|
-
vec2 uv2 = currentUv + offset * QUALITY(0);
|
|
123
|
-
|
|
124
|
-
// Read the lumas at both current extremities of the exploration segment,
|
|
125
|
-
// and compute the delta wrt to the local average luma.
|
|
126
|
-
float lumaEnd1 = sampleLuma(uv1);
|
|
127
|
-
float lumaEnd2 = sampleLuma(uv2);
|
|
128
|
-
lumaEnd1 -= lumaLocalAverage;
|
|
129
|
-
lumaEnd2 -= lumaLocalAverage;
|
|
130
|
-
|
|
131
|
-
// If the luma deltas at the current extremities is larger than the local gradient,
|
|
132
|
-
// we have reached the side of the edge.
|
|
133
|
-
bool reached1 = abs(lumaEnd1) >= gradientScaled;
|
|
134
|
-
bool reached2 = abs(lumaEnd2) >= gradientScaled;
|
|
135
|
-
bool reachedBoth = reached1 && reached2;
|
|
136
|
-
|
|
137
|
-
// If the side is not reached, we continue to explore in this direction.
|
|
138
|
-
if(!reached1){
|
|
139
|
-
uv1 -= offset * QUALITY(1);
|
|
140
|
-
}
|
|
141
|
-
if(!reached2){
|
|
142
|
-
uv2 += offset * QUALITY(1);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// If both sides have not been reached, continue to explore.
|
|
146
|
-
if(!reachedBoth){
|
|
147
|
-
for(int i = 2; i < dIterations; i++){
|
|
148
|
-
// If needed, read luma in 1st direction, compute delta.
|
|
149
|
-
if(!reached1){
|
|
150
|
-
lumaEnd1 = sampleLuma(uv1);
|
|
151
|
-
lumaEnd1 = lumaEnd1 - lumaLocalAverage;
|
|
152
|
-
}
|
|
153
|
-
// If needed, read luma in opposite direction, compute delta.
|
|
154
|
-
if(!reached2){
|
|
155
|
-
lumaEnd2 = sampleLuma(uv2);
|
|
156
|
-
lumaEnd2 = lumaEnd2 - lumaLocalAverage;
|
|
157
|
-
}
|
|
158
|
-
// If the luma deltas at the current extremities is larger than the local gradient,
|
|
159
|
-
// we have reached the side of the edge.
|
|
160
|
-
reached1 = abs(lumaEnd1) >= gradientScaled;
|
|
161
|
-
reached2 = abs(lumaEnd2) >= gradientScaled;
|
|
162
|
-
reachedBoth = reached1 && reached2;
|
|
163
|
-
|
|
164
|
-
// If the side is not reached, we continue to explore in this direction,
|
|
165
|
-
// with a variable quality.
|
|
166
|
-
if(!reached1){
|
|
167
|
-
uv1 -= offset * QUALITY(i);
|
|
168
|
-
}
|
|
169
|
-
if(!reached2){
|
|
170
|
-
uv2 += offset * QUALITY(i);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// If both sides have been reached, stop the exploration.
|
|
174
|
-
if(reachedBoth){
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Compute the distances to each side edge of the edge (!).
|
|
181
|
-
float distance1 = isHorizontal ? (coords.x - uv1.x) : (coords.y - uv1.y);
|
|
182
|
-
float distance2 = isHorizontal ? (uv2.x - coords.x) : (uv2.y - coords.y);
|
|
183
|
-
|
|
184
|
-
// In which direction is the side of the edge closer ?
|
|
185
|
-
bool isDirection1 = distance1 < distance2;
|
|
186
|
-
float distanceFinal = min(distance1, distance2);
|
|
187
|
-
|
|
188
|
-
// Thickness of the edge.
|
|
189
|
-
float edgeThickness = (distance1 + distance2);
|
|
190
|
-
|
|
191
|
-
// Is the luma at center smaller than the local average ?
|
|
192
|
-
bool isLumaCenterSmaller = lumaCenter < lumaLocalAverage;
|
|
193
|
-
|
|
194
|
-
// If the luma at center is smaller than at its neighbour,
|
|
195
|
-
// the delta luma at each end should be positive (same variation).
|
|
196
|
-
bool correctVariation1 = (lumaEnd1 < 0.0) != isLumaCenterSmaller;
|
|
197
|
-
bool correctVariation2 = (lumaEnd2 < 0.0) != isLumaCenterSmaller;
|
|
198
|
-
|
|
199
|
-
// Only keep the result in the direction of the closer side of the edge.
|
|
200
|
-
bool correctVariation = isDirection1 ? correctVariation1 : correctVariation2;
|
|
201
|
-
|
|
202
|
-
// UV offset: read in the direction of the closest side of the edge.
|
|
203
|
-
float pixelOffset = - distanceFinal / edgeThickness + 0.5;
|
|
204
|
-
|
|
205
|
-
// If the luma variation is incorrect, do not offset.
|
|
206
|
-
float finalOffset = correctVariation ? pixelOffset : 0.0;
|
|
207
|
-
|
|
208
|
-
// Sub-pixel shifting
|
|
209
|
-
// Full weighted average of the luma over the 3x3 neighborhood.
|
|
210
|
-
float lumaAverage = (1.0 / 12.0) * (2.0 * (lumaDownUp + lumaLeftRight) + lumaLeftCorners + lumaRightCorners);
|
|
211
|
-
// Ratio of the delta between the global average and the center luma,
|
|
212
|
-
// over the luma range in the 3x3 neighborhood.
|
|
213
|
-
float subPixelOffset1 = clamp(abs(lumaAverage - lumaCenter) / lumaRange, 0.0, 1.0);
|
|
214
|
-
float subPixelOffset2 = (-2.0 * subPixelOffset1 + 3.0) * subPixelOffset1 * subPixelOffset1;
|
|
215
|
-
// Compute a sub-pixel offset based on this delta.
|
|
216
|
-
float subPixelOffsetFinal = subPixelOffset2 * subPixelOffset2 * float(dSubpixelQuality);
|
|
217
|
-
|
|
218
|
-
// Pick the biggest of the two offsets.
|
|
219
|
-
finalOffset = max(finalOffset, subPixelOffsetFinal);
|
|
220
|
-
|
|
221
|
-
// Compute the final UV coordinates.
|
|
222
|
-
vec2 finalUv = coords;
|
|
223
|
-
if(isHorizontal){
|
|
224
|
-
finalUv.y += finalOffset * stepLength;
|
|
225
|
-
} else {
|
|
226
|
-
finalUv.x += finalOffset * stepLength;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// Read the color at the new UV coordinates, and use it.
|
|
230
|
-
gl_FragColor = texture2D(tColor, finalUv);
|
|
231
|
-
}
|
|
4
|
+
exports.fxaa_frag = `
|
|
5
|
+
precision highp float;
|
|
6
|
+
precision highp int;
|
|
7
|
+
precision highp sampler2D;
|
|
8
|
+
|
|
9
|
+
uniform sampler2D tColor;
|
|
10
|
+
uniform vec2 uTexSizeInv;
|
|
11
|
+
|
|
12
|
+
// adapted from https://github.com/kosua20/Rendu
|
|
13
|
+
// MIT License Copyright (c) 2017 Simon Rodriguez
|
|
14
|
+
|
|
15
|
+
#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))
|
|
16
|
+
|
|
17
|
+
float rgb2luma(vec3 rgb){
|
|
18
|
+
return sqrt(dot(rgb, vec3(0.299, 0.587, 0.114)));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
float sampleLuma(vec2 uv) {
|
|
22
|
+
return rgb2luma(texture2D(tColor, uv).rgb);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
float sampleLuma(vec2 uv, float uOffset, float vOffset) {
|
|
26
|
+
uv += uTexSizeInv * vec2(uOffset, vOffset);
|
|
27
|
+
return sampleLuma(uv);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
void main(void) {
|
|
31
|
+
vec2 coords = gl_FragCoord.xy * uTexSizeInv;
|
|
32
|
+
vec2 inverseScreenSize = uTexSizeInv;
|
|
33
|
+
|
|
34
|
+
vec4 colorCenter = texture2D(tColor, coords);
|
|
35
|
+
|
|
36
|
+
// Luma at the current fragment
|
|
37
|
+
float lumaCenter = rgb2luma(colorCenter.rgb);
|
|
38
|
+
|
|
39
|
+
// Luma at the four direct neighbours of the current fragment.
|
|
40
|
+
float lumaDown = sampleLuma(coords, 0.0, -1.0);
|
|
41
|
+
float lumaUp = sampleLuma(coords, 0.0, 1.0);
|
|
42
|
+
float lumaLeft = sampleLuma(coords, -1.0, 0.0);
|
|
43
|
+
float lumaRight = sampleLuma(coords, 1.0, 0.0);
|
|
44
|
+
|
|
45
|
+
// Find the maximum and minimum luma around the current fragment.
|
|
46
|
+
float lumaMin = min(lumaCenter, min(min(lumaDown, lumaUp), min(lumaLeft, lumaRight)));
|
|
47
|
+
float lumaMax = max(lumaCenter, max(max(lumaDown, lumaUp), max(lumaLeft, lumaRight)));
|
|
48
|
+
|
|
49
|
+
// Compute the delta.
|
|
50
|
+
float lumaRange = lumaMax - lumaMin;
|
|
51
|
+
|
|
52
|
+
// If the luma variation is lower that a threshold (or if we are in a really dark area),
|
|
53
|
+
// we are not on an edge, don't perform any AA.
|
|
54
|
+
if (lumaRange < max(dEdgeThresholdMin, lumaMax * dEdgeThresholdMax)) {
|
|
55
|
+
gl_FragColor = colorCenter;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Query the 4 remaining corners lumas.
|
|
60
|
+
float lumaDownLeft = sampleLuma(coords, -1.0, -1.0);
|
|
61
|
+
float lumaUpRight = sampleLuma(coords, 1.0, 1.0);
|
|
62
|
+
float lumaUpLeft = sampleLuma(coords, -1.0, 1.0);
|
|
63
|
+
float lumaDownRight = sampleLuma(coords, 1.0, -1.0);
|
|
64
|
+
|
|
65
|
+
// Combine the four edges lumas (using intermediary variables for future computations
|
|
66
|
+
// with the same values).
|
|
67
|
+
float lumaDownUp = lumaDown + lumaUp;
|
|
68
|
+
float lumaLeftRight = lumaLeft + lumaRight;
|
|
69
|
+
|
|
70
|
+
// Same for corners
|
|
71
|
+
float lumaLeftCorners = lumaDownLeft + lumaUpLeft;
|
|
72
|
+
float lumaDownCorners = lumaDownLeft + lumaDownRight;
|
|
73
|
+
float lumaRightCorners = lumaDownRight + lumaUpRight;
|
|
74
|
+
float lumaUpCorners = lumaUpRight + lumaUpLeft;
|
|
75
|
+
|
|
76
|
+
// Compute an estimation of the gradient along the horizontal and vertical axis.
|
|
77
|
+
float edgeHorizontal = abs(-2.0 * lumaLeft + lumaLeftCorners) + abs(-2.0 * lumaCenter + lumaDownUp) * 2.0 + abs(-2.0 * lumaRight + lumaRightCorners);
|
|
78
|
+
float edgeVertical = abs(-2.0 * lumaUp + lumaUpCorners) + abs(-2.0 * lumaCenter + lumaLeftRight) * 2.0 + abs(-2.0 * lumaDown + lumaDownCorners);
|
|
79
|
+
|
|
80
|
+
// Is the local edge horizontal or vertical ?
|
|
81
|
+
bool isHorizontal = (edgeHorizontal >= edgeVertical);
|
|
82
|
+
|
|
83
|
+
// Choose the step size (one pixel) accordingly.
|
|
84
|
+
float stepLength = isHorizontal ? inverseScreenSize.y : inverseScreenSize.x;
|
|
85
|
+
|
|
86
|
+
// Select the two neighboring texels lumas in the opposite direction to the local edge.
|
|
87
|
+
float luma1 = isHorizontal ? lumaDown : lumaLeft;
|
|
88
|
+
float luma2 = isHorizontal ? lumaUp : lumaRight;
|
|
89
|
+
// Compute gradients in this direction.
|
|
90
|
+
float gradient1 = luma1 - lumaCenter;
|
|
91
|
+
float gradient2 = luma2 - lumaCenter;
|
|
92
|
+
|
|
93
|
+
// Which direction is the steepest ?
|
|
94
|
+
bool is1Steepest = abs(gradient1) >= abs(gradient2);
|
|
95
|
+
|
|
96
|
+
// Gradient in the corresponding direction, normalized.
|
|
97
|
+
float gradientScaled = 0.25 * max(abs(gradient1), abs(gradient2));
|
|
98
|
+
|
|
99
|
+
// Average luma in the correct direction.
|
|
100
|
+
float lumaLocalAverage = 0.0;
|
|
101
|
+
if(is1Steepest){
|
|
102
|
+
// Switch the direction
|
|
103
|
+
stepLength = -stepLength;
|
|
104
|
+
lumaLocalAverage = 0.5 * (luma1 + lumaCenter);
|
|
105
|
+
} else {
|
|
106
|
+
lumaLocalAverage = 0.5 * (luma2 + lumaCenter);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Shift UV in the correct direction by half a pixel.
|
|
110
|
+
vec2 currentUv = coords;
|
|
111
|
+
if(isHorizontal){
|
|
112
|
+
currentUv.y += stepLength * 0.5;
|
|
113
|
+
} else {
|
|
114
|
+
currentUv.x += stepLength * 0.5;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Compute offset (for each iteration step) in the right direction.
|
|
118
|
+
vec2 offset = isHorizontal ? vec2(inverseScreenSize.x, 0.0) : vec2(0.0, inverseScreenSize.y);
|
|
119
|
+
// Compute UVs to explore on each side of the edge, orthogonally.
|
|
120
|
+
// The QUALITY allows us to step faster.
|
|
121
|
+
vec2 uv1 = currentUv - offset * QUALITY(0);
|
|
122
|
+
vec2 uv2 = currentUv + offset * QUALITY(0);
|
|
123
|
+
|
|
124
|
+
// Read the lumas at both current extremities of the exploration segment,
|
|
125
|
+
// and compute the delta wrt to the local average luma.
|
|
126
|
+
float lumaEnd1 = sampleLuma(uv1);
|
|
127
|
+
float lumaEnd2 = sampleLuma(uv2);
|
|
128
|
+
lumaEnd1 -= lumaLocalAverage;
|
|
129
|
+
lumaEnd2 -= lumaLocalAverage;
|
|
130
|
+
|
|
131
|
+
// If the luma deltas at the current extremities is larger than the local gradient,
|
|
132
|
+
// we have reached the side of the edge.
|
|
133
|
+
bool reached1 = abs(lumaEnd1) >= gradientScaled;
|
|
134
|
+
bool reached2 = abs(lumaEnd2) >= gradientScaled;
|
|
135
|
+
bool reachedBoth = reached1 && reached2;
|
|
136
|
+
|
|
137
|
+
// If the side is not reached, we continue to explore in this direction.
|
|
138
|
+
if(!reached1){
|
|
139
|
+
uv1 -= offset * QUALITY(1);
|
|
140
|
+
}
|
|
141
|
+
if(!reached2){
|
|
142
|
+
uv2 += offset * QUALITY(1);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// If both sides have not been reached, continue to explore.
|
|
146
|
+
if(!reachedBoth){
|
|
147
|
+
for(int i = 2; i < dIterations; i++){
|
|
148
|
+
// If needed, read luma in 1st direction, compute delta.
|
|
149
|
+
if(!reached1){
|
|
150
|
+
lumaEnd1 = sampleLuma(uv1);
|
|
151
|
+
lumaEnd1 = lumaEnd1 - lumaLocalAverage;
|
|
152
|
+
}
|
|
153
|
+
// If needed, read luma in opposite direction, compute delta.
|
|
154
|
+
if(!reached2){
|
|
155
|
+
lumaEnd2 = sampleLuma(uv2);
|
|
156
|
+
lumaEnd2 = lumaEnd2 - lumaLocalAverage;
|
|
157
|
+
}
|
|
158
|
+
// If the luma deltas at the current extremities is larger than the local gradient,
|
|
159
|
+
// we have reached the side of the edge.
|
|
160
|
+
reached1 = abs(lumaEnd1) >= gradientScaled;
|
|
161
|
+
reached2 = abs(lumaEnd2) >= gradientScaled;
|
|
162
|
+
reachedBoth = reached1 && reached2;
|
|
163
|
+
|
|
164
|
+
// If the side is not reached, we continue to explore in this direction,
|
|
165
|
+
// with a variable quality.
|
|
166
|
+
if(!reached1){
|
|
167
|
+
uv1 -= offset * QUALITY(i);
|
|
168
|
+
}
|
|
169
|
+
if(!reached2){
|
|
170
|
+
uv2 += offset * QUALITY(i);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// If both sides have been reached, stop the exploration.
|
|
174
|
+
if(reachedBoth){
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Compute the distances to each side edge of the edge (!).
|
|
181
|
+
float distance1 = isHorizontal ? (coords.x - uv1.x) : (coords.y - uv1.y);
|
|
182
|
+
float distance2 = isHorizontal ? (uv2.x - coords.x) : (uv2.y - coords.y);
|
|
183
|
+
|
|
184
|
+
// In which direction is the side of the edge closer ?
|
|
185
|
+
bool isDirection1 = distance1 < distance2;
|
|
186
|
+
float distanceFinal = min(distance1, distance2);
|
|
187
|
+
|
|
188
|
+
// Thickness of the edge.
|
|
189
|
+
float edgeThickness = (distance1 + distance2);
|
|
190
|
+
|
|
191
|
+
// Is the luma at center smaller than the local average ?
|
|
192
|
+
bool isLumaCenterSmaller = lumaCenter < lumaLocalAverage;
|
|
193
|
+
|
|
194
|
+
// If the luma at center is smaller than at its neighbour,
|
|
195
|
+
// the delta luma at each end should be positive (same variation).
|
|
196
|
+
bool correctVariation1 = (lumaEnd1 < 0.0) != isLumaCenterSmaller;
|
|
197
|
+
bool correctVariation2 = (lumaEnd2 < 0.0) != isLumaCenterSmaller;
|
|
198
|
+
|
|
199
|
+
// Only keep the result in the direction of the closer side of the edge.
|
|
200
|
+
bool correctVariation = isDirection1 ? correctVariation1 : correctVariation2;
|
|
201
|
+
|
|
202
|
+
// UV offset: read in the direction of the closest side of the edge.
|
|
203
|
+
float pixelOffset = - distanceFinal / edgeThickness + 0.5;
|
|
204
|
+
|
|
205
|
+
// If the luma variation is incorrect, do not offset.
|
|
206
|
+
float finalOffset = correctVariation ? pixelOffset : 0.0;
|
|
207
|
+
|
|
208
|
+
// Sub-pixel shifting
|
|
209
|
+
// Full weighted average of the luma over the 3x3 neighborhood.
|
|
210
|
+
float lumaAverage = (1.0 / 12.0) * (2.0 * (lumaDownUp + lumaLeftRight) + lumaLeftCorners + lumaRightCorners);
|
|
211
|
+
// Ratio of the delta between the global average and the center luma,
|
|
212
|
+
// over the luma range in the 3x3 neighborhood.
|
|
213
|
+
float subPixelOffset1 = clamp(abs(lumaAverage - lumaCenter) / lumaRange, 0.0, 1.0);
|
|
214
|
+
float subPixelOffset2 = (-2.0 * subPixelOffset1 + 3.0) * subPixelOffset1 * subPixelOffset1;
|
|
215
|
+
// Compute a sub-pixel offset based on this delta.
|
|
216
|
+
float subPixelOffsetFinal = subPixelOffset2 * subPixelOffset2 * float(dSubpixelQuality);
|
|
217
|
+
|
|
218
|
+
// Pick the biggest of the two offsets.
|
|
219
|
+
finalOffset = max(finalOffset, subPixelOffsetFinal);
|
|
220
|
+
|
|
221
|
+
// Compute the final UV coordinates.
|
|
222
|
+
vec2 finalUv = coords;
|
|
223
|
+
if(isHorizontal){
|
|
224
|
+
finalUv.y += finalOffset * stepLength;
|
|
225
|
+
} else {
|
|
226
|
+
finalUv.x += finalOffset * stepLength;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Read the color at the new UV coordinates, and use it.
|
|
230
|
+
gl_FragColor = texture2D(tColor, finalUv);
|
|
231
|
+
}
|
|
232
232
|
`;
|