molstar 3.5.0 → 3.7.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/index.html +1 -1
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/build/viewer/molstar.js.LICENSE.txt +12 -14
- package/lib/apps/docking-viewer/index.js +1 -1
- package/lib/apps/viewer/app.js +1 -1
- package/lib/apps/viewer/index.html +1 -1
- package/lib/cli/chem-comp-dict/util.d.ts +20 -20
- package/lib/cli/cifschema/util/cif-dic.d.ts +1 -1
- package/lib/cli/cifschema/util/cif-dic.js +7 -5
- package/lib/cli/cifschema/util/generate.d.ts +1 -1
- package/lib/cli/cifschema/util/generate.js +12 -3
- package/lib/cli/cifschema/util/schema.d.ts +3 -3
- package/lib/cli/cifschema/util/schema.js +1 -1
- package/lib/commonjs/apps/docking-viewer/index.js +2 -2
- package/lib/commonjs/apps/viewer/app.js +2 -2
- package/lib/commonjs/cli/chem-comp-dict/util.d.ts +20 -20
- package/lib/commonjs/cli/cifschema/util/cif-dic.d.ts +1 -1
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +7 -5
- package/lib/commonjs/cli/cifschema/util/generate.d.ts +1 -1
- package/lib/commonjs/cli/cifschema/util/generate.js +12 -3
- package/lib/commonjs/cli/cifschema/util/schema.d.ts +3 -3
- package/lib/commonjs/cli/cifschema/util/schema.js +1 -1
- package/lib/commonjs/examples/alpha-orbitals/index.js +22 -17
- package/lib/commonjs/examples/basic-wrapper/index.js +2 -2
- package/lib/commonjs/examples/lighting/index.js +2 -2
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +2 -2
- package/lib/commonjs/extensions/anvil/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +4 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +1 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -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/image.d.ts +1 -0
- package/lib/commonjs/mol-data/db/column.d.ts +10 -3
- package/lib/commonjs/mol-data/db/column.js +39 -17
- package/lib/commonjs/mol-geo/geometry/color-data.d.ts +2 -8
- package/lib/commonjs/mol-geo/geometry/color-data.js +16 -3
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +4 -3
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +4 -3
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +2 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +4 -3
- 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 +16 -5
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.js +2 -2
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/mesh.js +2 -2
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +2 -2
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +2 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +2 -2
- package/lib/commonjs/mol-gl/renderer.js +54 -23
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.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/image.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/image.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/lines.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/points.frag.js +2 -2
- package/lib/commonjs/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/text.frag.js +2 -2
- package/lib/commonjs/mol-gl/webgl/buffer.d.ts +2 -2
- package/lib/commonjs/mol-gl/webgl/buffer.js +12 -12
- package/lib/commonjs/mol-gl/webgl/program.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/program.js +10 -4
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +8 -8
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +12 -11
- package/lib/commonjs/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +12 -12
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +13 -12
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +44 -39
- package/lib/commonjs/mol-io/reader/cif/schema.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema.js +22 -2
- package/lib/commonjs/mol-io/writer/ligand-encoder.d.ts +4 -2
- package/lib/commonjs/mol-io/writer/ligand-encoder.js +9 -4
- package/lib/commonjs/mol-io/writer/mol/encoder.js +17 -5
- package/lib/commonjs/mol-io/writer/mol2/encoder.js +17 -4
- package/lib/commonjs/mol-model/structure/model/model.js +14 -6
- package/lib/commonjs/mol-model/structure/model/properties/common.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types.d.ts +19 -17
- package/lib/commonjs/mol-model/structure/model/types.js +30 -31
- package/lib/commonjs/mol-model/structure/query/queries/generators.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/properties.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
- package/lib/commonjs/mol-model/structure/structure/unit/rings.js +3 -0
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/commonjs/mol-model-formats/structure/basic/entities.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/common/component.d.ts +3 -3
- package/lib/commonjs/mol-model-formats/structure/common/component.js +46 -46
- package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/pdb/atom-site.js +72 -7
- package/lib/commonjs/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
- package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +7 -2
- package/lib/commonjs/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/util.js +3 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -0
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +3 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +6 -6
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +1 -1
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +6 -0
- package/lib/commonjs/mol-plugin-ui/base.d.ts +3 -1
- package/lib/commonjs/mol-plugin-ui/controls/color.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/controls/common.d.ts +2 -0
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +21 -7
- package/lib/commonjs/mol-plugin-ui/plugin.d.ts +2 -0
- package/lib/commonjs/mol-plugin-ui/plugin.js +2 -2
- package/lib/commonjs/mol-plugin-ui/react18.d.ts +11 -0
- package/lib/commonjs/mol-plugin-ui/react18.js +38 -0
- package/lib/commonjs/mol-plugin-ui/spec.d.ts +1 -0
- package/lib/commonjs/mol-plugin-ui/state/common.js +6 -7
- package/lib/commonjs/mol-plugin-ui/structure/focus.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/structure/focus.js +2 -2
- package/lib/commonjs/mol-plugin-ui/task.d.ts +2 -21
- package/lib/commonjs/mol-plugin-ui/task.js +39 -43
- package/lib/commonjs/mol-plugin-ui/viewport/help.d.ts +4 -1
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.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-visual.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +10 -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/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/putty.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +3 -0
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -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-sphere.d.ts +2 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.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/util.d.ts +2 -1
- package/lib/commonjs/mol-repr/util.js +2 -2
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +5 -0
- package/lib/commonjs/mol-repr/volume/registry.d.ts +1 -0
- package/lib/commonjs/mol-theme/color.d.ts +9 -2
- package/lib/commonjs/mol-theme/color.js +1 -1
- package/lib/commonjs/servers/model/server/query.js +1 -3
- package/lib/commonjs/servers/model/version.d.ts +1 -1
- package/lib/commonjs/servers/model/version.js +1 -1
- package/lib/examples/alpha-orbitals/index.js +21 -16
- package/lib/examples/basic-wrapper/index.js +1 -1
- package/lib/examples/lighting/index.js +1 -1
- package/lib/examples/proteopedia-wrapper/index.js +1 -1
- package/lib/extensions/anvil/behavior.d.ts +1 -0
- package/lib/extensions/anvil/representation.d.ts +4 -0
- package/lib/extensions/cellpack/representation.d.ts +1 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +3 -0
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +1 -0
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +1 -0
- package/lib/extensions/rcsb/validation-report/representation.d.ts +5 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +2 -0
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -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/image.d.ts +1 -0
- package/lib/mol-data/db/column.d.ts +10 -3
- package/lib/mol-data/db/column.js +39 -18
- package/lib/mol-geo/geometry/color-data.d.ts +2 -8
- package/lib/mol-geo/geometry/color-data.js +16 -3
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +4 -2
- package/lib/mol-geo/geometry/cylinders/cylinders.js +4 -3
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +2 -1
- package/lib/mol-geo/geometry/mesh/mesh.js +4 -3
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +2 -1
- package/lib/mol-geo/geometry/spheres/spheres.js +4 -3
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +2 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +16 -5
- package/lib/mol-gl/renderable/cylinders.d.ts +2 -1
- package/lib/mol-gl/renderable/cylinders.js +2 -2
- package/lib/mol-gl/renderable/mesh.d.ts +2 -1
- package/lib/mol-gl/renderable/mesh.js +2 -2
- package/lib/mol-gl/renderable/spheres.d.ts +2 -1
- package/lib/mol-gl/renderable/spheres.js +2 -2
- package/lib/mol-gl/renderable/texture-mesh.d.ts +2 -1
- package/lib/mol-gl/renderable/texture-mesh.js +2 -2
- package/lib/mol-gl/renderer.js +54 -23
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +2 -2
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.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/image.frag.d.ts +2 -2
- package/lib/mol-gl/shader/image.frag.js +2 -2
- package/lib/mol-gl/shader/lines.frag.d.ts +2 -2
- package/lib/mol-gl/shader/lines.frag.js +2 -2
- package/lib/mol-gl/shader/points.frag.d.ts +2 -2
- package/lib/mol-gl/shader/points.frag.js +2 -2
- package/lib/mol-gl/shader/text.frag.d.ts +2 -2
- package/lib/mol-gl/shader/text.frag.js +2 -2
- package/lib/mol-gl/webgl/buffer.d.ts +2 -2
- package/lib/mol-gl/webgl/buffer.js +12 -12
- package/lib/mol-gl/webgl/program.d.ts +1 -1
- package/lib/mol-gl/webgl/program.js +10 -4
- package/lib/mol-io/reader/cif/schema/bird.d.ts +8 -8
- package/lib/mol-io/reader/cif/schema/bird.js +12 -11
- package/lib/mol-io/reader/cif/schema/ccd-extras.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +12 -12
- package/lib/mol-io/reader/cif/schema/ccd.js +13 -12
- package/lib/mol-io/reader/cif/schema/mmcif-extras.d.ts +5 -5
- package/lib/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +30 -26
- package/lib/mol-io/reader/cif/schema/mmcif.js +44 -39
- package/lib/mol-io/reader/cif/schema.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema.js +22 -2
- package/lib/mol-io/writer/ligand-encoder.d.ts +4 -2
- package/lib/mol-io/writer/ligand-encoder.js +9 -4
- package/lib/mol-io/writer/mol/encoder.js +17 -5
- package/lib/mol-io/writer/mol2/encoder.js +17 -4
- package/lib/mol-model/structure/model/model.js +14 -6
- package/lib/mol-model/structure/model/properties/common.js +1 -1
- package/lib/mol-model/structure/model/types.d.ts +19 -17
- package/lib/mol-model/structure/model/types.js +30 -31
- package/lib/mol-model/structure/query/queries/generators.js +1 -1
- package/lib/mol-model/structure/structure/properties.d.ts +1 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +2 -4
- package/lib/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -3
- package/lib/mol-model/structure/structure/unit/rings.js +3 -0
- package/lib/mol-model-formats/shape/ply.d.ts +2 -0
- package/lib/mol-model-formats/structure/basic/entities.js +1 -1
- package/lib/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/mol-model-formats/structure/common/component.d.ts +3 -3
- package/lib/mol-model-formats/structure/common/component.js +46 -46
- package/lib/mol-model-formats/structure/pdb/atom-site.d.ts +2 -2
- package/lib/mol-model-formats/structure/pdb/atom-site.js +72 -7
- package/lib/mol-model-formats/structure/pdb/secondary-structure.js +11 -11
- package/lib/mol-model-formats/structure/pdb/to-cif.js +7 -2
- package/lib/mol-model-formats/structure/property/bonds/chem_comp.js +1 -1
- package/lib/mol-model-formats/structure/property/bonds/struct_conn.js +1 -1
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +1 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +3 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +4 -0
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/util.js +3 -2
- package/lib/mol-plugin/commands.d.ts +1 -0
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +3 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/structure.d.ts +6 -6
- package/lib/mol-plugin-state/helpers/structure-selection-query.d.ts +1 -1
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +1 -1
- package/lib/mol-plugin-state/transforms/representation.d.ts +6 -0
- package/lib/mol-plugin-ui/base.d.ts +3 -1
- package/lib/mol-plugin-ui/controls/color.d.ts +1 -1
- package/lib/mol-plugin-ui/controls/common.d.ts +2 -0
- package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/mol-plugin-ui/hooks/use-behavior.js +20 -7
- package/lib/mol-plugin-ui/plugin.d.ts +2 -0
- package/lib/mol-plugin-ui/plugin.js +2 -2
- package/lib/mol-plugin-ui/react18.d.ts +11 -0
- package/lib/mol-plugin-ui/react18.js +34 -0
- package/lib/mol-plugin-ui/spec.d.ts +1 -0
- package/lib/mol-plugin-ui/state/common.js +7 -8
- package/lib/mol-plugin-ui/structure/focus.d.ts +1 -1
- package/lib/mol-plugin-ui/structure/focus.js +2 -2
- package/lib/mol-plugin-ui/task.d.ts +2 -21
- package/lib/mol-plugin-ui/task.js +40 -46
- package/lib/mol-plugin-ui/viewport/help.d.ts +4 -1
- package/lib/mol-repr/shape/loci/angle.d.ts +1 -0
- package/lib/mol-repr/shape/loci/dihedral.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-visual.d.ts +3 -0
- package/lib/mol-repr/structure/params.d.ts +4 -0
- package/lib/mol-repr/structure/registry.d.ts +10 -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/molecular-surface.d.ts +3 -0
- package/lib/mol-repr/structure/representation/orientation.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-visual.d.ts +4 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +2 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +2 -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-sphere.d.ts +2 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +1 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +4 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.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/util.d.ts +2 -1
- package/lib/mol-repr/util.js +2 -2
- package/lib/mol-repr/volume/isosurface.d.ts +5 -0
- package/lib/mol-repr/volume/registry.d.ts +1 -0
- package/lib/mol-theme/color.d.ts +9 -2
- package/lib/mol-theme/color.js +1 -1
- package/lib/servers/model/server/query.js +1 -3
- package/lib/servers/model/version.d.ts +1 -1
- package/lib/servers/model/version.js +1 -1
- package/package.json +21 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -11,7 +11,7 @@ var rxjs_1 = require("rxjs");
|
|
|
11
11
|
var operators_1 = require("rxjs/operators");
|
|
12
12
|
var transforms_1 = require("../../extensions/alpha-orbitals/transforms");
|
|
13
13
|
var grid3d_1 = require("../../mol-gl/compute/grid3d");
|
|
14
|
-
var
|
|
14
|
+
var react18_1 = require("../../mol-plugin-ui/react18");
|
|
15
15
|
var spec_1 = require("../../mol-plugin-ui/spec");
|
|
16
16
|
var commands_1 = require("../../mol-plugin/commands");
|
|
17
17
|
var config_1 = require("../../mol-plugin/config");
|
|
@@ -30,15 +30,15 @@ var AlphaOrbitalsExample = /** @class */ (function () {
|
|
|
30
30
|
this.currentParams = tslib_1.__assign({}, this.state.value);
|
|
31
31
|
}
|
|
32
32
|
AlphaOrbitalsExample.prototype.init = function (target) {
|
|
33
|
-
var _a;
|
|
34
33
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
35
|
-
var defaultSpec,
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
var defaultSpec, _a;
|
|
35
|
+
var _this = this;
|
|
36
|
+
return tslib_1.__generator(this, function (_b) {
|
|
37
|
+
switch (_b.label) {
|
|
38
38
|
case 0:
|
|
39
39
|
defaultSpec = (0, spec_1.DefaultPluginUISpec)();
|
|
40
|
-
|
|
41
|
-
return [4 /*yield*/, (0,
|
|
40
|
+
_a = this;
|
|
41
|
+
return [4 /*yield*/, (0, react18_1.createPluginUI)(typeof target === 'string' ? document.getElementById(target) : target, tslib_1.__assign(tslib_1.__assign({}, defaultSpec), { layout: {
|
|
42
42
|
initial: {
|
|
43
43
|
isExpanded: false,
|
|
44
44
|
showControls: false
|
|
@@ -56,17 +56,22 @@ var AlphaOrbitalsExample = /** @class */ (function () {
|
|
|
56
56
|
[config_1.PluginConfig.Viewport.ShowAnimation, false],
|
|
57
57
|
] }))];
|
|
58
58
|
case 1:
|
|
59
|
-
|
|
59
|
+
_a.plugin = _b.sent();
|
|
60
60
|
this.plugin.managers.interactivity.setProps({ granularity: 'element' });
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
this.plugin.behaviors.canvas3d.initialized.subscribe(function (init) {
|
|
62
|
+
var _a;
|
|
63
|
+
if (!init)
|
|
64
|
+
return;
|
|
65
|
+
if (!(0, grid3d_1.canComputeGrid3dOnGPU)((_a = _this.plugin.canvas3d) === null || _a === void 0 ? void 0 : _a.webgl)) {
|
|
66
|
+
commands_1.PluginCommands.Toast.Show(_this.plugin, {
|
|
67
|
+
title: 'Error',
|
|
68
|
+
message: "Browser/device does not support required WebGL extension (OES_texture_float)."
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
_this.load(tslib_1.__assign({ moleculeSdf: example_data_1.DemoMoleculeSDF }, example_data_1.DemoOrbitals));
|
|
73
|
+
(0, controls_1.mountControls)(_this, document.getElementById('controls'));
|
|
74
|
+
});
|
|
70
75
|
return [2 /*return*/];
|
|
71
76
|
}
|
|
72
77
|
});
|
|
@@ -10,7 +10,7 @@ var pdbe_1 = require("../../extensions/pdbe");
|
|
|
10
10
|
var loci_1 = require("../../mol-model/loci");
|
|
11
11
|
var structure_1 = require("../../mol-model/structure");
|
|
12
12
|
var model_index_1 = require("../../mol-plugin-state/animation/built-in/model-index");
|
|
13
|
-
var
|
|
13
|
+
var react18_1 = require("../../mol-plugin-ui/react18");
|
|
14
14
|
var spec_1 = require("../../mol-plugin-ui/spec");
|
|
15
15
|
var commands_1 = require("../../mol-plugin/commands");
|
|
16
16
|
var script_1 = require("../../mol-script/script");
|
|
@@ -186,7 +186,7 @@ var BasicWrapper = /** @class */ (function () {
|
|
|
186
186
|
switch (_b.label) {
|
|
187
187
|
case 0:
|
|
188
188
|
_a = this;
|
|
189
|
-
return [4 /*yield*/, (0,
|
|
189
|
+
return [4 /*yield*/, (0, react18_1.createPluginUI)(typeof target === 'string' ? document.getElementById(target) : target, tslib_1.__assign(tslib_1.__assign({}, (0, spec_1.DefaultPluginUISpec)()), { layout: {
|
|
190
190
|
initial: {
|
|
191
191
|
isExpanded: false,
|
|
192
192
|
showControls: false
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
var tslib_1 = require("tslib");
|
|
9
|
-
var
|
|
9
|
+
var react18_1 = require("../../mol-plugin-ui/react18");
|
|
10
10
|
var spec_1 = require("../../mol-plugin-ui/spec");
|
|
11
11
|
var commands_1 = require("../../mol-plugin/commands");
|
|
12
12
|
var assets_1 = require("../../mol-util/assets");
|
|
@@ -66,7 +66,7 @@ var LightingDemo = /** @class */ (function () {
|
|
|
66
66
|
switch (_b.label) {
|
|
67
67
|
case 0:
|
|
68
68
|
_a = this;
|
|
69
|
-
return [4 /*yield*/, (0,
|
|
69
|
+
return [4 /*yield*/, (0, react18_1.createPluginUI)(typeof target === 'string' ? document.getElementById(target) : target, tslib_1.__assign(tslib_1.__assign({}, (0, spec_1.DefaultPluginUISpec)()), { layout: {
|
|
70
70
|
initial: {
|
|
71
71
|
isExpanded: false,
|
|
72
72
|
showControls: false
|
|
@@ -11,7 +11,7 @@ var canvas3d_1 = require("../../mol-canvas3d/canvas3d");
|
|
|
11
11
|
var model_index_1 = require("../../mol-plugin-state/animation/built-in/model-index");
|
|
12
12
|
var structure_representation_params_1 = require("../../mol-plugin-state/helpers/structure-representation-params");
|
|
13
13
|
var transforms_1 = require("../../mol-plugin-state/transforms");
|
|
14
|
-
var
|
|
14
|
+
var react18_1 = require("../../mol-plugin-ui/react18");
|
|
15
15
|
var spec_1 = require("../../mol-plugin-ui/spec");
|
|
16
16
|
var transformers_1 = require("../../mol-plugin/behavior/dynamic/volume-streaming/transformers");
|
|
17
17
|
var commands_1 = require("../../mol-plugin/commands");
|
|
@@ -241,7 +241,7 @@ var MolStarProteopediaWrapper = /** @class */ (function () {
|
|
|
241
241
|
switch (_b.label) {
|
|
242
242
|
case 0:
|
|
243
243
|
_a = this;
|
|
244
|
-
return [4 /*yield*/, (0,
|
|
244
|
+
return [4 /*yield*/, (0, react18_1.createPluginUI)(typeof target === 'string' ? document.getElementById(target) : target, tslib_1.__assign(tslib_1.__assign({}, (0, spec_1.DefaultPluginUISpec)()), { animations: [
|
|
245
245
|
model_index_1.AnimateModelIndex
|
|
246
246
|
], layout: {
|
|
247
247
|
initial: {
|
|
@@ -18,6 +18,7 @@ declare const BilayerPlanesParams: {
|
|
|
18
18
|
flatShaded: PD.BooleanParam;
|
|
19
19
|
ignoreLight: PD.BooleanParam;
|
|
20
20
|
xrayShaded: PD.BooleanParam;
|
|
21
|
+
transparentBackfaces: PD.Select<string>;
|
|
21
22
|
bumpFrequency: PD.Numeric;
|
|
22
23
|
bumpAmplitude: PD.Numeric;
|
|
23
24
|
alpha: PD.Numeric;
|
|
@@ -98,6 +99,7 @@ export declare const MembraneOrientationParams: {
|
|
|
98
99
|
flatShaded: PD.BooleanParam;
|
|
99
100
|
ignoreLight: PD.BooleanParam;
|
|
100
101
|
xrayShaded: PD.BooleanParam;
|
|
102
|
+
transparentBackfaces: PD.Select<string>;
|
|
101
103
|
bumpFrequency: PD.Numeric;
|
|
102
104
|
bumpAmplitude: PD.Numeric;
|
|
103
105
|
};
|
|
@@ -134,6 +136,7 @@ export declare function getMembraneOrientationParams(ctx: ThemeRegistryContext,
|
|
|
134
136
|
flatShaded: PD.BooleanParam;
|
|
135
137
|
ignoreLight: PD.BooleanParam;
|
|
136
138
|
xrayShaded: PD.BooleanParam;
|
|
139
|
+
transparentBackfaces: PD.Select<string>;
|
|
137
140
|
bumpFrequency: PD.Numeric;
|
|
138
141
|
bumpAmplitude: PD.Numeric;
|
|
139
142
|
};
|
|
@@ -170,6 +173,7 @@ export declare const MembraneOrientationRepresentationProvider: StructureReprese
|
|
|
170
173
|
flatShaded: PD.BooleanParam;
|
|
171
174
|
ignoreLight: PD.BooleanParam;
|
|
172
175
|
xrayShaded: PD.BooleanParam;
|
|
176
|
+
transparentBackfaces: PD.Select<string>;
|
|
173
177
|
bumpFrequency: PD.Numeric;
|
|
174
178
|
bumpAmplitude: PD.Numeric;
|
|
175
179
|
}, "membrane-orientation">;
|
|
@@ -17,6 +17,7 @@ export declare const ConfalPyramidsParams: {
|
|
|
17
17
|
flatShaded: PD.BooleanParam;
|
|
18
18
|
ignoreLight: PD.BooleanParam;
|
|
19
19
|
xrayShaded: PD.BooleanParam;
|
|
20
|
+
transparentBackfaces: PD.Select<string>;
|
|
20
21
|
bumpFrequency: PD.Numeric;
|
|
21
22
|
bumpAmplitude: PD.Numeric;
|
|
22
23
|
alpha: PD.Numeric;
|
|
@@ -46,6 +47,7 @@ export declare function getConfalPyramidsParams(ctx: ThemeRegistryContext, struc
|
|
|
46
47
|
flatShaded: PD.BooleanParam;
|
|
47
48
|
ignoreLight: PD.BooleanParam;
|
|
48
49
|
xrayShaded: PD.BooleanParam;
|
|
50
|
+
transparentBackfaces: PD.Select<string>;
|
|
49
51
|
bumpFrequency: PD.Numeric;
|
|
50
52
|
bumpAmplitude: PD.Numeric;
|
|
51
53
|
alpha: PD.Numeric;
|
|
@@ -76,6 +78,7 @@ export declare const ConfalPyramidsRepresentationProvider: StructureRepresentati
|
|
|
76
78
|
flatShaded: PD.BooleanParam;
|
|
77
79
|
ignoreLight: PD.BooleanParam;
|
|
78
80
|
xrayShaded: PD.BooleanParam;
|
|
81
|
+
transparentBackfaces: PD.Select<string>;
|
|
79
82
|
bumpFrequency: PD.Numeric;
|
|
80
83
|
bumpAmplitude: PD.Numeric;
|
|
81
84
|
alpha: PD.Numeric;
|
|
@@ -16,6 +16,7 @@ export declare const AssemblySymmetryParams: {
|
|
|
16
16
|
flatShaded: PD.BooleanParam;
|
|
17
17
|
ignoreLight: PD.BooleanParam;
|
|
18
18
|
xrayShaded: PD.BooleanParam;
|
|
19
|
+
transparentBackfaces: PD.Select<string>;
|
|
19
20
|
bumpFrequency: PD.Numeric;
|
|
20
21
|
bumpAmplitude: PD.Numeric;
|
|
21
22
|
alpha: PD.Numeric;
|
|
@@ -31,6 +31,7 @@ export declare const IntraUnitClashParams: {
|
|
|
31
31
|
flatShaded: PD.BooleanParam;
|
|
32
32
|
ignoreLight: PD.BooleanParam;
|
|
33
33
|
xrayShaded: PD.BooleanParam;
|
|
34
|
+
transparentBackfaces: PD.Select<string>;
|
|
34
35
|
bumpFrequency: PD.Numeric;
|
|
35
36
|
bumpAmplitude: PD.Numeric;
|
|
36
37
|
alpha: PD.Numeric;
|
|
@@ -73,6 +74,7 @@ export declare const InterUnitClashParams: {
|
|
|
73
74
|
flatShaded: PD.BooleanParam;
|
|
74
75
|
ignoreLight: PD.BooleanParam;
|
|
75
76
|
xrayShaded: PD.BooleanParam;
|
|
77
|
+
transparentBackfaces: PD.Select<string>;
|
|
76
78
|
bumpFrequency: PD.Numeric;
|
|
77
79
|
bumpAmplitude: PD.Numeric;
|
|
78
80
|
alpha: PD.Numeric;
|
|
@@ -116,6 +118,7 @@ export declare const ClashesParams: {
|
|
|
116
118
|
flatShaded: PD.BooleanParam;
|
|
117
119
|
ignoreLight: PD.BooleanParam;
|
|
118
120
|
xrayShaded: PD.BooleanParam;
|
|
121
|
+
transparentBackfaces: PD.Select<string>;
|
|
119
122
|
bumpFrequency: PD.Numeric;
|
|
120
123
|
bumpAmplitude: PD.Numeric;
|
|
121
124
|
alpha: PD.Numeric;
|
|
@@ -158,6 +161,7 @@ export declare function getClashesParams(ctx: ThemeRegistryContext, structure: S
|
|
|
158
161
|
flatShaded: PD.BooleanParam;
|
|
159
162
|
ignoreLight: PD.BooleanParam;
|
|
160
163
|
xrayShaded: PD.BooleanParam;
|
|
164
|
+
transparentBackfaces: PD.Select<string>;
|
|
161
165
|
bumpFrequency: PD.Numeric;
|
|
162
166
|
bumpAmplitude: PD.Numeric;
|
|
163
167
|
alpha: PD.Numeric;
|
|
@@ -201,6 +205,7 @@ export declare const ClashesRepresentationProvider: StructureRepresentationProvi
|
|
|
201
205
|
flatShaded: PD.BooleanParam;
|
|
202
206
|
ignoreLight: PD.BooleanParam;
|
|
203
207
|
xrayShaded: PD.BooleanParam;
|
|
208
|
+
transparentBackfaces: PD.Select<string>;
|
|
204
209
|
bumpFrequency: PD.Numeric;
|
|
205
210
|
bumpAmplitude: PD.Numeric;
|
|
206
211
|
alpha: PD.Numeric;
|
|
@@ -166,6 +166,7 @@ export declare const Canvas3DParams: {
|
|
|
166
166
|
flipSided: any;
|
|
167
167
|
flatShaded: any;
|
|
168
168
|
xrayShaded: any;
|
|
169
|
+
transparentBackfaces: any;
|
|
169
170
|
bumpFrequency: any;
|
|
170
171
|
bumpAmplitude: any;
|
|
171
172
|
quality: any;
|
|
@@ -319,6 +320,7 @@ export declare const DefaultCanvas3DParams: PD.Values<{
|
|
|
319
320
|
flipSided: any;
|
|
320
321
|
flatShaded: any;
|
|
321
322
|
xrayShaded: any;
|
|
323
|
+
transparentBackfaces: any;
|
|
322
324
|
bumpFrequency: any;
|
|
323
325
|
bumpAmplitude: any;
|
|
324
326
|
quality: any;
|
|
@@ -22,6 +22,7 @@ export declare const CameraHelperParams: {
|
|
|
22
22
|
flipSided: boolean;
|
|
23
23
|
flatShaded: boolean;
|
|
24
24
|
xrayShaded: boolean;
|
|
25
|
+
transparentBackfaces: string;
|
|
25
26
|
bumpFrequency: number;
|
|
26
27
|
bumpAmplitude: number;
|
|
27
28
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
@@ -24,6 +24,7 @@ export declare const HandleHelperParams: {
|
|
|
24
24
|
flipSided: boolean;
|
|
25
25
|
flatShaded: boolean;
|
|
26
26
|
xrayShaded: boolean;
|
|
27
|
+
transparentBackfaces: string;
|
|
27
28
|
bumpFrequency: number;
|
|
28
29
|
bumpAmplitude: number;
|
|
29
30
|
quality: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
|
|
@@ -33,6 +33,7 @@ export declare const HelperParams: {
|
|
|
33
33
|
flipSided: any;
|
|
34
34
|
flatShaded: any;
|
|
35
35
|
xrayShaded: any;
|
|
36
|
+
transparentBackfaces: any;
|
|
36
37
|
bumpFrequency: any;
|
|
37
38
|
bumpAmplitude: any;
|
|
38
39
|
quality: any;
|
|
@@ -65,6 +66,7 @@ export declare const DefaultHelperProps: PD.Values<{
|
|
|
65
66
|
flipSided: any;
|
|
66
67
|
flatShaded: any;
|
|
67
68
|
xrayShaded: any;
|
|
69
|
+
transparentBackfaces: any;
|
|
68
70
|
bumpFrequency: any;
|
|
69
71
|
bumpAmplitude: any;
|
|
70
72
|
quality: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2017-
|
|
2
|
+
* Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -28,6 +28,7 @@ declare namespace Column {
|
|
|
28
28
|
export type Str = {
|
|
29
29
|
'@type': 'str';
|
|
30
30
|
T: string;
|
|
31
|
+
transform?: 'uppercase' | 'lowercase';
|
|
31
32
|
} & Base<'str'>;
|
|
32
33
|
export type Int = {
|
|
33
34
|
'@type': 'int';
|
|
@@ -50,6 +51,7 @@ declare namespace Column {
|
|
|
50
51
|
export type Aliased<T> = {
|
|
51
52
|
'@type': 'aliased';
|
|
52
53
|
T: T;
|
|
54
|
+
transform?: T extends string ? 'uppercase' | 'lowercase' : never;
|
|
53
55
|
} & Base<T extends string ? 'str' : 'int'>;
|
|
54
56
|
export type List<T extends number | string> = {
|
|
55
57
|
'@type': 'list';
|
|
@@ -58,16 +60,21 @@ declare namespace Column {
|
|
|
58
60
|
itemParse: (x: string) => T;
|
|
59
61
|
} & Base<'list'>;
|
|
60
62
|
export const str: Str;
|
|
63
|
+
export const ustr: Str;
|
|
64
|
+
export const lstr: Str;
|
|
61
65
|
export const int: Int;
|
|
62
66
|
export const coord: Coordinate;
|
|
63
67
|
export const float: Float;
|
|
64
|
-
export function Str(
|
|
68
|
+
export function Str(options?: {
|
|
69
|
+
defaultValue?: string;
|
|
70
|
+
transform?: 'uppercase' | 'lowercase';
|
|
71
|
+
}): Str;
|
|
65
72
|
export function Int(defaultValue?: number): Int;
|
|
66
73
|
export function Float(defaultValue?: number): Float;
|
|
67
74
|
export function Tensor(space: Tensors.Space, baseType?: Int | Float): Tensor;
|
|
68
75
|
export function Vector(dim: number, baseType?: Int | Float): Tensor;
|
|
69
76
|
export function Matrix(rows: number, cols: number, baseType?: Int | Float): Tensor;
|
|
70
|
-
export function Aliased<T>(t: Str | Int
|
|
77
|
+
export function Aliased<T>(t: Str | Int): Aliased<T>;
|
|
71
78
|
export function List<T extends number | string>(separator: string, itemParse: (x: string) => T, defaultValue?: T[]): List<T>;
|
|
72
79
|
export {};
|
|
73
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
6
6
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
@@ -17,13 +17,12 @@ var Column;
|
|
|
17
17
|
(function (Schema) {
|
|
18
18
|
// T also serves as a default value for undefined columns
|
|
19
19
|
Schema.str = { '@type': 'str', T: '', valueType: 'str' };
|
|
20
|
+
Schema.ustr = { '@type': 'str', T: '', valueType: 'str', transform: 'uppercase' };
|
|
21
|
+
Schema.lstr = { '@type': 'str', T: '', valueType: 'str', transform: 'lowercase' };
|
|
20
22
|
Schema.int = { '@type': 'int', T: 0, valueType: 'int' };
|
|
21
23
|
Schema.coord = { '@type': 'coord', T: 0, valueType: 'float' };
|
|
22
24
|
Schema.float = { '@type': 'float', T: 0, valueType: 'float' };
|
|
23
|
-
function Str(defaultValue)
|
|
24
|
-
if (defaultValue === void 0) { defaultValue = ''; }
|
|
25
|
-
return { '@type': 'str', T: defaultValue, valueType: 'str' };
|
|
26
|
-
}
|
|
25
|
+
function Str(options) { var _a; return { '@type': 'str', T: (_a = options === null || options === void 0 ? void 0 : options.defaultValue) !== null && _a !== void 0 ? _a : '', transform: options === null || options === void 0 ? void 0 : options.transform, valueType: 'str' }; }
|
|
27
26
|
Schema.Str = Str;
|
|
28
27
|
;
|
|
29
28
|
function Int(defaultValue) {
|
|
@@ -53,9 +52,7 @@ var Column;
|
|
|
53
52
|
return Tensor(linear_algebra_1.Tensor.ColumnMajorMatrix(rows, cols, baseType['@type'] === 'int' ? Int32Array : Float64Array), baseType);
|
|
54
53
|
}
|
|
55
54
|
Schema.Matrix = Matrix;
|
|
56
|
-
function Aliased(t
|
|
57
|
-
if (typeof defaultValue !== 'undefined')
|
|
58
|
-
return tslib_1.__assign(tslib_1.__assign({}, t), { T: defaultValue });
|
|
55
|
+
function Aliased(t) {
|
|
59
56
|
return t;
|
|
60
57
|
}
|
|
61
58
|
Schema.Aliased = Aliased;
|
|
@@ -268,8 +265,13 @@ function lambdaColumn(_a) {
|
|
|
268
265
|
function arrayColumn(_a) {
|
|
269
266
|
var array = _a.array, schema = _a.schema, valueKind = _a.valueKind;
|
|
270
267
|
var rowCount = array.length;
|
|
268
|
+
var defaultValue = schema.T;
|
|
271
269
|
var value = schema.valueType === 'str'
|
|
272
|
-
?
|
|
270
|
+
? schema.transform === 'lowercase'
|
|
271
|
+
? function (row) { var v = array[row]; return typeof v === 'string' ? v.toLowerCase() : "".concat(v !== null && v !== void 0 ? v : defaultValue).toLowerCase(); }
|
|
272
|
+
: schema.transform === 'uppercase'
|
|
273
|
+
? function (row) { var v = array[row]; return typeof v === 'string' ? v.toUpperCase() : "".concat(v !== null && v !== void 0 ? v : defaultValue).toUpperCase(); }
|
|
274
|
+
: function (row) { var v = array[row]; return typeof v === 'string' ? v : "".concat(v !== null && v !== void 0 ? v : defaultValue); }
|
|
273
275
|
: function (row) { return array[row]; };
|
|
274
276
|
var isTyped = ColumnHelpers.isTypedArray(array);
|
|
275
277
|
return {
|
|
@@ -280,15 +282,35 @@ function arrayColumn(_a) {
|
|
|
280
282
|
value: value,
|
|
281
283
|
valueKind: valueKind ? valueKind : function (row) { return 0 /* Present */; },
|
|
282
284
|
toArray: schema.valueType === 'str'
|
|
283
|
-
?
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
var
|
|
288
|
-
|
|
285
|
+
? schema.transform === 'lowercase'
|
|
286
|
+
? function (params) {
|
|
287
|
+
var _a = ColumnHelpers.getArrayBounds(rowCount, params), start = _a.start, end = _a.end;
|
|
288
|
+
var ret = new (params && typeof params.array !== 'undefined' ? params.array : array.constructor)(end - start);
|
|
289
|
+
for (var i = 0, _i = end - start; i < _i; i++) {
|
|
290
|
+
var v = array[start + i];
|
|
291
|
+
ret[i] = typeof v === 'string' ? v.toLowerCase() : "".concat(v !== null && v !== void 0 ? v : defaultValue).toLowerCase();
|
|
292
|
+
}
|
|
293
|
+
return ret;
|
|
289
294
|
}
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
: schema.transform === 'uppercase'
|
|
296
|
+
? function (params) {
|
|
297
|
+
var _a = ColumnHelpers.getArrayBounds(rowCount, params), start = _a.start, end = _a.end;
|
|
298
|
+
var ret = new (params && typeof params.array !== 'undefined' ? params.array : array.constructor)(end - start);
|
|
299
|
+
for (var i = 0, _i = end - start; i < _i; i++) {
|
|
300
|
+
var v = array[start + i];
|
|
301
|
+
ret[i] = typeof v === 'string' ? v.toUpperCase() : "".concat(v !== null && v !== void 0 ? v : defaultValue).toUpperCase();
|
|
302
|
+
}
|
|
303
|
+
return ret;
|
|
304
|
+
}
|
|
305
|
+
: function (params) {
|
|
306
|
+
var _a = ColumnHelpers.getArrayBounds(rowCount, params), start = _a.start, end = _a.end;
|
|
307
|
+
var ret = new (params && typeof params.array !== 'undefined' ? params.array : array.constructor)(end - start);
|
|
308
|
+
for (var i = 0, _i = end - start; i < _i; i++) {
|
|
309
|
+
var v = array[start + i];
|
|
310
|
+
ret[i] = typeof v === 'string' ? v : "".concat(v !== null && v !== void 0 ? v : defaultValue);
|
|
311
|
+
}
|
|
312
|
+
return ret;
|
|
313
|
+
}
|
|
292
314
|
: isTyped
|
|
293
315
|
? function (params) { return ColumnHelpers.typedArrayWindow(array, params); }
|
|
294
316
|
: function (params) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -9,7 +9,7 @@ import { TextureImage } from '../../mol-gl/renderable/util';
|
|
|
9
9
|
import { Color } from '../../mol-util/color';
|
|
10
10
|
import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
|
|
11
11
|
import { LocationIterator } from '../util/location-iterator';
|
|
12
|
-
import { ColorTheme } from '../../mol-theme/color';
|
|
12
|
+
import { ColorTheme, ColorVolume } from '../../mol-theme/color';
|
|
13
13
|
import { Texture } from '../../mol-gl/webgl/texture';
|
|
14
14
|
export declare type ColorType = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance' | 'volume' | 'volumeInstance' | 'direct';
|
|
15
15
|
export declare type ColorData = {
|
|
@@ -26,10 +26,4 @@ export declare type ColorData = {
|
|
|
26
26
|
export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any>, colorData?: ColorData): ColorData;
|
|
27
27
|
export declare function createValueColor(value: Color, colorData?: ColorData): ColorData;
|
|
28
28
|
export declare function createTextureColor(colors: TextureImage<Uint8Array>, type: ColorType, colorData?: ColorData): ColorData;
|
|
29
|
-
interface ColorVolume {
|
|
30
|
-
colors: Texture;
|
|
31
|
-
dimension: Vec3;
|
|
32
|
-
transform: Vec4;
|
|
33
|
-
}
|
|
34
29
|
export declare function createGridColor(grid: ColorVolume, type: ColorType, colorData?: ColorData): ColorData;
|
|
35
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2018-
|
|
3
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -34,8 +34,20 @@ function _createColors(locationIt, positionIt, colorTheme, colorData) {
|
|
|
34
34
|
case 'groupInstance': return createGroupInstanceColor(locationIt, colorTheme.color, colorData);
|
|
35
35
|
case 'vertex': return createVertexColor(positionIt, colorTheme.color, colorData);
|
|
36
36
|
case 'vertexInstance': return createVertexInstanceColor(positionIt, colorTheme.color, colorData);
|
|
37
|
-
case 'volume':
|
|
38
|
-
|
|
37
|
+
case 'volume':
|
|
38
|
+
if (colorTheme.grid) {
|
|
39
|
+
return createGridColor(colorTheme.grid, 'volume', colorData);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
throw new Error('Grid missing for "volume" color theme');
|
|
43
|
+
}
|
|
44
|
+
case 'volumeInstance':
|
|
45
|
+
if (colorTheme.grid) {
|
|
46
|
+
return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
throw new Error('Grid missing for "volume" color theme');
|
|
50
|
+
}
|
|
39
51
|
case 'direct': return createDirectColor(colorData);
|
|
40
52
|
}
|
|
41
53
|
}
|
|
@@ -184,6 +196,7 @@ function createVertexInstanceColor(locationIt, color, colorData) {
|
|
|
184
196
|
}
|
|
185
197
|
return createTextureColor(colors, 'vertexInstance', colorData);
|
|
186
198
|
}
|
|
199
|
+
//
|
|
187
200
|
function createGridColor(grid, type, colorData) {
|
|
188
201
|
var colors = grid.colors, dimension = grid.dimension, transform = grid.transform;
|
|
189
202
|
var width = colors.getWidth();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -43,13 +43,15 @@ export declare namespace Cylinders {
|
|
|
43
43
|
doubleSided: PD.BooleanParam;
|
|
44
44
|
ignoreLight: PD.BooleanParam;
|
|
45
45
|
xrayShaded: PD.BooleanParam;
|
|
46
|
+
transparentBackfaces: PD.Select<string>;
|
|
46
47
|
bumpFrequency: PD.Numeric;
|
|
47
48
|
bumpAmplitude: PD.Numeric;
|
|
48
49
|
alpha: PD.Numeric;
|
|
49
50
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
50
51
|
material: PD.Group<PD.Normalize<{
|
|
51
52
|
metalness: number;
|
|
52
|
-
roughness: number;
|
|
53
|
+
roughness: number;
|
|
54
|
+
/** Number of cylinders */
|
|
53
55
|
bumpiness: number;
|
|
54
56
|
}>>;
|
|
55
57
|
clip: PD.Group<PD.Normalize<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -110,7 +110,7 @@ var Cylinders;
|
|
|
110
110
|
}
|
|
111
111
|
Cylinders.transform = transform;
|
|
112
112
|
//
|
|
113
|
-
Cylinders.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), sizeAspectRatio: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 3, step: 0.01 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
|
|
113
|
+
Cylinders.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), sizeAspectRatio: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 3, step: 0.01 }), doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), transparentBackfaces: param_definition_1.ParamDefinition.Select('off', param_definition_1.ParamDefinition.arrayToOptions(['off', 'on', 'opaque']), base_1.BaseGeometry.ShadingCategory), bumpFrequency: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }, base_1.BaseGeometry.ShadingCategory), bumpAmplitude: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }, base_1.BaseGeometry.ShadingCategory) });
|
|
114
114
|
Cylinders.Utils = {
|
|
115
115
|
Params: Cylinders.Params,
|
|
116
116
|
createEmpty: createEmpty,
|
|
@@ -156,7 +156,7 @@ var Cylinders;
|
|
|
156
156
|
var padding = (0, size_data_1.getMaxSize)(size) * props.sizeFactor;
|
|
157
157
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(cylinders.boundingSphere);
|
|
158
158
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
159
|
-
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
|
|
159
|
+
return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ dGeometryType: mol_util_1.ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: mol_util_1.ValueCell.create(boundingSphere), invariantBoundingSphere: mol_util_1.ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: mol_util_1.ValueCell.create(linear_algebra_1.Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded), dOpaqueBackfaces: mol_util_1.ValueCell.create(props.transparentBackfaces === 'opaque'), uBumpFrequency: mol_util_1.ValueCell.create(props.bumpFrequency), uBumpAmplitude: mol_util_1.ValueCell.create(props.bumpAmplitude) });
|
|
160
160
|
}
|
|
161
161
|
function createValuesSimple(cylinders, props, colorValue, sizeValue, transform) {
|
|
162
162
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -169,6 +169,7 @@ var Cylinders;
|
|
|
169
169
|
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
170
170
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
171
171
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
172
|
+
mol_util_1.ValueCell.updateIfChanged(values.dOpaqueBackfaces, props.transparentBackfaces === 'opaque');
|
|
172
173
|
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
173
174
|
mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
174
175
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -62,6 +62,7 @@ export declare namespace Mesh {
|
|
|
62
62
|
flatShaded: PD.BooleanParam;
|
|
63
63
|
ignoreLight: PD.BooleanParam;
|
|
64
64
|
xrayShaded: PD.BooleanParam;
|
|
65
|
+
transparentBackfaces: PD.Select<string>;
|
|
65
66
|
bumpFrequency: PD.Numeric;
|
|
66
67
|
bumpAmplitude: PD.Numeric;
|
|
67
68
|
alpha: PD.Numeric;
|