molstar 3.0.0-dev.6 → 3.0.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/README.md +7 -0
- package/build/viewer/index.html +4 -0
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/viewer/app.d.ts +230 -0
- package/lib/apps/viewer/app.js +525 -0
- package/lib/apps/viewer/index.d.ts +2 -224
- package/lib/apps/viewer/index.html +4 -0
- package/lib/apps/viewer/index.js +2 -507
- package/lib/commonjs/apps/viewer/app.d.ts +230 -0
- package/lib/commonjs/apps/viewer/app.js +531 -0
- package/lib/commonjs/apps/viewer/index.d.ts +2 -224
- package/lib/commonjs/apps/viewer/index.js +2 -510
- package/lib/commonjs/examples/alpha-orbitals/index.js +1 -1
- package/lib/commonjs/examples/basic-wrapper/index.js +7 -3
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +7 -1
- package/lib/commonjs/extensions/anvil/behavior.d.ts +4 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +50 -0
- package/lib/commonjs/extensions/anvil/representation.js +1 -1
- 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-export/export.d.ts +9 -0
- package/lib/commonjs/extensions/model-export/export.js +129 -0
- package/lib/commonjs/extensions/model-export/index.d.ts +7 -0
- package/lib/commonjs/extensions/model-export/index.js +36 -0
- package/lib/commonjs/extensions/model-export/ui.d.ts +11 -0
- package/lib/commonjs/extensions/model-export/ui.js +77 -0
- package/lib/commonjs/extensions/mp4-export/encoder.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +6 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +2 -2
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +15 -13
- package/lib/commonjs/mol-canvas3d/canvas3d.js +34 -29
- package/lib/commonjs/mol-canvas3d/controls/trackball.d.ts +9 -4
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +50 -11
- 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 +9 -2
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +14 -12
- 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 +10 -0
- 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 +10 -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 +10 -0
- 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/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.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 +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/commonjs/mol-io/reader/mol/parser.d.ts +23 -1
- package/lib/commonjs/mol-io/reader/mol/parser.js +116 -4
- 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-io/reader/sdf/parser-v3-util.d.ts +6 -0
- package/lib/commonjs/mol-io/reader/sdf/parser-v3-util.js +9 -0
- package/lib/commonjs/mol-io/reader/sdf/parser.d.ts +3 -1
- package/lib/commonjs/mol-io/reader/sdf/parser.js +11 -2
- package/lib/commonjs/mol-io/writer/cif/encoder/binary.js +9 -2
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +2 -2
- package/lib/commonjs/mol-math/geometry/symmetry-operator.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/symmetry-operator.js +10 -4
- 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/export/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/export/mmcif.js +8 -5
- package/lib/commonjs/mol-model/structure/model/properties/common.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/element/stats.js +8 -0
- package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/properties.js +2 -1
- package/lib/commonjs/mol-model/structure/structure/symmetry.js +1 -3
- 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/util/superposition-db-mapping.js +10 -5
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +20 -0
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/commonjs/mol-model-formats/structure/basic/entities.d.ts +2 -1
- package/lib/commonjs/mol-model-formats/structure/basic/entities.js +28 -24
- package/lib/commonjs/mol-model-formats/structure/basic/parser.js +17 -8
- package/lib/commonjs/mol-model-formats/structure/basic/properties.d.ts +6 -1
- package/lib/commonjs/mol-model-formats/structure/basic/properties.js +12 -22
- package/lib/commonjs/mol-model-formats/structure/mol.d.ts +2 -1
- package/lib/commonjs/mol-model-formats/structure/mol.js +19 -5
- 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/common/custom-property.d.ts +1 -1
- 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 +11 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +25 -10
- 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-model-props/sequence/best-database-mapping.js +15 -15
- package/lib/commonjs/mol-plugin/animation-loop.d.ts +2 -0
- package/lib/commonjs/mol-plugin/animation-loop.js +1 -1
- 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/commands.d.ts +7 -6
- package/lib/commonjs/mol-plugin/config.d.ts +1 -2
- package/lib/commonjs/mol-plugin/config.js +4 -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.d.ts +1 -1
- package/lib/commonjs/mol-plugin/spec.js +4 -1
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +12 -0
- package/lib/commonjs/mol-plugin-state/actions/file.d.ts +3 -2
- package/lib/commonjs/mol-plugin-state/actions/file.js +67 -31
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.js +41 -8
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +62 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
- package/lib/commonjs/mol-plugin-state/animation/model.d.ts +4 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +149 -5
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +74 -2
- 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/manager/animation.d.ts +5 -1
- package/lib/commonjs/mol-plugin-state/manager/animation.js +5 -5
- 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/structure/superposition.js +2 -2
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +6 -14
- 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-line.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +11 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +11 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +11 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
- 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-tube-mesh.d.ts +10 -0
- 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.d.ts +1 -1
- package/lib/commonjs/mol-repr/visual.js +13 -8
- 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-state/tree/immutable.d.ts +18 -0
- package/lib/commonjs/mol-state/tree/transient.d.ts +3 -4
- 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/element-symbol.d.ts +243 -1
- package/lib/commonjs/mol-theme/color/element-symbol.js +10 -5
- package/lib/commonjs/mol-theme/color/entity-id.d.ts +1 -1
- package/lib/commonjs/mol-theme/color/entity-id.js +26 -5
- package/lib/commonjs/mol-theme/color/illustrative.d.ts +100 -29
- package/lib/commonjs/mol-theme/color/illustrative.js +26 -7
- package/lib/commonjs/mol-theme/color/molecule-type.d.ts +19 -1
- package/lib/commonjs/mol-theme/color/molecule-type.js +10 -5
- package/lib/commonjs/mol-theme/color/residue-name.d.ts +77 -1
- package/lib/commonjs/mol-theme/color/residue-name.js +10 -5
- package/lib/commonjs/mol-theme/color/secondary-structure.d.ts +27 -1
- package/lib/commonjs/mol-theme/color/secondary-structure.js +10 -5
- 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 +233 -14
- 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/color/color.d.ts +1 -1
- package/lib/commonjs/mol-util/color/color.js +1 -1
- package/lib/commonjs/mol-util/color/params.d.ts +10 -0
- package/lib/commonjs/mol-util/color/params.js +19 -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.js +1 -1
- package/lib/examples/basic-wrapper/index.js +7 -3
- package/lib/examples/proteopedia-wrapper/index.js +7 -1
- package/lib/extensions/anvil/behavior.d.ts +4 -0
- package/lib/extensions/anvil/representation.d.ts +50 -0
- package/lib/extensions/anvil/representation.js +1 -1
- 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-export/export.d.ts +9 -0
- package/lib/extensions/model-export/export.js +125 -0
- package/lib/extensions/model-export/index.d.ts +7 -0
- package/lib/extensions/model-export/index.js +33 -0
- package/lib/extensions/model-export/ui.d.ts +11 -0
- package/lib/extensions/model-export/ui.js +74 -0
- package/lib/extensions/mp4-export/encoder.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +6 -2
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/extensions/rcsb/graphql/types.d.ts +2 -2
- package/lib/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +15 -13
- package/lib/mol-canvas3d/canvas3d.js +34 -29
- package/lib/mol-canvas3d/controls/trackball.d.ts +9 -4
- package/lib/mol-canvas3d/controls/trackball.js +51 -12
- 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 +9 -2
- package/lib/mol-canvas3d/passes/multi-sample.js +14 -12
- 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 +10 -0
- 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 +10 -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 +10 -0
- 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/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- 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 +2 -2
- package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/mol-io/reader/mol/parser.d.ts +23 -1
- package/lib/mol-io/reader/mol/parser.js +112 -3
- 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-io/reader/sdf/parser-v3-util.d.ts +6 -0
- package/lib/mol-io/reader/sdf/parser-v3-util.js +9 -0
- package/lib/mol-io/reader/sdf/parser.d.ts +3 -1
- package/lib/mol-io/reader/sdf/parser.js +12 -3
- package/lib/mol-io/writer/cif/encoder/binary.js +9 -2
- package/lib/mol-math/geometry/gaussian-density/gpu.js +2 -2
- package/lib/mol-math/geometry/symmetry-operator.d.ts +1 -1
- package/lib/mol-math/geometry/symmetry-operator.js +10 -4
- 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/export/mmcif.d.ts +1 -1
- package/lib/mol-model/structure/export/mmcif.js +8 -5
- package/lib/mol-model/structure/model/properties/common.d.ts +1 -1
- package/lib/mol-model/structure/structure/element/stats.js +8 -0
- package/lib/mol-model/structure/structure/properties.d.ts +1 -0
- package/lib/mol-model/structure/structure/properties.js +2 -1
- package/lib/mol-model/structure/structure/symmetry.js +1 -3
- 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/util/superposition-db-mapping.js +10 -5
- package/lib/mol-model-formats/shape/ply.d.ts +20 -0
- package/lib/mol-model-formats/structure/basic/atomic.d.ts +2 -2
- package/lib/mol-model-formats/structure/basic/atomic.js +6 -6
- package/lib/mol-model-formats/structure/basic/coarse.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/mol-model-formats/structure/basic/entities.d.ts +2 -1
- package/lib/mol-model-formats/structure/basic/entities.js +25 -22
- package/lib/mol-model-formats/structure/basic/parser.js +19 -10
- package/lib/mol-model-formats/structure/basic/properties.d.ts +6 -1
- package/lib/mol-model-formats/structure/basic/properties.js +12 -25
- package/lib/mol-model-formats/structure/mol.d.ts +2 -1
- package/lib/mol-model-formats/structure/mol.js +17 -3
- 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/common/custom-property.d.ts +1 -1
- 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 +11 -1
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +25 -10
- 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-model-props/sequence/best-database-mapping.js +15 -15
- package/lib/mol-plugin/animation-loop.d.ts +2 -0
- package/lib/mol-plugin/animation-loop.js +1 -1
- 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/commands.d.ts +7 -6
- package/lib/mol-plugin/config.d.ts +1 -2
- package/lib/mol-plugin/config.js +3 -23
- package/lib/mol-plugin/features.d.ts +9 -0
- package/lib/mol-plugin/features.js +35 -0
- package/lib/mol-plugin/spec.d.ts +1 -1
- package/lib/mol-plugin/spec.js +4 -1
- 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/file.d.ts +3 -2
- package/lib/mol-plugin-state/actions/file.js +67 -31
- package/lib/mol-plugin-state/actions/structure.d.ts +1 -0
- package/lib/mol-plugin-state/actions/structure.js +41 -8
- package/lib/mol-plugin-state/animation/built-in/camera-rock.d.ts +16 -0
- package/lib/mol-plugin-state/animation/built-in/camera-rock.js +59 -0
- package/lib/mol-plugin-state/animation/built-in/camera-spin.d.ts +1 -1
- package/lib/mol-plugin-state/animation/built-in/camera-spin.js +9 -8
- package/lib/mol-plugin-state/animation/model.d.ts +4 -0
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +6 -6
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -1
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +149 -5
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +74 -2
- 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/manager/animation.d.ts +5 -1
- package/lib/mol-plugin-state/manager/animation.js +5 -5
- package/lib/mol-plugin-state/manager/structure/component.d.ts +13 -1
- package/lib/mol-plugin-state/manager/structure/component.js +13 -8
- 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/structure/superposition.js +2 -2
- package/lib/mol-plugin-ui/viewport/simple-settings.d.ts +1 -1
- package/lib/mol-plugin-ui/viewport/simple-settings.js +6 -14
- 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-line.d.ts +10 -0
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +11 -1
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +8 -4
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +11 -1
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +10 -6
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +11 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +8 -4
- 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-tube-mesh.d.ts +10 -0
- 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.d.ts +1 -1
- package/lib/mol-repr/visual.js +13 -8
- 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-state/tree/immutable.d.ts +18 -0
- package/lib/mol-state/tree/transient.d.ts +3 -4
- package/lib/mol-theme/clipping.d.ts +7 -15
- package/lib/mol-theme/clipping.js +5 -12
- package/lib/mol-theme/color/element-symbol.d.ts +243 -1
- package/lib/mol-theme/color/element-symbol.js +10 -5
- package/lib/mol-theme/color/entity-id.d.ts +1 -1
- package/lib/mol-theme/color/entity-id.js +26 -5
- package/lib/mol-theme/color/illustrative.d.ts +100 -29
- package/lib/mol-theme/color/illustrative.js +26 -7
- package/lib/mol-theme/color/molecule-type.d.ts +19 -1
- package/lib/mol-theme/color/molecule-type.js +10 -5
- package/lib/mol-theme/color/residue-name.d.ts +77 -1
- package/lib/mol-theme/color/residue-name.js +10 -5
- package/lib/mol-theme/color/secondary-structure.d.ts +27 -1
- package/lib/mol-theme/color/secondary-structure.js +10 -5
- 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 +233 -14
- 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/color/color.d.ts +1 -1
- package/lib/mol-util/color/color.js +1 -1
- package/lib/mol-util/color/params.d.ts +10 -0
- package/lib/mol-util/color/params.js +15 -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 +36 -35
- package/lib/commonjs/mol-util/float-packing.d.ts +0 -15
- package/lib/mol-util/float-packing.d.ts +0 -15
|
@@ -18,11 +18,11 @@ export function getTextureMaxCells(webgl, structure) {
|
|
|
18
18
|
return (d * d) / Math.max(1, (structure ? structure.units.length / 16 : 1));
|
|
19
19
|
}
|
|
20
20
|
//
|
|
21
|
-
export function computeUnitGaussianDensity(structure, unit, props) {
|
|
21
|
+
export function computeUnitGaussianDensity(structure, unit, sizeTheme, props) {
|
|
22
22
|
var _this = this;
|
|
23
23
|
var box = unit.lookup3d.boundary.box;
|
|
24
24
|
var p = ensureReasonableResolution(box, props);
|
|
25
|
-
var _a = getUnitConformationAndRadius(structure, unit, p), position = _a.position, radius = _a.radius;
|
|
25
|
+
var _a = getUnitConformationAndRadius(structure, unit, sizeTheme, p), position = _a.position, radius = _a.radius;
|
|
26
26
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
27
27
|
return __generator(this, function (_a) {
|
|
28
28
|
switch (_a.label) {
|
|
@@ -32,22 +32,22 @@ export function computeUnitGaussianDensity(structure, unit, props) {
|
|
|
32
32
|
});
|
|
33
33
|
}); });
|
|
34
34
|
}
|
|
35
|
-
export function computeUnitGaussianDensityTexture(structure, unit, props, webgl, texture) {
|
|
35
|
+
export function computeUnitGaussianDensityTexture(structure, unit, sizeTheme, props, webgl, texture) {
|
|
36
36
|
var _this = this;
|
|
37
37
|
var box = unit.lookup3d.boundary.box;
|
|
38
38
|
var p = ensureReasonableResolution(box, props, getTextureMaxCells(webgl, structure));
|
|
39
|
-
var _a = getUnitConformationAndRadius(structure, unit, p), position = _a.position, radius = _a.radius;
|
|
39
|
+
var _a = getUnitConformationAndRadius(structure, unit, sizeTheme, p), position = _a.position, radius = _a.radius;
|
|
40
40
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
41
41
|
return __generator(this, function (_a) {
|
|
42
42
|
return [2 /*return*/, GaussianDensityTexture(webgl, position, box, radius, p, texture)];
|
|
43
43
|
});
|
|
44
44
|
}); });
|
|
45
45
|
}
|
|
46
|
-
export function computeUnitGaussianDensityTexture2d(structure, unit, powerOfTwo, props, webgl, texture) {
|
|
46
|
+
export function computeUnitGaussianDensityTexture2d(structure, unit, sizeTheme, powerOfTwo, props, webgl, texture) {
|
|
47
47
|
var _this = this;
|
|
48
48
|
var box = unit.lookup3d.boundary.box;
|
|
49
49
|
var p = ensureReasonableResolution(box, props, getTextureMaxCells(webgl, structure));
|
|
50
|
-
var _a = getUnitConformationAndRadius(structure, unit, p), position = _a.position, radius = _a.radius;
|
|
50
|
+
var _a = getUnitConformationAndRadius(structure, unit, sizeTheme, p), position = _a.position, radius = _a.radius;
|
|
51
51
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
53
|
return [2 /*return*/, GaussianDensityTexture2d(webgl, position, box, radius, powerOfTwo, p, texture)];
|
|
@@ -55,11 +55,11 @@ export function computeUnitGaussianDensityTexture2d(structure, unit, powerOfTwo,
|
|
|
55
55
|
}); });
|
|
56
56
|
}
|
|
57
57
|
//
|
|
58
|
-
export function computeStructureGaussianDensity(structure, props) {
|
|
58
|
+
export function computeStructureGaussianDensity(structure, sizeTheme, props) {
|
|
59
59
|
var _this = this;
|
|
60
60
|
var box = structure.lookup3d.boundary.box;
|
|
61
61
|
var p = ensureReasonableResolution(box, props);
|
|
62
|
-
var _a = getStructureConformationAndRadius(structure, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
62
|
+
var _a = getStructureConformationAndRadius(structure, sizeTheme, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
63
63
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
64
64
|
return __generator(this, function (_a) {
|
|
65
65
|
switch (_a.label) {
|
|
@@ -69,22 +69,22 @@ export function computeStructureGaussianDensity(structure, props) {
|
|
|
69
69
|
});
|
|
70
70
|
}); });
|
|
71
71
|
}
|
|
72
|
-
export function computeStructureGaussianDensityTexture(structure, props, webgl, texture) {
|
|
72
|
+
export function computeStructureGaussianDensityTexture(structure, sizeTheme, props, webgl, texture) {
|
|
73
73
|
var _this = this;
|
|
74
74
|
var box = structure.lookup3d.boundary.box;
|
|
75
75
|
var p = ensureReasonableResolution(box, props, getTextureMaxCells(webgl));
|
|
76
|
-
var _a = getStructureConformationAndRadius(structure, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
76
|
+
var _a = getStructureConformationAndRadius(structure, sizeTheme, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
77
77
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
78
78
|
return __generator(this, function (_a) {
|
|
79
79
|
return [2 /*return*/, GaussianDensityTexture(webgl, position, box, radius, p, texture)];
|
|
80
80
|
});
|
|
81
81
|
}); });
|
|
82
82
|
}
|
|
83
|
-
export function computeStructureGaussianDensityTexture2d(structure, powerOfTwo, props, webgl, texture) {
|
|
83
|
+
export function computeStructureGaussianDensityTexture2d(structure, sizeTheme, powerOfTwo, props, webgl, texture) {
|
|
84
84
|
var _this = this;
|
|
85
85
|
var box = structure.lookup3d.boundary.box;
|
|
86
86
|
var p = ensureReasonableResolution(box, props, getTextureMaxCells(webgl));
|
|
87
|
-
var _a = getStructureConformationAndRadius(structure, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
87
|
+
var _a = getStructureConformationAndRadius(structure, sizeTheme, props.ignoreHydrogens, props.traceOnly), position = _a.position, radius = _a.radius;
|
|
88
88
|
return Task.create('Gaussian Density', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
89
89
|
return __generator(this, function (_a) {
|
|
90
90
|
return [2 /*return*/, GaussianDensityTexture2d(webgl, position, box, radius, powerOfTwo, p, texture)];
|
|
@@ -8,5 +8,6 @@ import { Task } from '../../../../mol-task';
|
|
|
8
8
|
import { CommonSurfaceProps } from './common';
|
|
9
9
|
import { DensityData } from '../../../../mol-math/geometry';
|
|
10
10
|
import { MolecularSurfaceCalculationProps } from '../../../../mol-math/geometry/molecular-surface';
|
|
11
|
+
import { SizeTheme } from '../../../../mol-theme/size';
|
|
11
12
|
export declare type MolecularSurfaceProps = MolecularSurfaceCalculationProps & CommonSurfaceProps;
|
|
12
|
-
export declare function computeUnitMolecularSurface(structure: Structure, unit: Unit, props: MolecularSurfaceProps): Task<DensityData>;
|
|
13
|
+
export declare function computeUnitMolecularSurface(structure: Structure, unit: Unit, sizeTheme: SizeTheme<any>, props: MolecularSurfaceProps): Task<DensityData>;
|
|
@@ -8,9 +8,9 @@ import { Task } from '../../../../mol-task';
|
|
|
8
8
|
import { getUnitConformationAndRadius, ensureReasonableResolution } from './common';
|
|
9
9
|
import { calcMolecularSurface } from '../../../../mol-math/geometry/molecular-surface';
|
|
10
10
|
import { OrderedSet } from '../../../../mol-data/int';
|
|
11
|
-
function getPositionDataAndMaxRadius(structure, unit, props) {
|
|
11
|
+
function getPositionDataAndMaxRadius(structure, unit, sizeTheme, props) {
|
|
12
12
|
var probeRadius = props.probeRadius;
|
|
13
|
-
var _a = getUnitConformationAndRadius(structure, unit, props), position = _a.position, boundary = _a.boundary, radius = _a.radius;
|
|
13
|
+
var _a = getUnitConformationAndRadius(structure, unit, sizeTheme, props), position = _a.position, boundary = _a.boundary, radius = _a.radius;
|
|
14
14
|
var indices = position.indices;
|
|
15
15
|
var n = OrderedSet.size(indices);
|
|
16
16
|
var radii = new Float32Array(OrderedSet.end(indices));
|
|
@@ -24,11 +24,11 @@ function getPositionDataAndMaxRadius(structure, unit, props) {
|
|
|
24
24
|
}
|
|
25
25
|
return { position: __assign(__assign({}, position), { radius: radii }), boundary: boundary, maxRadius: maxRadius };
|
|
26
26
|
}
|
|
27
|
-
export function computeUnitMolecularSurface(structure, unit, props) {
|
|
27
|
+
export function computeUnitMolecularSurface(structure, unit, sizeTheme, props) {
|
|
28
28
|
var _this = this;
|
|
29
29
|
var box = unit.lookup3d.boundary.box;
|
|
30
30
|
var p = ensureReasonableResolution(box, props);
|
|
31
|
-
var _a = getPositionDataAndMaxRadius(structure, unit, p), position = _a.position, boundary = _a.boundary, maxRadius = _a.maxRadius;
|
|
31
|
+
var _a = getPositionDataAndMaxRadius(structure, unit, sizeTheme, p), position = _a.position, boundary = _a.boundary, maxRadius = _a.maxRadius;
|
|
32
32
|
return Task.create('Molecular Surface', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|
|
33
33
|
return __generator(this, function (_a) {
|
|
34
34
|
switch (_a.label) {
|
package/lib/mol-repr/visual.d.ts
CHANGED
package/lib/mol-repr/visual.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -44,11 +44,12 @@ var Visual;
|
|
|
44
44
|
function mark(renderObject, loci, action, lociApply, previous) {
|
|
45
45
|
if (!renderObject || isEmptyLoci(loci))
|
|
46
46
|
return false;
|
|
47
|
-
var _a = renderObject.values, tMarker = _a.tMarker,
|
|
47
|
+
var _a = renderObject.values, tMarker = _a.tMarker, uMarker = _a.uMarker, markerAverage = _a.markerAverage, markerStatus = _a.markerStatus, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
48
48
|
var count = uGroupCount.ref.value * instanceCount.ref.value;
|
|
49
49
|
var array = tMarker.ref.value.array;
|
|
50
50
|
var currentStatus = markerStatus.ref.value;
|
|
51
51
|
if (!isEveryLoci(loci)) {
|
|
52
|
+
// assume that all interval are non-overlapping
|
|
52
53
|
var intervalSize_1 = 0;
|
|
53
54
|
lociApply(loci, function (interval) {
|
|
54
55
|
intervalSize_1 += Interval.size(interval);
|
|
@@ -101,7 +102,6 @@ var Visual;
|
|
|
101
102
|
ValueCell.updateIfChanged(uMarker, status);
|
|
102
103
|
if (status === -1)
|
|
103
104
|
ValueCell.update(tMarker, tMarker.ref.value);
|
|
104
|
-
ValueCell.updateIfChanged(dMarkerType, status === -1 ? 'groupInstance' : 'uniform');
|
|
105
105
|
ValueCell.updateIfChanged(markerAverage, average);
|
|
106
106
|
ValueCell.updateIfChanged(markerStatus, status);
|
|
107
107
|
}
|
|
@@ -111,7 +111,7 @@ var Visual;
|
|
|
111
111
|
function setOverpaint(renderObject, overpaint, lociApply, clear, smoothing) {
|
|
112
112
|
if (!renderObject)
|
|
113
113
|
return;
|
|
114
|
-
var _a = renderObject.values, tOverpaint = _a.tOverpaint, dOverpaintType = _a.dOverpaintType, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
114
|
+
var _a = renderObject.values, tOverpaint = _a.tOverpaint, dOverpaintType = _a.dOverpaintType, dOverpaint = _a.dOverpaint, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
115
115
|
var count = uGroupCount.ref.value * instanceCount.ref.value;
|
|
116
116
|
// ensure texture has right size
|
|
117
117
|
createOverpaint(overpaint.layers.length ? count : 0, renderObject.values);
|
|
@@ -135,6 +135,7 @@ var Visual;
|
|
|
135
135
|
}
|
|
136
136
|
ValueCell.update(tOverpaint, tOverpaint.ref.value);
|
|
137
137
|
ValueCell.updateIfChanged(dOverpaintType, 'groupInstance');
|
|
138
|
+
ValueCell.updateIfChanged(dOverpaint, overpaint.layers.length > 0);
|
|
138
139
|
if (overpaint.layers.length === 0)
|
|
139
140
|
return;
|
|
140
141
|
if (smoothing && hasColorSmoothingProp(smoothing.props)) {
|
|
@@ -161,7 +162,7 @@ var Visual;
|
|
|
161
162
|
function setTransparency(renderObject, transparency, lociApply, clear, smoothing) {
|
|
162
163
|
if (!renderObject)
|
|
163
164
|
return;
|
|
164
|
-
var _a = renderObject.values, tTransparency = _a.tTransparency, dTransparencyType = _a.dTransparencyType, transparencyAverage = _a.transparencyAverage, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
165
|
+
var _a = renderObject.values, tTransparency = _a.tTransparency, dTransparencyType = _a.dTransparencyType, transparencyAverage = _a.transparencyAverage, dTransparency = _a.dTransparency, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
165
166
|
var count = uGroupCount.ref.value * instanceCount.ref.value;
|
|
166
167
|
// ensure texture has right size and variant
|
|
167
168
|
createTransparency(transparency.layers.length ? count : 0, renderObject.values);
|
|
@@ -184,6 +185,7 @@ var Visual;
|
|
|
184
185
|
ValueCell.update(tTransparency, tTransparency.ref.value);
|
|
185
186
|
ValueCell.updateIfChanged(transparencyAverage, getTransparencyAverage(array, count));
|
|
186
187
|
ValueCell.updateIfChanged(dTransparencyType, 'groupInstance');
|
|
188
|
+
ValueCell.updateIfChanged(dTransparency, transparency.layers.length > 0);
|
|
187
189
|
if (transparency.layers.length === 0)
|
|
188
190
|
return;
|
|
189
191
|
if (smoothing && hasColorSmoothingProp(smoothing.props)) {
|
|
@@ -210,7 +212,7 @@ var Visual;
|
|
|
210
212
|
function setSubstance(renderObject, substance, lociApply, clear, smoothing) {
|
|
211
213
|
if (!renderObject)
|
|
212
214
|
return;
|
|
213
|
-
var _a = renderObject.values, tSubstance = _a.tSubstance, dSubstanceType = _a.dSubstanceType, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
215
|
+
var _a = renderObject.values, tSubstance = _a.tSubstance, dSubstanceType = _a.dSubstanceType, dSubstance = _a.dSubstance, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
214
216
|
var count = uGroupCount.ref.value * instanceCount.ref.value;
|
|
215
217
|
// ensure texture has right size
|
|
216
218
|
createSubstance(substance.layers.length ? count : 0, renderObject.values);
|
|
@@ -234,6 +236,7 @@ var Visual;
|
|
|
234
236
|
}
|
|
235
237
|
ValueCell.update(tSubstance, tSubstance.ref.value);
|
|
236
238
|
ValueCell.updateIfChanged(dSubstanceType, 'groupInstance');
|
|
239
|
+
ValueCell.updateIfChanged(dSubstance, substance.layers.length > 0);
|
|
237
240
|
if (substance.layers.length === 0)
|
|
238
241
|
return;
|
|
239
242
|
if (smoothing && hasColorSmoothingProp(smoothing.props)) {
|
|
@@ -260,10 +263,11 @@ var Visual;
|
|
|
260
263
|
function setClipping(renderObject, clipping, lociApply, clear) {
|
|
261
264
|
if (!renderObject)
|
|
262
265
|
return;
|
|
263
|
-
var _a = renderObject.values, tClipping = _a.tClipping, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
266
|
+
var _a = renderObject.values, tClipping = _a.tClipping, dClipping = _a.dClipping, uGroupCount = _a.uGroupCount, instanceCount = _a.instanceCount;
|
|
264
267
|
var count = uGroupCount.ref.value * instanceCount.ref.value;
|
|
268
|
+
var layers = clipping.layers;
|
|
265
269
|
// ensure texture has right size
|
|
266
|
-
createClipping(
|
|
270
|
+
createClipping(layers.length ? count : 0, renderObject.values);
|
|
267
271
|
var array = tClipping.ref.value.array;
|
|
268
272
|
// clear if requested
|
|
269
273
|
if (clear)
|
|
@@ -281,6 +285,7 @@ var Visual;
|
|
|
281
285
|
_loop_4(i, il);
|
|
282
286
|
}
|
|
283
287
|
ValueCell.update(tClipping, tClipping.ref.value);
|
|
288
|
+
ValueCell.updateIfChanged(dClipping, clipping.layers.length > 0);
|
|
284
289
|
}
|
|
285
290
|
Visual.setClipping = setClipping;
|
|
286
291
|
function setTransform(renderObject, transform, instanceTransforms) {
|
|
@@ -46,27 +46,9 @@ export declare const DirectVolumeParams: {
|
|
|
46
46
|
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
47
47
|
}) | undefined;
|
|
48
48
|
};
|
|
49
|
-
doubleSided: PD.BooleanParam;
|
|
50
|
-
flipSided: PD.BooleanParam;
|
|
51
|
-
flatShaded: PD.BooleanParam;
|
|
52
49
|
ignoreLight: PD.BooleanParam;
|
|
53
50
|
xrayShaded: PD.BooleanParam;
|
|
54
|
-
|
|
55
|
-
controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[];
|
|
56
|
-
list: {
|
|
57
|
-
kind: "set" | "interpolate";
|
|
58
|
-
colors: import("../../mol-util/color/color").ColorListEntry[];
|
|
59
|
-
};
|
|
60
|
-
}>, "volume"> | PD.NamedParams<PD.Normalize<{
|
|
61
|
-
isoValue: Readonly<{
|
|
62
|
-
kind: "absolute";
|
|
63
|
-
absoluteValue: number;
|
|
64
|
-
}> | Readonly<{
|
|
65
|
-
kind: "relative";
|
|
66
|
-
relativeValue: number;
|
|
67
|
-
}>;
|
|
68
|
-
singleLayer: boolean;
|
|
69
|
-
}>, "isosurface">>;
|
|
51
|
+
controlPoints: PD.LineGraph;
|
|
70
52
|
stepsPerCell: PD.Numeric;
|
|
71
53
|
jumpLength: PD.Numeric;
|
|
72
54
|
alpha: PD.Numeric;
|
|
@@ -75,6 +57,16 @@ export declare const DirectVolumeParams: {
|
|
|
75
57
|
roughness: number;
|
|
76
58
|
bumpiness: number;
|
|
77
59
|
}>>;
|
|
60
|
+
clip: PD.Group<PD.Normalize<{
|
|
61
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
62
|
+
objects: PD.Normalize<{
|
|
63
|
+
type: any;
|
|
64
|
+
invert: any;
|
|
65
|
+
position: any;
|
|
66
|
+
rotation: any;
|
|
67
|
+
scale: any;
|
|
68
|
+
}>[];
|
|
69
|
+
}>>;
|
|
78
70
|
};
|
|
79
71
|
export declare type DirectVolumeParams = typeof DirectVolumeParams;
|
|
80
72
|
export declare function getDirectVolumeParams(ctx: ThemeRegistryContext, volume: Volume): {
|
|
@@ -101,27 +93,9 @@ export declare function getDirectVolumeParams(ctx: ThemeRegistryContext, volume:
|
|
|
101
93
|
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
102
94
|
}) | undefined;
|
|
103
95
|
};
|
|
104
|
-
doubleSided: PD.BooleanParam;
|
|
105
|
-
flipSided: PD.BooleanParam;
|
|
106
|
-
flatShaded: PD.BooleanParam;
|
|
107
96
|
ignoreLight: PD.BooleanParam;
|
|
108
97
|
xrayShaded: PD.BooleanParam;
|
|
109
|
-
|
|
110
|
-
controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[];
|
|
111
|
-
list: {
|
|
112
|
-
kind: "set" | "interpolate";
|
|
113
|
-
colors: import("../../mol-util/color/color").ColorListEntry[];
|
|
114
|
-
};
|
|
115
|
-
}>, "volume"> | PD.NamedParams<PD.Normalize<{
|
|
116
|
-
isoValue: Readonly<{
|
|
117
|
-
kind: "absolute";
|
|
118
|
-
absoluteValue: number;
|
|
119
|
-
}> | Readonly<{
|
|
120
|
-
kind: "relative";
|
|
121
|
-
relativeValue: number;
|
|
122
|
-
}>;
|
|
123
|
-
singleLayer: boolean;
|
|
124
|
-
}>, "isosurface">>;
|
|
98
|
+
controlPoints: PD.LineGraph;
|
|
125
99
|
stepsPerCell: PD.Numeric;
|
|
126
100
|
jumpLength: PD.Numeric;
|
|
127
101
|
alpha: PD.Numeric;
|
|
@@ -130,6 +104,16 @@ export declare function getDirectVolumeParams(ctx: ThemeRegistryContext, volume:
|
|
|
130
104
|
roughness: number;
|
|
131
105
|
bumpiness: number;
|
|
132
106
|
}>>;
|
|
107
|
+
clip: PD.Group<PD.Normalize<{
|
|
108
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
109
|
+
objects: PD.Normalize<{
|
|
110
|
+
type: any;
|
|
111
|
+
invert: any;
|
|
112
|
+
position: any;
|
|
113
|
+
rotation: any;
|
|
114
|
+
scale: any;
|
|
115
|
+
}>[];
|
|
116
|
+
}>>;
|
|
133
117
|
};
|
|
134
118
|
export declare type DirectVolumeProps = PD.Values<DirectVolumeParams>;
|
|
135
119
|
export declare function DirectVolumeVisual(materialId: number): VolumeVisual<DirectVolumeParams>;
|
|
@@ -158,27 +142,9 @@ export declare const DirectVolumeRepresentationProvider: VolumeRepresentationPro
|
|
|
158
142
|
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
159
143
|
}) | undefined;
|
|
160
144
|
};
|
|
161
|
-
doubleSided: PD.BooleanParam;
|
|
162
|
-
flipSided: PD.BooleanParam;
|
|
163
|
-
flatShaded: PD.BooleanParam;
|
|
164
145
|
ignoreLight: PD.BooleanParam;
|
|
165
146
|
xrayShaded: PD.BooleanParam;
|
|
166
|
-
|
|
167
|
-
controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[];
|
|
168
|
-
list: {
|
|
169
|
-
kind: "set" | "interpolate";
|
|
170
|
-
colors: import("../../mol-util/color/color").ColorListEntry[];
|
|
171
|
-
};
|
|
172
|
-
}>, "volume"> | PD.NamedParams<PD.Normalize<{
|
|
173
|
-
isoValue: Readonly<{
|
|
174
|
-
kind: "absolute";
|
|
175
|
-
absoluteValue: number;
|
|
176
|
-
}> | Readonly<{
|
|
177
|
-
kind: "relative";
|
|
178
|
-
relativeValue: number;
|
|
179
|
-
}>;
|
|
180
|
-
singleLayer: boolean;
|
|
181
|
-
}>, "isosurface">>;
|
|
147
|
+
controlPoints: PD.LineGraph;
|
|
182
148
|
stepsPerCell: PD.Numeric;
|
|
183
149
|
jumpLength: PD.Numeric;
|
|
184
150
|
alpha: PD.Numeric;
|
|
@@ -187,4 +153,14 @@ export declare const DirectVolumeRepresentationProvider: VolumeRepresentationPro
|
|
|
187
153
|
roughness: number;
|
|
188
154
|
bumpiness: number;
|
|
189
155
|
}>>;
|
|
156
|
+
clip: PD.Group<PD.Normalize<{
|
|
157
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
158
|
+
objects: PD.Normalize<{
|
|
159
|
+
type: any;
|
|
160
|
+
invert: any;
|
|
161
|
+
position: any;
|
|
162
|
+
rotation: any;
|
|
163
|
+
scale: any;
|
|
164
|
+
}>[];
|
|
165
|
+
}>>;
|
|
190
166
|
}, "direct-volume">;
|
|
@@ -35,7 +35,8 @@ export function createDirectVolume2d(ctx, webgl, volume, directVolume) {
|
|
|
35
35
|
var texture = directVolume ? directVolume.gridTexture.ref.value : webgl.resources.texture('image-uint8', 'rgba', 'ubyte', 'linear');
|
|
36
36
|
texture.load(textureImage);
|
|
37
37
|
var _b = getUnitToCartn(volume.grid), unitToCartn = _b.unitToCartn, cellDim = _b.cellDim;
|
|
38
|
-
|
|
38
|
+
var axisOrder = volume.grid.cells.space.axisOrderSlowToFast;
|
|
39
|
+
return DirectVolume.create(bbox, gridDimension, transform, unitToCartn, cellDim, texture, volume.grid.stats, false, axisOrder, directVolume);
|
|
39
40
|
}
|
|
40
41
|
// 3d volume texture
|
|
41
42
|
function getUnitToCartn(grid) {
|
|
@@ -63,7 +64,8 @@ export function createDirectVolume3d(ctx, webgl, volume, directVolume) {
|
|
|
63
64
|
var texture = directVolume ? directVolume.gridTexture.ref.value : webgl.resources.texture('volume-uint8', 'rgba', 'ubyte', 'linear');
|
|
64
65
|
texture.load(textureVolume);
|
|
65
66
|
var _a = getUnitToCartn(volume.grid), unitToCartn = _a.unitToCartn, cellDim = _a.cellDim;
|
|
66
|
-
|
|
67
|
+
var axisOrder = volume.grid.cells.space.axisOrderSlowToFast;
|
|
68
|
+
return DirectVolume.create(bbox, gridDimension, transform, unitToCartn, cellDim, texture, volume.grid.stats, false, axisOrder, directVolume);
|
|
67
69
|
}
|
|
68
70
|
//
|
|
69
71
|
export function createDirectVolume(ctx, volume, theme, props, directVolume) {
|
|
@@ -80,9 +82,7 @@ export function createDirectVolume(ctx, volume, theme, props, directVolume) {
|
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
function getLoci(volume, props) {
|
|
83
|
-
return
|
|
84
|
-
? Volume.Isosurface.Loci(volume, props.renderMode.params.isoValue)
|
|
85
|
-
: Volume.Loci(volume);
|
|
85
|
+
return Volume.Loci(volume);
|
|
86
86
|
}
|
|
87
87
|
export function getDirectVolumeLoci(pickingId, volume, props, id) {
|
|
88
88
|
var objectId = pickingId.objectId, groupId = pickingId.groupId;
|
|
@@ -92,16 +92,12 @@ export function getDirectVolumeLoci(pickingId, volume, props, id) {
|
|
|
92
92
|
return EmptyLoci;
|
|
93
93
|
}
|
|
94
94
|
export function eachDirectVolume(loci, volume, props, apply) {
|
|
95
|
-
|
|
96
|
-
? props.renderMode.params.isoValue : undefined;
|
|
97
|
-
return eachVolumeLoci(loci, volume, isoValue, apply);
|
|
95
|
+
return eachVolumeLoci(loci, volume, undefined, apply);
|
|
98
96
|
}
|
|
99
97
|
//
|
|
100
98
|
export var DirectVolumeParams = __assign(__assign({}, DirectVolume.Params), { quality: __assign(__assign({}, DirectVolume.Params.quality), { isEssential: false }) });
|
|
101
99
|
export function getDirectVolumeParams(ctx, volume) {
|
|
102
|
-
|
|
103
|
-
p.renderMode = DirectVolume.createRenderModeParam(volume.grid.stats);
|
|
104
|
-
return p;
|
|
100
|
+
return PD.clone(DirectVolumeParams);
|
|
105
101
|
}
|
|
106
102
|
export function DirectVolumeVisual(materialId) {
|
|
107
103
|
return VolumeVisual({
|
|
@@ -128,7 +124,7 @@ export var DirectVolumeRepresentationProvider = VolumeRepresentationProvider({
|
|
|
128
124
|
factory: DirectVolumeRepresentation,
|
|
129
125
|
getParams: getDirectVolumeParams,
|
|
130
126
|
defaultValues: PD.getDefaultValues(DirectVolumeParams),
|
|
131
|
-
defaultColorTheme: { name: '
|
|
127
|
+
defaultColorTheme: { name: 'volume-value' },
|
|
132
128
|
defaultSizeTheme: { name: 'uniform' },
|
|
133
129
|
isApplicable: function (volume) { return !Volume.isEmpty(volume); }
|
|
134
130
|
});
|
|
@@ -101,6 +101,16 @@ export declare function IsosurfaceVisual(materialId: number, volume: Volume, pro
|
|
|
101
101
|
roughness: number;
|
|
102
102
|
bumpiness: number;
|
|
103
103
|
}>>;
|
|
104
|
+
clip: PD.Group<PD.Normalize<{
|
|
105
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
106
|
+
objects: PD.Normalize<{
|
|
107
|
+
type: any;
|
|
108
|
+
invert: any;
|
|
109
|
+
position: any;
|
|
110
|
+
rotation: any;
|
|
111
|
+
scale: any;
|
|
112
|
+
}>[];
|
|
113
|
+
}>>;
|
|
104
114
|
}>;
|
|
105
115
|
export declare function eachIsosurface(loci: Loci, volume: Volume, props: VolumeIsosurfaceProps, apply: (interval: Interval) => boolean): boolean;
|
|
106
116
|
export declare function createVolumeIsosurfaceMesh(ctx: VisualContext, volume: Volume, theme: Theme, props: VolumeIsosurfaceProps, mesh?: Mesh): Promise<Mesh>;
|
|
@@ -164,6 +174,16 @@ export declare const IsosurfaceMeshParams: {
|
|
|
164
174
|
roughness: number;
|
|
165
175
|
bumpiness: number;
|
|
166
176
|
}>>;
|
|
177
|
+
clip: PD.Group<PD.Normalize<{
|
|
178
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
179
|
+
objects: PD.Normalize<{
|
|
180
|
+
type: any;
|
|
181
|
+
invert: any;
|
|
182
|
+
position: any;
|
|
183
|
+
rotation: any;
|
|
184
|
+
scale: any;
|
|
185
|
+
}>[];
|
|
186
|
+
}>>;
|
|
167
187
|
};
|
|
168
188
|
export declare type IsosurfaceMeshParams = typeof IsosurfaceMeshParams;
|
|
169
189
|
export declare function IsosurfaceMeshVisual(materialId: number): VolumeVisual<IsosurfaceMeshParams>;
|
|
@@ -223,6 +243,16 @@ export declare const IsosurfaceWireframeParams: {
|
|
|
223
243
|
roughness: number;
|
|
224
244
|
bumpiness: number;
|
|
225
245
|
}>>;
|
|
246
|
+
clip: PD.Group<PD.Normalize<{
|
|
247
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
248
|
+
objects: PD.Normalize<{
|
|
249
|
+
type: any;
|
|
250
|
+
invert: any;
|
|
251
|
+
position: any;
|
|
252
|
+
rotation: any;
|
|
253
|
+
scale: any;
|
|
254
|
+
}>[];
|
|
255
|
+
}>>;
|
|
226
256
|
};
|
|
227
257
|
export declare type IsosurfaceWireframeParams = typeof IsosurfaceWireframeParams;
|
|
228
258
|
export declare function IsosurfaceWireframeVisual(materialId: number): VolumeVisual<IsosurfaceWireframeParams>;
|
|
@@ -282,6 +312,16 @@ export declare const IsosurfaceParams: {
|
|
|
282
312
|
roughness: number;
|
|
283
313
|
bumpiness: number;
|
|
284
314
|
}>>;
|
|
315
|
+
clip: PD.Group<PD.Normalize<{
|
|
316
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
317
|
+
objects: PD.Normalize<{
|
|
318
|
+
type: any;
|
|
319
|
+
invert: any;
|
|
320
|
+
position: any;
|
|
321
|
+
rotation: any;
|
|
322
|
+
scale: any;
|
|
323
|
+
}>[];
|
|
324
|
+
}>>;
|
|
285
325
|
tryUseGpu: PD.BooleanParam;
|
|
286
326
|
doubleSided: PD.BooleanParam;
|
|
287
327
|
flipSided: PD.BooleanParam;
|
|
@@ -347,6 +387,16 @@ export declare function getIsosurfaceParams(ctx: ThemeRegistryContext, volume: V
|
|
|
347
387
|
roughness: number;
|
|
348
388
|
bumpiness: number;
|
|
349
389
|
}>>;
|
|
390
|
+
clip: PD.Group<PD.Normalize<{
|
|
391
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
392
|
+
objects: PD.Normalize<{
|
|
393
|
+
type: any;
|
|
394
|
+
invert: any;
|
|
395
|
+
position: any;
|
|
396
|
+
rotation: any;
|
|
397
|
+
scale: any;
|
|
398
|
+
}>[];
|
|
399
|
+
}>>;
|
|
350
400
|
tryUseGpu: PD.BooleanParam;
|
|
351
401
|
doubleSided: PD.BooleanParam;
|
|
352
402
|
flipSided: PD.BooleanParam;
|
|
@@ -413,6 +463,16 @@ export declare const IsosurfaceRepresentationProvider: VolumeRepresentationProvi
|
|
|
413
463
|
roughness: number;
|
|
414
464
|
bumpiness: number;
|
|
415
465
|
}>>;
|
|
466
|
+
clip: PD.Group<PD.Normalize<{
|
|
467
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
468
|
+
objects: PD.Normalize<{
|
|
469
|
+
type: any;
|
|
470
|
+
invert: any;
|
|
471
|
+
position: any;
|
|
472
|
+
rotation: any;
|
|
473
|
+
scale: any;
|
|
474
|
+
}>[];
|
|
475
|
+
}>>;
|
|
416
476
|
tryUseGpu: PD.BooleanParam;
|
|
417
477
|
doubleSided: PD.BooleanParam;
|
|
418
478
|
flipSided: PD.BooleanParam;
|
|
@@ -31,6 +31,11 @@ function gpuSupport(webgl) {
|
|
|
31
31
|
}
|
|
32
32
|
var Padding = 1;
|
|
33
33
|
function suitableForGpu(volume, webgl) {
|
|
34
|
+
// small volumes are about as fast or faster on CPU vs integrated GPU
|
|
35
|
+
if (volume.grid.cells.data.length < Math.pow(10, 3))
|
|
36
|
+
return false;
|
|
37
|
+
// the GPU is much more memory contraint, especially true for integrated GPUs,
|
|
38
|
+
// fallback to CPU for large volumes
|
|
34
39
|
var gridDim = volume.grid.cells.space.dimensions;
|
|
35
40
|
var powerOfTwoSize = getVolumeTexture2dLayout(gridDim, Padding).powerOfTwoSize;
|
|
36
41
|
return powerOfTwoSize <= webgl.maxTextureSize / 2;
|
|
@@ -140,17 +145,21 @@ var VolumeIsosurfaceTexture;
|
|
|
140
145
|
})(VolumeIsosurfaceTexture || (VolumeIsosurfaceTexture = {}));
|
|
141
146
|
function createVolumeIsosurfaceTextureMesh(ctx, volume, theme, props, textureMesh) {
|
|
142
147
|
return __awaiter(this, void 0, void 0, function () {
|
|
143
|
-
var _a, max, min, diff, value, isoLevel, _b, texture, gridDimension, gridTexDim, gridTexScale, transform, buffer, gv, surface;
|
|
148
|
+
var _a, max, min, diff, value, isoLevel, _b, texture, gridDimension, gridTexDim, gridTexScale, transform, axisOrder, buffer, gv, surface;
|
|
144
149
|
return __generator(this, function (_c) {
|
|
145
150
|
if (!ctx.webgl)
|
|
146
151
|
throw new Error('webgl context required to create volume isosurface texture-mesh');
|
|
152
|
+
if (volume.grid.cells.data.length <= 1) {
|
|
153
|
+
return [2 /*return*/, TextureMesh.createEmpty(textureMesh)];
|
|
154
|
+
}
|
|
147
155
|
_a = volume.grid.stats, max = _a.max, min = _a.min;
|
|
148
156
|
diff = max - min;
|
|
149
157
|
value = Volume.IsoValue.toAbsolute(props.isoValue, volume.grid.stats).absoluteValue;
|
|
150
158
|
isoLevel = ((value - min) / diff);
|
|
151
159
|
_b = VolumeIsosurfaceTexture.get(volume, ctx.webgl), texture = _b.texture, gridDimension = _b.gridDimension, gridTexDim = _b.gridTexDim, gridTexScale = _b.gridTexScale, transform = _b.transform;
|
|
160
|
+
axisOrder = volume.grid.cells.space.axisOrderSlowToFast;
|
|
152
161
|
buffer = textureMesh === null || textureMesh === void 0 ? void 0 : textureMesh.doubleBuffer.get();
|
|
153
|
-
gv = extractIsosurface(ctx.webgl, texture, gridDimension, gridTexDim, gridTexScale, transform, isoLevel, value < 0, false, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
|
|
162
|
+
gv = extractIsosurface(ctx.webgl, texture, gridDimension, gridTexDim, gridTexScale, transform, isoLevel, value < 0, false, axisOrder, buffer === null || buffer === void 0 ? void 0 : buffer.vertex, buffer === null || buffer === void 0 ? void 0 : buffer.group, buffer === null || buffer === void 0 ? void 0 : buffer.normal);
|
|
154
163
|
surface = TextureMesh.create(gv.vertexCount, 1, gv.vertexTexture, gv.groupTexture, gv.normalTexture, Volume.getBoundingSphere(volume), textureMesh);
|
|
155
164
|
return [2 /*return*/, surface];
|
|
156
165
|
});
|
|
@@ -66,6 +66,16 @@ export declare namespace VolumeRepresentationRegistry {
|
|
|
66
66
|
roughness: number;
|
|
67
67
|
bumpiness: number;
|
|
68
68
|
}>>;
|
|
69
|
+
clip: import("../../mol-util/param-definition").ParamDefinition.Group<import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
70
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
71
|
+
objects: import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
72
|
+
type: any;
|
|
73
|
+
invert: any;
|
|
74
|
+
position: any;
|
|
75
|
+
rotation: any;
|
|
76
|
+
scale: any;
|
|
77
|
+
}>[];
|
|
78
|
+
}>>;
|
|
69
79
|
tryUseGpu: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
70
80
|
doubleSided: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
71
81
|
flipSided: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
@@ -128,6 +138,16 @@ export declare namespace VolumeRepresentationRegistry {
|
|
|
128
138
|
roughness: number;
|
|
129
139
|
bumpiness: number;
|
|
130
140
|
}>>;
|
|
141
|
+
clip: import("../../mol-util/param-definition").ParamDefinition.Group<import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
142
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
143
|
+
objects: import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
144
|
+
type: any;
|
|
145
|
+
invert: any;
|
|
146
|
+
position: any;
|
|
147
|
+
rotation: any;
|
|
148
|
+
scale: any;
|
|
149
|
+
}>[];
|
|
150
|
+
}>>;
|
|
131
151
|
}, "slice">;
|
|
132
152
|
'direct-volume': import("./representation").VolumeRepresentationProvider<{
|
|
133
153
|
quality: {
|
|
@@ -153,27 +173,9 @@ export declare namespace VolumeRepresentationRegistry {
|
|
|
153
173
|
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
154
174
|
}) | undefined;
|
|
155
175
|
};
|
|
156
|
-
doubleSided: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
157
|
-
flipSided: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
158
|
-
flatShaded: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
159
176
|
ignoreLight: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
160
177
|
xrayShaded: import("../../mol-util/param-definition").ParamDefinition.BooleanParam;
|
|
161
|
-
|
|
162
|
-
controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[];
|
|
163
|
-
list: {
|
|
164
|
-
kind: "set" | "interpolate";
|
|
165
|
-
colors: import("../../mol-util/color/color").ColorListEntry[];
|
|
166
|
-
};
|
|
167
|
-
}>, "volume"> | import("../../mol-util/param-definition").ParamDefinition.NamedParams<import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
168
|
-
isoValue: Readonly<{
|
|
169
|
-
kind: "absolute";
|
|
170
|
-
absoluteValue: number;
|
|
171
|
-
}> | Readonly<{
|
|
172
|
-
kind: "relative";
|
|
173
|
-
relativeValue: number;
|
|
174
|
-
}>;
|
|
175
|
-
singleLayer: boolean;
|
|
176
|
-
}>, "isosurface">>;
|
|
178
|
+
controlPoints: import("../../mol-util/param-definition").ParamDefinition.LineGraph;
|
|
177
179
|
stepsPerCell: import("../../mol-util/param-definition").ParamDefinition.Numeric;
|
|
178
180
|
jumpLength: import("../../mol-util/param-definition").ParamDefinition.Numeric;
|
|
179
181
|
alpha: import("../../mol-util/param-definition").ParamDefinition.Numeric;
|
|
@@ -182,6 +184,16 @@ export declare namespace VolumeRepresentationRegistry {
|
|
|
182
184
|
roughness: number;
|
|
183
185
|
bumpiness: number;
|
|
184
186
|
}>>;
|
|
187
|
+
clip: import("../../mol-util/param-definition").ParamDefinition.Group<import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
188
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
189
|
+
objects: import("../../mol-util/param-definition").ParamDefinition.Normalize<{
|
|
190
|
+
type: any;
|
|
191
|
+
invert: any;
|
|
192
|
+
position: any;
|
|
193
|
+
rotation: any;
|
|
194
|
+
scale: any;
|
|
195
|
+
}>[];
|
|
196
|
+
}>>;
|
|
185
197
|
}, "direct-volume">;
|
|
186
198
|
};
|
|
187
199
|
type _BuiltIn = typeof BuiltIn;
|
|
@@ -43,6 +43,16 @@ export declare const VolumeParams: {
|
|
|
43
43
|
roughness: number;
|
|
44
44
|
bumpiness: number;
|
|
45
45
|
}>>;
|
|
46
|
+
clip: PD.Group<PD.Normalize<{
|
|
47
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
48
|
+
objects: PD.Normalize<{
|
|
49
|
+
type: any;
|
|
50
|
+
invert: any;
|
|
51
|
+
position: any;
|
|
52
|
+
rotation: any;
|
|
53
|
+
scale: any;
|
|
54
|
+
}>[];
|
|
55
|
+
}>>;
|
|
46
56
|
};
|
|
47
57
|
export declare type VolumeParams = typeof VolumeParams;
|
|
48
58
|
export declare function VolumeRepresentation<P extends VolumeParams>(label: string, ctx: RepresentationContext, getParams: RepresentationParamsGetter<Volume, P>, visualCtor: (materialId: number, volume: Volume, props: PD.Values<P>, webgl?: WebGLContext) => VolumeVisual<P>, getLoci: (volume: Volume, props: PD.Values<P>) => Loci): VolumeRepresentation<P>;
|