molstar 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/mesoscale-explorer/data/cellpack/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/cellpack/preset.js +5 -5
- package/lib/apps/mesoscale-explorer/data/generic/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/generic/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/mmcif/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/mmcif/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/petworld/preset.d.ts +1 -1
- package/lib/apps/mesoscale-explorer/data/petworld/preset.js +3 -3
- package/lib/apps/mesoscale-explorer/data/state.d.ts +10 -1
- package/lib/apps/mesoscale-explorer/data/state.js +14 -2
- package/lib/apps/mesoscale-explorer/ui/entities.d.ts +7 -1
- package/lib/apps/mesoscale-explorer/ui/entities.js +23 -4
- package/lib/apps/viewer/app.d.ts +8 -2
- package/lib/apps/viewer/app.js +6 -6
- package/lib/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/apps/mesoscale-explorer/data/cellpack/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/cellpack/preset.js +5 -5
- package/lib/commonjs/apps/mesoscale-explorer/data/generic/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/generic/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/mmcif/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/mmcif/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/petworld/preset.d.ts +1 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/petworld/preset.js +3 -3
- package/lib/commonjs/apps/mesoscale-explorer/data/state.d.ts +10 -1
- package/lib/commonjs/apps/mesoscale-explorer/data/state.js +15 -3
- package/lib/commonjs/apps/mesoscale-explorer/ui/entities.d.ts +7 -1
- package/lib/commonjs/apps/mesoscale-explorer/ui/entities.js +22 -3
- package/lib/commonjs/apps/viewer/app.d.ts +8 -2
- package/lib/commonjs/apps/viewer/app.js +6 -6
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +5 -0
- package/lib/commonjs/extensions/assembly-symmetry/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/assembly-symmetry/representation.d.ts +1 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/commonjs/extensions/dnatco/ntc-tube/representation.d.ts +3 -0
- package/lib/commonjs/extensions/geo-export/glb-exporter.d.ts +1 -1
- package/lib/commonjs/extensions/geo-export/glb-exporter.js +6 -4
- package/lib/commonjs/extensions/mvs/camera.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/camera.js +29 -2
- package/lib/commonjs/extensions/mvs/components/annotation-label/representation.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/components/annotation-label/visual.d.ts +1 -0
- package/lib/commonjs/extensions/mvs/components/custom-label/representation.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/components/custom-label/visual.d.ts +1 -0
- package/lib/commonjs/extensions/mvs/components/formats.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/components/formats.js +2 -1
- package/lib/commonjs/extensions/mvs/load.d.ts +2 -0
- package/lib/commonjs/extensions/mvs/load.js +12 -6
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +14 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/bloom.d.ts +37 -0
- package/lib/commonjs/mol-canvas3d/passes/bloom.js +272 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +11 -7
- package/lib/commonjs/mol-canvas3d/passes/draw.js +23 -3
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +6 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +30 -5
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +27 -32
- package/lib/commonjs/mol-geo/geometry/base.d.ts +3 -1
- package/lib/commonjs/mol-geo/geometry/base.js +4 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -1
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +4 -1
- package/lib/commonjs/mol-geo/geometry/emissive-data.d.ts +26 -0
- package/lib/commonjs/mol-geo/geometry/emissive-data.js +80 -0
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/image/image.js +4 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +3 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +4 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +36 -2
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -1
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/points/points.js +4 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +7 -3
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/text/text.js +4 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +34 -2
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +3 -0
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +24 -1
- package/lib/commonjs/mol-gl/renderable/schema.js +15 -2
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +10 -0
- package/lib/commonjs/mol-gl/renderable.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable.js +2 -2
- package/lib/commonjs/mol-gl/renderer.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderer.js +58 -49
- package/lib/commonjs/mol-gl/scene.d.ts +3 -1
- package/lib/commonjs/mol-gl/scene.js +26 -1
- package/lib/commonjs/mol-gl/shader/bloom/blur.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/blur.frag.js +32 -0
- package/lib/commonjs/mol-gl/shader/bloom/composite.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/composite.frag.js +37 -0
- package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/bloom/luminosity.frag.js +56 -0
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +10 -2
- 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 +28 -0
- 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 +20 -31
- package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.d.ts +1 -0
- package/lib/commonjs/mol-gl/shader/chunks/check-transparency.glsl.js +20 -0
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +9 -0
- 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 +30 -0
- 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 -0
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +4 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +17 -11
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/image.frag.js +14 -5
- package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/lines.frag.js +4 -1
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +4 -1
- package/lib/commonjs/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/points.frag.js +9 -5
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +11 -5
- package/lib/commonjs/mol-gl/shader/ssao-blur.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/ssao-blur.frag.js +7 -8
- package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/ssao.frag.js +56 -17
- package/lib/commonjs/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/text.frag.js +6 -4
- package/lib/commonjs/mol-gl/shader-code.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader-code.js +9 -3
- package/lib/commonjs/mol-gl/webgl/render-item.d.ts +3 -2
- package/lib/commonjs/mol-gl/webgl/render-item.js +1 -1
- package/lib/commonjs/mol-io/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 +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.d.ts +9 -6
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +7 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +10 -6
- package/lib/commonjs/mol-model/structure/structure/unit.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit.js +5 -2
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +4 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +6 -3
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -208
- package/lib/commonjs/mol-plugin-state/helpers/structure-emissive.d.ts +12 -0
- package/lib/commonjs/mol-plugin-state/helpers/structure-emissive.js +69 -0
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +3 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +9 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.d.ts +341 -9
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.js +32 -19
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +25 -0
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +121 -6
- package/lib/commonjs/mol-repr/representation.d.ts +6 -2
- package/lib/commonjs/mol-repr/representation.js +12 -2
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/complex-representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/complex-representation.js +7 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +8 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.js +5 -1
- package/lib/commonjs/mol-repr/structure/params.d.ts +8 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +14 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/units-representation.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/units-representation.js +9 -3
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +9 -1
- package/lib/commonjs/mol-repr/structure/units-visual.js +5 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/visual.d.ts +6 -1
- package/lib/commonjs/mol-repr/visual.js +55 -1
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +6 -0
- package/lib/commonjs/mol-repr/volume/registry.d.ts +4 -0
- package/lib/commonjs/mol-repr/volume/representation.d.ts +2 -1
- package/lib/commonjs/mol-repr/volume/representation.js +9 -2
- package/lib/commonjs/mol-repr/volume/segment.d.ts +5 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +3 -0
- package/lib/commonjs/mol-theme/emissive.d.ts +40 -0
- package/lib/commonjs/mol-theme/emissive.js +137 -0
- package/lib/commonjs/mol-util/set.d.ts +1 -1
- package/lib/commonjs/mol-util/set.js +17 -1
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/anvil/representation.d.ts +5 -0
- package/lib/extensions/assembly-symmetry/behavior.d.ts +1 -0
- package/lib/extensions/assembly-symmetry/representation.d.ts +1 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/extensions/dnatco/ntc-tube/representation.d.ts +3 -0
- package/lib/extensions/geo-export/glb-exporter.d.ts +1 -1
- package/lib/extensions/geo-export/glb-exporter.js +6 -4
- package/lib/extensions/mvs/camera.d.ts +2 -0
- package/lib/extensions/mvs/camera.js +27 -1
- package/lib/extensions/mvs/components/annotation-label/representation.d.ts +2 -0
- package/lib/extensions/mvs/components/annotation-label/visual.d.ts +1 -0
- package/lib/extensions/mvs/components/custom-label/representation.d.ts +2 -0
- package/lib/extensions/mvs/components/custom-label/visual.d.ts +1 -0
- package/lib/extensions/mvs/components/formats.d.ts +2 -0
- package/lib/extensions/mvs/components/formats.js +2 -1
- package/lib/extensions/mvs/load.d.ts +2 -0
- package/lib/extensions/mvs/load.js +13 -7
- package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +14 -0
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -0
- package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/mol-canvas3d/passes/bloom.d.ts +37 -0
- package/lib/mol-canvas3d/passes/bloom.js +268 -0
- package/lib/mol-canvas3d/passes/draw.d.ts +11 -7
- package/lib/mol-canvas3d/passes/draw.js +23 -3
- package/lib/mol-canvas3d/passes/image.d.ts +6 -0
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +30 -5
- package/lib/mol-canvas3d/passes/postprocessing.js +25 -31
- package/lib/mol-geo/geometry/base.d.ts +3 -1
- package/lib/mol-geo/geometry/base.js +4 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -1
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +2 -1
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +4 -1
- package/lib/mol-geo/geometry/emissive-data.d.ts +26 -0
- package/lib/mol-geo/geometry/emissive-data.js +72 -0
- package/lib/mol-geo/geometry/image/image.d.ts +2 -1
- package/lib/mol-geo/geometry/image/image.js +4 -1
- package/lib/mol-geo/geometry/lines/lines.d.ts +3 -1
- package/lib/mol-geo/geometry/lines/lines.js +4 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +2 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +34 -1
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/mol-geo/geometry/mesh/mesh.js +4 -1
- package/lib/mol-geo/geometry/points/points.d.ts +2 -2
- package/lib/mol-geo/geometry/points/points.js +4 -1
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +2 -2
- package/lib/mol-geo/geometry/spheres/spheres.js +7 -3
- package/lib/mol-geo/geometry/text/text.d.ts +2 -1
- package/lib/mol-geo/geometry/text/text.js +4 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +2 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +32 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +3 -0
- package/lib/mol-gl/renderable/cylinders.d.ts +10 -0
- package/lib/mol-gl/renderable/direct-volume.d.ts +10 -0
- package/lib/mol-gl/renderable/image.d.ts +10 -0
- package/lib/mol-gl/renderable/lines.d.ts +10 -0
- package/lib/mol-gl/renderable/mesh.d.ts +10 -0
- package/lib/mol-gl/renderable/points.d.ts +10 -0
- package/lib/mol-gl/renderable/schema.d.ts +24 -1
- package/lib/mol-gl/renderable/schema.js +14 -1
- package/lib/mol-gl/renderable/spheres.d.ts +10 -0
- package/lib/mol-gl/renderable/text.d.ts +10 -0
- package/lib/mol-gl/renderable/texture-mesh.d.ts +10 -0
- package/lib/mol-gl/renderable.d.ts +1 -1
- package/lib/mol-gl/renderable.js +2 -2
- package/lib/mol-gl/renderer.d.ts +2 -1
- package/lib/mol-gl/renderer.js +58 -49
- package/lib/mol-gl/scene.d.ts +3 -1
- package/lib/mol-gl/scene.js +26 -1
- package/lib/mol-gl/shader/bloom/blur.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/blur.frag.js +29 -0
- package/lib/mol-gl/shader/bloom/composite.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/composite.frag.js +34 -0
- package/lib/mol-gl/shader/bloom/luminosity.frag.d.ts +1 -0
- package/lib/mol-gl/shader/bloom/luminosity.frag.js +53 -0
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +10 -2
- 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 +28 -0
- 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 +20 -31
- package/lib/mol-gl/shader/chunks/check-transparency.glsl.d.ts +1 -0
- package/lib/mol-gl/shader/chunks/check-transparency.glsl.js +17 -0
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +9 -0
- 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 +30 -0
- 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 -0
- package/lib/mol-gl/shader/cylinders.frag.d.ts +2 -2
- package/lib/mol-gl/shader/cylinders.frag.js +4 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +17 -11
- package/lib/mol-gl/shader/image.frag.d.ts +2 -2
- package/lib/mol-gl/shader/image.frag.js +14 -5
- package/lib/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/mol-gl/shader/lines.frag.js +4 -1
- package/lib/mol-gl/shader/mesh.frag.d.ts +2 -2
- package/lib/mol-gl/shader/mesh.frag.js +4 -1
- package/lib/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/mol-gl/shader/points.frag.js +9 -5
- package/lib/mol-gl/shader/spheres.frag.d.ts +2 -2
- package/lib/mol-gl/shader/spheres.frag.js +11 -5
- package/lib/mol-gl/shader/ssao-blur.frag.d.ts +3 -2
- package/lib/mol-gl/shader/ssao-blur.frag.js +7 -8
- package/lib/mol-gl/shader/ssao.frag.d.ts +3 -2
- package/lib/mol-gl/shader/ssao.frag.js +56 -17
- package/lib/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/mol-gl/shader/text.frag.js +6 -4
- package/lib/mol-gl/shader-code.d.ts +1 -1
- package/lib/mol-gl/shader-code.js +9 -3
- package/lib/mol-gl/webgl/render-item.d.ts +3 -2
- package/lib/mol-gl/webgl/render-item.js +1 -1
- package/lib/mol-io/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 +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.js +1 -1
- package/lib/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/data.d.ts +9 -6
- package/lib/mol-model/structure/structure/unit/bonds/data.js +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +7 -4
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +10 -6
- package/lib/mol-model/structure/structure/unit.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit.js +5 -2
- package/lib/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +4 -1
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +6 -3
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/mol-plugin/commands.d.ts +1 -208
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/helpers/structure-emissive.d.ts +12 -0
- package/lib/mol-plugin-state/helpers/structure-emissive.js +64 -0
- package/lib/mol-plugin-state/manager/structure/component.d.ts +3 -1
- package/lib/mol-plugin-state/manager/structure/component.js +9 -1
- package/lib/mol-plugin-state/manager/structure/measurement.d.ts +341 -9
- package/lib/mol-plugin-state/manager/structure/measurement.js +32 -19
- package/lib/mol-plugin-state/transforms/representation.d.ts +25 -0
- package/lib/mol-plugin-state/transforms/representation.js +120 -5
- package/lib/mol-repr/representation.d.ts +6 -2
- package/lib/mol-repr/representation.js +12 -2
- package/lib/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/mol-repr/shape/loci/common.d.ts +1 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +1 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +1 -0
- package/lib/mol-repr/shape/loci/label.d.ts +1 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +1 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +1 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +1 -0
- package/lib/mol-repr/structure/complex-representation.d.ts +1 -1
- package/lib/mol-repr/structure/complex-representation.js +7 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +8 -1
- package/lib/mol-repr/structure/complex-visual.js +5 -1
- package/lib/mol-repr/structure/params.d.ts +8 -0
- package/lib/mol-repr/structure/registry.d.ts +14 -0
- package/lib/mol-repr/structure/representation/backbone.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +3 -0
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +3 -0
- package/lib/mol-repr/structure/representation/cartoon.d.ts +3 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +3 -0
- package/lib/mol-repr/structure/representation/label.d.ts +3 -0
- package/lib/mol-repr/structure/representation/line.d.ts +3 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/orientation.d.ts +3 -0
- package/lib/mol-repr/structure/representation/point.d.ts +3 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +3 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +3 -0
- package/lib/mol-repr/structure/units-representation.d.ts +1 -1
- package/lib/mol-repr/structure/units-representation.js +9 -3
- package/lib/mol-repr/structure/units-visual.d.ts +9 -1
- package/lib/mol-repr/structure/units-visual.js +5 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +4 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +2 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/label-text.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-bond.d.ts +2 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-element.d.ts +2 -0
- package/lib/mol-repr/structure/visual/nucleotide-atomic-ring-fill.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +2 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +1 -0
- package/lib/mol-repr/visual.d.ts +6 -1
- package/lib/mol-repr/visual.js +57 -3
- package/lib/mol-repr/volume/direct-volume.d.ts +3 -0
- package/lib/mol-repr/volume/isosurface.d.ts +6 -0
- package/lib/mol-repr/volume/registry.d.ts +4 -0
- package/lib/mol-repr/volume/representation.d.ts +2 -1
- package/lib/mol-repr/volume/representation.js +9 -2
- package/lib/mol-repr/volume/segment.d.ts +5 -0
- package/lib/mol-repr/volume/slice.d.ts +3 -0
- package/lib/mol-theme/emissive.d.ts +40 -0
- package/lib/mol-theme/emissive.js +134 -0
- package/lib/mol-util/set.d.ts +1 -1
- package/lib/mol-util/set.js +17 -1
- package/package.json +19 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2022-
|
|
3
|
+
* Copyright (c) 2022-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -94,11 +94,11 @@ async function createPetworldHierarchy(plugin, trajectory) {
|
|
|
94
94
|
const groupParams = (0, state_1.getMesoscaleGroupParams)(graphicsMode);
|
|
95
95
|
const group = await state.build()
|
|
96
96
|
.toRoot()
|
|
97
|
-
.applyOrUpdateTagged('group:ent:', state_1.MesoscaleGroup, { ...groupParams, root: true, index: -1, tag: `ent:`, label: 'entity', color: { type: 'generate', value: names_1.ColorNames.white, variability: 20, shift: 0, lightness: 0, alpha: 1 } }, { tags: 'group:ent:', state: { isCollapsed: false, isHidden: groupParams.hidden } })
|
|
97
|
+
.applyOrUpdateTagged('group:ent:', state_1.MesoscaleGroup, { ...groupParams, root: true, index: -1, tag: `ent:`, label: 'entity', color: { type: 'generate', value: names_1.ColorNames.white, variability: 20, shift: 0, lightness: 0, alpha: 1, emissive: 0 } }, { tags: 'group:ent:', state: { isCollapsed: false, isHidden: groupParams.hidden } })
|
|
98
98
|
.commit({ revertOnError: true });
|
|
99
99
|
await state.build()
|
|
100
100
|
.to(group)
|
|
101
|
-
.applyOrUpdateTagged(`group:ent:mem`, state_1.MesoscaleGroup, { ...groupParams, index: undefined, tag: `ent:mem`, label: 'Membrane', color: { type: 'uniform', value: names_1.ColorNames.lightgrey, variability: 20, shift: 0, lightness: 0, alpha: 1 } }, { tags: `ent:`, state: { isCollapsed: true, isHidden: groupParams.hidden } })
|
|
101
|
+
.applyOrUpdateTagged(`group:ent:mem`, state_1.MesoscaleGroup, { ...groupParams, index: undefined, tag: `ent:mem`, label: 'Membrane', color: { type: 'uniform', value: names_1.ColorNames.lightgrey, variability: 20, shift: 0, lightness: 0, alpha: 1, emissive: 0 } }, { tags: `ent:`, state: { isCollapsed: true, isHidden: groupParams.hidden } })
|
|
102
102
|
.commit();
|
|
103
103
|
const colors = (0, state_1.getDistinctBaseColors)(other.length, 0);
|
|
104
104
|
await state.transaction(async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2023-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -24,6 +24,7 @@ export declare const ColorParams: {
|
|
|
24
24
|
shift: PD.Numeric;
|
|
25
25
|
lightness: PD.Numeric;
|
|
26
26
|
alpha: PD.Numeric;
|
|
27
|
+
emissive: PD.Numeric;
|
|
27
28
|
};
|
|
28
29
|
export type ColorProps = PD.Values<typeof ColorParams>;
|
|
29
30
|
export declare const ColorValueParam: PD.Color;
|
|
@@ -34,6 +35,7 @@ export declare const RootParams: {
|
|
|
34
35
|
shift: PD.Numeric;
|
|
35
36
|
lightness: PD.Numeric;
|
|
36
37
|
alpha: PD.Numeric;
|
|
38
|
+
emissive: PD.Numeric;
|
|
37
39
|
};
|
|
38
40
|
export declare const LightnessParams: {
|
|
39
41
|
lightness: PD.Numeric;
|
|
@@ -42,6 +44,9 @@ export declare const DimLightness = 6;
|
|
|
42
44
|
export declare const OpacityParams: {
|
|
43
45
|
alpha: PD.Numeric;
|
|
44
46
|
};
|
|
47
|
+
export declare const EmissiveParams: {
|
|
48
|
+
emissive: PD.Numeric;
|
|
49
|
+
};
|
|
45
50
|
export declare const PatternParams: {
|
|
46
51
|
frequency: PD.Numeric;
|
|
47
52
|
amplitude: PD.Numeric;
|
|
@@ -122,9 +127,11 @@ export declare const MesoscaleGroupParams: {
|
|
|
122
127
|
shift: number;
|
|
123
128
|
lightness: number;
|
|
124
129
|
alpha: number;
|
|
130
|
+
emissive: number;
|
|
125
131
|
}>>;
|
|
126
132
|
lightness: PD.Numeric;
|
|
127
133
|
alpha: PD.Numeric;
|
|
134
|
+
emissive: PD.Numeric;
|
|
128
135
|
lod: PD.Group<PD.Normalize<{
|
|
129
136
|
lodLevels: PD.Normalize<{
|
|
130
137
|
minDistance: number;
|
|
@@ -186,9 +193,11 @@ export declare const MesoscaleGroup: import("../../../mol-state").StateTransform
|
|
|
186
193
|
shift: any;
|
|
187
194
|
lightness: any;
|
|
188
195
|
alpha: any;
|
|
196
|
+
emissive: any;
|
|
189
197
|
}>;
|
|
190
198
|
lightness: number;
|
|
191
199
|
alpha: number;
|
|
200
|
+
emissive: number;
|
|
192
201
|
lod: PD.Normalize<{
|
|
193
202
|
lodLevels: any;
|
|
194
203
|
cellSize: any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2023-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.expandAllGroups = exports.updateColors = exports.getEntityLabel = exports.getAllFilteredEntities = exports.getAllEntities = exports.getFilteredEntities = exports.getEntities = exports.getAllLeafGroups = exports.getAllGroups = exports.getGroups = exports.getRoots = exports.MesoscaleState = exports.MesoscaleStateObject = exports.MesoscaleStateParams = exports.setGraphicsCanvas3DProps = exports.getGraphicsModeProps = exports.getLodLevels = exports.getMesoscaleGroupParams = exports.MesoscaleGroup = exports.MesoscaleGroupObject = exports.MesoscaleGroupParams = exports.createClipMapping = exports.getClipObjects = exports.SimpleClipParams = exports.LodParams = exports.PatternParams = exports.OpacityParams = exports.DimLightness = exports.LightnessParams = exports.RootParams = exports.ColorValueParam = exports.ColorParams = exports.getDistinctBaseColors = exports.getDistinctGroupColors = void 0;
|
|
8
|
+
exports.expandAllGroups = exports.updateColors = exports.getEntityLabel = exports.getAllFilteredEntities = exports.getAllEntities = exports.getFilteredEntities = exports.getEntities = exports.getAllLeafGroups = exports.getAllGroups = exports.getGroups = exports.getRoots = exports.MesoscaleState = exports.MesoscaleStateObject = exports.MesoscaleStateParams = exports.setGraphicsCanvas3DProps = exports.getGraphicsModeProps = exports.getLodLevels = exports.getMesoscaleGroupParams = exports.MesoscaleGroup = exports.MesoscaleGroupObject = exports.MesoscaleGroupParams = exports.createClipMapping = exports.getClipObjects = exports.SimpleClipParams = exports.LodParams = exports.PatternParams = exports.EmissiveParams = exports.OpacityParams = exports.DimLightness = exports.LightnessParams = exports.RootParams = exports.ColorValueParam = exports.ColorParams = exports.getDistinctBaseColors = exports.getDistinctGroupColors = void 0;
|
|
9
9
|
const objects_1 = require("../../../mol-plugin-state/objects");
|
|
10
10
|
const param_definition_1 = require("../../../mol-util/param-definition");
|
|
11
11
|
const mol_task_1 = require("../../../mol-task");
|
|
@@ -104,6 +104,7 @@ exports.ColorParams = {
|
|
|
104
104
|
shift: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 100, step: 1 }, { hideIf: p => !p.type.includes('generate') }),
|
|
105
105
|
lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }, { hideIf: p => p.type === 'custom' }),
|
|
106
106
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }, { hideIf: p => p.type === 'custom' }),
|
|
107
|
+
emissive: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }, { hideIf: p => p.type === 'custom' }),
|
|
107
108
|
};
|
|
108
109
|
exports.ColorValueParam = param_definition_1.ParamDefinition.Color((0, color_1.Color)(0xFFFFFF));
|
|
109
110
|
exports.RootParams = {
|
|
@@ -113,6 +114,7 @@ exports.RootParams = {
|
|
|
113
114
|
shift: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 100, step: 1 }, { hideIf: p => !p.type.includes('generate') }),
|
|
114
115
|
lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }, { hideIf: p => p.type === 'custom' }),
|
|
115
116
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }, { hideIf: p => p.type === 'custom' }),
|
|
117
|
+
emissive: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }, { hideIf: p => p.type === 'custom' }),
|
|
116
118
|
};
|
|
117
119
|
exports.LightnessParams = {
|
|
118
120
|
lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
|
|
@@ -121,6 +123,9 @@ exports.DimLightness = 6;
|
|
|
121
123
|
exports.OpacityParams = {
|
|
122
124
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }),
|
|
123
125
|
};
|
|
126
|
+
exports.EmissiveParams = {
|
|
127
|
+
emissive: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }),
|
|
128
|
+
};
|
|
124
129
|
exports.PatternParams = {
|
|
125
130
|
frequency: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }),
|
|
126
131
|
amplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }),
|
|
@@ -220,6 +225,7 @@ exports.MesoscaleGroupParams = {
|
|
|
220
225
|
color: param_definition_1.ParamDefinition.Group(exports.RootParams),
|
|
221
226
|
lightness: param_definition_1.ParamDefinition.Numeric(0, { min: -6, max: 6, step: 0.1 }),
|
|
222
227
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }),
|
|
228
|
+
emissive: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 1, step: 0.01 }),
|
|
223
229
|
lod: param_definition_1.ParamDefinition.Group(exports.LodParams),
|
|
224
230
|
clip: param_definition_1.ParamDefinition.Group(exports.SimpleClipParams),
|
|
225
231
|
};
|
|
@@ -462,7 +468,7 @@ exports.getEntityLabel = getEntityLabel;
|
|
|
462
468
|
async function updateColors(plugin, values, tag, filter) {
|
|
463
469
|
var _a, _b;
|
|
464
470
|
const update = plugin.state.data.build();
|
|
465
|
-
const { type, value, shift, lightness, alpha } = values;
|
|
471
|
+
const { type, value, shift, lightness, alpha, emissive } = values;
|
|
466
472
|
if (type === 'group-generate' || type === 'group-uniform') {
|
|
467
473
|
const groups = getAllLeafGroups(plugin, tag);
|
|
468
474
|
const baseColors = getDistinctBaseColors(groups.length, shift);
|
|
@@ -482,12 +488,14 @@ async function updateColors(plugin, values, tag, filter) {
|
|
|
482
488
|
old.colorTheme.params.lightness = lightness;
|
|
483
489
|
old.type.params.alpha = alpha;
|
|
484
490
|
old.type.params.xrayShaded = alpha < 1 ? 'inverted' : false;
|
|
491
|
+
old.type.params.emissive = emissive;
|
|
485
492
|
}
|
|
486
493
|
else if (old.coloring) {
|
|
487
494
|
old.coloring.params.color = c;
|
|
488
495
|
old.coloring.params.lightness = lightness;
|
|
489
496
|
old.alpha = alpha;
|
|
490
497
|
old.xrayShaded = alpha < 1 ? true : false;
|
|
498
|
+
old.emissive = emissive;
|
|
491
499
|
}
|
|
492
500
|
});
|
|
493
501
|
}
|
|
@@ -496,6 +504,7 @@ async function updateColors(plugin, values, tag, filter) {
|
|
|
496
504
|
old.color.value = baseColors[i];
|
|
497
505
|
old.color.lightness = lightness;
|
|
498
506
|
old.color.alpha = alpha;
|
|
507
|
+
old.color.emissive = emissive;
|
|
499
508
|
});
|
|
500
509
|
}
|
|
501
510
|
}
|
|
@@ -513,12 +522,14 @@ async function updateColors(plugin, values, tag, filter) {
|
|
|
513
522
|
old.colorTheme.params.lightness = lightness;
|
|
514
523
|
old.type.params.alpha = alpha;
|
|
515
524
|
old.type.params.xrayShaded = alpha < 1 ? 'inverted' : false;
|
|
525
|
+
old.type.params.emissive = emissive;
|
|
516
526
|
}
|
|
517
527
|
else if (old.coloring) {
|
|
518
528
|
old.coloring.params.color = c;
|
|
519
529
|
old.coloring.params.lightness = lightness;
|
|
520
530
|
old.alpha = alpha;
|
|
521
531
|
old.xrayShaded = alpha < 1 ? true : false;
|
|
532
|
+
old.emissive = emissive;
|
|
522
533
|
}
|
|
523
534
|
});
|
|
524
535
|
}
|
|
@@ -529,6 +540,7 @@ async function updateColors(plugin, values, tag, filter) {
|
|
|
529
540
|
old.color.value = value;
|
|
530
541
|
old.color.lightness = lightness;
|
|
531
542
|
old.color.alpha = alpha;
|
|
543
|
+
old.color.emissive = emissive;
|
|
532
544
|
});
|
|
533
545
|
}
|
|
534
546
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -170,9 +170,11 @@ export declare class EntityNode extends Node<{}, {
|
|
|
170
170
|
shift: any;
|
|
171
171
|
lightness: any;
|
|
172
172
|
alpha: any;
|
|
173
|
+
emissive: any;
|
|
173
174
|
}>;
|
|
174
175
|
lightness: number;
|
|
175
176
|
alpha: number;
|
|
177
|
+
emissive: number;
|
|
176
178
|
lod: PD.Normalize<{
|
|
177
179
|
lodLevels: any;
|
|
178
180
|
cellSize: any;
|
|
@@ -202,6 +204,9 @@ export declare class EntityNode extends Node<{}, {
|
|
|
202
204
|
get opacityValue(): {
|
|
203
205
|
alpha: number;
|
|
204
206
|
} | undefined;
|
|
207
|
+
get emissiveValue(): {
|
|
208
|
+
emissive: number;
|
|
209
|
+
} | undefined;
|
|
205
210
|
get clipValue(): Clip.Props | undefined;
|
|
206
211
|
get lodValue(): PD.Values<typeof LodParams> | undefined;
|
|
207
212
|
get patternValue(): {
|
|
@@ -211,6 +216,7 @@ export declare class EntityNode extends Node<{}, {
|
|
|
211
216
|
updateColor: ParamOnChange;
|
|
212
217
|
updateLightness: (values: PD.Values) => Promise<void>;
|
|
213
218
|
updateOpacity: (values: PD.Values) => Promise<void>;
|
|
219
|
+
updateEmissive: (values: PD.Values) => Promise<void>;
|
|
214
220
|
updateClip: (props: Clip.Props) => void;
|
|
215
221
|
updateLod: (values: PD.Values) => void;
|
|
216
222
|
updatePattern: (values: PD.Values) => Promise<void>;
|
|
@@ -4,7 +4,7 @@ exports.EntityNode = exports.GroupNode = exports.EntityControls = exports.Select
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
/**
|
|
7
|
-
* Copyright (c) 2022-
|
|
7
|
+
* Copyright (c) 2022-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
8
8
|
*
|
|
9
9
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
10
10
|
*/
|
|
@@ -388,7 +388,7 @@ class GroupNode extends Node {
|
|
|
388
388
|
};
|
|
389
389
|
this.updateColor = (values) => {
|
|
390
390
|
const update = this.plugin.state.data.build();
|
|
391
|
-
const { value, type, lightness, alpha } = values;
|
|
391
|
+
const { value, type, lightness, alpha, emissive } = values;
|
|
392
392
|
const entities = this.filteredEntities;
|
|
393
393
|
let groupColors = [];
|
|
394
394
|
if (type === 'generate') {
|
|
@@ -402,12 +402,14 @@ class GroupNode extends Node {
|
|
|
402
402
|
old.colorTheme.params.lightness = lightness;
|
|
403
403
|
old.type.params.alpha = alpha;
|
|
404
404
|
old.type.params.xrayShaded = alpha < 1 ? 'inverted' : false;
|
|
405
|
+
old.type.params.emissive = emissive;
|
|
405
406
|
}
|
|
406
407
|
else {
|
|
407
408
|
old.coloring.params.color = c;
|
|
408
409
|
old.coloring.params.lightness = lightness;
|
|
409
410
|
old.alpha = alpha;
|
|
410
411
|
old.xrayShaded = alpha < 1 ? true : false;
|
|
412
|
+
old.emissive = emissive;
|
|
411
413
|
}
|
|
412
414
|
});
|
|
413
415
|
}
|
|
@@ -679,6 +681,16 @@ class EntityNode extends Node {
|
|
|
679
681
|
}
|
|
680
682
|
}).commit();
|
|
681
683
|
};
|
|
684
|
+
this.updateEmissive = (values) => {
|
|
685
|
+
return this.plugin.build().to(this.ref).update(old => {
|
|
686
|
+
if (old.type) {
|
|
687
|
+
old.type.params.emissive = values.emissive;
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
old.emissive = values.emissive;
|
|
691
|
+
}
|
|
692
|
+
}).commit();
|
|
693
|
+
};
|
|
682
694
|
this.updateClip = (props) => {
|
|
683
695
|
const params = this.cell.transform.params;
|
|
684
696
|
const clip = params.type ? params.type.params.clip : params.clip;
|
|
@@ -737,6 +749,12 @@ class EntityNode extends Node {
|
|
|
737
749
|
alpha: (_e = (_c = (_b = (_a = this.cell.transform.params) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.params.alpha) !== null && _c !== void 0 ? _c : (_d = this.cell.transform.params) === null || _d === void 0 ? void 0 : _d.alpha) !== null && _e !== void 0 ? _e : 1
|
|
738
750
|
};
|
|
739
751
|
}
|
|
752
|
+
get emissiveValue() {
|
|
753
|
+
var _a, _b, _c, _d, _e;
|
|
754
|
+
return {
|
|
755
|
+
emissive: (_e = (_c = (_b = (_a = this.cell.transform.params) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.params.emissive) !== null && _c !== void 0 ? _c : (_d = this.cell.transform.params) === null || _d === void 0 ? void 0 : _d.emissive) !== null && _e !== void 0 ? _e : 0
|
|
756
|
+
};
|
|
757
|
+
}
|
|
740
758
|
get clipValue() {
|
|
741
759
|
var _a, _b;
|
|
742
760
|
return (_b = (_a = this.cell.transform.params.type) === null || _a === void 0 ? void 0 : _a.params.clip) !== null && _b !== void 0 ? _b : this.cell.transform.params.clip;
|
|
@@ -769,6 +787,7 @@ class EntityNode extends Node {
|
|
|
769
787
|
const colorValue = this.colorValue;
|
|
770
788
|
const lightnessValue = this.lightnessValue;
|
|
771
789
|
const opacityValue = this.opacityValue;
|
|
790
|
+
const emissiveValue = this.emissiveValue;
|
|
772
791
|
const lodValue = this.lodValue;
|
|
773
792
|
const patternValue = this.patternValue;
|
|
774
793
|
const l = (0, state_1.getEntityLabel)(this.plugin, this.cell);
|
|
@@ -776,7 +795,7 @@ class EntityNode extends Node {
|
|
|
776
795
|
const color = colorValue !== undefined && (0, jsx_runtime_1.jsx)(common_1.Button, { style: { backgroundColor: color_1.Color.toStyle(colorValue), minWidth: 32, width: 32, borderRight: `6px solid ${color_1.Color.toStyle(color_1.Color.lighten(colorValue, (lightnessValue === null || lightnessValue === void 0 ? void 0 : lightnessValue.lightness) || 0))}` }, onClick: this.toggleColor });
|
|
777
796
|
const clip = (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.ContentCutSvg, toggleState: false, disabled: disabled, small: true, onClick: this.toggleClip });
|
|
778
797
|
const visibility = (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: cellState.isHidden ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, toggleState: false, disabled: disabled, small: true, onClick: this.toggleVisible });
|
|
779
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: `msp-flex-row`, style: { margin: `1px 5px 1px ${depth * 10 + 5}px` }, children: [label, color, clip, visibility] }), this.state.action === 'color' && colorValue !== void 0 && (0, jsx_runtime_1.jsx)("div", { style: { marginRight: 5 }, className: 'msp-accent-offset', children: (0, jsx_runtime_1.jsxs)(common_1.ControlGroup, { header: 'Color', initialExpanded: true, hideExpander: true, hideOffset: true, onHeaderClick: this.toggleColor, topRightIcon: icons_1.CloseSvg, noTopMargin: true, childrenClassName: 'msp-viewport-controls-panel-controls', children: [(0, jsx_runtime_1.jsx)(color_2.CombinedColorControl, { param: state_1.ColorValueParam, value: colorValue !== null && colorValue !== void 0 ? colorValue : (0, color_1.Color)(0xFFFFFF), onChange: this.updateColor, name: 'color', hideNameRow: true }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.LightnessParams, values: lightnessValue, onChangeValues: this.updateLightness }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.OpacityParams, values: opacityValue, onChangeValues: this.updateOpacity }), patternValue && (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.PatternParams, values: patternValue, onChangeValues: this.updatePattern })] }) }), this.state.action === 'clip' && (0, jsx_runtime_1.jsx)("div", { style: { marginRight: 5 }, className: 'msp-accent-offset', children: (0, jsx_runtime_1.jsxs)(common_1.ControlGroup, { header: 'Clip', initialExpanded: true, hideExpander: true, hideOffset: true, onHeaderClick: this.toggleClip, topRightIcon: icons_1.CloseSvg, noTopMargin: true, childrenClassName: 'msp-viewport-controls-panel-controls', children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterMappingControl, { mapping: this.clipMapping }), lodValue && (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.LodParams, values: lodValue, onChangeValues: this.updateLod })] }) })] });
|
|
798
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: `msp-flex-row`, style: { margin: `1px 5px 1px ${depth * 10 + 5}px` }, children: [label, color, clip, visibility] }), this.state.action === 'color' && colorValue !== void 0 && (0, jsx_runtime_1.jsx)("div", { style: { marginRight: 5 }, className: 'msp-accent-offset', children: (0, jsx_runtime_1.jsxs)(common_1.ControlGroup, { header: 'Color', initialExpanded: true, hideExpander: true, hideOffset: true, onHeaderClick: this.toggleColor, topRightIcon: icons_1.CloseSvg, noTopMargin: true, childrenClassName: 'msp-viewport-controls-panel-controls', children: [(0, jsx_runtime_1.jsx)(color_2.CombinedColorControl, { param: state_1.ColorValueParam, value: colorValue !== null && colorValue !== void 0 ? colorValue : (0, color_1.Color)(0xFFFFFF), onChange: this.updateColor, name: 'color', hideNameRow: true }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.LightnessParams, values: lightnessValue, onChangeValues: this.updateLightness }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.OpacityParams, values: opacityValue, onChangeValues: this.updateOpacity }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.EmissiveParams, values: emissiveValue, onChangeValues: this.updateEmissive }), patternValue && (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.PatternParams, values: patternValue, onChangeValues: this.updatePattern })] }) }), this.state.action === 'clip' && (0, jsx_runtime_1.jsx)("div", { style: { marginRight: 5 }, className: 'msp-accent-offset', children: (0, jsx_runtime_1.jsxs)(common_1.ControlGroup, { header: 'Clip', initialExpanded: true, hideExpander: true, hideOffset: true, onHeaderClick: this.toggleClip, topRightIcon: icons_1.CloseSvg, noTopMargin: true, childrenClassName: 'msp-viewport-controls-panel-controls', children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterMappingControl, { mapping: this.clipMapping }), lodValue && (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: state_1.LodParams, values: lodValue, onChangeValues: this.updateLod })] }) })] });
|
|
780
799
|
}
|
|
781
800
|
}
|
|
782
801
|
exports.EntityNode = EntityNode;
|
|
@@ -187,11 +187,17 @@ export declare class Viewer {
|
|
|
187
187
|
representation: any;
|
|
188
188
|
} | undefined;
|
|
189
189
|
}>;
|
|
190
|
-
loadMvsFromUrl(url: string, format: 'mvsj' | 'mvsx'
|
|
190
|
+
loadMvsFromUrl(url: string, format: 'mvsj' | 'mvsx', options?: {
|
|
191
|
+
replaceExisting?: boolean;
|
|
192
|
+
keepCamera?: boolean;
|
|
193
|
+
}): Promise<void>;
|
|
191
194
|
/** Load MolViewSpec from `data`.
|
|
192
195
|
* If `format` is 'mvsj', `data` must be a string or a Uint8Array containing a UTF8-encoded string.
|
|
193
196
|
* If `format` is 'mvsx', `data` must be a Uint8Array or a string containing base64-encoded binary data prefixed with 'base64,'. */
|
|
194
|
-
loadMvsData(data: string | Uint8Array, format: 'mvsj' | 'mvsx'
|
|
197
|
+
loadMvsData(data: string | Uint8Array, format: 'mvsj' | 'mvsx', options?: {
|
|
198
|
+
replaceExisting?: boolean;
|
|
199
|
+
keepCamera?: boolean;
|
|
200
|
+
}): Promise<void>;
|
|
195
201
|
handleResize(): void;
|
|
196
202
|
dispose(): void;
|
|
197
203
|
}
|
|
@@ -432,17 +432,17 @@ class Viewer {
|
|
|
432
432
|
const preset = await plugin.builders.structure.hierarchy.applyPreset(trajectory, (_b = params.preset) !== null && _b !== void 0 ? _b : 'default');
|
|
433
433
|
return { model, coords, preset };
|
|
434
434
|
}
|
|
435
|
-
async loadMvsFromUrl(url, format) {
|
|
435
|
+
async loadMvsFromUrl(url, format, options) {
|
|
436
436
|
if (format === 'mvsj') {
|
|
437
437
|
const data = await this.plugin.runTask(this.plugin.fetch({ url, type: 'string' }));
|
|
438
438
|
const mvsData = mvs_data_1.MVSData.fromMVSJ(data);
|
|
439
|
-
await (0, load_1.loadMVS)(this.plugin, mvsData, { sanityChecks: true, sourceUrl: url });
|
|
439
|
+
await (0, load_1.loadMVS)(this.plugin, mvsData, { sanityChecks: true, sourceUrl: url, ...options });
|
|
440
440
|
}
|
|
441
441
|
else if (format === 'mvsx') {
|
|
442
442
|
const data = await this.plugin.runTask(this.plugin.fetch({ url, type: 'binary' }));
|
|
443
443
|
await this.plugin.runTask(mol_task_1.Task.create('Load MVSX file', async (ctx) => {
|
|
444
444
|
const parsed = await (0, formats_1.loadMVSX)(this.plugin, ctx, data);
|
|
445
|
-
await (0, load_1.loadMVS)(this.plugin, parsed.mvsData, { sanityChecks: true, sourceUrl: parsed.sourceUrl });
|
|
445
|
+
await (0, load_1.loadMVS)(this.plugin, parsed.mvsData, { sanityChecks: true, sourceUrl: parsed.sourceUrl, ...options });
|
|
446
446
|
}));
|
|
447
447
|
}
|
|
448
448
|
else {
|
|
@@ -452,7 +452,7 @@ class Viewer {
|
|
|
452
452
|
/** Load MolViewSpec from `data`.
|
|
453
453
|
* If `format` is 'mvsj', `data` must be a string or a Uint8Array containing a UTF8-encoded string.
|
|
454
454
|
* If `format` is 'mvsx', `data` must be a Uint8Array or a string containing base64-encoded binary data prefixed with 'base64,'. */
|
|
455
|
-
async loadMvsData(data, format) {
|
|
455
|
+
async loadMvsData(data, format, options) {
|
|
456
456
|
if (typeof data === 'string' && data.startsWith('base64')) {
|
|
457
457
|
data = Uint8Array.from(atob(data.substring(7)), c => c.charCodeAt(0)); // Decode base64 string to Uint8Array
|
|
458
458
|
}
|
|
@@ -461,7 +461,7 @@ class Viewer {
|
|
|
461
461
|
data = new TextDecoder().decode(data); // Decode Uint8Array to string using UTF8
|
|
462
462
|
}
|
|
463
463
|
const mvsData = mvs_data_1.MVSData.fromMVSJ(data);
|
|
464
|
-
await (0, load_1.loadMVS)(this.plugin, mvsData, { sanityChecks: true, sourceUrl: undefined });
|
|
464
|
+
await (0, load_1.loadMVS)(this.plugin, mvsData, { sanityChecks: true, sourceUrl: undefined, ...options });
|
|
465
465
|
}
|
|
466
466
|
else if (format === 'mvsx') {
|
|
467
467
|
if (typeof data === 'string') {
|
|
@@ -469,7 +469,7 @@ class Viewer {
|
|
|
469
469
|
}
|
|
470
470
|
await this.plugin.runTask(mol_task_1.Task.create('Load MVSX file', async (ctx) => {
|
|
471
471
|
const parsed = await (0, formats_1.loadMVSX)(this.plugin, ctx, data);
|
|
472
|
-
await (0, load_1.loadMVS)(this.plugin, parsed.mvsData, { sanityChecks: true, sourceUrl: parsed.sourceUrl });
|
|
472
|
+
await (0, load_1.loadMVS)(this.plugin, parsed.mvsData, { sanityChecks: true, sourceUrl: parsed.sourceUrl, ...options });
|
|
473
473
|
}));
|
|
474
474
|
}
|
|
475
475
|
else {
|
|
@@ -40,6 +40,7 @@ function getFieldType(type, description, values, container) {
|
|
|
40
40
|
case 'pdbx_related_db_id':
|
|
41
41
|
case 'sequence_dep':
|
|
42
42
|
case 'pdb_id':
|
|
43
|
+
case 'pdb_id_u': // should be case insensitve, but can't express that
|
|
43
44
|
case 'emd_id':
|
|
44
45
|
// todo, consider adding specialised fields
|
|
45
46
|
case 'yyyy-mm-dd':
|
|
@@ -38,6 +38,7 @@ declare const BilayerPlanesParams: {
|
|
|
38
38
|
scale: any;
|
|
39
39
|
}>[];
|
|
40
40
|
}>>;
|
|
41
|
+
emissive: PD.Numeric;
|
|
41
42
|
instanceGranularity: PD.BooleanParam;
|
|
42
43
|
lod: PD.Vec3;
|
|
43
44
|
cellSize: PD.Numeric;
|
|
@@ -69,6 +70,7 @@ declare const BilayerRimsParams: {
|
|
|
69
70
|
scale: any;
|
|
70
71
|
}>[];
|
|
71
72
|
}>>;
|
|
73
|
+
emissive: PD.Numeric;
|
|
72
74
|
instanceGranularity: PD.BooleanParam;
|
|
73
75
|
lod: PD.Vec3;
|
|
74
76
|
cellSize: PD.Numeric;
|
|
@@ -101,6 +103,7 @@ export declare const MembraneOrientationParams: {
|
|
|
101
103
|
scale: any;
|
|
102
104
|
}>[];
|
|
103
105
|
}>>;
|
|
106
|
+
emissive: PD.Numeric;
|
|
104
107
|
instanceGranularity: PD.BooleanParam;
|
|
105
108
|
lod: PD.Vec3;
|
|
106
109
|
cellSize: PD.Numeric;
|
|
@@ -142,6 +145,7 @@ export declare function getMembraneOrientationParams(ctx: ThemeRegistryContext,
|
|
|
142
145
|
scale: any;
|
|
143
146
|
}>[];
|
|
144
147
|
}>>;
|
|
148
|
+
emissive: PD.Numeric;
|
|
145
149
|
instanceGranularity: PD.BooleanParam;
|
|
146
150
|
lod: PD.Vec3;
|
|
147
151
|
cellSize: PD.Numeric;
|
|
@@ -183,6 +187,7 @@ export declare const MembraneOrientationRepresentationProvider: StructureReprese
|
|
|
183
187
|
scale: any;
|
|
184
188
|
}>[];
|
|
185
189
|
}>>;
|
|
190
|
+
emissive: PD.Numeric;
|
|
186
191
|
instanceGranularity: PD.BooleanParam;
|
|
187
192
|
lod: PD.Vec3;
|
|
188
193
|
cellSize: PD.Numeric;
|
|
@@ -37,6 +37,7 @@ export declare const ConfalPyramidsParams: {
|
|
|
37
37
|
scale: any;
|
|
38
38
|
}>[];
|
|
39
39
|
}>>;
|
|
40
|
+
emissive: PD.Numeric;
|
|
40
41
|
instanceGranularity: PD.BooleanParam;
|
|
41
42
|
lod: PD.Vec3;
|
|
42
43
|
cellSize: PD.Numeric;
|
|
@@ -71,6 +72,7 @@ export declare function getConfalPyramidsParams(ctx: ThemeRegistryContext, struc
|
|
|
71
72
|
scale: any;
|
|
72
73
|
}>[];
|
|
73
74
|
}>>;
|
|
75
|
+
emissive: PD.Numeric;
|
|
74
76
|
instanceGranularity: PD.BooleanParam;
|
|
75
77
|
lod: PD.Vec3;
|
|
76
78
|
cellSize: PD.Numeric;
|
|
@@ -106,6 +108,7 @@ export declare const ConfalPyramidsRepresentationProvider: StructureRepresentati
|
|
|
106
108
|
scale: any;
|
|
107
109
|
}>[];
|
|
108
110
|
}>>;
|
|
111
|
+
emissive: PD.Numeric;
|
|
109
112
|
instanceGranularity: PD.BooleanParam;
|
|
110
113
|
lod: PD.Vec3;
|
|
111
114
|
cellSize: PD.Numeric;
|
|
@@ -41,6 +41,7 @@ export declare const NtCTubeParams: {
|
|
|
41
41
|
scale: any;
|
|
42
42
|
}>[];
|
|
43
43
|
}>>;
|
|
44
|
+
emissive: PD.Numeric;
|
|
44
45
|
instanceGranularity: PD.BooleanParam;
|
|
45
46
|
lod: PD.Vec3;
|
|
46
47
|
cellSize: PD.Numeric;
|
|
@@ -79,6 +80,7 @@ export declare function getNtCTubeParams(ctx: ThemeRegistryContext, structure: S
|
|
|
79
80
|
scale: any;
|
|
80
81
|
}>[];
|
|
81
82
|
}>>;
|
|
83
|
+
emissive: PD.Numeric;
|
|
82
84
|
instanceGranularity: PD.BooleanParam;
|
|
83
85
|
lod: PD.Vec3;
|
|
84
86
|
cellSize: PD.Numeric;
|
|
@@ -118,6 +120,7 @@ export declare const NtCTubeRepresentationProvider: StructureRepresentationProvi
|
|
|
118
120
|
scale: any;
|
|
119
121
|
}>[];
|
|
120
122
|
}>>;
|
|
123
|
+
emissive: PD.Numeric;
|
|
121
124
|
instanceGranularity: PD.BooleanParam;
|
|
122
125
|
lod: PD.Vec3;
|
|
123
126
|
cellSize: PD.Numeric;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Sukolsak Sakshuwong <sukolsak@stanford.edu>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2021-
|
|
3
|
+
* Copyright (c) 2021-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Sukolsak Sakshuwong <sukolsak@stanford.edu>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -132,8 +132,8 @@ class GlbExporter extends mesh_exporter_1.MeshExporter {
|
|
|
132
132
|
}
|
|
133
133
|
return this.addBuffer(colorBuffer, UNSIGNED_BYTE, 'VEC4', vertexCount, ARRAY_BUFFER, undefined, undefined, true);
|
|
134
134
|
}
|
|
135
|
-
addMaterial(metalness, roughness, doubleSided, alpha) {
|
|
136
|
-
const hash = `${metalness}|${roughness}|${doubleSided}`;
|
|
135
|
+
addMaterial(metalness, roughness, emissive, doubleSided, alpha) {
|
|
136
|
+
const hash = `${metalness}|${roughness}|${emissive}|${doubleSided}`;
|
|
137
137
|
if (!this.materialMap.has(hash)) {
|
|
138
138
|
this.materialMap.set(hash, this.materials.length);
|
|
139
139
|
this.materials.push({
|
|
@@ -142,6 +142,7 @@ class GlbExporter extends mesh_exporter_1.MeshExporter {
|
|
|
142
142
|
metallicFactor: metalness,
|
|
143
143
|
roughnessFactor: roughness
|
|
144
144
|
},
|
|
145
|
+
emissiveFactor: [emissive, emissive, emissive],
|
|
145
146
|
doubleSided,
|
|
146
147
|
alphaMode: alpha ? 'BLEND' : 'OPAQUE',
|
|
147
148
|
});
|
|
@@ -160,9 +161,10 @@ class GlbExporter extends mesh_exporter_1.MeshExporter {
|
|
|
160
161
|
const instanceCount = values.uInstanceCount.ref.value;
|
|
161
162
|
const metalness = values.uMetalness.ref.value;
|
|
162
163
|
const roughness = values.uRoughness.ref.value;
|
|
164
|
+
const emissive = values.uEmissive.ref.value;
|
|
163
165
|
const doubleSided = ((_a = values.uDoubleSided) === null || _a === void 0 ? void 0 : _a.ref.value) || values.hasReflection.ref.value;
|
|
164
166
|
const alpha = values.uAlpha.ref.value < 1;
|
|
165
|
-
const material = this.addMaterial(metalness, roughness, doubleSided, alpha);
|
|
167
|
+
const material = this.addMaterial(metalness, roughness, emissive, doubleSided, alpha);
|
|
166
168
|
let interpolatedColors;
|
|
167
169
|
if (webgl && mesh && (colorType === 'volume' || colorType === 'volumeInstance')) {
|
|
168
170
|
const stride = isGeoTexture ? 4 : 3;
|
|
@@ -7,6 +7,8 @@ import { PluginContext } from '../../mol-plugin/context';
|
|
|
7
7
|
import { StateObjectSelector } from '../../mol-state';
|
|
8
8
|
import { ParamsOfKind } from './tree/generic/tree-schema';
|
|
9
9
|
import { MolstarTree } from './tree/molstar/molstar-tree';
|
|
10
|
+
/** Set the camera position to the current position (thus suppress automatic adjustment). */
|
|
11
|
+
export declare function suppressCameraAutoreset(plugin: PluginContext): Promise<void>;
|
|
10
12
|
/** Set the camera based on a camera node params. */
|
|
11
13
|
export declare function setCamera(plugin: PluginContext, params: ParamsOfKind<MolstarTree, 'camera'>): Promise<void>;
|
|
12
14
|
/** Focus the camera on the bounding sphere of a (sub)structure (or on the whole scene if `structureNodeSelector` is null).
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* @author Adam Midlik <midlik@gmail.com>
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.setCanvas = exports.setFocus = exports.setCamera = void 0;
|
|
8
|
+
exports.setCanvas = exports.setFocus = exports.setCamera = exports.suppressCameraAutoreset = void 0;
|
|
9
|
+
const canvas3d_1 = require("../../mol-canvas3d/canvas3d");
|
|
9
10
|
const boundary_helper_1 = require("../../mol-math/geometry/boundary-helper");
|
|
10
11
|
const linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
11
12
|
const loci_1 = require("../../mol-model/loci");
|
|
@@ -22,6 +23,14 @@ const DefaultFocusOptions = {
|
|
|
22
23
|
};
|
|
23
24
|
const DefaultCanvasBackgroundColor = names_1.ColorNames.white;
|
|
24
25
|
const _tmpVec = (0, linear_algebra_1.Vec3)();
|
|
26
|
+
/** Set the camera position to the current position (thus suppress automatic adjustment). */
|
|
27
|
+
async function suppressCameraAutoreset(plugin) {
|
|
28
|
+
var _a;
|
|
29
|
+
const snapshot = { ...(_a = plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.camera.state, radius: Infinity }; // `radius: Infinity` avoids clipping when the scene expands
|
|
30
|
+
adjustSceneRadiusFactor(plugin, snapshot.target);
|
|
31
|
+
await commands_1.PluginCommands.Camera.SetSnapshot(plugin, { snapshot });
|
|
32
|
+
}
|
|
33
|
+
exports.suppressCameraAutoreset = suppressCameraAutoreset;
|
|
25
34
|
/** Set the camera based on a camera node params. */
|
|
26
35
|
async function setCamera(plugin, params) {
|
|
27
36
|
const target = linear_algebra_1.Vec3.create(...params.target);
|
|
@@ -30,7 +39,8 @@ async function setCamera(plugin, params) {
|
|
|
30
39
|
position = fovAdjustedPosition(target, position, plugin.canvas3d.camera.state.mode, plugin.canvas3d.camera.state.fov);
|
|
31
40
|
const up = linear_algebra_1.Vec3.create(...params.up);
|
|
32
41
|
linear_algebra_1.Vec3.orthogonalize(up, linear_algebra_1.Vec3.sub(_tmpVec, target, position), up);
|
|
33
|
-
const snapshot = { target, position, up, radius:
|
|
42
|
+
const snapshot = { target, position, up, radius: Infinity }; // `radius: Infinity` avoids clipping (ensures covering the whole scene)
|
|
43
|
+
adjustSceneRadiusFactor(plugin, snapshot.target);
|
|
34
44
|
await commands_1.PluginCommands.Camera.SetSnapshot(plugin, { snapshot });
|
|
35
45
|
}
|
|
36
46
|
exports.setCamera = setCamera;
|
|
@@ -61,10 +71,27 @@ async function setFocus(plugin, structureNodeSelector, params = mvs_defaults_1.M
|
|
|
61
71
|
up,
|
|
62
72
|
direction,
|
|
63
73
|
});
|
|
74
|
+
resetSceneRadiusFactor(plugin);
|
|
64
75
|
await commands_1.PluginCommands.Camera.SetSnapshot(plugin, { snapshot });
|
|
65
76
|
}
|
|
66
77
|
}
|
|
67
78
|
exports.setFocus = setFocus;
|
|
79
|
+
/** Adjust `sceneRadiusFactor` property so that the current scene is not cropped */
|
|
80
|
+
function adjustSceneRadiusFactor(plugin, cameraTarget) {
|
|
81
|
+
var _a;
|
|
82
|
+
if (!cameraTarget)
|
|
83
|
+
return;
|
|
84
|
+
const boundingSphere = getPluginBoundingSphere(plugin);
|
|
85
|
+
const offset = linear_algebra_1.Vec3.distance(cameraTarget, boundingSphere.center);
|
|
86
|
+
const sceneRadiusFactor = boundingSphere.radius > 0 ? ((boundingSphere.radius + offset) / boundingSphere.radius) : 1;
|
|
87
|
+
(_a = plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.setProps({ sceneRadiusFactor });
|
|
88
|
+
}
|
|
89
|
+
/** Reset `sceneRadiusFactor` property to the default value */
|
|
90
|
+
function resetSceneRadiusFactor(plugin) {
|
|
91
|
+
var _a;
|
|
92
|
+
const sceneRadiusFactor = canvas3d_1.Canvas3DParams.sceneRadiusFactor.defaultValue;
|
|
93
|
+
(_a = plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.setProps({ sceneRadiusFactor });
|
|
94
|
+
}
|
|
68
95
|
/** Return camera snapshot for focusing a sphere with given `center` and `radius`,
|
|
69
96
|
* while ensuring given view `direction` (aligns with vector position->target)
|
|
70
97
|
* and `up` (aligns with screen Y axis). */
|
|
@@ -51,6 +51,7 @@ export declare const MVSAnnotationLabelParams: {
|
|
|
51
51
|
fontWeight: PD.Select<import("../../../../mol-geo/geometry/text/font-atlas").FontWeight>;
|
|
52
52
|
background: PD.BooleanParam;
|
|
53
53
|
borderWidth: PD.Numeric;
|
|
54
|
+
emissive: PD.Numeric;
|
|
54
55
|
batchSize: PD.Numeric;
|
|
55
56
|
material: PD.Group<PD.Normalize<{
|
|
56
57
|
metalness: number;
|
|
@@ -128,6 +129,7 @@ export declare const MVSAnnotationLabelRepresentationProvider: StructureRepresen
|
|
|
128
129
|
fontWeight: PD.Select<import("../../../../mol-geo/geometry/text/font-atlas").FontWeight>;
|
|
129
130
|
background: PD.BooleanParam;
|
|
130
131
|
borderWidth: PD.Numeric;
|
|
132
|
+
emissive: PD.Numeric;
|
|
131
133
|
batchSize: PD.Numeric;
|
|
132
134
|
material: PD.Group<PD.Normalize<{
|
|
133
135
|
metalness: number;
|