molstar 3.0.0-dev.5 → 3.0.0-dev.9
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 +187 -187
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -95
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.d.ts +2 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/index.js +87 -74
- package/lib/apps/viewer/app.d.ts +230 -0
- package/lib/apps/viewer/app.js +515 -0
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.d.ts +2 -403
- package/lib/apps/viewer/index.html +106 -95
- package/lib/apps/viewer/index.js +2 -420
- package/lib/cli/cifschema/index.d.ts +1 -1
- package/lib/cli/cifschema/index.js +15 -35
- package/lib/commonjs/apps/docking-viewer/index.d.ts +2 -1
- package/lib/commonjs/apps/docking-viewer/index.js +86 -73
- package/lib/commonjs/apps/viewer/app.d.ts +230 -0
- package/lib/commonjs/apps/viewer/app.js +521 -0
- package/lib/commonjs/apps/viewer/index.d.ts +2 -403
- package/lib/commonjs/apps/viewer/index.js +2 -423
- package/lib/commonjs/cli/cifschema/index.d.ts +1 -1
- package/lib/commonjs/cli/cifschema/index.js +15 -35
- package/lib/commonjs/examples/alpha-orbitals/index.js +3 -4
- package/lib/commonjs/examples/basic-wrapper/index.js +23 -11
- package/lib/commonjs/examples/lighting/index.d.ts +1 -1
- package/lib/commonjs/examples/lighting/index.js +57 -41
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -14
- package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/commonjs/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/commonjs/extensions/anvil/behavior.d.ts +4 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +50 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +10 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +30 -0
- package/lib/commonjs/extensions/geo-export/mesh-exporter.js +4 -4
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +236 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +125 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +111 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +130 -0
- package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +6 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +3 -9
- package/lib/commonjs/mol-canvas3d/canvas3d.js +34 -23
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +13 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.js +16 -15
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/image.js +3 -2
- package/lib/commonjs/mol-canvas3d/passes/marking.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +10 -2
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +18 -14
- package/lib/commonjs/mol-canvas3d/passes/pick.js +12 -12
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/commonjs/mol-geo/geometry/base.d.ts +18 -0
- package/lib/commonjs/mol-geo/geometry/base.js +18 -1
- package/lib/commonjs/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/commonjs/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/commonjs/mol-geo/geometry/color-data.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/color-data.js +22 -0
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +12 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +15 -38
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +21 -66
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.d.ts +2 -4
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.js +4 -7
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/image/image.js +1 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.js +13 -9
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +11 -1
- package/lib/commonjs/mol-geo/geometry/points/points.js +1 -1
- package/lib/commonjs/mol-geo/geometry/size-data.js +5 -5
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/text/text.js +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.js +2 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.d.ts +2 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +10 -9
- package/lib/commonjs/mol-gl/render-object.d.ts +2 -1
- package/lib/commonjs/mol-gl/render-object.js +10 -10
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/cylinders.js +3 -3
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +15 -14
- package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/image.js +2 -2
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +39 -33
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/points.js +2 -2
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/commonjs/mol-gl/renderable/schema.js +4 -10
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/spheres.js +3 -3
- package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/text.js +2 -2
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +11 -6
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable.d.ts +0 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +12 -12
- package/lib/commonjs/mol-gl/renderer.js +23 -92
- package/lib/commonjs/mol-gl/scene.d.ts +2 -2
- package/lib/commonjs/mol-gl/scene.js +7 -5
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- 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 +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-group.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-group.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
- 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 +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/gaussian-density.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/gaussian-density.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.vert.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.vert.js +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader-code.d.ts +3 -1
- package/lib/commonjs/mol-gl/shader-code.js +43 -14
- package/lib/commonjs/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/commonjs/mol-gl/webgl/render-item.js +10 -8
- package/lib/commonjs/mol-gl/webgl/resources.js +8 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/commonjs/mol-io/reader/mol2/parser.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/mol2/parser.js +33 -3
- package/lib/commonjs/mol-io/reader/mol2/schema.d.ts +12 -1
- package/lib/commonjs/mol-io/reader/mol2/schema.js +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +2 -2
- package/lib/commonjs/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/commonjs/mol-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/quat.js +20 -1
- package/lib/commonjs/mol-model/structure/model/model.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/model/model.js +8 -2
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.js +4 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/commonjs/mol-model/structure/model/types.js +9 -0
- package/lib/commonjs/mol-model/structure/structure/element/stats.js +8 -0
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/common.js +11 -2
- 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 +20 -10
- 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 +21 -11
- package/lib/commonjs/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +20 -0
- package/lib/commonjs/mol-model-formats/structure/mol2.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/mol2.js +37 -7
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +30 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +40 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +4 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +11 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -4
- package/lib/commonjs/mol-plugin/config.d.ts +2 -2
- package/lib/commonjs/mol-plugin/config.js +5 -25
- package/lib/commonjs/mol-plugin/features.d.ts +9 -0
- package/lib/commonjs/mol-plugin/features.js +38 -0
- package/lib/commonjs/mol-plugin/spec.js +1 -0
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +12 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +8 -1
- package/lib/commonjs/mol-plugin-state/actions/structure.js +183 -72
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +13 -8
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +4 -4
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +13 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +13 -8
- package/lib/commonjs/mol-plugin-state/manager/structure/selection.js +3 -1
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +32 -0
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +2 -2
- package/lib/commonjs/mol-plugin-ui/index.d.ts +4 -4
- package/lib/commonjs/mol-plugin-ui/index.js +13 -16
- package/lib/commonjs/mol-plugin-ui/plugin.js +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/complex-representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +61 -19
- package/lib/commonjs/mol-repr/structure/params.d.ts +81 -19
- package/lib/commonjs/mol-repr/structure/registry.d.ts +141 -19
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +34 -58
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.js +2 -7
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/label.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/units-representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +81 -19
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -38
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +8 -6
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +40 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +11 -8
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +1 -2
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +3 -2
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +2 -5
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +7 -6
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.js +12 -12
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.d.ts +2 -1
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.js +4 -4
- package/lib/commonjs/mol-repr/visual.js +11 -7
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +33 -57
- package/lib/commonjs/mol-repr/volume/direct-volume.js +8 -12
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +60 -0
- package/lib/commonjs/mol-repr/volume/isosurface.js +11 -2
- package/lib/commonjs/mol-repr/volume/registry.d.ts +31 -19
- package/lib/commonjs/mol-repr/volume/representation.d.ts +10 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +30 -0
- package/lib/commonjs/mol-repr/volume/slice.js +2 -2
- package/lib/commonjs/mol-repr/volume/util.js +2 -2
- package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
- package/lib/commonjs/mol-theme/clipping.d.ts +7 -15
- package/lib/commonjs/mol-theme/clipping.js +5 -12
- package/lib/commonjs/mol-theme/color/volume-value.d.ts +17 -0
- package/lib/commonjs/mol-theme/color/volume-value.js +57 -0
- package/lib/commonjs/mol-theme/color.d.ts +3 -0
- package/lib/commonjs/mol-theme/color.js +2 -0
- package/lib/commonjs/mol-util/clip.d.ts +49 -0
- package/lib/commonjs/mol-util/clip.js +97 -0
- package/lib/commonjs/mol-util/number-packing.d.ts +11 -0
- package/lib/commonjs/mol-util/{float-packing.js → number-packing.js} +10 -19
- package/lib/examples/alpha-orbitals/index.html +61 -60
- package/lib/examples/alpha-orbitals/index.js +4 -5
- package/lib/examples/basic-wrapper/index.html +137 -136
- package/lib/examples/basic-wrapper/index.js +24 -12
- package/lib/examples/lighting/index.d.ts +1 -1
- package/lib/examples/lighting/index.html +88 -86
- package/lib/examples/lighting/index.js +58 -42
- package/lib/examples/proteopedia-wrapper/index.html +236 -235
- package/lib/examples/proteopedia-wrapper/index.js +27 -15
- package/lib/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/extensions/anvil/behavior.d.ts +4 -0
- package/lib/extensions/anvil/representation.d.ts +50 -0
- package/lib/extensions/cellpack/representation.d.ts +10 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +30 -0
- package/lib/extensions/geo-export/mesh-exporter.js +4 -4
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.js +233 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.js +120 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.js +106 -0
- package/lib/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/extensions/model-archive/quality-assessment/prop.js +127 -0
- package/lib/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +6 -2
- package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +3 -9
- package/lib/mol-canvas3d/canvas3d.js +34 -23
- package/lib/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +4 -0
- package/lib/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +4 -0
- package/lib/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/mol-canvas3d/passes/draw.d.ts +13 -1
- package/lib/mol-canvas3d/passes/draw.js +16 -15
- package/lib/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/mol-canvas3d/passes/image.js +3 -2
- package/lib/mol-canvas3d/passes/marking.js +1 -1
- package/lib/mol-canvas3d/passes/multi-sample.d.ts +10 -2
- package/lib/mol-canvas3d/passes/multi-sample.js +18 -14
- package/lib/mol-canvas3d/passes/pick.js +11 -11
- package/lib/mol-canvas3d/passes/postprocessing.js +3 -3
- package/lib/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/mol-geo/geometry/base.d.ts +18 -0
- package/lib/mol-geo/geometry/base.js +18 -1
- package/lib/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/mol-geo/geometry/color-data.d.ts +1 -1
- package/lib/mol-geo/geometry/color-data.js +22 -0
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +12 -2
- package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +15 -38
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +22 -67
- package/lib/mol-geo/geometry/direct-volume/transfer-function.d.ts +2 -4
- package/lib/mol-geo/geometry/direct-volume/transfer-function.js +4 -7
- package/lib/mol-geo/geometry/image/image.d.ts +10 -0
- package/lib/mol-geo/geometry/image/image.js +1 -1
- package/lib/mol-geo/geometry/lines/lines.d.ts +11 -0
- package/lib/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/mol-geo/geometry/marker-data.js +13 -9
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +10 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/mol-geo/geometry/points/points.d.ts +11 -1
- package/lib/mol-geo/geometry/points/points.js +1 -1
- package/lib/mol-geo/geometry/size-data.js +5 -5
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +10 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/mol-geo/geometry/text/text.d.ts +10 -0
- package/lib/mol-geo/geometry/text/text.js +1 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +10 -0
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/mol-gl/compute/histogram-pyramid/sum.js +2 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.d.ts +2 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.js +10 -9
- package/lib/mol-gl/render-object.d.ts +2 -1
- package/lib/mol-gl/render-object.js +10 -10
- package/lib/mol-gl/renderable/cylinders.d.ts +11 -5
- package/lib/mol-gl/renderable/cylinders.js +3 -3
- package/lib/mol-gl/renderable/direct-volume.d.ts +15 -14
- package/lib/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/mol-gl/renderable/image.d.ts +10 -4
- package/lib/mol-gl/renderable/image.js +2 -2
- package/lib/mol-gl/renderable/lines.d.ts +39 -33
- package/lib/mol-gl/renderable/lines.js +4 -4
- package/lib/mol-gl/renderable/mesh.d.ts +11 -5
- package/lib/mol-gl/renderable/mesh.js +3 -3
- package/lib/mol-gl/renderable/points.d.ts +10 -4
- package/lib/mol-gl/renderable/points.js +2 -2
- package/lib/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/mol-gl/renderable/schema.js +4 -10
- package/lib/mol-gl/renderable/spheres.d.ts +11 -5
- package/lib/mol-gl/renderable/spheres.js +3 -3
- package/lib/mol-gl/renderable/text.d.ts +10 -4
- package/lib/mol-gl/renderable/text.js +2 -2
- package/lib/mol-gl/renderable/texture-mesh.d.ts +11 -6
- package/lib/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/mol-gl/renderable.d.ts +0 -1
- package/lib/mol-gl/renderer.d.ts +12 -12
- package/lib/mol-gl/renderer.js +24 -93
- package/lib/mol-gl/scene.d.ts +2 -2
- package/lib/mol-gl/scene.js +7 -5
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- 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 +1 -1
- package/lib/mol-gl/shader/chunks/assign-group.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-group.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
- 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 +1 -1
- package/lib/mol-gl/shader/chunks/assign-position.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-position.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-size.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-size.glsl.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.d.ts +1 -1
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.js +1 -1
- package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/gaussian-density.frag.d.ts +1 -1
- package/lib/mol-gl/shader/gaussian-density.frag.js +1 -1
- package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.d.ts +1 -1
- package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.js +1 -1
- package/lib/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.frag.js +1 -1
- package/lib/mol-gl/shader/marching-cubes/isosurface.frag.d.ts +1 -1
- package/lib/mol-gl/shader/marching-cubes/isosurface.frag.js +1 -1
- package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.frag.js +1 -1
- package/lib/mol-gl/shader/mesh.vert.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.vert.js +1 -1
- package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/mol-gl/shader-code.d.ts +3 -1
- package/lib/mol-gl/shader-code.js +43 -14
- package/lib/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/mol-gl/webgl/render-item.js +8 -6
- package/lib/mol-gl/webgl/resources.js +8 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/mol-io/reader/mol2/parser.d.ts +1 -1
- package/lib/mol-io/reader/mol2/parser.js +33 -3
- package/lib/mol-io/reader/mol2/schema.d.ts +12 -1
- package/lib/mol-io/reader/mol2/schema.js +1 -1
- package/lib/mol-math/geometry/gaussian-density/gpu.js +2 -2
- package/lib/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/mol-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/mol-math/linear-algebra/3d/quat.js +20 -1
- package/lib/mol-model/structure/model/model.d.ts +1 -0
- package/lib/mol-model/structure/model/model.js +8 -2
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.js +5 -2
- package/lib/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/mol-model/structure/model/types.js +9 -0
- package/lib/mol-model/structure/structure/element/stats.js +8 -0
- package/lib/mol-model/structure/structure/unit/bonds/common.d.ts +2 -1
- package/lib/mol-model/structure/structure/unit/bonds/common.js +9 -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 +21 -11
- 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 +22 -12
- package/lib/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/mol-model-formats/shape/ply.d.ts +20 -0
- package/lib/mol-model-formats/structure/mol2.d.ts +1 -1
- package/lib/mol-model-formats/structure/mol2.js +37 -7
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +18 -1
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +18 -5
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +10 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +10 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +30 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +40 -0
- package/lib/mol-plugin/behavior/dynamic/representation.js +4 -6
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +11 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/commands.d.ts +1 -4
- package/lib/mol-plugin/config.d.ts +2 -2
- package/lib/mol-plugin/config.js +4 -23
- package/lib/mol-plugin/features.d.ts +9 -0
- package/lib/mol-plugin/features.js +35 -0
- package/lib/mol-plugin/spec.js +1 -0
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +12 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/structure.d.ts +8 -1
- package/lib/mol-plugin-state/actions/structure.js +183 -72
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.js +14 -9
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +4 -4
- package/lib/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
- package/lib/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
- package/lib/mol-plugin-state/manager/structure/component.d.ts +13 -1
- package/lib/mol-plugin-state/manager/structure/component.js +14 -9
- package/lib/mol-plugin-state/manager/structure/selection.js +3 -1
- package/lib/mol-plugin-state/transforms/representation.d.ts +32 -0
- package/lib/mol-plugin-state/transforms/representation.js +2 -2
- package/lib/mol-plugin-ui/index.d.ts +4 -4
- package/lib/mol-plugin-ui/index.js +11 -13
- package/lib/mol-plugin-ui/plugin.js +1 -1
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- 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 +643 -643
- 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 +127 -127
- 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 +85 -85
- 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/viewport/simple-settings.js +2 -6
- package/lib/mol-repr/shape/loci/angle.d.ts +10 -0
- package/lib/mol-repr/shape/loci/common.d.ts +10 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +10 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +10 -0
- package/lib/mol-repr/shape/loci/label.d.ts +10 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +10 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +10 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +10 -0
- package/lib/mol-repr/structure/complex-representation.js +1 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +61 -19
- package/lib/mol-repr/structure/params.d.ts +81 -19
- package/lib/mol-repr/structure/registry.d.ts +141 -19
- package/lib/mol-repr/structure/representation/backbone.d.ts +30 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +30 -0
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +30 -0
- package/lib/mol-repr/structure/representation/cartoon.d.ts +30 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +30 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +30 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +34 -58
- package/lib/mol-repr/structure/representation/gaussian-volume.js +2 -7
- package/lib/mol-repr/structure/representation/label.d.ts +30 -0
- package/lib/mol-repr/structure/representation/label.js +1 -1
- package/lib/mol-repr/structure/representation/line.d.ts +30 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +30 -0
- package/lib/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/mol-repr/structure/representation/orientation.d.ts +30 -0
- package/lib/mol-repr/structure/representation/point.d.ts +30 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +30 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +30 -0
- package/lib/mol-repr/structure/units-representation.js +1 -1
- package/lib/mol-repr/structure/units-visual.d.ts +81 -19
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +20 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +10 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +20 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +10 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +10 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +20 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -38
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +8 -6
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +40 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +11 -8
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +10 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +1 -1
- package/lib/mol-repr/structure/visual/label-text.d.ts +10 -0
- package/lib/mol-repr/structure/visual/label-text.js +1 -2
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +10 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +20 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +20 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/mol-repr/structure/visual/util/common.d.ts +3 -2
- package/lib/mol-repr/structure/visual/util/common.js +2 -5
- package/lib/mol-repr/structure/visual/util/gaussian.d.ts +7 -6
- package/lib/mol-repr/structure/visual/util/gaussian.js +12 -12
- package/lib/mol-repr/structure/visual/util/molecular-surface.d.ts +2 -1
- package/lib/mol-repr/structure/visual/util/molecular-surface.js +4 -4
- package/lib/mol-repr/visual.js +11 -7
- package/lib/mol-repr/volume/direct-volume.d.ts +33 -57
- package/lib/mol-repr/volume/direct-volume.js +8 -12
- package/lib/mol-repr/volume/isosurface.d.ts +60 -0
- package/lib/mol-repr/volume/isosurface.js +11 -2
- package/lib/mol-repr/volume/registry.d.ts +31 -19
- package/lib/mol-repr/volume/representation.d.ts +10 -0
- package/lib/mol-repr/volume/slice.d.ts +30 -0
- package/lib/mol-repr/volume/slice.js +2 -2
- package/lib/mol-repr/volume/util.js +2 -2
- package/lib/mol-script/language/builder.d.ts +0 -1
- package/lib/mol-theme/clipping.d.ts +7 -15
- package/lib/mol-theme/clipping.js +5 -12
- package/lib/mol-theme/color/volume-value.d.ts +17 -0
- package/lib/mol-theme/color/volume-value.js +52 -0
- package/lib/mol-theme/color.d.ts +3 -0
- package/lib/mol-theme/color.js +2 -0
- package/lib/mol-util/clip.d.ts +49 -0
- package/lib/mol-util/clip.js +93 -0
- package/lib/mol-util/number-packing.d.ts +11 -0
- package/lib/mol-util/{float-packing.js → number-packing.js} +7 -14
- package/package.json +162 -162
- package/lib/commonjs/mol-util/float-packing.d.ts +0 -15
- package/lib/mol-util/float-packing.d.ts +0 -15
|
@@ -27,8 +27,8 @@ function getComposeRenderable(ctx, colorTexture) {
|
|
|
27
27
|
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
28
28
|
}
|
|
29
29
|
exports.MultiSampleParams = {
|
|
30
|
-
mode: param_definition_1.ParamDefinition.Select('
|
|
31
|
-
sampleLevel: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 5, step: 1 }),
|
|
30
|
+
mode: param_definition_1.ParamDefinition.Select('temporal', [['off', 'Off'], ['on', 'On'], ['temporal', 'Temporal']]),
|
|
31
|
+
sampleLevel: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 5, step: 1 }, { description: 'Take level^2 samples.' }),
|
|
32
32
|
};
|
|
33
33
|
var MultiSamplePass = /** @class */ (function () {
|
|
34
34
|
function MultiSamplePass(webgl, drawPass) {
|
|
@@ -58,13 +58,13 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
58
58
|
mol_util_1.ValueCell.update(this.compose.values.uTexSize, linear_algebra_1.Vec2.set(this.compose.values.uTexSize.ref.value, width, height));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
MultiSamplePass.prototype.render = function (sampleIndex,
|
|
62
|
-
if (props.multiSample.mode === 'temporal') {
|
|
63
|
-
return this.renderTemporalMultiSample(sampleIndex,
|
|
61
|
+
MultiSamplePass.prototype.render = function (sampleIndex, ctx, props, toDrawingBuffer, forceOn) {
|
|
62
|
+
if (props.multiSample.mode === 'temporal' && !forceOn) {
|
|
63
|
+
return this.renderTemporalMultiSample(sampleIndex, ctx, props, toDrawingBuffer);
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
this.renderMultiSample(
|
|
67
|
-
return
|
|
66
|
+
this.renderMultiSample(ctx, toDrawingBuffer, props);
|
|
67
|
+
return -2;
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
MultiSamplePass.prototype.bindOutputTarget = function (toDrawingBuffer) {
|
|
@@ -75,7 +75,8 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
75
75
|
this.colorTarget.bind();
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
MultiSamplePass.prototype.renderMultiSample = function (
|
|
78
|
+
MultiSamplePass.prototype.renderMultiSample = function (ctx, toDrawingBuffer, props) {
|
|
79
|
+
var camera = ctx.camera;
|
|
79
80
|
var _a = this, compose = _a.compose, composeTarget = _a.composeTarget, drawPass = _a.drawPass, webgl = _a.webgl;
|
|
80
81
|
var gl = webgl.gl, state = webgl.state;
|
|
81
82
|
// based on the Multisample Anti-Aliasing Render Pass
|
|
@@ -103,7 +104,7 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
103
104
|
var sampleWeight = baseSampleWeight + roundingRange * uniformCenteredDistribution;
|
|
104
105
|
mol_util_1.ValueCell.update(compose.values.uWeight, sampleWeight);
|
|
105
106
|
// render scene
|
|
106
|
-
drawPass.render(
|
|
107
|
+
drawPass.render(ctx, props, false);
|
|
107
108
|
// compose rendered scene with compose target
|
|
108
109
|
composeTarget.bind();
|
|
109
110
|
state.enable(gl.BLEND);
|
|
@@ -130,7 +131,8 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
130
131
|
camera.viewOffset.enabled = false;
|
|
131
132
|
camera.update();
|
|
132
133
|
};
|
|
133
|
-
MultiSamplePass.prototype.renderTemporalMultiSample = function (sampleIndex,
|
|
134
|
+
MultiSamplePass.prototype.renderTemporalMultiSample = function (sampleIndex, ctx, props, toDrawingBuffer) {
|
|
135
|
+
var camera = ctx.camera;
|
|
134
136
|
var _a = this, compose = _a.compose, composeTarget = _a.composeTarget, holdTarget = _a.holdTarget, drawPass = _a.drawPass, webgl = _a.webgl;
|
|
135
137
|
var gl = webgl.gl, state = webgl.state;
|
|
136
138
|
// based on the Multisample Anti-Aliasing Render Pass
|
|
@@ -144,7 +146,7 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
144
146
|
var _b = camera.viewport, x = _b.x, y = _b.y, width = _b.width, height = _b.height;
|
|
145
147
|
var sampleWeight = 1.0 / offsetList.length;
|
|
146
148
|
if (sampleIndex === -1) {
|
|
147
|
-
drawPass.render(
|
|
149
|
+
drawPass.render(ctx, props, false);
|
|
148
150
|
mol_util_1.ValueCell.update(compose.values.uWeight, 1.0);
|
|
149
151
|
mol_util_1.ValueCell.update(compose.values.tColor, drawPass.getColorTarget(props.postprocessing).texture);
|
|
150
152
|
compose.update();
|
|
@@ -170,7 +172,7 @@ var MultiSamplePass = /** @class */ (function () {
|
|
|
170
172
|
camera_1.Camera.setViewOffset(camera.viewOffset, width, height, offset[0], offset[1], width, height);
|
|
171
173
|
camera.update();
|
|
172
174
|
// render scene
|
|
173
|
-
drawPass.render(
|
|
175
|
+
drawPass.render(ctx, props, false);
|
|
174
176
|
// compose rendered scene with compose target
|
|
175
177
|
composeTarget.bind();
|
|
176
178
|
state.enable(gl.BLEND);
|
|
@@ -266,8 +268,10 @@ var MultiSampleHelper = /** @class */ (function () {
|
|
|
266
268
|
this.sampleIndex = -1;
|
|
267
269
|
return props.mode === 'temporal' ? this.sampleIndex !== -2 : false;
|
|
268
270
|
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
/** Return `true` while more samples are needed */
|
|
272
|
+
MultiSampleHelper.prototype.render = function (ctx, props, toDrawingBuffer, forceOn) {
|
|
273
|
+
this.sampleIndex = this.multiSamplePass.render(this.sampleIndex, ctx, props, toDrawingBuffer, !!forceOn);
|
|
274
|
+
return this.sampleIndex < 0;
|
|
271
275
|
};
|
|
272
276
|
return MultiSampleHelper;
|
|
273
277
|
}());
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.PickHelper = exports.PickPass = void 0;
|
|
9
9
|
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
10
10
|
var misc_1 = require("../../mol-math/misc");
|
|
11
|
-
var
|
|
11
|
+
var number_packing_1 = require("../../mol-util/number-packing");
|
|
12
12
|
var stereo_1 = require("../camera/stereo");
|
|
13
13
|
var util_1 = require("../camera/util");
|
|
14
14
|
var util_2 = require("../camera/util");
|
|
@@ -46,29 +46,29 @@ var PickPass = /** @class */ (function () {
|
|
|
46
46
|
this.depthPickTarget.setSize(this.pickWidth, this.pickHeight);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
PickPass.prototype.renderVariant = function (renderer, camera, scene, helper, variant) {
|
|
49
|
+
PickPass.prototype.renderVariant = function (renderer, camera, scene, helper, variant, pickType) {
|
|
50
50
|
var depth = this.drawPass.depthTexturePrimitives;
|
|
51
51
|
renderer.clear(false);
|
|
52
52
|
renderer.update(camera);
|
|
53
|
-
renderer.renderPick(scene.primitives, camera, variant, null);
|
|
54
|
-
renderer.renderPick(scene.volumes, camera, variant, depth);
|
|
55
|
-
renderer.renderPick(helper.handle.scene, camera, variant, null);
|
|
53
|
+
renderer.renderPick(scene.primitives, camera, variant, null, pickType);
|
|
54
|
+
renderer.renderPick(scene.volumes, camera, variant, depth, pickType);
|
|
55
|
+
renderer.renderPick(helper.handle.scene, camera, variant, null, pickType);
|
|
56
56
|
if (helper.camera.isEnabled) {
|
|
57
57
|
helper.camera.update(camera);
|
|
58
58
|
renderer.update(helper.camera.camera);
|
|
59
|
-
renderer.renderPick(helper.camera.scene, helper.camera.camera, variant, null);
|
|
59
|
+
renderer.renderPick(helper.camera.scene, helper.camera.camera, variant, null, pickType);
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
PickPass.prototype.render = function (renderer, camera, scene, helper) {
|
|
63
63
|
this.objectPickTarget.bind();
|
|
64
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
64
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 1 /* Object */);
|
|
65
65
|
this.instancePickTarget.bind();
|
|
66
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
66
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 2 /* Instance */);
|
|
67
67
|
this.groupPickTarget.bind();
|
|
68
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
68
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 3 /* Group */);
|
|
69
69
|
// printTexture(this.webgl, this.groupPickTarget.texture, { id: 'group' })
|
|
70
70
|
this.depthPickTarget.bind();
|
|
71
|
-
this.renderVariant(renderer, camera, scene, helper, 'depth');
|
|
71
|
+
this.renderVariant(renderer, camera, scene, helper, 'depth', 0 /* None */);
|
|
72
72
|
};
|
|
73
73
|
return PickPass;
|
|
74
74
|
}());
|
|
@@ -127,11 +127,11 @@ var PickHelper = /** @class */ (function () {
|
|
|
127
127
|
PickHelper.prototype.getDepth = function (x, y) {
|
|
128
128
|
var idx = this.getBufferIdx(x, y);
|
|
129
129
|
var b = this.depthBuffer;
|
|
130
|
-
return (0,
|
|
130
|
+
return (0, number_packing_1.unpackRGBAToDepth)(b[idx], b[idx + 1], b[idx + 2], b[idx + 3]);
|
|
131
131
|
};
|
|
132
132
|
PickHelper.prototype.getId = function (x, y, buffer) {
|
|
133
133
|
var idx = this.getBufferIdx(x, y);
|
|
134
|
-
return (0,
|
|
134
|
+
return (0, number_packing_1.unpackRGBToInt)(buffer[idx], buffer[idx + 1], buffer[idx + 2]);
|
|
135
135
|
};
|
|
136
136
|
PickHelper.prototype.render = function (camera) {
|
|
137
137
|
var _a = this, pickX = _a.pickX, pickY = _a.pickY, pickWidth = _a.pickWidth, pickHeight = _a.pickHeight, halfPickWidth = _a.halfPickWidth;
|
|
@@ -34,7 +34,7 @@ function getOutlinesRenderable(ctx, depthTexture) {
|
|
|
34
34
|
}
|
|
35
35
|
var SsaoSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uSamples: (0, schema_1.UniformSpec)('v3[]'), dNSamples: (0, schema_1.DefineSpec)('number'), uProjection: (0, schema_1.UniformSpec)('m4'), uInvProjection: (0, schema_1.UniformSpec)('m4'), uBounds: (0, schema_1.UniformSpec)('v4'), uTexSize: (0, schema_1.UniformSpec)('v2'), uRadius: (0, schema_1.UniformSpec)('f'), uBias: (0, schema_1.UniformSpec)('f') });
|
|
36
36
|
function getSsaoRenderable(ctx, depthTexture) {
|
|
37
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tDepth: mol_util_1.ValueCell.create(depthTexture), uSamples: mol_util_1.ValueCell.create([0.0, 0.0, 1.0]), dNSamples: mol_util_1.ValueCell.create(
|
|
37
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tDepth: mol_util_1.ValueCell.create(depthTexture), uSamples: mol_util_1.ValueCell.create([0.0, 0.0, 1.0]), dNSamples: mol_util_1.ValueCell.create(32), uProjection: mol_util_1.ValueCell.create(linear_algebra_1.Mat4.identity()), uInvProjection: mol_util_1.ValueCell.create(linear_algebra_1.Mat4.identity()), uBounds: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ctx.gl.drawingBufferWidth, ctx.gl.drawingBufferHeight)), uRadius: mol_util_1.ValueCell.create(8.0), uBias: mol_util_1.ValueCell.create(0.025) });
|
|
38
38
|
var schema = (0, tslib_1.__assign)({}, SsaoSchema);
|
|
39
39
|
var shaderCode = (0, shader_code_1.ShaderCode)('ssao', quad_vert_1.quad_vert, ssao_frag_1.ssao_frag);
|
|
40
40
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -42,7 +42,7 @@ function getSsaoRenderable(ctx, depthTexture) {
|
|
|
42
42
|
}
|
|
43
43
|
var SsaoBlurSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), uKernel: (0, schema_1.UniformSpec)('f[]'), dOcclusionKernelSize: (0, schema_1.DefineSpec)('number'), uBlurDirectionX: (0, schema_1.UniformSpec)('f'), uBlurDirectionY: (0, schema_1.UniformSpec)('f'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uBounds: (0, schema_1.UniformSpec)('v4'), dOrthographic: (0, schema_1.DefineSpec)('number') });
|
|
44
44
|
function getSsaoBlurRenderable(ctx, ssaoDepthTexture, direction) {
|
|
45
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ssaoDepthTexture.getWidth(), ssaoDepthTexture.getHeight())), uKernel: mol_util_1.ValueCell.create([0.0]), dOcclusionKernelSize: mol_util_1.ValueCell.create(
|
|
45
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ssaoDepthTexture.getWidth(), ssaoDepthTexture.getHeight())), uKernel: mol_util_1.ValueCell.create([0.0]), dOcclusionKernelSize: mol_util_1.ValueCell.create(15), uBlurDirectionX: mol_util_1.ValueCell.create(direction === 'horizontal' ? 1 : 0), uBlurDirectionY: mol_util_1.ValueCell.create(direction === 'vertical' ? 1 : 0), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), uNear: mol_util_1.ValueCell.create(0.0), uFar: mol_util_1.ValueCell.create(10000.0), uBounds: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dOrthographic: mol_util_1.ValueCell.create(0) });
|
|
46
46
|
var schema = (0, tslib_1.__assign)({}, SsaoBlurSchema);
|
|
47
47
|
var shaderCode = (0, shader_code_1.ShaderCode)('ssao_blur', quad_vert_1.quad_vert, ssao_blur_frag_1.ssaoBlur_frag);
|
|
48
48
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -70,7 +70,7 @@ function getSamples(vectorSamples, nSamples) {
|
|
|
70
70
|
}
|
|
71
71
|
var PostprocessingSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uFogNear: (0, schema_1.UniformSpec)('f'), uFogFar: (0, schema_1.UniformSpec)('f'), uFogColor: (0, schema_1.UniformSpec)('v3'), uOutlineColor: (0, schema_1.UniformSpec)('v3'), uTransparentBackground: (0, schema_1.UniformSpec)('b'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), dOcclusionEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineScale: (0, schema_1.DefineSpec)('number'), uOutlineThreshold: (0, schema_1.UniformSpec)('f') });
|
|
72
72
|
function getPostprocessingRenderable(ctx, colorTexture, depthTexture, outlinesTexture, ssaoDepthTexture) {
|
|
73
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepth: mol_util_1.ValueCell.create(depthTexture), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uOutlineColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(0, 0, 0)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(
|
|
73
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepth: mol_util_1.ValueCell.create(depthTexture), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uOutlineColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(0, 0, 0)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(true), dOutlineEnable: mol_util_1.ValueCell.create(false), dOutlineScale: mol_util_1.ValueCell.create(1), uOutlineThreshold: mol_util_1.ValueCell.create(0.33) });
|
|
74
74
|
var schema = (0, tslib_1.__assign)({}, PostprocessingSchema);
|
|
75
75
|
var shaderCode = (0, shader_code_1.ShaderCode)('postprocessing', quad_vert_1.quad_vert, postprocessing_frag_1.postprocessing_frag);
|
|
76
76
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -138,7 +138,7 @@ function getWeightsRenderable(ctx, edgesTexture) {
|
|
|
138
138
|
var height = edgesTexture.getHeight();
|
|
139
139
|
var areaTexture = (0, texture_1.createTexture)(ctx.gl, ctx.extensions, 'image-uint8', 'rgb', 'ubyte', 'linear');
|
|
140
140
|
var searchTexture = (0, texture_1.createTexture)(ctx.gl, ctx.extensions, 'image-uint8', 'rgba', 'ubyte', 'nearest');
|
|
141
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tEdges: mol_util_1.ValueCell.create(edgesTexture), tArea: mol_util_1.ValueCell.create(areaTexture), tSearch: mol_util_1.ValueCell.create(searchTexture), uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)), uViewport: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dMaxSearchSteps: mol_util_1.ValueCell.create(
|
|
141
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tEdges: mol_util_1.ValueCell.create(edgesTexture), tArea: mol_util_1.ValueCell.create(areaTexture), tSearch: mol_util_1.ValueCell.create(searchTexture), uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)), uViewport: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dMaxSearchSteps: mol_util_1.ValueCell.create(16) });
|
|
142
142
|
// Note: loading image textures requires `HTMLImageElement` to be available
|
|
143
143
|
(0, texture_1.loadImageTexture)(getAreaTexture(), values.tArea, areaTexture);
|
|
144
144
|
(0, texture_1.loadImageTexture)(getSearchTexture(), values.tSearch, searchTexture);
|
|
@@ -10,6 +10,7 @@ import { LocationIterator } from '../util/location-iterator';
|
|
|
10
10
|
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
11
11
|
import { TransformData } from './transform-data';
|
|
12
12
|
import { Theme } from '../../mol-theme/theme';
|
|
13
|
+
import { Clip } from '../../mol-util/clip';
|
|
13
14
|
export declare const VisualQualityInfo: {
|
|
14
15
|
custom: {};
|
|
15
16
|
auto: {};
|
|
@@ -48,6 +49,16 @@ export declare namespace BaseGeometry {
|
|
|
48
49
|
roughness: number;
|
|
49
50
|
bumpiness: number;
|
|
50
51
|
}>>;
|
|
52
|
+
clip: PD.Group<PD.Normalize<{
|
|
53
|
+
variant: Clip.Variant;
|
|
54
|
+
objects: PD.Normalize<{
|
|
55
|
+
type: any;
|
|
56
|
+
invert: any;
|
|
57
|
+
position: any;
|
|
58
|
+
rotation: any;
|
|
59
|
+
scale: any;
|
|
60
|
+
}>[];
|
|
61
|
+
}>>;
|
|
51
62
|
};
|
|
52
63
|
type Params = typeof Params;
|
|
53
64
|
type Counts = {
|
|
@@ -71,6 +82,13 @@ export declare namespace BaseGeometry {
|
|
|
71
82
|
uRoughness: ValueCell<number, never>;
|
|
72
83
|
uBumpiness: ValueCell<number, never>;
|
|
73
84
|
dLightCount: ValueCell<number, never>;
|
|
85
|
+
dClipObjectCount: ValueCell<number, never>;
|
|
86
|
+
dClipVariant: ValueCell<Clip.Variant, never>;
|
|
87
|
+
uClipObjectType: ValueCell<number[], never>;
|
|
88
|
+
uClipObjectInvert: ValueCell<boolean[], never>;
|
|
89
|
+
uClipObjectPosition: ValueCell<number[], never>;
|
|
90
|
+
uClipObjectRotation: ValueCell<number[], never>;
|
|
91
|
+
uClipObjectScale: ValueCell<number[], never>;
|
|
74
92
|
};
|
|
75
93
|
function updateValues(values: BaseValues, props: PD.Values<Params>): void;
|
|
76
94
|
function createRenderableState(props?: Partial<PD.Values<Params>>): RenderableState;
|
|
@@ -16,6 +16,7 @@ var uniform_1 = require("../../mol-theme/color/uniform");
|
|
|
16
16
|
var uniform_2 = require("../../mol-theme/size/uniform");
|
|
17
17
|
var interpolate_1 = require("../../mol-math/interpolate");
|
|
18
18
|
var material_1 = require("../../mol-util/material");
|
|
19
|
+
var clip_1 = require("../../mol-util/clip");
|
|
19
20
|
exports.VisualQualityInfo = {
|
|
20
21
|
'custom': {},
|
|
21
22
|
'auto': {},
|
|
@@ -76,6 +77,7 @@ var BaseGeometry;
|
|
|
76
77
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }, { label: 'Opacity', isEssential: true, description: 'How opaque/transparent the representation is rendered.' }),
|
|
77
78
|
quality: param_definition_1.ParamDefinition.Select('auto', exports.VisualQualityOptions, { isEssential: true, description: 'Visual/rendering quality of the representation.' }),
|
|
78
79
|
material: material_1.Material.getParam(),
|
|
80
|
+
clip: param_definition_1.ParamDefinition.Group(clip_1.Clip.Params),
|
|
79
81
|
};
|
|
80
82
|
function createSimple(colorValue, sizeValue, transform) {
|
|
81
83
|
if (colorValue === void 0) { colorValue = names_1.ColorNames.grey; }
|
|
@@ -91,6 +93,7 @@ var BaseGeometry;
|
|
|
91
93
|
}
|
|
92
94
|
BaseGeometry.createSimple = createSimple;
|
|
93
95
|
function createValues(props, counts) {
|
|
96
|
+
var clip = clip_1.Clip.getClip(props.clip);
|
|
94
97
|
return {
|
|
95
98
|
alpha: mol_util_1.ValueCell.create(props.alpha),
|
|
96
99
|
uAlpha: mol_util_1.ValueCell.create(props.alpha),
|
|
@@ -101,6 +104,13 @@ var BaseGeometry;
|
|
|
101
104
|
uRoughness: mol_util_1.ValueCell.create(props.material.roughness),
|
|
102
105
|
uBumpiness: mol_util_1.ValueCell.create(props.material.bumpiness),
|
|
103
106
|
dLightCount: mol_util_1.ValueCell.create(1),
|
|
107
|
+
dClipObjectCount: mol_util_1.ValueCell.create(clip.objects.count),
|
|
108
|
+
dClipVariant: mol_util_1.ValueCell.create(clip.variant),
|
|
109
|
+
uClipObjectType: mol_util_1.ValueCell.create(clip.objects.type),
|
|
110
|
+
uClipObjectInvert: mol_util_1.ValueCell.create(clip.objects.invert),
|
|
111
|
+
uClipObjectPosition: mol_util_1.ValueCell.create(clip.objects.position),
|
|
112
|
+
uClipObjectRotation: mol_util_1.ValueCell.create(clip.objects.rotation),
|
|
113
|
+
uClipObjectScale: mol_util_1.ValueCell.create(clip.objects.scale),
|
|
104
114
|
};
|
|
105
115
|
}
|
|
106
116
|
BaseGeometry.createValues = createValues;
|
|
@@ -109,6 +119,14 @@ var BaseGeometry;
|
|
|
109
119
|
mol_util_1.ValueCell.updateIfChanged(values.uMetalness, props.material.metalness);
|
|
110
120
|
mol_util_1.ValueCell.updateIfChanged(values.uRoughness, props.material.roughness);
|
|
111
121
|
mol_util_1.ValueCell.updateIfChanged(values.uBumpiness, props.material.bumpiness);
|
|
122
|
+
var clip = clip_1.Clip.getClip(props.clip);
|
|
123
|
+
mol_util_1.ValueCell.update(values.dClipObjectCount, clip.objects.count);
|
|
124
|
+
mol_util_1.ValueCell.update(values.dClipVariant, clip.variant);
|
|
125
|
+
mol_util_1.ValueCell.update(values.uClipObjectType, clip.objects.type);
|
|
126
|
+
mol_util_1.ValueCell.update(values.uClipObjectInvert, clip.objects.invert);
|
|
127
|
+
mol_util_1.ValueCell.update(values.uClipObjectPosition, clip.objects.position);
|
|
128
|
+
mol_util_1.ValueCell.update(values.uClipObjectRotation, clip.objects.rotation);
|
|
129
|
+
mol_util_1.ValueCell.update(values.uClipObjectScale, clip.objects.scale);
|
|
112
130
|
}
|
|
113
131
|
BaseGeometry.updateValues = updateValues;
|
|
114
132
|
function createRenderableState(props) {
|
|
@@ -122,7 +140,6 @@ var BaseGeometry;
|
|
|
122
140
|
colorOnly: false,
|
|
123
141
|
opaque: opaque,
|
|
124
142
|
writeDepth: opaque,
|
|
125
|
-
noClip: false,
|
|
126
143
|
};
|
|
127
144
|
}
|
|
128
145
|
BaseGeometry.createRenderableState = createRenderableState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2020-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -8,8 +8,6 @@ import { Vec2 } from '../../mol-math/linear-algebra';
|
|
|
8
8
|
import { TextureImage } from '../../mol-gl/renderable/util';
|
|
9
9
|
import { Clipping } from '../../mol-theme/clipping';
|
|
10
10
|
export declare type ClippingData = {
|
|
11
|
-
dClipObjectCount: ValueCell<number>;
|
|
12
|
-
dClipVariant: ValueCell<string>;
|
|
13
11
|
tClipping: ValueCell<TextureImage<Uint8Array>>;
|
|
14
12
|
uClippingTexDim: ValueCell<Vec2>;
|
|
15
13
|
dClipping: ValueCell<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2020-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -10,9 +10,7 @@ var value_cell_1 = require("../../mol-util/value-cell");
|
|
|
10
10
|
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
11
11
|
var util_1 = require("../../mol-gl/renderable/util");
|
|
12
12
|
function applyClippingGroups(array, start, end, groups) {
|
|
13
|
-
|
|
14
|
-
array[i] = groups;
|
|
15
|
-
}
|
|
13
|
+
array.fill(groups, start, end);
|
|
16
14
|
return true;
|
|
17
15
|
}
|
|
18
16
|
exports.applyClippingGroups = applyClippingGroups;
|
|
@@ -30,8 +28,6 @@ function createClipping(count, clippingData) {
|
|
|
30
28
|
}
|
|
31
29
|
else {
|
|
32
30
|
return {
|
|
33
|
-
dClipObjectCount: value_cell_1.ValueCell.create(0),
|
|
34
|
-
dClipVariant: value_cell_1.ValueCell.create('instance'),
|
|
35
31
|
tClipping: value_cell_1.ValueCell.create(clipping),
|
|
36
32
|
uClippingTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(clipping.width, clipping.height)),
|
|
37
33
|
dClipping: value_cell_1.ValueCell.create(count > 0),
|
|
@@ -44,12 +40,11 @@ function createEmptyClipping(clippingData) {
|
|
|
44
40
|
if (clippingData) {
|
|
45
41
|
value_cell_1.ValueCell.update(clippingData.tClipping, emptyClippingTexture);
|
|
46
42
|
value_cell_1.ValueCell.update(clippingData.uClippingTexDim, linear_algebra_1.Vec2.create(1, 1));
|
|
43
|
+
value_cell_1.ValueCell.updateIfChanged(clippingData.dClipping, false);
|
|
47
44
|
return clippingData;
|
|
48
45
|
}
|
|
49
46
|
else {
|
|
50
47
|
return {
|
|
51
|
-
dClipObjectCount: value_cell_1.ValueCell.create(0),
|
|
52
|
-
dClipVariant: value_cell_1.ValueCell.create('instance'),
|
|
53
48
|
tClipping: value_cell_1.ValueCell.create(emptyClippingTexture),
|
|
54
49
|
uClippingTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(1, 1)),
|
|
55
50
|
dClipping: value_cell_1.ValueCell.create(false),
|
|
@@ -11,7 +11,7 @@ import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
|
|
|
11
11
|
import { LocationIterator } from '../util/location-iterator';
|
|
12
12
|
import { ColorTheme } from '../../mol-theme/color';
|
|
13
13
|
import { Texture } from '../../mol-gl/webgl/texture';
|
|
14
|
-
export declare type ColorType = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance' | 'volume' | 'volumeInstance';
|
|
14
|
+
export declare type ColorType = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance' | 'volume' | 'volumeInstance' | 'direct';
|
|
15
15
|
export declare type ColorData = {
|
|
16
16
|
uColor: ValueCell<Vec3>;
|
|
17
17
|
tColor: ValueCell<TextureImage<Uint8Array>>;
|
|
@@ -36,6 +36,7 @@ function _createColors(locationIt, positionIt, colorTheme, colorData) {
|
|
|
36
36
|
case 'vertexInstance': return createVertexInstanceColor(positionIt, colorTheme.color, colorData);
|
|
37
37
|
case 'volume': return createGridColor(colorTheme.grid, 'volume', colorData);
|
|
38
38
|
case 'volumeInstance': return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
|
|
39
|
+
case 'direct': return createDirectColor(colorData);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
function updatePaletteTexture(palette, cell) {
|
|
@@ -210,4 +211,25 @@ function createGridColor(grid, type, colorData) {
|
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
exports.createGridColor = createGridColor;
|
|
214
|
+
//
|
|
215
|
+
/** Creates direct color */
|
|
216
|
+
function createDirectColor(colorData) {
|
|
217
|
+
if (colorData) {
|
|
218
|
+
mol_util_1.ValueCell.updateIfChanged(colorData.dColorType, 'direct');
|
|
219
|
+
return colorData;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return {
|
|
223
|
+
uColor: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec3)()),
|
|
224
|
+
tColor: mol_util_1.ValueCell.create({ array: new Uint8Array(3), width: 1, height: 1 }),
|
|
225
|
+
tColorGrid: mol_util_1.ValueCell.create((0, texture_1.createNullTexture)()),
|
|
226
|
+
tPalette: mol_util_1.ValueCell.create({ array: new Uint8Array(3), width: 1, height: 1 }),
|
|
227
|
+
uColorTexDim: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1, 1)),
|
|
228
|
+
uColorGridDim: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)),
|
|
229
|
+
uColorGridTransform: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.create(0, 0, 0, 1)),
|
|
230
|
+
dColorType: mol_util_1.ValueCell.create('direct'),
|
|
231
|
+
dUsePalette: mol_util_1.ValueCell.create(false),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
213
235
|
//# sourceMappingURL=color-data.js.map
|
|
@@ -48,10 +48,20 @@ export declare namespace Cylinders {
|
|
|
48
48
|
alpha: PD.Numeric;
|
|
49
49
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
50
50
|
material: PD.Group<PD.Normalize<{
|
|
51
|
-
metalness: number;
|
|
52
|
-
roughness: number;
|
|
51
|
+
metalness: number; /** Number of cylinders */
|
|
52
|
+
roughness: number;
|
|
53
53
|
bumpiness: number;
|
|
54
54
|
}>>;
|
|
55
|
+
clip: PD.Group<PD.Normalize<{
|
|
56
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
57
|
+
objects: PD.Normalize<{
|
|
58
|
+
type: any;
|
|
59
|
+
invert: any;
|
|
60
|
+
position: any;
|
|
61
|
+
rotation: any;
|
|
62
|
+
scale: any;
|
|
63
|
+
}>[];
|
|
64
|
+
}>>;
|
|
55
65
|
};
|
|
56
66
|
type Params = typeof Params;
|
|
57
67
|
const Utils: GeometryUtils<Cylinders, Params>;
|
|
@@ -156,7 +156,7 @@ var Cylinders;
|
|
|
156
156
|
var padding = (0, size_data_1.getMaxSize)(size) * props.sizeFactor;
|
|
157
157
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(cylinders.boundingSphere);
|
|
158
158
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
159
|
-
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio),
|
|
159
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ dGeometryType: mol_util_1.ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
|
|
160
160
|
}
|
|
161
161
|
function createValuesSimple(cylinders, props, colorValue, sizeValue, transform) {
|
|
162
162
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -166,7 +166,7 @@ var Cylinders;
|
|
|
166
166
|
function updateValues(values, props) {
|
|
167
167
|
base_1.BaseGeometry.updateValues(values, props);
|
|
168
168
|
mol_util_1.ValueCell.updateIfChanged(values.uSizeFactor, props.sizeFactor * props.sizeAspectRatio);
|
|
169
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
169
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
170
170
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
171
171
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
172
172
|
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
6
6
|
import { Texture } from '../../../mol-gl/webgl/texture';
|
|
7
7
|
import { Box3D, Sphere3D } from '../../../mol-math/geometry';
|
|
8
|
-
import { Mat4,
|
|
8
|
+
import { Mat4, Vec3, Vec4 } from '../../../mol-math/linear-algebra';
|
|
9
9
|
import { ValueCell } from '../../../mol-util';
|
|
10
10
|
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
|
|
11
11
|
import { GeometryUtils } from '../geometry';
|
|
@@ -24,51 +24,18 @@ export interface DirectVolume {
|
|
|
24
24
|
readonly unitToCartn: ValueCell<Mat4>;
|
|
25
25
|
readonly cartnToUnit: ValueCell<Mat4>;
|
|
26
26
|
readonly packedGroup: ValueCell<boolean>;
|
|
27
|
+
readonly axisOrder: ValueCell<Vec3>;
|
|
27
28
|
/** Bounding sphere of the volume */
|
|
28
29
|
readonly boundingSphere: Sphere3D;
|
|
29
30
|
setBoundingSphere(boundingSphere: Sphere3D): void;
|
|
30
31
|
}
|
|
31
32
|
export declare namespace DirectVolume {
|
|
32
|
-
function create(bbox: Box3D, gridDimension: Vec3, transform: Mat4, unitToCartn: Mat4, cellDim: Vec3, texture: Texture, stats: Grid['stats'], packedGroup: boolean, directVolume?: DirectVolume): DirectVolume;
|
|
33
|
+
function create(bbox: Box3D, gridDimension: Vec3, transform: Mat4, unitToCartn: Mat4, cellDim: Vec3, texture: Texture, stats: Grid['stats'], packedGroup: boolean, axisOrder: Vec3, directVolume?: DirectVolume): DirectVolume;
|
|
33
34
|
function createEmpty(directVolume?: DirectVolume): DirectVolume;
|
|
34
|
-
function createRenderModeParam(stats?: Grid['stats']): PD.Mapped<PD.NamedParams<PD.Normalize<{
|
|
35
|
-
controlPoints: Vec2[];
|
|
36
|
-
list: {
|
|
37
|
-
kind: "set" | "interpolate";
|
|
38
|
-
colors: import("../../../mol-util/color/color").ColorListEntry[];
|
|
39
|
-
};
|
|
40
|
-
}>, "volume"> | PD.NamedParams<PD.Normalize<{
|
|
41
|
-
isoValue: Readonly<{
|
|
42
|
-
kind: "absolute";
|
|
43
|
-
absoluteValue: number;
|
|
44
|
-
}> | Readonly<{
|
|
45
|
-
kind: "relative";
|
|
46
|
-
relativeValue: number;
|
|
47
|
-
}>;
|
|
48
|
-
singleLayer: boolean;
|
|
49
|
-
}>, "isosurface">>;
|
|
50
35
|
const Params: {
|
|
51
|
-
doubleSided: PD.BooleanParam;
|
|
52
|
-
flipSided: PD.BooleanParam;
|
|
53
|
-
flatShaded: PD.BooleanParam;
|
|
54
36
|
ignoreLight: PD.BooleanParam;
|
|
55
37
|
xrayShaded: PD.BooleanParam;
|
|
56
|
-
|
|
57
|
-
controlPoints: Vec2[];
|
|
58
|
-
list: {
|
|
59
|
-
kind: "set" | "interpolate";
|
|
60
|
-
colors: import("../../../mol-util/color/color").ColorListEntry[];
|
|
61
|
-
};
|
|
62
|
-
}>, "volume"> | PD.NamedParams<PD.Normalize<{
|
|
63
|
-
isoValue: Readonly<{
|
|
64
|
-
kind: "absolute";
|
|
65
|
-
absoluteValue: number;
|
|
66
|
-
}> | Readonly<{
|
|
67
|
-
kind: "relative";
|
|
68
|
-
relativeValue: number;
|
|
69
|
-
}>;
|
|
70
|
-
singleLayer: boolean;
|
|
71
|
-
}>, "isosurface">>;
|
|
38
|
+
controlPoints: PD.LineGraph;
|
|
72
39
|
stepsPerCell: PD.Numeric;
|
|
73
40
|
jumpLength: PD.Numeric;
|
|
74
41
|
alpha: PD.Numeric;
|
|
@@ -78,6 +45,16 @@ export declare namespace DirectVolume {
|
|
|
78
45
|
roughness: number;
|
|
79
46
|
bumpiness: number;
|
|
80
47
|
}>>;
|
|
48
|
+
clip: PD.Group<PD.Normalize<{
|
|
49
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
50
|
+
objects: PD.Normalize<{
|
|
51
|
+
type: any;
|
|
52
|
+
invert: any;
|
|
53
|
+
position: any;
|
|
54
|
+
rotation: any;
|
|
55
|
+
scale: any;
|
|
56
|
+
}>[];
|
|
57
|
+
}>>;
|
|
81
58
|
};
|
|
82
59
|
type Params = typeof Params;
|
|
83
60
|
const Utils: GeometryUtils<DirectVolume, Params>;
|