molstar 3.26.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +202 -202
- package/build/viewer/embedded.html +52 -52
- package/build/viewer/index.html +115 -115
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/apps/docking-viewer/viewport.js +1 -0
- package/lib/apps/viewer/app.d.ts +3 -1
- package/lib/apps/viewer/app.js +4 -0
- package/lib/apps/viewer/embedded.html +52 -52
- package/lib/apps/viewer/index.html +115 -115
- package/lib/cli/structure-info/volume.js +1 -1
- package/lib/commonjs/apps/docking-viewer/viewport.d.ts +2 -0
- package/lib/commonjs/apps/docking-viewer/viewport.js +1 -0
- package/lib/commonjs/apps/viewer/app.d.ts +3 -1
- package/lib/commonjs/apps/viewer/app.js +4 -0
- package/lib/commonjs/cli/structure-info/volume.js +1 -1
- package/lib/commonjs/examples/lighting/index.js +1 -1
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/cellpack/model.js +2 -1
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/meshes/choice.d.ts +26 -0
- package/lib/commonjs/extensions/meshes/choice.js +31 -0
- package/lib/commonjs/extensions/meshes/examples.d.ts +26 -0
- package/lib/commonjs/extensions/meshes/examples.js +337 -0
- package/lib/commonjs/extensions/meshes/mesh-cif-schema.d.ts +29 -0
- package/lib/commonjs/extensions/meshes/mesh-cif-schema.js +34 -0
- package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +66 -0
- package/lib/commonjs/extensions/meshes/mesh-extension.js +221 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.js +379 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/server-info.js +30 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
- package/lib/commonjs/extensions/meshes/mesh-streaming/transformers.js +273 -0
- package/lib/commonjs/extensions/meshes/mesh-utils.d.ts +41 -0
- package/lib/commonjs/extensions/meshes/mesh-utils.js +357 -0
- package/lib/commonjs/extensions/meshes/metadata.d.ts +108 -0
- package/lib/commonjs/extensions/meshes/metadata.js +72 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +16 -4
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-meshes.js +156 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-models.js +96 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-root.js +576 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-segmentation.js +200 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-state.js +32 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/entry-volume.js +234 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/external-api.js +85 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/global-state.js +83 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/helpers.js +171 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/index.d.ts +20 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/index.js +130 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/transformers.js +85 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/ui.d.ts +29 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/ui.js +232 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/api.js +83 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/data.js +7 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
- package/lib/commonjs/extensions/volumes-and-segmentations/volseg-api/utils.js +78 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +2 -1
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +27 -13
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +4 -6
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -0
- package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
- 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/clip-instance.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
- 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/cylinders.vert.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.vert.js +2 -2
- 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/outlines.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.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/spheres.vert.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.vert.js +2 -2
- package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.js +15 -0
- package/lib/commonjs/mol-gl/webgl/state.d.ts +12 -0
- package/lib/commonjs/mol-gl/webgl/state.js +136 -0
- package/lib/commonjs/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
- package/lib/commonjs/mol-io/reader/cif/schema/segmentation.js +22 -0
- package/lib/commonjs/mol-io/reader/cif.d.ts +3 -1
- package/lib/commonjs/mol-io/reader/cif.js +3 -1
- package/lib/commonjs/mol-model/location.d.ts +2 -1
- package/lib/commonjs/mol-model/loci.d.ts +11 -11
- package/lib/commonjs/mol-model/loci.js +13 -1
- package/lib/commonjs/mol-model/sequence/alignment/sequence.d.ts +4 -1
- package/lib/commonjs/mol-model/sequence/alignment/sequence.js +4 -1
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
- package/lib/commonjs/mol-model/structure/structure/util/superposition.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/util/superposition.js +2 -1
- package/lib/commonjs/mol-model/volume/volume.d.ts +35 -2
- package/lib/commonjs/mol-model/volume/volume.js +77 -2
- package/lib/commonjs/mol-model-formats/volume/segmentation.d.ts +23 -0
- package/lib/commonjs/mol-model-formats/volume/segmentation.js +138 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/animation/built-in/model-index.js +4 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.d.ts +13 -4
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +6 -1
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.d.ts +1 -0
- package/lib/commonjs/mol-plugin-state/formats/provider.d.ts +2 -2
- package/lib/commonjs/mol-plugin-state/formats/provider.js +11 -3
- package/lib/commonjs/mol-plugin-state/formats/registry.js +6 -5
- package/lib/commonjs/mol-plugin-state/formats/volume.d.ts +27 -0
- package/lib/commonjs/mol-plugin-state/formats/volume.js +65 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +18 -13
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +1 -2
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +5 -6
- package/lib/commonjs/mol-plugin-state/transforms/volume.d.ts +11 -1
- package/lib/commonjs/mol-plugin-state/transforms/volume.js +55 -2
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +22 -5
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.d.ts +25 -17
- package/lib/commonjs/mol-plugin-ui/sequence.d.ts +19 -1
- package/lib/commonjs/mol-plugin-ui/sequence.js +8 -1
- package/lib/commonjs/mol-plugin-ui/state/apply-action.d.ts +2 -10
- package/lib/commonjs/mol-plugin-ui/state/apply-action.js +2 -2
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/commonjs/mol-plugin-ui/structure/superposition.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/volume.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +3 -2
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +12 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +6 -0
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.js +2 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.js +2 -1
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.js +3 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.d.ts +7 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +18 -7
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +4 -1
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +10 -6
- package/lib/commonjs/mol-repr/structure/visual/util/element.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/util/element.js +2 -3
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +4 -4
- package/lib/commonjs/mol-repr/volume/direct-volume.js +8 -6
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +4 -4
- package/lib/commonjs/mol-repr/volume/isosurface.js +17 -16
- package/lib/commonjs/mol-repr/volume/registry.d.ts +54 -1
- package/lib/commonjs/mol-repr/volume/registry.js +3 -1
- package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -7
- package/lib/commonjs/mol-repr/volume/representation.js +142 -47
- package/lib/commonjs/mol-repr/volume/segment.d.ts +291 -0
- package/lib/commonjs/mol-repr/volume/segment.js +289 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +2 -2
- package/lib/commonjs/mol-repr/volume/slice.js +5 -5
- package/lib/commonjs/mol-repr/volume/util.d.ts +12 -3
- package/lib/commonjs/mol-repr/volume/util.js +72 -6
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-theme/color/volume-segment.d.ts +41 -0
- package/lib/commonjs/mol-theme/color/volume-segment.js +58 -0
- package/lib/commonjs/mol-theme/color/volume-value.js +2 -1
- package/lib/commonjs/mol-theme/color.d.ts +15 -0
- package/lib/commonjs/mol-theme/color.js +2 -0
- package/lib/commonjs/mol-theme/label.d.ts +1 -1
- package/lib/commonjs/mol-theme/label.js +13 -1
- package/lib/commonjs/mol-util/param-definition.d.ts +4 -1
- package/lib/commonjs/mol-util/param-definition.js +5 -2
- package/lib/examples/alpha-orbitals/index.html +72 -72
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/lighting/index.js +1 -1
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/cellpack/model.js +2 -1
- package/lib/extensions/dnatco/confal-pyramids/behavior.d.ts +1 -0
- package/lib/extensions/meshes/choice.d.ts +26 -0
- package/lib/extensions/meshes/choice.js +28 -0
- package/lib/extensions/meshes/examples.d.ts +26 -0
- package/lib/extensions/meshes/examples.js +325 -0
- package/lib/extensions/meshes/mesh-cif-schema.d.ts +29 -0
- package/lib/extensions/meshes/mesh-cif-schema.js +30 -0
- package/lib/extensions/meshes/mesh-extension.d.ts +66 -0
- package/lib/extensions/meshes/mesh-extension.js +218 -0
- package/lib/extensions/meshes/mesh-streaming/behavior.d.ts +105 -0
- package/lib/extensions/meshes/mesh-streaming/behavior.js +375 -0
- package/lib/extensions/meshes/mesh-streaming/server-info.d.ts +54 -0
- package/lib/extensions/meshes/mesh-streaming/server-info.js +26 -0
- package/lib/extensions/meshes/mesh-streaming/transformers.d.ts +42 -0
- package/lib/extensions/meshes/mesh-streaming/transformers.js +270 -0
- package/lib/extensions/meshes/mesh-utils.d.ts +41 -0
- package/lib/extensions/meshes/mesh-utils.js +346 -0
- package/lib/extensions/meshes/metadata.d.ts +108 -0
- package/lib/extensions/meshes/metadata.js +69 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +2 -0
- package/lib/extensions/model-archive/quality-assessment/prop.d.ts +1 -0
- package/lib/extensions/model-archive/quality-assessment/prop.js +16 -4
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +4 -2
- package/lib/extensions/rcsb/validation-report/behavior.d.ts +3 -0
- package/lib/extensions/volumes-and-segmentations/entry-meshes.d.ts +17 -0
- package/lib/extensions/volumes-and-segmentations/entry-meshes.js +153 -0
- package/lib/extensions/volumes-and-segmentations/entry-models.d.ts +12 -0
- package/lib/extensions/volumes-and-segmentations/entry-models.js +93 -0
- package/lib/extensions/volumes-and-segmentations/entry-root.d.ts +122 -0
- package/lib/extensions/volumes-and-segmentations/entry-root.js +571 -0
- package/lib/extensions/volumes-and-segmentations/entry-segmentation.d.ts +20 -0
- package/lib/extensions/volumes-and-segmentations/entry-segmentation.js +197 -0
- package/lib/extensions/volumes-and-segmentations/entry-state.d.ts +88 -0
- package/lib/extensions/volumes-and-segmentations/entry-state.js +29 -0
- package/lib/extensions/volumes-and-segmentations/entry-volume.d.ts +35 -0
- package/lib/extensions/volumes-and-segmentations/entry-volume.js +231 -0
- package/lib/extensions/volumes-and-segmentations/external-api.d.ts +11 -0
- package/lib/extensions/volumes-and-segmentations/external-api.js +80 -0
- package/lib/extensions/volumes-and-segmentations/global-state.d.ts +51 -0
- package/lib/extensions/volumes-and-segmentations/global-state.js +80 -0
- package/lib/extensions/volumes-and-segmentations/helpers.d.ts +56 -0
- package/lib/extensions/volumes-and-segmentations/helpers.js +163 -0
- package/lib/extensions/volumes-and-segmentations/index.d.ts +20 -0
- package/lib/extensions/volumes-and-segmentations/index.js +127 -0
- package/lib/extensions/volumes-and-segmentations/transformers.d.ts +33 -0
- package/lib/extensions/volumes-and-segmentations/transformers.js +82 -0
- package/lib/extensions/volumes-and-segmentations/ui.d.ts +29 -0
- package/lib/extensions/volumes-and-segmentations/ui.js +229 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/api.d.ts +22 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/api.js +80 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/data.d.ts +92 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/data.js +6 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/utils.d.ts +23 -0
- package/lib/extensions/volumes-and-segmentations/volseg-api/utils.js +75 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/mol-canvas3d/passes/draw.js +3 -3
- package/lib/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +2 -1
- package/lib/mol-canvas3d/passes/postprocessing.js +27 -13
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +3 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +1 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +3 -2
- package/lib/mol-gl/compute/histogram-pyramid/reduction.js +1 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.js +4 -6
- package/lib/mol-gl/renderable/cylinders.d.ts +1 -0
- package/lib/mol-gl/renderable/cylinders.js +1 -1
- package/lib/mol-gl/renderable/spheres.d.ts +1 -0
- package/lib/mol-gl/renderable/spheres.js +1 -1
- 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/clip-instance.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/clip-instance.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/clip-pixel.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-clip.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/common-clip.glsl.js +2 -2
- 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/cylinders.vert.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.vert.js +2 -2
- 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/outlines.frag.d.ts +1 -1
- package/lib/mol-gl/shader/outlines.frag.js +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.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/spheres.vert.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.vert.js +2 -2
- package/lib/mol-gl/webgl/renderbuffer.d.ts +1 -1
- package/lib/mol-gl/webgl/renderbuffer.js +15 -0
- package/lib/mol-gl/webgl/state.d.ts +12 -0
- package/lib/mol-gl/webgl/state.js +136 -0
- package/lib/mol-io/reader/cif/schema/segmentation.d.ts +38 -0
- package/lib/mol-io/reader/cif/schema/segmentation.js +19 -0
- package/lib/mol-io/reader/cif.d.ts +3 -1
- package/lib/mol-io/reader/cif.js +3 -1
- package/lib/mol-model/location.d.ts +2 -1
- package/lib/mol-model/loci.d.ts +11 -11
- package/lib/mol-model/loci.js +13 -1
- package/lib/mol-model/sequence/alignment/sequence.d.ts +4 -1
- package/lib/mol-model/sequence/alignment/sequence.js +3 -2
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -0
- package/lib/mol-model/structure/model/properties/utils/atomic-index.js +8 -0
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +21 -5
- package/lib/mol-model/structure/structure/util/superposition.d.ts +1 -0
- package/lib/mol-model/structure/structure/util/superposition.js +1 -1
- package/lib/mol-model/volume/volume.d.ts +35 -2
- package/lib/mol-model/volume/volume.js +79 -4
- package/lib/mol-model-formats/volume/segmentation.d.ts +23 -0
- package/lib/mol-model-formats/volume/segmentation.js +135 -0
- package/lib/mol-plugin/behavior/dynamic/representation.d.ts +2 -2
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +1 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +2 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/commands.d.ts +1 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/animation/built-in/model-index.js +4 -1
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +2 -0
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -0
- package/lib/mol-plugin-state/builder/structure/representation-preset.d.ts +13 -4
- package/lib/mol-plugin-state/builder/structure/representation-preset.js +6 -1
- package/lib/mol-plugin-state/builder/structure/representation.d.ts +1 -0
- package/lib/mol-plugin-state/formats/provider.d.ts +2 -2
- package/lib/mol-plugin-state/formats/provider.js +11 -3
- package/lib/mol-plugin-state/formats/registry.js +6 -5
- package/lib/mol-plugin-state/formats/volume.d.ts +27 -0
- package/lib/mol-plugin-state/formats/volume.js +64 -0
- package/lib/mol-plugin-state/manager/structure/component.d.ts +1 -1
- package/lib/mol-plugin-state/manager/structure/component.js +18 -13
- package/lib/mol-plugin-state/transforms/representation.d.ts +1 -2
- package/lib/mol-plugin-state/transforms/representation.js +5 -6
- package/lib/mol-plugin-state/transforms/volume.d.ts +11 -1
- package/lib/mol-plugin-state/transforms/volume.js +54 -1
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.d.ts +1 -0
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.js +33 -13
- package/lib/mol-plugin-ui/controls/parameters.d.ts +1 -0
- package/lib/mol-plugin-ui/controls/parameters.js +22 -5
- package/lib/mol-plugin-ui/sequence/sequence.d.ts +25 -17
- package/lib/mol-plugin-ui/sequence.d.ts +19 -1
- package/lib/mol-plugin-ui/sequence.js +7 -7
- 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 +137 -128
- 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/state/apply-action.d.ts +2 -10
- package/lib/mol-plugin-ui/state/apply-action.js +2 -2
- package/lib/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/mol-plugin-ui/structure/superposition.d.ts +1 -1
- package/lib/mol-plugin-ui/structure/volume.d.ts +1 -1
- package/lib/mol-plugin-ui/structure/volume.js +3 -2
- package/lib/mol-repr/structure/complex-visual.d.ts +1 -0
- package/lib/mol-repr/structure/params.d.ts +2 -0
- package/lib/mol-repr/structure/registry.d.ts +12 -0
- package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +6 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +6 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +6 -0
- package/lib/mol-repr/structure/units-visual.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +4 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +4 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +1 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-cross.js +2 -1
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-point.js +2 -1
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/mol-repr/structure/visual/element-sphere.js +3 -1
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +6 -2
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +3 -1
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/mol-repr/structure/visual/util/bond.d.ts +7 -0
- package/lib/mol-repr/structure/visual/util/bond.js +19 -8
- package/lib/mol-repr/structure/visual/util/common.d.ts +4 -1
- package/lib/mol-repr/structure/visual/util/common.js +10 -6
- package/lib/mol-repr/structure/visual/util/element.d.ts +1 -0
- package/lib/mol-repr/structure/visual/util/element.js +3 -4
- package/lib/mol-repr/structure/visual/util/gaussian.d.ts +2 -0
- package/lib/mol-repr/volume/direct-volume.d.ts +4 -4
- package/lib/mol-repr/volume/direct-volume.js +8 -6
- package/lib/mol-repr/volume/isosurface.d.ts +4 -4
- package/lib/mol-repr/volume/isosurface.js +17 -16
- package/lib/mol-repr/volume/registry.d.ts +54 -1
- package/lib/mol-repr/volume/registry.js +3 -1
- package/lib/mol-repr/volume/representation.d.ts +11 -7
- package/lib/mol-repr/volume/representation.js +144 -49
- package/lib/mol-repr/volume/segment.d.ts +291 -0
- package/lib/mol-repr/volume/segment.js +279 -0
- package/lib/mol-repr/volume/slice.d.ts +2 -2
- package/lib/mol-repr/volume/slice.js +5 -5
- package/lib/mol-repr/volume/util.d.ts +12 -3
- package/lib/mol-repr/volume/util.js +71 -6
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-theme/color/volume-segment.d.ts +41 -0
- package/lib/mol-theme/color/volume-segment.js +53 -0
- package/lib/mol-theme/color/volume-value.js +2 -1
- package/lib/mol-theme/color.d.ts +15 -0
- package/lib/mol-theme/color.js +2 -0
- package/lib/mol-theme/label.d.ts +1 -1
- package/lib/mol-theme/label.js +13 -1
- package/lib/mol-util/param-definition.d.ts +4 -1
- package/lib/mol-util/param-definition.js +5 -2
- package/package.json +169 -168
|
@@ -11,13 +11,14 @@ import { Geometry } from '../../mol-geo/geometry/geometry';
|
|
|
11
11
|
import { Theme } from '../../mol-theme/theme';
|
|
12
12
|
import { createIdentityTransform } from '../../mol-geo/geometry/transform-data';
|
|
13
13
|
import { createRenderObject, getNextMaterialId } from '../../mol-gl/render-object';
|
|
14
|
-
import { isEveryLoci, EmptyLoci } from '../../mol-model/loci';
|
|
15
|
-
import { Interval } from '../../mol-data/int';
|
|
14
|
+
import { isEveryLoci, EmptyLoci, isEmptyLoci } from '../../mol-model/loci';
|
|
15
|
+
import { Interval, SortedArray } from '../../mol-data/int';
|
|
16
16
|
import { getQualityProps, VisualUpdateState } from '../util';
|
|
17
17
|
import { ColorTheme } from '../../mol-theme/color';
|
|
18
18
|
import { ValueCell } from '../../mol-util';
|
|
19
19
|
import { createSizes } from '../../mol-geo/geometry/size-data';
|
|
20
20
|
import { createColors } from '../../mol-geo/geometry/color-data';
|
|
21
|
+
import { EPSILON, Mat4 } from '../../mol-math/linear-algebra';
|
|
21
22
|
import { Representation } from '../representation';
|
|
22
23
|
import { BaseGeometry } from '../../mol-geo/geometry/base';
|
|
23
24
|
import { Subject } from 'rxjs';
|
|
@@ -39,25 +40,28 @@ export function VolumeVisual(builder, materialId) {
|
|
|
39
40
|
var newProps;
|
|
40
41
|
var newTheme;
|
|
41
42
|
var newVolume;
|
|
43
|
+
var newKey;
|
|
42
44
|
var currentProps = Object.assign({}, defaultProps);
|
|
43
45
|
var currentTheme = Theme.createEmpty();
|
|
44
46
|
var currentVolume;
|
|
47
|
+
var currentKey;
|
|
45
48
|
var geometry;
|
|
46
49
|
var geometryVersion = -1;
|
|
47
50
|
var locationIt;
|
|
48
51
|
var positionIt;
|
|
49
|
-
function prepareUpdate(theme, props, volume) {
|
|
52
|
+
function prepareUpdate(theme, props, volume, key) {
|
|
50
53
|
if (!volume && !currentVolume) {
|
|
51
54
|
throw new Error('missing volume');
|
|
52
55
|
}
|
|
53
56
|
newProps = Object.assign({}, currentProps, props);
|
|
54
57
|
newTheme = theme;
|
|
55
58
|
newVolume = volume;
|
|
59
|
+
newKey = key;
|
|
56
60
|
VisualUpdateState.reset(updateState);
|
|
57
61
|
if (!renderObject) {
|
|
58
62
|
updateState.createNew = true;
|
|
59
63
|
}
|
|
60
|
-
else if (!
|
|
64
|
+
else if (!Volume.areEquivalent(newVolume, currentVolume) || newKey !== currentKey) {
|
|
61
65
|
updateState.createNew = true;
|
|
62
66
|
}
|
|
63
67
|
if (updateState.createNew) {
|
|
@@ -76,7 +80,7 @@ export function VolumeVisual(builder, materialId) {
|
|
|
76
80
|
}
|
|
77
81
|
function update(newGeometry) {
|
|
78
82
|
if (updateState.createNew) {
|
|
79
|
-
locationIt = createLocationIterator(newVolume);
|
|
83
|
+
locationIt = createLocationIterator(newVolume, newKey);
|
|
80
84
|
if (newGeometry) {
|
|
81
85
|
renderObject = createVolumeRenderObject(newVolume, newGeometry, locationIt, newTheme, newProps, materialId);
|
|
82
86
|
positionIt = createPositionIterator(newGeometry, renderObject.values);
|
|
@@ -91,7 +95,7 @@ export function VolumeVisual(builder, materialId) {
|
|
|
91
95
|
}
|
|
92
96
|
if (updateState.updateTransform) {
|
|
93
97
|
// console.log('update transform');
|
|
94
|
-
locationIt = createLocationIterator(newVolume);
|
|
98
|
+
locationIt = createLocationIterator(newVolume, newKey);
|
|
95
99
|
var instanceCount = locationIt.instanceCount, groupCount = locationIt.groupCount;
|
|
96
100
|
if (newProps.instanceGranularity) {
|
|
97
101
|
createMarkers(instanceCount, 'instance', renderObject.values);
|
|
@@ -132,21 +136,32 @@ export function VolumeVisual(builder, materialId) {
|
|
|
132
136
|
currentProps = newProps;
|
|
133
137
|
currentTheme = newTheme;
|
|
134
138
|
currentVolume = newVolume;
|
|
139
|
+
currentKey = newKey;
|
|
135
140
|
if (newGeometry) {
|
|
136
141
|
geometry = newGeometry;
|
|
137
142
|
geometryVersion += 1;
|
|
138
143
|
}
|
|
139
144
|
}
|
|
140
|
-
function eachInstance(loci, volume, apply) {
|
|
145
|
+
function eachInstance(loci, volume, key, apply) {
|
|
141
146
|
var changed = false;
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
if (Volume.Cell.isLoci(loci)) {
|
|
148
|
+
if (Volume.Cell.isLociEmpty(loci))
|
|
149
|
+
return false;
|
|
150
|
+
if (!Volume.areEquivalent(loci.volume, volume))
|
|
151
|
+
return false;
|
|
152
|
+
if (apply(Interval.ofSingleton(0)))
|
|
153
|
+
changed = true;
|
|
154
|
+
}
|
|
155
|
+
else if (Volume.Segment.isLoci(loci)) {
|
|
156
|
+
if (Volume.Segment.isLociEmpty(loci))
|
|
157
|
+
return false;
|
|
158
|
+
if (!Volume.areEquivalent(loci.volume, volume))
|
|
159
|
+
return false;
|
|
160
|
+
if (!SortedArray.has(loci.segments, key))
|
|
161
|
+
return false;
|
|
162
|
+
if (apply(Interval.ofSingleton(0)))
|
|
163
|
+
changed = true;
|
|
164
|
+
}
|
|
150
165
|
return changed;
|
|
151
166
|
}
|
|
152
167
|
function lociApply(loci, apply) {
|
|
@@ -160,10 +175,10 @@ export function VolumeVisual(builder, materialId) {
|
|
|
160
175
|
}
|
|
161
176
|
else {
|
|
162
177
|
if (currentProps.instanceGranularity) {
|
|
163
|
-
return eachInstance(loci, currentVolume, apply);
|
|
178
|
+
return eachInstance(loci, currentVolume, currentKey, apply);
|
|
164
179
|
}
|
|
165
180
|
else {
|
|
166
|
-
return eachLocation(loci, currentVolume, currentProps, apply);
|
|
181
|
+
return eachLocation(loci, currentVolume, currentKey, currentProps, apply);
|
|
167
182
|
}
|
|
168
183
|
}
|
|
169
184
|
}
|
|
@@ -171,14 +186,14 @@ export function VolumeVisual(builder, materialId) {
|
|
|
171
186
|
get groupCount() { return locationIt ? locationIt.count : 0; },
|
|
172
187
|
get renderObject() { return renderObject; },
|
|
173
188
|
get geometryVersion() { return geometryVersion; },
|
|
174
|
-
createOrUpdate: function (ctx, theme, props,
|
|
189
|
+
createOrUpdate: function (ctx, theme, props, volumeKey) {
|
|
175
190
|
if (props === void 0) { props = {}; }
|
|
176
191
|
return __awaiter(this, void 0, void 0, function () {
|
|
177
192
|
var newGeometry;
|
|
178
193
|
return __generator(this, function (_a) {
|
|
179
|
-
prepareUpdate(theme, props, volume || currentVolume);
|
|
194
|
+
prepareUpdate(theme, props, (volumeKey === null || volumeKey === void 0 ? void 0 : volumeKey.volume) || currentVolume, (volumeKey === null || volumeKey === void 0 ? void 0 : volumeKey.key) || currentKey);
|
|
180
195
|
if (updateState.createGeometry) {
|
|
181
|
-
newGeometry = createGeometry(ctx, newVolume, newTheme, newProps, geometry);
|
|
196
|
+
newGeometry = createGeometry(ctx, newVolume, newKey, newTheme, newProps, geometry);
|
|
182
197
|
return [2 /*return*/, isPromiseLike(newGeometry) ? newGeometry.then(update) : update(newGeometry)];
|
|
183
198
|
}
|
|
184
199
|
else {
|
|
@@ -189,7 +204,7 @@ export function VolumeVisual(builder, materialId) {
|
|
|
189
204
|
});
|
|
190
205
|
},
|
|
191
206
|
getLoci: function (pickingId) {
|
|
192
|
-
return renderObject ? getLoci(pickingId, currentVolume, currentProps, renderObject.id) : EmptyLoci;
|
|
207
|
+
return renderObject ? getLoci(pickingId, currentVolume, currentKey, currentProps, renderObject.id) : EmptyLoci;
|
|
193
208
|
},
|
|
194
209
|
mark: function (loci, action) {
|
|
195
210
|
return Visual.mark(renderObject, loci, action, lociApply);
|
|
@@ -237,7 +252,8 @@ export function VolumeVisual(builder, materialId) {
|
|
|
237
252
|
export function VolumeRepresentationProvider(p) { return p; }
|
|
238
253
|
//
|
|
239
254
|
export var VolumeParams = __assign({}, BaseGeometry.Params);
|
|
240
|
-
export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci) {
|
|
255
|
+
export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci, getKeys) {
|
|
256
|
+
if (getKeys === void 0) { getKeys = function () { return [-1]; }; }
|
|
241
257
|
var version = 0;
|
|
242
258
|
var webgl = ctx.webgl;
|
|
243
259
|
var updated = new Subject();
|
|
@@ -245,11 +261,31 @@ export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci)
|
|
|
245
261
|
var materialId = getNextMaterialId();
|
|
246
262
|
var renderObjects = [];
|
|
247
263
|
var _state = Representation.createState();
|
|
248
|
-
var
|
|
264
|
+
var visuals = new Map();
|
|
249
265
|
var _volume;
|
|
266
|
+
var _keys;
|
|
250
267
|
var _params;
|
|
251
268
|
var _props;
|
|
252
269
|
var _theme = Theme.createEmpty();
|
|
270
|
+
function visual(runtime, key) {
|
|
271
|
+
var _a;
|
|
272
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
273
|
+
var visual;
|
|
274
|
+
return __generator(this, function (_b) {
|
|
275
|
+
visual = visuals.get(key);
|
|
276
|
+
if (!visual) {
|
|
277
|
+
visual = visualCtor(materialId, _volume, key, _props, webgl);
|
|
278
|
+
visuals.set(key, visual);
|
|
279
|
+
}
|
|
280
|
+
else if ((_a = visual.mustRecreate) === null || _a === void 0 ? void 0 : _a.call(visual, { volume: _volume, key: key }, _props, webgl)) {
|
|
281
|
+
visual.destroy();
|
|
282
|
+
visual = visualCtor(materialId, _volume, key, _props, webgl);
|
|
283
|
+
visuals.set(key, visual);
|
|
284
|
+
}
|
|
285
|
+
return [2 /*return*/, visual.createOrUpdate({ webgl: webgl, runtime: runtime }, _theme, _props, { volume: _volume, key: key })];
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
}
|
|
253
289
|
function createOrUpdate(props, volume) {
|
|
254
290
|
var _this = this;
|
|
255
291
|
if (props === void 0) { props = {}; }
|
|
@@ -261,32 +297,42 @@ export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci)
|
|
|
261
297
|
}
|
|
262
298
|
var qualityProps = getQualityProps(Object.assign({}, _props, props), _volume);
|
|
263
299
|
Object.assign(_props, props, qualityProps);
|
|
300
|
+
_keys = getKeys(_props);
|
|
264
301
|
return Task.create('Creating or updating VolumeRepresentation', function (runtime) { return __awaiter(_this, void 0, void 0, function () {
|
|
265
|
-
var promise;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
switch (_b.label) {
|
|
302
|
+
var toDelete, i, il, segment, promise;
|
|
303
|
+
return __generator(this, function (_a) {
|
|
304
|
+
switch (_a.label) {
|
|
269
305
|
case 0:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
else if ((_a = visual.mustRecreate) === null || _a === void 0 ? void 0 : _a.call(visual, _volume, _props, webgl)) {
|
|
274
|
-
visual.destroy();
|
|
275
|
-
visual = visualCtor(materialId, _volume, _props, webgl);
|
|
276
|
-
}
|
|
277
|
-
promise = visual.createOrUpdate({ webgl: webgl, runtime: runtime }, _theme, _props, volume);
|
|
278
|
-
if (!promise) return [3 /*break*/, 2];
|
|
279
|
-
return [4 /*yield*/, promise];
|
|
306
|
+
toDelete = new Set(visuals.keys());
|
|
307
|
+
i = 0, il = _keys.length;
|
|
308
|
+
_a.label = 1;
|
|
280
309
|
case 1:
|
|
281
|
-
|
|
282
|
-
|
|
310
|
+
if (!(i < il)) return [3 /*break*/, 4];
|
|
311
|
+
segment = _keys[i];
|
|
312
|
+
toDelete.delete(segment);
|
|
313
|
+
promise = visual(runtime, segment);
|
|
314
|
+
if (!promise) return [3 /*break*/, 3];
|
|
315
|
+
return [4 /*yield*/, promise];
|
|
283
316
|
case 2:
|
|
317
|
+
_a.sent();
|
|
318
|
+
_a.label = 3;
|
|
319
|
+
case 3:
|
|
320
|
+
++i;
|
|
321
|
+
return [3 /*break*/, 1];
|
|
322
|
+
case 4:
|
|
323
|
+
toDelete.forEach(function (segment) {
|
|
324
|
+
var _a;
|
|
325
|
+
(_a = visuals.get(segment)) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
326
|
+
visuals.delete(segment);
|
|
327
|
+
});
|
|
284
328
|
// update list of renderObjects
|
|
285
329
|
renderObjects.length = 0;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
330
|
+
visuals.forEach(function (visual) {
|
|
331
|
+
if (visual.renderObject) {
|
|
332
|
+
renderObjects.push(visual.renderObject);
|
|
333
|
+
geometryState.add(visual.renderObject.id, visual.geometryVersion);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
290
336
|
geometryState.snapshot();
|
|
291
337
|
// increment version
|
|
292
338
|
updated.next(version++);
|
|
@@ -296,9 +342,13 @@ export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci)
|
|
|
296
342
|
}); });
|
|
297
343
|
}
|
|
298
344
|
function mark(loci, action) {
|
|
299
|
-
|
|
345
|
+
var changed = false;
|
|
346
|
+
visuals.forEach(function (visual) {
|
|
347
|
+
changed = visual.mark(loci, action) || changed;
|
|
348
|
+
});
|
|
349
|
+
return changed;
|
|
300
350
|
}
|
|
301
|
-
function
|
|
351
|
+
function setVisualState(visual, state) {
|
|
302
352
|
if (state.visible !== undefined && visual)
|
|
303
353
|
visual.setVisibility(state.visible);
|
|
304
354
|
if (state.alphaFactor !== undefined && visual)
|
|
@@ -309,21 +359,60 @@ export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci)
|
|
|
309
359
|
visual.setOverpaint(state.overpaint);
|
|
310
360
|
if (state.transparency !== undefined && visual)
|
|
311
361
|
visual.setTransparency(state.transparency);
|
|
362
|
+
if (state.substance !== undefined && visual)
|
|
363
|
+
visual.setSubstance(state.substance);
|
|
364
|
+
if (state.clipping !== undefined && visual)
|
|
365
|
+
visual.setClipping(state.clipping);
|
|
312
366
|
if (state.transform !== undefined && visual)
|
|
313
367
|
visual.setTransform(state.transform);
|
|
368
|
+
if (state.themeStrength !== undefined && visual)
|
|
369
|
+
visual.setThemeStrength(state.themeStrength);
|
|
370
|
+
}
|
|
371
|
+
function setState(state) {
|
|
372
|
+
var visible = state.visible, alphaFactor = state.alphaFactor, pickable = state.pickable, overpaint = state.overpaint, transparency = state.transparency, substance = state.substance, clipping = state.clipping, transform = state.transform, themeStrength = state.themeStrength, syncManually = state.syncManually, markerActions = state.markerActions;
|
|
373
|
+
var newState = {};
|
|
374
|
+
if (visible !== _state.visible)
|
|
375
|
+
newState.visible = visible;
|
|
376
|
+
if (alphaFactor !== _state.alphaFactor)
|
|
377
|
+
newState.alphaFactor = alphaFactor;
|
|
378
|
+
if (pickable !== _state.pickable)
|
|
379
|
+
newState.pickable = pickable;
|
|
380
|
+
if (overpaint !== undefined)
|
|
381
|
+
newState.overpaint = overpaint;
|
|
382
|
+
if (transparency !== undefined)
|
|
383
|
+
newState.transparency = transparency;
|
|
384
|
+
if (substance !== undefined)
|
|
385
|
+
newState.substance = substance;
|
|
386
|
+
if (clipping !== undefined)
|
|
387
|
+
newState.clipping = clipping;
|
|
388
|
+
if (themeStrength !== undefined)
|
|
389
|
+
newState.themeStrength = themeStrength;
|
|
390
|
+
if (transform !== undefined && !Mat4.areEqual(transform, _state.transform, EPSILON)) {
|
|
391
|
+
newState.transform = transform;
|
|
392
|
+
}
|
|
393
|
+
if (syncManually !== _state.syncManually)
|
|
394
|
+
newState.syncManually = syncManually;
|
|
395
|
+
if (markerActions !== _state.markerActions)
|
|
396
|
+
newState.markerActions = markerActions;
|
|
397
|
+
visuals.forEach(function (visual) { return setVisualState(visual, newState); });
|
|
314
398
|
Representation.updateState(_state, state);
|
|
315
399
|
}
|
|
316
400
|
function setTheme(theme) {
|
|
317
401
|
_theme = theme;
|
|
318
402
|
}
|
|
319
403
|
function destroy() {
|
|
320
|
-
|
|
321
|
-
|
|
404
|
+
visuals.forEach(function (visual) { return visual.destroy(); });
|
|
405
|
+
visuals.clear();
|
|
322
406
|
}
|
|
323
407
|
return {
|
|
324
408
|
label: label,
|
|
325
409
|
get groupCount() {
|
|
326
|
-
|
|
410
|
+
var groupCount = 0;
|
|
411
|
+
visuals.forEach(function (visual) {
|
|
412
|
+
if (visual.renderObject)
|
|
413
|
+
groupCount += visual.groupCount;
|
|
414
|
+
});
|
|
415
|
+
return groupCount;
|
|
327
416
|
},
|
|
328
417
|
get props() { return _props; },
|
|
329
418
|
get params() { return _params; },
|
|
@@ -336,7 +425,13 @@ export function VolumeRepresentation(label, ctx, getParams, visualCtor, getLoci)
|
|
|
336
425
|
setState: setState,
|
|
337
426
|
setTheme: setTheme,
|
|
338
427
|
getLoci: function (pickingId) {
|
|
339
|
-
|
|
428
|
+
var loci = EmptyLoci;
|
|
429
|
+
visuals.forEach(function (visual) {
|
|
430
|
+
var _loci = visual.getLoci(pickingId);
|
|
431
|
+
if (!isEmptyLoci(_loci))
|
|
432
|
+
loci = _loci;
|
|
433
|
+
});
|
|
434
|
+
return loci;
|
|
340
435
|
},
|
|
341
436
|
getAllLoci: function () {
|
|
342
437
|
return [getLoci(_volume, _props)];
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
|
+
*/
|
|
6
|
+
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
7
|
+
import { Volume } from '../../mol-model/volume';
|
|
8
|
+
import { VisualContext } from '../visual';
|
|
9
|
+
import { Theme, ThemeRegistryContext } from '../../mol-theme/theme';
|
|
10
|
+
import { Mesh } from '../../mol-geo/geometry/mesh/mesh';
|
|
11
|
+
import { VolumeVisual, VolumeRepresentation, VolumeRepresentationProvider } from './representation';
|
|
12
|
+
import { RepresentationContext, RepresentationParamsGetter } from '../representation';
|
|
13
|
+
import { Loci } from '../../mol-model/loci';
|
|
14
|
+
import { Interval } from '../../mol-data/int';
|
|
15
|
+
import { WebGLContext } from '../../mol-gl/webgl/context';
|
|
16
|
+
export declare const VolumeSegmentParams: {
|
|
17
|
+
segments: PD.Converted<number[], string[]>;
|
|
18
|
+
};
|
|
19
|
+
export type VolumeSegmentParams = typeof VolumeSegmentParams;
|
|
20
|
+
export type VolumeSegmentProps = PD.Values<VolumeSegmentParams>;
|
|
21
|
+
export declare function SegmentVisual(materialId: number, volume: Volume, key: number, props: PD.Values<SegmentMeshParams>, webgl?: WebGLContext): VolumeVisual<{
|
|
22
|
+
quality: {
|
|
23
|
+
isEssential: boolean;
|
|
24
|
+
type: "select";
|
|
25
|
+
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
|
|
26
|
+
cycle?: boolean | undefined;
|
|
27
|
+
isOptional?: boolean | undefined;
|
|
28
|
+
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
29
|
+
label?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
32
|
+
fieldLabels?: {
|
|
33
|
+
[name: string]: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
isHidden?: boolean | undefined;
|
|
36
|
+
shortLabel?: boolean | undefined;
|
|
37
|
+
twoColumns?: boolean | undefined;
|
|
38
|
+
category?: string | undefined;
|
|
39
|
+
hideIf?: ((currentGroup: any) => boolean) | undefined;
|
|
40
|
+
help?: ((value: any) => {
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
43
|
+
}) | undefined;
|
|
44
|
+
};
|
|
45
|
+
tryUseGpu: PD.BooleanParam;
|
|
46
|
+
segments: PD.Converted<number[], string[]>;
|
|
47
|
+
doubleSided: PD.BooleanParam;
|
|
48
|
+
flipSided: PD.BooleanParam;
|
|
49
|
+
flatShaded: PD.BooleanParam;
|
|
50
|
+
ignoreLight: PD.BooleanParam;
|
|
51
|
+
xrayShaded: PD.BooleanParam;
|
|
52
|
+
transparentBackfaces: PD.Select<string>;
|
|
53
|
+
bumpFrequency: PD.Numeric;
|
|
54
|
+
bumpAmplitude: PD.Numeric;
|
|
55
|
+
alpha: PD.Numeric;
|
|
56
|
+
material: PD.Group<PD.Normalize<{
|
|
57
|
+
metalness: number;
|
|
58
|
+
roughness: number;
|
|
59
|
+
bumpiness: number;
|
|
60
|
+
}>>;
|
|
61
|
+
clip: PD.Group<PD.Normalize<{
|
|
62
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
63
|
+
objects: PD.Normalize<{
|
|
64
|
+
type: any;
|
|
65
|
+
invert: any;
|
|
66
|
+
position: any;
|
|
67
|
+
rotation: any;
|
|
68
|
+
scale: any;
|
|
69
|
+
}>[];
|
|
70
|
+
}>>;
|
|
71
|
+
instanceGranularity: PD.BooleanParam;
|
|
72
|
+
}>;
|
|
73
|
+
export declare function eachSegment(loci: Loci, volume: Volume, key: number, props: VolumeSegmentProps, apply: (interval: Interval) => boolean): boolean;
|
|
74
|
+
export declare function createVolumeSegmentMesh(ctx: VisualContext, volume: Volume, key: number, theme: Theme, props: VolumeSegmentProps, mesh?: Mesh): Promise<Mesh>;
|
|
75
|
+
export declare const SegmentMeshParams: {
|
|
76
|
+
quality: {
|
|
77
|
+
isEssential: boolean;
|
|
78
|
+
type: "select";
|
|
79
|
+
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
|
|
80
|
+
cycle?: boolean | undefined;
|
|
81
|
+
isOptional?: boolean | undefined;
|
|
82
|
+
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
83
|
+
label?: string | undefined;
|
|
84
|
+
description?: string | undefined;
|
|
85
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
86
|
+
fieldLabels?: {
|
|
87
|
+
[name: string]: string;
|
|
88
|
+
} | undefined;
|
|
89
|
+
isHidden?: boolean | undefined;
|
|
90
|
+
shortLabel?: boolean | undefined;
|
|
91
|
+
twoColumns?: boolean | undefined;
|
|
92
|
+
category?: string | undefined;
|
|
93
|
+
hideIf?: ((currentGroup: any) => boolean) | undefined;
|
|
94
|
+
help?: ((value: any) => {
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
97
|
+
}) | undefined;
|
|
98
|
+
};
|
|
99
|
+
tryUseGpu: PD.BooleanParam;
|
|
100
|
+
segments: PD.Converted<number[], string[]>;
|
|
101
|
+
doubleSided: PD.BooleanParam;
|
|
102
|
+
flipSided: PD.BooleanParam;
|
|
103
|
+
flatShaded: PD.BooleanParam;
|
|
104
|
+
ignoreLight: PD.BooleanParam;
|
|
105
|
+
xrayShaded: PD.BooleanParam;
|
|
106
|
+
transparentBackfaces: PD.Select<string>;
|
|
107
|
+
bumpFrequency: PD.Numeric;
|
|
108
|
+
bumpAmplitude: PD.Numeric;
|
|
109
|
+
alpha: PD.Numeric;
|
|
110
|
+
material: PD.Group<PD.Normalize<{
|
|
111
|
+
metalness: number;
|
|
112
|
+
roughness: number;
|
|
113
|
+
bumpiness: number;
|
|
114
|
+
}>>;
|
|
115
|
+
clip: PD.Group<PD.Normalize<{
|
|
116
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
117
|
+
objects: PD.Normalize<{
|
|
118
|
+
type: any;
|
|
119
|
+
invert: any;
|
|
120
|
+
position: any;
|
|
121
|
+
rotation: any;
|
|
122
|
+
scale: any;
|
|
123
|
+
}>[];
|
|
124
|
+
}>>;
|
|
125
|
+
instanceGranularity: PD.BooleanParam;
|
|
126
|
+
};
|
|
127
|
+
export type SegmentMeshParams = typeof SegmentMeshParams;
|
|
128
|
+
export declare function SegmentMeshVisual(materialId: number): VolumeVisual<SegmentMeshParams>;
|
|
129
|
+
export declare function SegmentTextureMeshVisual(materialId: number): VolumeVisual<SegmentMeshParams>;
|
|
130
|
+
export declare const SegmentParams: {
|
|
131
|
+
visuals: PD.MultiSelect<"segment">;
|
|
132
|
+
bumpFrequency: PD.Numeric;
|
|
133
|
+
quality: {
|
|
134
|
+
isEssential: boolean;
|
|
135
|
+
type: "select";
|
|
136
|
+
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
|
|
137
|
+
cycle?: boolean | undefined;
|
|
138
|
+
isOptional?: boolean | undefined;
|
|
139
|
+
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
140
|
+
label?: string | undefined;
|
|
141
|
+
description?: string | undefined;
|
|
142
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
143
|
+
fieldLabels?: {
|
|
144
|
+
[name: string]: string;
|
|
145
|
+
} | undefined;
|
|
146
|
+
isHidden?: boolean | undefined;
|
|
147
|
+
shortLabel?: boolean | undefined;
|
|
148
|
+
twoColumns?: boolean | undefined;
|
|
149
|
+
category?: string | undefined;
|
|
150
|
+
hideIf?: ((currentGroup: any) => boolean) | undefined;
|
|
151
|
+
help?: ((value: any) => {
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
154
|
+
}) | undefined;
|
|
155
|
+
};
|
|
156
|
+
tryUseGpu: PD.BooleanParam;
|
|
157
|
+
segments: PD.Converted<number[], string[]>;
|
|
158
|
+
doubleSided: PD.BooleanParam;
|
|
159
|
+
flipSided: PD.BooleanParam;
|
|
160
|
+
flatShaded: PD.BooleanParam;
|
|
161
|
+
ignoreLight: PD.BooleanParam;
|
|
162
|
+
xrayShaded: PD.BooleanParam;
|
|
163
|
+
transparentBackfaces: PD.Select<string>;
|
|
164
|
+
bumpAmplitude: PD.Numeric;
|
|
165
|
+
alpha: PD.Numeric;
|
|
166
|
+
material: PD.Group<PD.Normalize<{
|
|
167
|
+
metalness: number;
|
|
168
|
+
roughness: number;
|
|
169
|
+
bumpiness: number;
|
|
170
|
+
}>>;
|
|
171
|
+
clip: PD.Group<PD.Normalize<{
|
|
172
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
173
|
+
objects: PD.Normalize<{
|
|
174
|
+
type: any;
|
|
175
|
+
invert: any;
|
|
176
|
+
position: any;
|
|
177
|
+
rotation: any;
|
|
178
|
+
scale: any;
|
|
179
|
+
}>[];
|
|
180
|
+
}>>;
|
|
181
|
+
instanceGranularity: PD.BooleanParam;
|
|
182
|
+
};
|
|
183
|
+
export type SegmentParams = typeof SegmentParams;
|
|
184
|
+
export declare function getSegmentParams(ctx: ThemeRegistryContext, volume: Volume): {
|
|
185
|
+
visuals: PD.MultiSelect<"segment">;
|
|
186
|
+
bumpFrequency: PD.Numeric;
|
|
187
|
+
quality: {
|
|
188
|
+
isEssential: boolean;
|
|
189
|
+
type: "select";
|
|
190
|
+
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
|
|
191
|
+
cycle?: boolean | undefined;
|
|
192
|
+
isOptional?: boolean | undefined;
|
|
193
|
+
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
194
|
+
label?: string | undefined;
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
197
|
+
fieldLabels?: {
|
|
198
|
+
[name: string]: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
isHidden?: boolean | undefined;
|
|
201
|
+
shortLabel?: boolean | undefined;
|
|
202
|
+
twoColumns?: boolean | undefined;
|
|
203
|
+
category?: string | undefined;
|
|
204
|
+
hideIf?: ((currentGroup: any) => boolean) | undefined;
|
|
205
|
+
help?: ((value: any) => {
|
|
206
|
+
description?: string | undefined;
|
|
207
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
208
|
+
}) | undefined;
|
|
209
|
+
};
|
|
210
|
+
tryUseGpu: PD.BooleanParam;
|
|
211
|
+
segments: PD.Converted<number[], string[]>;
|
|
212
|
+
doubleSided: PD.BooleanParam;
|
|
213
|
+
flipSided: PD.BooleanParam;
|
|
214
|
+
flatShaded: PD.BooleanParam;
|
|
215
|
+
ignoreLight: PD.BooleanParam;
|
|
216
|
+
xrayShaded: PD.BooleanParam;
|
|
217
|
+
transparentBackfaces: PD.Select<string>;
|
|
218
|
+
bumpAmplitude: PD.Numeric;
|
|
219
|
+
alpha: PD.Numeric;
|
|
220
|
+
material: PD.Group<PD.Normalize<{
|
|
221
|
+
metalness: number;
|
|
222
|
+
roughness: number;
|
|
223
|
+
bumpiness: number;
|
|
224
|
+
}>>;
|
|
225
|
+
clip: PD.Group<PD.Normalize<{
|
|
226
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
227
|
+
objects: PD.Normalize<{
|
|
228
|
+
type: any;
|
|
229
|
+
invert: any;
|
|
230
|
+
position: any;
|
|
231
|
+
rotation: any;
|
|
232
|
+
scale: any;
|
|
233
|
+
}>[];
|
|
234
|
+
}>>;
|
|
235
|
+
instanceGranularity: PD.BooleanParam;
|
|
236
|
+
};
|
|
237
|
+
export type SegmentRepresentation = VolumeRepresentation<SegmentParams>;
|
|
238
|
+
export declare function SegmentRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Volume, SegmentParams>): SegmentRepresentation;
|
|
239
|
+
export declare const SegmentRepresentationProvider: VolumeRepresentationProvider<{
|
|
240
|
+
visuals: PD.MultiSelect<"segment">;
|
|
241
|
+
bumpFrequency: PD.Numeric;
|
|
242
|
+
quality: {
|
|
243
|
+
isEssential: boolean;
|
|
244
|
+
type: "select";
|
|
245
|
+
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
|
|
246
|
+
cycle?: boolean | undefined;
|
|
247
|
+
isOptional?: boolean | undefined;
|
|
248
|
+
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
249
|
+
label?: string | undefined;
|
|
250
|
+
description?: string | undefined;
|
|
251
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
252
|
+
fieldLabels?: {
|
|
253
|
+
[name: string]: string;
|
|
254
|
+
} | undefined;
|
|
255
|
+
isHidden?: boolean | undefined;
|
|
256
|
+
shortLabel?: boolean | undefined;
|
|
257
|
+
twoColumns?: boolean | undefined;
|
|
258
|
+
category?: string | undefined;
|
|
259
|
+
hideIf?: ((currentGroup: any) => boolean) | undefined;
|
|
260
|
+
help?: ((value: any) => {
|
|
261
|
+
description?: string | undefined;
|
|
262
|
+
legend?: import("../../mol-util/legend").Legend | undefined;
|
|
263
|
+
}) | undefined;
|
|
264
|
+
};
|
|
265
|
+
tryUseGpu: PD.BooleanParam;
|
|
266
|
+
segments: PD.Converted<number[], string[]>;
|
|
267
|
+
doubleSided: PD.BooleanParam;
|
|
268
|
+
flipSided: PD.BooleanParam;
|
|
269
|
+
flatShaded: PD.BooleanParam;
|
|
270
|
+
ignoreLight: PD.BooleanParam;
|
|
271
|
+
xrayShaded: PD.BooleanParam;
|
|
272
|
+
transparentBackfaces: PD.Select<string>;
|
|
273
|
+
bumpAmplitude: PD.Numeric;
|
|
274
|
+
alpha: PD.Numeric;
|
|
275
|
+
material: PD.Group<PD.Normalize<{
|
|
276
|
+
metalness: number;
|
|
277
|
+
roughness: number;
|
|
278
|
+
bumpiness: number;
|
|
279
|
+
}>>;
|
|
280
|
+
clip: PD.Group<PD.Normalize<{
|
|
281
|
+
variant: import("../../mol-util/clip").Clip.Variant;
|
|
282
|
+
objects: PD.Normalize<{
|
|
283
|
+
type: any;
|
|
284
|
+
invert: any;
|
|
285
|
+
position: any;
|
|
286
|
+
rotation: any;
|
|
287
|
+
scale: any;
|
|
288
|
+
}>[];
|
|
289
|
+
}>>;
|
|
290
|
+
instanceGranularity: PD.BooleanParam;
|
|
291
|
+
}, "segment">;
|