molstar 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +202 -194
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/viewport.js +1 -1
- package/lib/apps/viewer/app.d.ts +7 -6
- package/lib/apps/viewer/app.js +2 -0
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/cli/chem-comp-dict/create-saccharides.d.ts +7 -0
- package/lib/cli/chem-comp-dict/create-saccharides.js +67 -0
- package/lib/cli/cif2bcif/converter.js +1 -1
- package/lib/cli/cif2bcif/index.js +4 -4
- package/lib/commonjs/apps/docking-viewer/index.js +12 -12
- package/lib/commonjs/apps/docking-viewer/viewport.js +33 -33
- package/lib/commonjs/apps/viewer/app.d.ts +7 -6
- package/lib/commonjs/apps/viewer/app.js +24 -22
- package/lib/commonjs/apps/viewer/index.js +1 -1
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +6 -6
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.d.ts +7 -0
- package/lib/commonjs/cli/chem-comp-dict/create-saccharides.js +69 -0
- package/lib/commonjs/cli/chem-comp-dict/create-table.js +8 -8
- package/lib/commonjs/cli/chem-comp-dict/util.js +17 -17
- package/lib/commonjs/cli/cif2bcif/converter.js +9 -9
- package/lib/commonjs/cli/cif2bcif/index.js +12 -12
- package/lib/commonjs/cli/cifschema/index.js +27 -27
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -1
- package/lib/commonjs/cli/lipid-params/index.js +9 -9
- package/lib/commonjs/cli/state-docs/index.js +2 -2
- package/lib/commonjs/cli/structure-info/helpers.js +11 -11
- package/lib/commonjs/cli/structure-info/model.js +15 -15
- package/lib/commonjs/cli/structure-info/volume.js +9 -9
- package/lib/commonjs/examples/alpha-orbitals/controls.js +3 -3
- package/lib/commonjs/examples/alpha-orbitals/index.js +11 -11
- package/lib/commonjs/examples/basic-wrapper/controls.js +2 -2
- package/lib/commonjs/examples/basic-wrapper/index.js +22 -22
- package/lib/commonjs/examples/basic-wrapper/superposition.js +8 -8
- package/lib/commonjs/examples/domain-annotation-server/mapping.js +3 -3
- package/lib/commonjs/examples/domain-annotation-server/server.js +6 -6
- package/lib/commonjs/examples/domain-annotation-server/test.js +3 -3
- package/lib/commonjs/examples/lighting/index.js +6 -6
- package/lib/commonjs/examples/proteopedia-wrapper/annotation.js +2 -2
- package/lib/commonjs/examples/proteopedia-wrapper/helpers.js +4 -4
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -26
- package/lib/commonjs/examples/proteopedia-wrapper/ui/controls.js +2 -2
- package/lib/commonjs/examples/task.js +15 -15
- package/lib/commonjs/extensions/alpha-orbitals/collocation.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/data-model.js +1 -1
- package/lib/commonjs/extensions/alpha-orbitals/density.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/gpu/compute.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/orbitals.js +2 -2
- package/lib/commonjs/extensions/alpha-orbitals/transforms.js +13 -13
- package/lib/commonjs/extensions/anvil/algorithm.js +13 -13
- package/lib/commonjs/extensions/anvil/behavior.js +14 -14
- package/lib/commonjs/extensions/anvil/prop.js +7 -7
- package/lib/commonjs/extensions/anvil/representation.js +5 -5
- package/lib/commonjs/extensions/cellpack/index.js +1 -1
- package/lib/commonjs/extensions/cellpack/model.js +26 -24
- package/lib/commonjs/extensions/cellpack/preset.js +6 -6
- package/lib/commonjs/extensions/cellpack/property.js +3 -3
- package/lib/commonjs/extensions/cellpack/representation.js +2 -2
- package/lib/commonjs/extensions/cellpack/state.js +13 -13
- package/lib/commonjs/extensions/cellpack/util.js +14 -14
- package/lib/commonjs/extensions/dnatco/confal-pyramids/behavior.js +7 -7
- package/lib/commonjs/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
- package/lib/commonjs/extensions/dnatco/confal-pyramids/color.js +223 -131
- package/lib/commonjs/extensions/dnatco/confal-pyramids/property.js +6 -8
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.js +2 -2
- package/lib/commonjs/extensions/dnatco/confal-pyramids/util.js +19 -20
- package/lib/commonjs/extensions/g3d/data.js +6 -6
- package/lib/commonjs/extensions/g3d/format.js +14 -14
- package/lib/commonjs/extensions/g3d/model.js +4 -4
- package/lib/commonjs/extensions/geo-export/controls.js +3 -3
- package/lib/commonjs/extensions/geo-export/glb-exporter.js +9 -9
- package/lib/commonjs/extensions/geo-export/index.js +1 -1
- package/lib/commonjs/extensions/geo-export/mesh-exporter.js +12 -12
- package/lib/commonjs/extensions/geo-export/obj-exporter.js +7 -7
- package/lib/commonjs/extensions/geo-export/stl-exporter.js +7 -7
- package/lib/commonjs/extensions/geo-export/ui.js +7 -7
- package/lib/commonjs/extensions/geo-export/usdz-exporter.js +9 -9
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +9 -9
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +4 -4
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +4 -4
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +5 -5
- package/lib/commonjs/extensions/model-export/export.js +4 -4
- package/lib/commonjs/extensions/model-export/index.js +1 -1
- package/lib/commonjs/extensions/model-export/ui.js +5 -5
- package/lib/commonjs/extensions/mp4-export/controls.js +5 -5
- package/lib/commonjs/extensions/mp4-export/encoder.js +4 -4
- package/lib/commonjs/extensions/mp4-export/index.js +1 -1
- package/lib/commonjs/extensions/mp4-export/ui.js +5 -5
- package/lib/commonjs/extensions/pdbe/preferred-assembly.js +2 -2
- package/lib/commonjs/extensions/pdbe/struct-ref-domain.js +2 -2
- package/lib/commonjs/extensions/pdbe/structure-quality-report/behavior.js +1 -1
- package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +8 -8
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.js +17 -17
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/color.js +2 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +9 -9
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.js +6 -6
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/ui.js +9 -9
- package/lib/commonjs/extensions/rcsb/validation-report/behavior.js +17 -17
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +15 -15
- package/lib/commonjs/extensions/rcsb/validation-report/representation.js +22 -5
- package/lib/commonjs/extensions/zenodo/index.d.ts +7 -0
- package/lib/commonjs/extensions/zenodo/index.js +35 -0
- package/lib/commonjs/extensions/zenodo/ui.d.ts +61 -0
- package/lib/commonjs/extensions/zenodo/ui.js +306 -0
- package/lib/commonjs/mol-canvas3d/camera/stereo.js +1 -1
- package/lib/commonjs/mol-canvas3d/camera/util.js +1 -1
- package/lib/commonjs/mol-canvas3d/camera.js +2 -1
- package/lib/commonjs/mol-canvas3d/canvas3d.js +14 -14
- package/lib/commonjs/mol-canvas3d/controls/trackball.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +5 -5
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +5 -5
- package/lib/commonjs/mol-canvas3d/helper/helper.js +1 -1
- package/lib/commonjs/mol-canvas3d/helper/interaction-events.js +2 -2
- package/lib/commonjs/mol-canvas3d/passes/draw.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/fxaa.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/image.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/marking.js +6 -6
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +12 -12
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +9 -9
- package/lib/commonjs/mol-canvas3d/passes/wboit.js +3 -3
- package/lib/commonjs/mol-canvas3d/util.js +2 -2
- package/lib/commonjs/mol-data/db/column.js +2 -2
- package/lib/commonjs/mol-data/db/table.js +1 -1
- package/lib/commonjs/mol-data/db.js +1 -1
- package/lib/commonjs/mol-data/generic.js +3 -3
- package/lib/commonjs/mol-data/index.js +4 -4
- package/lib/commonjs/mol-data/int/interval.js +1 -1
- package/lib/commonjs/mol-data/int/ordered-set.js +1 -1
- package/lib/commonjs/mol-data/int/segmentation.js +1 -1
- package/lib/commonjs/mol-data/int/sorted-array.js +1 -1
- package/lib/commonjs/mol-data/util.js +7 -7
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +3 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +3 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.js +1 -1
- package/lib/commonjs/mol-geo/geometry/image/image.js +3 -3
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +3 -3
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +5 -3
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +3 -3
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/points/points.js +3 -3
- package/lib/commonjs/mol-geo/geometry/size-data.js +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +3 -3
- package/lib/commonjs/mol-geo/geometry/text/font-atlas.js +1 -1
- package/lib/commonjs/mol-geo/geometry/text/text-builder.js +3 -2
- package/lib/commonjs/mol-geo/geometry/text/text.js +3 -3
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +10 -8
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +3 -3
- package/lib/commonjs/mol-geo/primitive/circle.js +1 -1
- package/lib/commonjs/mol-geo/primitive/cylinder.js +1 -1
- package/lib/commonjs/mol-geo/primitive/polyhedron.js +1 -1
- package/lib/commonjs/mol-geo/primitive/prism.js +1 -1
- package/lib/commonjs/mol-geo/primitive/star.js +1 -1
- package/lib/commonjs/mol-geo/primitive/torus.js +1 -1
- package/lib/commonjs/mol-geo/util/marching-cubes/algorithm.js +9 -9
- package/lib/commonjs/mol-gl/compute/grid3d.js +5 -5
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/reduction.js +3 -3
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.js +3 -3
- package/lib/commonjs/mol-gl/compute/marching-cubes/active-voxels.js +3 -3
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +3 -3
- package/lib/commonjs/mol-gl/compute/util.js +3 -3
- package/lib/commonjs/mol-gl/renderable/cylinders.js +3 -3
- package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/commonjs/mol-gl/renderable/image.js +3 -3
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable/points.js +3 -3
- package/lib/commonjs/mol-gl/renderable/schema.js +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +3 -3
- package/lib/commonjs/mol-gl/renderable/text.js +3 -3
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable/util.js +1 -1
- package/lib/commonjs/mol-gl/shader-code.js +2 -1
- package/lib/commonjs/mol-gl/webgl/buffer.js +4 -5
- package/lib/commonjs/mol-gl/webgl/context.d.ts +1 -1
- package/lib/commonjs/mol-gl/webgl/context.js +5 -5
- package/lib/commonjs/mol-gl/webgl/render-item.js +1 -1
- package/lib/commonjs/mol-gl/webgl/resources.js +2 -2
- package/lib/commonjs/mol-io/common/binary-cif/classifier.js +7 -6
- package/lib/commonjs/mol-io/common/binary-cif/decoder.js +4 -3
- package/lib/commonjs/mol-io/common/binary-cif.js +3 -3
- package/lib/commonjs/mol-io/common/io-buffer.d.ts +206 -0
- package/lib/commonjs/mol-io/common/io-buffer.js +408 -0
- package/lib/commonjs/mol-io/common/netcdf/reader.d.ts +78 -0
- package/lib/commonjs/mol-io/common/netcdf/reader.js +459 -0
- package/lib/commonjs/mol-io/common/typed-array.js +2 -2
- package/lib/commonjs/mol-io/reader/ccp4/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/cif/binary/parser.js +3 -3
- package/lib/commonjs/mol-io/reader/cif/data-model.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif-extras.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema.js +2 -2
- package/lib/commonjs/mol-io/reader/cif/text/parser.js +7 -7
- package/lib/commonjs/mol-io/reader/cif.js +1 -1
- package/lib/commonjs/mol-io/reader/common/text/tokenizer.js +4 -4
- package/lib/commonjs/mol-io/reader/csv/data-model.js +1 -1
- package/lib/commonjs/mol-io/reader/csv/parser.js +7 -7
- package/lib/commonjs/mol-io/reader/cube/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/dcd/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/dsn6/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/dx/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/gro/parser.js +6 -6
- package/lib/commonjs/mol-io/reader/mol/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/mol2/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/nctraj/parser.d.ts +18 -0
- package/lib/commonjs/mol-io/reader/nctraj/parser.js +101 -0
- package/lib/commonjs/mol-io/reader/obj/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/pdb/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/ply/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/prmtop/parser.d.ts +58 -0
- package/lib/commonjs/mol-io/reader/prmtop/parser.js +172 -0
- package/lib/commonjs/mol-io/reader/psf/parser.js +8 -8
- package/lib/commonjs/mol-io/reader/sdf/parser.js +2 -2
- package/lib/commonjs/mol-io/reader/top/parser.d.ts +37 -0
- package/lib/commonjs/mol-io/reader/top/parser.js +303 -0
- package/lib/commonjs/mol-io/reader/trr/parser.d.ts +22 -0
- package/lib/commonjs/mol-io/reader/trr/parser.js +146 -0
- package/lib/commonjs/mol-io/reader/xtc/parser.js +4 -4
- package/lib/commonjs/mol-io/reader/xyz/parser.js +2 -2
- package/lib/commonjs/mol-io/writer/cif/encoder.js +3 -2
- package/lib/commonjs/mol-io/writer/cif.js +1 -1
- package/lib/commonjs/mol-io/writer/ligand-encoder.js +1 -1
- package/lib/commonjs/mol-io/writer/mol/encoder.js +1 -1
- package/lib/commonjs/mol-io/writer/mol2/encoder.js +1 -1
- package/lib/commonjs/mol-math/geometry/boundary-helper.js +5 -5
- package/lib/commonjs/mol-math/geometry/common.d.ts +2 -1
- package/lib/commonjs/mol-math/geometry/common.js +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.js +6 -6
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +8 -8
- package/lib/commonjs/mol-math/geometry/gaussian-density.d.ts +2 -2
- package/lib/commonjs/mol-math/geometry/gaussian-density.js +5 -5
- package/lib/commonjs/mol-math/geometry/molecular-surface.d.ts +2 -1
- package/lib/commonjs/mol-math/geometry/molecular-surface.js +10 -10
- package/lib/commonjs/mol-math/geometry/primitives/box3d.js +2 -1
- package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +13 -7
- package/lib/commonjs/mol-math/geometry.js +8 -8
- package/lib/commonjs/mol-math/graph/inter-unit-graph.js +1 -1
- package/lib/commonjs/mol-math/graph.js +1 -1
- package/lib/commonjs/mol-math/linear-algebra.js +2 -2
- package/lib/commonjs/mol-model/sequence/alignment/alignment.js +1 -1
- package/lib/commonjs/mol-model/sequence/sequence.js +2 -1
- package/lib/commonjs/mol-model/sequence.js +1 -1
- package/lib/commonjs/mol-model/shape.js +1 -1
- package/lib/commonjs/mol-model/structure/coordinates.js +1 -1
- package/lib/commonjs/mol-model/structure/export/categories/secondary-structure.js +2 -2
- package/lib/commonjs/mol-model/structure/model/model.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/atomic.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/coarse.js +2 -2
- package/lib/commonjs/mol-model/structure/model/types/saccharides.d.ts +8 -0
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +11 -0
- package/lib/commonjs/mol-model/structure/model.js +3 -3
- package/lib/commonjs/mol-model/structure/query/queries/generators.js +2 -2
- package/lib/commonjs/mol-model/structure/query/queries/modifiers.js +2 -2
- package/lib/commonjs/mol-model/structure/query.js +6 -6
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/compute.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/structure/carbohydrates/constants.js +6 -9
- package/lib/commonjs/mol-model/structure/structure/element/element.js +5 -5
- package/lib/commonjs/mol-model/structure/structure/element.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/structure.js +9 -6
- package/lib/commonjs/mol-model/structure/structure/symmetry.js +10 -10
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/data.js +2 -2
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/inter-compute.js +6 -4
- package/lib/commonjs/mol-model/structure/structure/unit/bonds/intra-compute.js +1 -1
- package/lib/commonjs/mol-model/structure/structure/unit/bonds.js +3 -3
- package/lib/commonjs/mol-model/structure/structure/unit.js +5 -22
- package/lib/commonjs/mol-model/structure/structure/util/superposition.js +1 -1
- package/lib/commonjs/mol-model/structure/structure.js +2 -2
- package/lib/commonjs/mol-model/structure/topology.js +1 -1
- package/lib/commonjs/mol-model/structure.js +6 -6
- package/lib/commonjs/mol-model/volume.js +2 -2
- package/lib/commonjs/mol-model-formats/shape/ply.js +7 -7
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/atomic.js +2 -15
- package/lib/commonjs/mol-model-formats/structure/basic/coarse.js +3 -3
- package/lib/commonjs/mol-model-formats/structure/basic/entities.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/parser.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/basic/parser.js +10 -10
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/schema.js +7 -2
- package/lib/commonjs/mol-model-formats/structure/basic/sort.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/basic/util.d.ts +33 -2
- package/lib/commonjs/mol-model-formats/structure/basic/util.js +26 -2
- package/lib/commonjs/mol-model-formats/structure/cif-core.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/common/component.js +5 -1
- package/lib/commonjs/mol-model-formats/structure/cube.js +5 -5
- package/lib/commonjs/mol-model-formats/structure/dcd.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/gro.js +5 -3
- package/lib/commonjs/mol-model-formats/structure/mmcif.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/mmcif.js +4 -2
- package/lib/commonjs/mol-model-formats/structure/mol.js +5 -5
- package/lib/commonjs/mol-model-formats/structure/mol2.js +6 -6
- package/lib/commonjs/mol-model-formats/structure/nctraj.d.ts +9 -0
- package/lib/commonjs/mol-model-formats/structure/nctraj.js +60 -0
- package/lib/commonjs/mol-model-formats/structure/pdb/to-cif.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/pdb.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/pdb.js +7 -5
- package/lib/commonjs/mol-model-formats/structure/prmtop.d.ts +16 -0
- package/lib/commonjs/mol-model-formats/structure/prmtop.js +147 -0
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/symmetry.js +11 -1
- package/lib/commonjs/mol-model-formats/structure/psf.js +5 -3
- package/lib/commonjs/mol-model-formats/structure/top.d.ts +16 -0
- package/lib/commonjs/mol-model-formats/structure/top.js +189 -0
- package/lib/commonjs/mol-model-formats/structure/trr.d.ts +9 -0
- package/lib/commonjs/mol-model-formats/structure/trr.js +46 -0
- package/lib/commonjs/mol-model-formats/structure/util.d.ts +2 -2
- package/lib/commonjs/mol-model-formats/structure/util.js +19 -20
- package/lib/commonjs/mol-model-formats/structure/xtc.js +2 -2
- package/lib/commonjs/mol-model-formats/structure/xyz.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/ccp4.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/cube.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/density-server.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/dsn6.js +2 -2
- package/lib/commonjs/mol-model-formats/volume/dx.js +2 -2
- package/lib/commonjs/mol-model-props/common/custom-element-property.js +2 -2
- package/lib/commonjs/mol-model-props/common/custom-model-property.js +5 -5
- package/lib/commonjs/mol-model-props/common/custom-property.js +1 -1
- package/lib/commonjs/mol-model-props/common/custom-structure-property.js +6 -6
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley/area.js +2 -2
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area/shrake-rupley.js +5 -5
- package/lib/commonjs/mol-model-props/computed/accessible-surface-area.js +4 -4
- package/lib/commonjs/mol-model-props/computed/chemistry/valence-model.js +3 -3
- package/lib/commonjs/mol-model-props/computed/helix-orientation.js +2 -2
- package/lib/commonjs/mol-model-props/computed/interactions/common.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/contacts.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/features.js +1 -1
- package/lib/commonjs/mol-model-props/computed/interactions/hydrogen-bonds.js +3 -3
- package/lib/commonjs/mol-model-props/computed/interactions/interactions.js +3 -3
- package/lib/commonjs/mol-model-props/computed/interactions.js +4 -4
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +10 -4
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +12 -7
- package/lib/commonjs/mol-model-props/computed/representations/interactions.js +1 -1
- package/lib/commonjs/mol-model-props/computed/secondary-structure/dssp.js +2 -2
- package/lib/commonjs/mol-model-props/computed/secondary-structure.js +7 -7
- package/lib/commonjs/mol-model-props/computed/valence-model.js +4 -4
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/property.js +2 -2
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.js +12 -3
- package/lib/commonjs/mol-model-props/sequence/sifts-mapping.js +2 -2
- package/lib/commonjs/mol-model-props/sequence/themes/sifts-mapping.js +3 -3
- package/lib/commonjs/mol-plugin/animation-loop.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/behavior.js +5 -5
- package/lib/commonjs/mol-plugin/behavior/dynamic/camera.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/accessible-surface-area.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/interactions.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/secondary-structure.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/computed/valence-model.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/integrative/cross-link-restraint.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/sifts-mapping.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/structure-info.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +3 -3
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +11 -11
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/behavior.js +12 -12
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.js +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/transformers.js +16 -16
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/util.js +10 -10
- package/lib/commonjs/mol-plugin/behavior/static/state.js +6 -6
- package/lib/commonjs/mol-plugin/behavior.js +8 -8
- package/lib/commonjs/mol-plugin/command.js +2 -2
- package/lib/commonjs/mol-plugin/context.d.ts +2 -1
- package/lib/commonjs/mol-plugin/context.js +9 -8
- package/lib/commonjs/mol-plugin/layout.js +2 -2
- package/lib/commonjs/mol-plugin/spec.js +1 -1
- package/lib/commonjs/mol-plugin/state.js +5 -5
- package/lib/commonjs/mol-plugin/util/task-manager.js +4 -4
- package/lib/commonjs/mol-plugin/util/toast.js +1 -1
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.js +17 -17
- package/lib/commonjs/mol-plugin-state/actions/file.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/actions/file.js +94 -61
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +11 -2
- package/lib/commonjs/mol-plugin-state/actions/structure.js +190 -20
- package/lib/commonjs/mol-plugin-state/actions/volume.js +5 -4
- package/lib/commonjs/mol-plugin-state/actions.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/assembly-unwind.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-rock.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/camera-spin.js +3 -3
- package/lib/commonjs/mol-plugin-state/animation/built-in/explode-units.js +4 -4
- package/lib/commonjs/mol-plugin-state/animation/built-in/model-index.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/spin-structure.js +5 -5
- package/lib/commonjs/mol-plugin-state/animation/built-in/state-interpolation.js +2 -2
- package/lib/commonjs/mol-plugin-state/animation/built-in/state-snapshots.js +5 -5
- package/lib/commonjs/mol-plugin-state/builder/data.js +2 -2
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +16 -16
- package/lib/commonjs/mol-plugin-state/builder/structure/representation-preset.js +28 -28
- package/lib/commonjs/mol-plugin-state/builder/structure/representation.js +2 -2
- package/lib/commonjs/mol-plugin-state/builder/structure.js +7 -7
- package/lib/commonjs/mol-plugin-state/component.js +1 -1
- package/lib/commonjs/mol-plugin-state/formats/{structure.d.ts → coordinates.d.ts} +34 -18
- package/lib/commonjs/mol-plugin-state/formats/coordinates.js +70 -0
- package/lib/commonjs/mol-plugin-state/formats/registry.d.ts +3 -3
- package/lib/commonjs/mol-plugin-state/formats/registry.js +13 -8
- package/lib/commonjs/mol-plugin-state/formats/shape.js +2 -2
- package/lib/commonjs/mol-plugin-state/formats/topology.d.ts +73 -0
- package/lib/commonjs/mol-plugin-state/formats/topology.js +87 -0
- package/lib/commonjs/mol-plugin-state/formats/trajectory.js +6 -6
- package/lib/commonjs/mol-plugin-state/formats/volume.js +21 -21
- package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +15 -15
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +7 -7
- package/lib/commonjs/mol-plugin-state/helpers/structure-component.js +2 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-overpaint.js +11 -11
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +3 -3
- package/lib/commonjs/mol-plugin-state/helpers/structure-substance.js +11 -11
- package/lib/commonjs/mol-plugin-state/helpers/structure-transparency.js +11 -11
- package/lib/commonjs/mol-plugin-state/manager/animation.js +17 -17
- package/lib/commonjs/mol-plugin-state/manager/camera.js +1 -1
- package/lib/commonjs/mol-plugin-state/manager/interactivity.js +6 -6
- package/lib/commonjs/mol-plugin-state/manager/snapshots.js +14 -14
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +26 -26
- package/lib/commonjs/mol-plugin-state/manager/structure/focus.js +2 -2
- package/lib/commonjs/mol-plugin-state/manager/structure/hierarchy-state.js +1 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/hierarchy.js +8 -8
- package/lib/commonjs/mol-plugin-state/manager/structure/measurement.js +21 -21
- package/lib/commonjs/mol-plugin-state/manager/structure/selection.js +3 -3
- package/lib/commonjs/mol-plugin-state/manager/volume/hierarchy.js +1 -1
- package/lib/commonjs/mol-plugin-state/objects.d.ts +47 -1
- package/lib/commonjs/mol-plugin-state/objects.js +46 -30
- package/lib/commonjs/mol-plugin-state/transforms/data.d.ts +6 -0
- package/lib/commonjs/mol-plugin-state/transforms/data.js +93 -41
- package/lib/commonjs/mol-plugin-state/transforms/model.d.ts +14 -2
- package/lib/commonjs/mol-plugin-state/transforms/model.js +163 -54
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +77 -77
- package/lib/commonjs/mol-plugin-state/transforms/shape.js +2 -2
- package/lib/commonjs/mol-plugin-state/transforms/volume.js +16 -16
- package/lib/commonjs/mol-plugin-state/transforms.js +6 -6
- package/lib/commonjs/mol-plugin-ui/base.js +5 -5
- package/lib/commonjs/mol-plugin-ui/context.js +1 -1
- package/lib/commonjs/mol-plugin-ui/controls/action-menu.js +14 -14
- package/lib/commonjs/mol-plugin-ui/controls/color.js +7 -7
- package/lib/commonjs/mol-plugin-ui/controls/common.js +16 -16
- package/lib/commonjs/mol-plugin-ui/controls/icons.js +70 -70
- package/lib/commonjs/mol-plugin-ui/controls/legend.js +7 -7
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/line-graph-component.js +3 -3
- package/lib/commonjs/mol-plugin-ui/controls/line-graph/point-component.js +2 -2
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +94 -94
- package/lib/commonjs/mol-plugin-ui/controls/screenshot.js +5 -5
- package/lib/commonjs/mol-plugin-ui/controls/slider.js +16 -16
- package/lib/commonjs/mol-plugin-ui/controls.js +16 -16
- package/lib/commonjs/mol-plugin-ui/custom/volume.js +16 -16
- package/lib/commonjs/mol-plugin-ui/index.js +4 -4
- package/lib/commonjs/mol-plugin-ui/left-panel.d.ts +8 -1
- package/lib/commonjs/mol-plugin-ui/left-panel.js +40 -19
- package/lib/commonjs/mol-plugin-ui/plugin.js +17 -17
- package/lib/commonjs/mol-plugin-ui/sequence/chain.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/element.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/hetero.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/polymer.js +1 -1
- package/lib/commonjs/mol-plugin-ui/sequence/sequence.js +6 -6
- package/lib/commonjs/mol-plugin-ui/sequence.js +9 -9
- package/lib/commonjs/mol-plugin-ui/spec.js +1 -1
- package/lib/commonjs/mol-plugin-ui/state/actions.js +2 -2
- package/lib/commonjs/mol-plugin-ui/state/animation.js +2 -2
- package/lib/commonjs/mol-plugin-ui/state/apply-action.js +1 -1
- package/lib/commonjs/mol-plugin-ui/state/common.js +12 -12
- package/lib/commonjs/mol-plugin-ui/state/snapshots.js +29 -29
- package/lib/commonjs/mol-plugin-ui/state/tree.js +19 -19
- package/lib/commonjs/mol-plugin-ui/state/update-transform.js +3 -3
- package/lib/commonjs/mol-plugin-ui/structure/components.js +19 -19
- package/lib/commonjs/mol-plugin-ui/structure/focus.js +4 -4
- package/lib/commonjs/mol-plugin-ui/structure/generic.js +6 -6
- package/lib/commonjs/mol-plugin-ui/structure/measurements.js +13 -13
- package/lib/commonjs/mol-plugin-ui/structure/quick-styles.js +11 -11
- package/lib/commonjs/mol-plugin-ui/structure/selection.js +13 -13
- package/lib/commonjs/mol-plugin-ui/structure/source.js +12 -12
- package/lib/commonjs/mol-plugin-ui/structure/superposition.js +20 -20
- package/lib/commonjs/mol-plugin-ui/structure/volume.js +12 -12
- package/lib/commonjs/mol-plugin-ui/task.js +8 -8
- package/lib/commonjs/mol-plugin-ui/toast.js +6 -6
- package/lib/commonjs/mol-plugin-ui/viewport/canvas.js +5 -5
- package/lib/commonjs/mol-plugin-ui/viewport/help.js +14 -14
- package/lib/commonjs/mol-plugin-ui/viewport/screenshot.js +8 -8
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +6 -6
- package/lib/commonjs/mol-plugin-ui/viewport.js +7 -7
- package/lib/commonjs/mol-repr/representation.js +4 -4
- package/lib/commonjs/mol-repr/shape/loci/angle.js +9 -9
- package/lib/commonjs/mol-repr/shape/loci/common.js +1 -1
- package/lib/commonjs/mol-repr/shape/loci/dihedral.js +14 -14
- package/lib/commonjs/mol-repr/shape/loci/distance.js +5 -5
- package/lib/commonjs/mol-repr/shape/loci/label.js +3 -3
- package/lib/commonjs/mol-repr/shape/loci/orientation.js +4 -4
- package/lib/commonjs/mol-repr/shape/loci/plane.js +2 -2
- package/lib/commonjs/mol-repr/shape/model/unitcell.js +2 -2
- package/lib/commonjs/mol-repr/shape/representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/complex-representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/complex-visual.js +12 -12
- package/lib/commonjs/mol-repr/structure/params.js +8 -8
- package/lib/commonjs/mol-repr/structure/registry.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +3 -3
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/label.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/line.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/point.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/putty.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/spacefill.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/units-representation.js +2 -2
- package/lib/commonjs/mol-repr/structure/units-visual.js +16 -16
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +21 -11
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.js +11 -6
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +17 -7
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +9 -4
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.js +11 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +11 -2
- package/lib/commonjs/mol-repr/structure/visual/element-cross.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/element-point.js +23 -4
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +8 -9
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +20 -20
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +7 -8
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +6 -6
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +7 -7
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +1 -3
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +3 -28
- package/lib/commonjs/mol-repr/structure/visual/util/element.js +36 -2
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.js +13 -13
- package/lib/commonjs/mol-repr/structure/visual/util/link.d.ts +13 -3
- package/lib/commonjs/mol-repr/structure/visual/util/link.js +55 -6
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.js +5 -5
- package/lib/commonjs/mol-repr/structure/visual/util/polymer.js +4 -4
- package/lib/commonjs/mol-repr/util.js +1 -1
- package/lib/commonjs/mol-repr/volume/direct-volume.js +3 -3
- package/lib/commonjs/mol-repr/volume/isosurface.js +9 -9
- package/lib/commonjs/mol-repr/volume/registry.js +1 -1
- package/lib/commonjs/mol-repr/volume/representation.js +5 -5
- package/lib/commonjs/mol-repr/volume/slice.js +4 -4
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/commonjs/mol-script/language/parser.js +7 -4
- package/lib/commonjs/mol-script/language/symbol-table/internal.js +1 -1
- package/lib/commonjs/mol-script/language/symbol-table/structure-query.js +1 -1
- package/lib/commonjs/mol-script/runtime/query/compiler.js +1 -1
- package/lib/commonjs/mol-script/script/mol-script/symbols.js +1 -1
- package/lib/commonjs/mol-state/action.js +1 -1
- package/lib/commonjs/mol-state/index.js +8 -8
- package/lib/commonjs/mol-state/state/builder.js +2 -2
- package/lib/commonjs/mol-state/state/selection.js +1 -1
- package/lib/commonjs/mol-state/state.js +21 -21
- package/lib/commonjs/mol-state/transform.js +4 -4
- package/lib/commonjs/mol-state/transformer.js +1 -1
- package/lib/commonjs/mol-task/execution/observable.js +5 -5
- package/lib/commonjs/mol-task/task.js +3 -3
- package/lib/commonjs/mol-task/util/chunked.js +2 -2
- package/lib/commonjs/mol-task/util/multistep.js +1 -1
- package/lib/commonjs/mol-task/util/scheduler.d.ts +2 -2
- package/lib/commonjs/mol-task/util/scheduler.js +8 -8
- package/lib/commonjs/mol-theme/color/atom-id.js +1 -1
- package/lib/commonjs/mol-theme/color/chain-id.js +1 -1
- package/lib/commonjs/mol-theme/color/element-index.js +1 -1
- package/lib/commonjs/mol-theme/color/entity-id.js +1 -1
- package/lib/commonjs/mol-theme/color/entity-source.js +2 -2
- package/lib/commonjs/mol-theme/color/hydrophobicity.js +2 -2
- package/lib/commonjs/mol-theme/color/model-index.js +1 -1
- package/lib/commonjs/mol-theme/color/operator-hkl.js +2 -2
- package/lib/commonjs/mol-theme/color/operator-name.js +1 -1
- package/lib/commonjs/mol-theme/color/polymer-id.js +2 -2
- package/lib/commonjs/mol-theme/color/polymer-index.js +2 -2
- package/lib/commonjs/mol-theme/color/unit-index.js +2 -2
- package/lib/commonjs/mol-theme/label.js +6 -6
- package/lib/commonjs/mol-theme/theme.js +3 -3
- package/lib/commonjs/mol-util/assets.js +7 -7
- package/lib/commonjs/mol-util/color/distinct.js +1 -1
- package/lib/commonjs/mol-util/color/palette.js +3 -3
- package/lib/commonjs/mol-util/color/scale.js +2 -2
- package/lib/commonjs/mol-util/data-source.js +14 -13
- package/lib/commonjs/mol-util/file-info.d.ts +1 -3
- package/lib/commonjs/mol-util/file-info.js +2 -10
- package/lib/commonjs/mol-util/graphql-client.js +4 -4
- package/lib/commonjs/mol-util/index.d.ts +1 -0
- package/lib/commonjs/mol-util/index.js +8 -2
- package/lib/commonjs/mol-util/input/input-observer.js +6 -6
- package/lib/commonjs/mol-util/make-dir.js +1 -1
- package/lib/commonjs/mol-util/material.js +2 -2
- package/lib/commonjs/mol-util/monadic-parser.js +2 -2
- package/lib/commonjs/mol-util/param-definition.js +7 -7
- package/lib/commonjs/mol-util/read.js +2 -2
- package/lib/commonjs/mol-util/retry-if.js +2 -2
- package/lib/commonjs/mol-util/string.js +1 -1
- package/lib/commonjs/mol-util/zip/deflate.js +4 -3
- package/lib/commonjs/mol-util/zip/inflate.js +2 -2
- package/lib/commonjs/mol-util/zip/zip.d.ts +7 -1
- package/lib/commonjs/mol-util/zip/zip.js +21 -16
- package/lib/commonjs/servers/common/file-handle.js +1 -1
- package/lib/commonjs/servers/common/swagger-ui/index.js +1 -1
- package/lib/commonjs/servers/model/config.d.ts +2 -2
- package/lib/commonjs/servers/model/config.js +5 -5
- package/lib/commonjs/servers/model/preprocess/converter.js +2 -2
- package/lib/commonjs/servers/model/preprocess/master.js +3 -3
- package/lib/commonjs/servers/model/preprocess/parallel.js +6 -6
- package/lib/commonjs/servers/model/preprocess/preprocess.js +4 -4
- package/lib/commonjs/servers/model/preprocess.js +1 -1
- package/lib/commonjs/servers/model/properties/providers/pdbe.js +8 -8
- package/lib/commonjs/servers/model/properties/providers/wwpdb.js +12 -12
- package/lib/commonjs/servers/model/property-provider.js +3 -3
- package/lib/commonjs/servers/model/query.js +1 -1
- package/lib/commonjs/servers/model/server/api-local.js +2 -2
- package/lib/commonjs/servers/model/server/api-schema.js +2 -2
- package/lib/commonjs/servers/model/server/api-web.js +5 -5
- package/lib/commonjs/servers/model/server/api.js +6 -6
- package/lib/commonjs/servers/model/server/query.js +15 -15
- package/lib/commonjs/servers/model/server/structure-wrapper.js +21 -21
- package/lib/commonjs/servers/model/server.js +2 -2
- package/lib/commonjs/servers/model/utils/fetch-props-pdbe.js +6 -6
- package/lib/commonjs/servers/model/utils/fetch-retry.js +3 -3
- package/lib/commonjs/servers/model/utils/writer.js +3 -3
- package/lib/commonjs/servers/plugin-state/config.js +1 -1
- package/lib/commonjs/servers/plugin-state/index.js +6 -6
- package/lib/commonjs/servers/volume/common/binary-schema.js +1 -1
- package/lib/commonjs/servers/volume/common/data-format.js +3 -3
- package/lib/commonjs/servers/volume/common/file.js +8 -8
- package/lib/commonjs/servers/volume/config.js +6 -6
- package/lib/commonjs/servers/volume/pack/format/ccp4.js +4 -4
- package/lib/commonjs/servers/volume/pack/format/dsn6.js +4 -4
- package/lib/commonjs/servers/volume/pack/format.js +3 -3
- package/lib/commonjs/servers/volume/pack/main.js +13 -13
- package/lib/commonjs/servers/volume/pack/sampling.js +13 -13
- package/lib/commonjs/servers/volume/pack/writer.js +2 -2
- package/lib/commonjs/servers/volume/pack.js +1 -1
- package/lib/commonjs/servers/volume/query.js +4 -4
- package/lib/commonjs/servers/volume/server/algebra/box.js +1 -1
- package/lib/commonjs/servers/volume/server/api.js +8 -8
- package/lib/commonjs/servers/volume/server/local-api.js +8 -8
- package/lib/commonjs/servers/volume/server/query/compose.js +8 -8
- package/lib/commonjs/servers/volume/server/query/execute.js +10 -10
- package/lib/commonjs/servers/volume/server/query/identify.js +2 -2
- package/lib/commonjs/servers/volume/server/web-api.js +7 -7
- package/lib/commonjs/servers/volume/server.js +2 -2
- package/lib/examples/alpha-orbitals/controls.js +2 -2
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/controls.js +1 -1
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/examples/proteopedia-wrapper/ui/controls.js +1 -1
- package/lib/extensions/cellpack/model.js +4 -2
- package/lib/extensions/cellpack/state.js +2 -2
- package/lib/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
- package/lib/extensions/dnatco/confal-pyramids/color.js +224 -132
- package/lib/extensions/dnatco/confal-pyramids/property.js +1 -3
- package/lib/extensions/dnatco/confal-pyramids/util.js +19 -20
- package/lib/extensions/geo-export/ui.js +2 -2
- package/lib/extensions/model-export/ui.js +2 -2
- package/lib/extensions/mp4-export/ui.js +2 -2
- package/lib/extensions/rcsb/assembly-symmetry/ui.js +3 -3
- package/lib/extensions/rcsb/validation-report/representation.js +19 -2
- package/lib/extensions/zenodo/index.d.ts +7 -0
- package/lib/extensions/zenodo/index.js +32 -0
- package/lib/extensions/zenodo/ui.d.ts +61 -0
- package/lib/extensions/zenodo/ui.js +303 -0
- package/lib/mol-canvas3d/camera.js +2 -1
- package/lib/mol-canvas3d/helper/camera-helper.js +1 -1
- package/lib/mol-canvas3d/helper/handle-helper.js +1 -1
- package/lib/mol-canvas3d/helper/interaction-events.js +1 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +5 -3
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/text/text-builder.js +2 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
- package/lib/mol-gl/shader-code.js +2 -1
- package/lib/mol-gl/webgl/buffer.js +2 -3
- package/lib/mol-gl/webgl/context.d.ts +1 -1
- package/lib/mol-gl/webgl/context.js +2 -2
- package/lib/mol-io/common/binary-cif/classifier.js +3 -2
- package/lib/mol-io/common/binary-cif/decoder.js +4 -3
- package/lib/mol-io/common/io-buffer.d.ts +206 -0
- package/lib/mol-io/common/io-buffer.js +405 -0
- package/lib/mol-io/common/netcdf/reader.d.ts +78 -0
- package/lib/mol-io/common/netcdf/reader.js +456 -0
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +1 -1
- package/lib/mol-io/reader/nctraj/parser.d.ts +18 -0
- package/lib/mol-io/reader/nctraj/parser.js +97 -0
- package/lib/mol-io/reader/prmtop/parser.d.ts +58 -0
- package/lib/mol-io/reader/prmtop/parser.js +168 -0
- package/lib/mol-io/reader/top/parser.d.ts +37 -0
- package/lib/mol-io/reader/top/parser.js +299 -0
- package/lib/mol-io/reader/trr/parser.d.ts +22 -0
- package/lib/mol-io/reader/trr/parser.js +142 -0
- package/lib/mol-io/writer/cif/encoder.js +2 -1
- package/lib/mol-math/geometry/common.d.ts +2 -1
- package/lib/mol-math/geometry/common.js +1 -1
- package/lib/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
- package/lib/mol-math/geometry/gaussian-density/cpu.js +2 -2
- package/lib/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
- package/lib/mol-math/geometry/gaussian-density/gpu.js +7 -7
- package/lib/mol-math/geometry/gaussian-density.d.ts +2 -2
- package/lib/mol-math/geometry/gaussian-density.js +1 -1
- package/lib/mol-math/geometry/molecular-surface.d.ts +2 -1
- package/lib/mol-math/geometry/molecular-surface.js +2 -2
- package/lib/mol-math/geometry/primitives/box3d.js +2 -1
- package/lib/mol-math/geometry/primitives/sphere3d.js +12 -6
- package/lib/mol-model/sequence/sequence.js +2 -1
- package/lib/mol-model/structure/model/types/saccharides.d.ts +8 -0
- package/lib/mol-model/structure/model/types/saccharides.js +8 -0
- package/lib/mol-model/structure/structure/carbohydrates/constants.d.ts +1 -1
- package/lib/mol-model/structure/structure/carbohydrates/constants.js +6 -9
- package/lib/mol-model/structure/structure/structure.js +4 -1
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.d.ts +1 -0
- package/lib/mol-model/structure/structure/unit/bonds/inter-compute.js +4 -2
- package/lib/mol-model/structure/structure/unit.js +1 -18
- package/lib/mol-model-formats/structure/basic/atomic.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/atomic.js +1 -14
- package/lib/mol-model-formats/structure/basic/parser.d.ts +1 -1
- package/lib/mol-model-formats/structure/basic/parser.js +1 -1
- package/lib/mol-model-formats/structure/basic/schema.d.ts +2 -2
- package/lib/mol-model-formats/structure/basic/schema.js +7 -2
- package/lib/mol-model-formats/structure/basic/util.d.ts +33 -2
- package/lib/mol-model-formats/structure/basic/util.js +24 -1
- package/lib/mol-model-formats/structure/cif-core.js +4 -4
- package/lib/mol-model-formats/structure/common/component.js +5 -1
- package/lib/mol-model-formats/structure/cube.js +3 -3
- package/lib/mol-model-formats/structure/gro.js +3 -1
- package/lib/mol-model-formats/structure/mmcif.d.ts +1 -1
- package/lib/mol-model-formats/structure/mmcif.js +4 -2
- package/lib/mol-model-formats/structure/mol.js +3 -3
- package/lib/mol-model-formats/structure/mol2.js +4 -4
- package/lib/mol-model-formats/structure/nctraj.d.ts +9 -0
- package/lib/mol-model-formats/structure/nctraj.js +56 -0
- package/lib/mol-model-formats/structure/pdb.d.ts +1 -1
- package/lib/mol-model-formats/structure/pdb.js +5 -3
- package/lib/mol-model-formats/structure/prmtop.d.ts +16 -0
- package/lib/mol-model-formats/structure/prmtop.js +144 -0
- package/lib/mol-model-formats/structure/property/symmetry.js +11 -1
- package/lib/mol-model-formats/structure/psf.js +3 -1
- package/lib/mol-model-formats/structure/top.d.ts +16 -0
- package/lib/mol-model-formats/structure/top.js +186 -0
- package/lib/mol-model-formats/structure/trr.d.ts +9 -0
- package/lib/mol-model-formats/structure/trr.js +42 -0
- package/lib/mol-model-formats/structure/util.d.ts +2 -2
- package/lib/mol-model-formats/structure/util.js +19 -20
- package/lib/mol-model-formats/structure/xyz.js +2 -2
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.js +9 -3
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.js +10 -5
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.js +10 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/context.d.ts +2 -1
- package/lib/mol-plugin/context.js +4 -3
- package/lib/mol-plugin/spec.js +1 -1
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/file.d.ts +1 -1
- package/lib/mol-plugin-state/actions/file.js +88 -55
- package/lib/mol-plugin-state/actions/structure.d.ts +11 -2
- package/lib/mol-plugin-state/actions/structure.js +174 -4
- package/lib/mol-plugin-state/actions/volume.js +3 -2
- package/lib/mol-plugin-state/formats/{structure.d.ts → coordinates.d.ts} +34 -18
- package/lib/mol-plugin-state/formats/coordinates.js +67 -0
- package/lib/mol-plugin-state/formats/registry.d.ts +3 -3
- package/lib/mol-plugin-state/formats/registry.js +13 -8
- package/lib/mol-plugin-state/formats/topology.d.ts +73 -0
- package/lib/mol-plugin-state/formats/topology.js +84 -0
- package/lib/mol-plugin-state/helpers/root-structure.js +1 -1
- package/lib/mol-plugin-state/helpers/structure-component.js +2 -1
- package/lib/mol-plugin-state/manager/snapshots.js +4 -4
- package/lib/mol-plugin-state/objects.d.ts +47 -1
- package/lib/mol-plugin-state/objects.js +17 -1
- package/lib/mol-plugin-state/transforms/data.d.ts +6 -0
- package/lib/mol-plugin-state/transforms/data.js +61 -9
- package/lib/mol-plugin-state/transforms/model.d.ts +14 -2
- package/lib/mol-plugin-state/transforms/model.js +112 -3
- package/lib/mol-plugin-ui/base.js +1 -1
- package/lib/mol-plugin-ui/controls/action-menu.js +7 -7
- package/lib/mol-plugin-ui/controls/color.js +3 -3
- package/lib/mol-plugin-ui/controls/common.js +10 -10
- package/lib/mol-plugin-ui/controls/icons.js +70 -70
- package/lib/mol-plugin-ui/controls/legend.js +3 -3
- package/lib/mol-plugin-ui/controls/line-graph/line-graph-component.js +1 -1
- package/lib/mol-plugin-ui/controls/parameters.js +51 -51
- package/lib/mol-plugin-ui/controls/screenshot.js +2 -2
- package/lib/mol-plugin-ui/controls/slider.js +5 -5
- package/lib/mol-plugin-ui/controls.js +7 -7
- package/lib/mol-plugin-ui/custom/volume.js +4 -4
- package/lib/mol-plugin-ui/left-panel.d.ts +8 -1
- package/lib/mol-plugin-ui/left-panel.js +33 -12
- package/lib/mol-plugin-ui/plugin.js +10 -10
- package/lib/mol-plugin-ui/sequence/sequence.js +1 -1
- package/lib/mol-plugin-ui/sequence.js +5 -5
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/state/actions.js +1 -1
- package/lib/mol-plugin-ui/state/animation.js +1 -1
- package/lib/mol-plugin-ui/state/common.js +7 -7
- package/lib/mol-plugin-ui/state/snapshots.js +9 -9
- package/lib/mol-plugin-ui/state/tree.js +14 -14
- package/lib/mol-plugin-ui/state/update-transform.js +1 -1
- package/lib/mol-plugin-ui/structure/components.js +10 -10
- package/lib/mol-plugin-ui/structure/focus.js +1 -1
- package/lib/mol-plugin-ui/structure/generic.js +4 -4
- package/lib/mol-plugin-ui/structure/measurements.js +8 -8
- package/lib/mol-plugin-ui/structure/quick-styles.js +2 -2
- package/lib/mol-plugin-ui/structure/selection.js +7 -7
- package/lib/mol-plugin-ui/structure/source.js +4 -4
- package/lib/mol-plugin-ui/structure/superposition.js +8 -8
- package/lib/mol-plugin-ui/structure/volume.js +4 -4
- package/lib/mol-plugin-ui/task.js +5 -5
- package/lib/mol-plugin-ui/toast.js +4 -4
- package/lib/mol-plugin-ui/viewport/canvas.js +3 -3
- package/lib/mol-plugin-ui/viewport/help.js +8 -8
- package/lib/mol-plugin-ui/viewport/screenshot.js +3 -3
- package/lib/mol-plugin-ui/viewport/simple-settings.js +1 -1
- package/lib/mol-plugin-ui/viewport.js +4 -4
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +1 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +20 -10
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +1 -1
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.js +10 -5
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +16 -6
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +8 -3
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.js +10 -1
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.js +10 -1
- package/lib/mol-repr/structure/visual/element-point.d.ts +1 -1
- package/lib/mol-repr/structure/visual/element-point.js +22 -3
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +10 -10
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -4
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +5 -5
- package/lib/mol-repr/structure/visual/util/common.d.ts +1 -3
- package/lib/mol-repr/structure/visual/util/common.js +1 -24
- package/lib/mol-repr/structure/visual/util/element.js +36 -2
- package/lib/mol-repr/structure/visual/util/link.d.ts +13 -3
- package/lib/mol-repr/structure/visual/util/link.js +55 -6
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/lib/mol-script/language/parser.js +7 -4
- package/lib/mol-task/util/scheduler.d.ts +2 -2
- package/lib/mol-task/util/scheduler.js +7 -7
- package/lib/mol-theme/color/hydrophobicity.js +2 -2
- package/lib/mol-util/data-source.js +2 -1
- package/lib/mol-util/file-info.d.ts +1 -3
- package/lib/mol-util/file-info.js +2 -10
- package/lib/mol-util/index.d.ts +1 -0
- package/lib/mol-util/index.js +5 -0
- package/lib/mol-util/zip/deflate.js +2 -1
- package/lib/mol-util/zip/zip.d.ts +7 -1
- package/lib/mol-util/zip/zip.js +5 -1
- package/lib/servers/model/config.d.ts +2 -2
- package/package.json +160 -160
- package/lib/commonjs/mol-plugin-state/formats/structure.js +0 -64
- package/lib/mol-plugin-state/formats/structure.js +0 -61
|
@@ -48,8 +48,8 @@ export declare namespace Cylinders {
|
|
|
48
48
|
alpha: PD.Numeric;
|
|
49
49
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
50
50
|
material: PD.Group<PD.Normalize<{
|
|
51
|
-
metalness: number;
|
|
52
|
-
roughness: number;
|
|
51
|
+
metalness: number;
|
|
52
|
+
roughness: number; /** Number of cylinders */
|
|
53
53
|
bumpiness: number;
|
|
54
54
|
}>>;
|
|
55
55
|
clip: PD.Group<PD.Normalize<{
|
|
@@ -110,7 +110,7 @@ var Cylinders;
|
|
|
110
110
|
}
|
|
111
111
|
Cylinders.transform = transform;
|
|
112
112
|
//
|
|
113
|
-
Cylinders.Params =
|
|
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) });
|
|
114
114
|
Cylinders.Utils = {
|
|
115
115
|
Params: Cylinders.Params,
|
|
116
116
|
createEmpty: createEmpty,
|
|
@@ -156,11 +156,11 @@ 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
|
|
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) });
|
|
160
160
|
}
|
|
161
161
|
function createValuesSimple(cylinders, props, colorValue, sizeValue, transform) {
|
|
162
162
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
163
|
-
var p =
|
|
163
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Cylinders.Params)), props);
|
|
164
164
|
return createValues(cylinders, s.transform, s.locationIterator, s.theme, p);
|
|
165
165
|
}
|
|
166
166
|
function updateValues(values, props) {
|
|
@@ -110,7 +110,7 @@ var DirectVolume;
|
|
|
110
110
|
return create(bbox, gridDimension, transform, unitToCartn, cellDim, texture, stats, packedGroup, axisOrder, directVolume);
|
|
111
111
|
}
|
|
112
112
|
DirectVolume.createEmpty = createEmpty;
|
|
113
|
-
DirectVolume.Params =
|
|
113
|
+
DirectVolume.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { ignoreLight: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), xrayShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), controlPoints: param_definition_1.ParamDefinition.LineGraph([
|
|
114
114
|
linear_algebra_1.Vec2.create(0.19, 0.0), linear_algebra_1.Vec2.create(0.2, 0.05), linear_algebra_1.Vec2.create(0.25, 0.05), linear_algebra_1.Vec2.create(0.26, 0.0),
|
|
115
115
|
linear_algebra_1.Vec2.create(0.79, 0.0), linear_algebra_1.Vec2.create(0.8, 0.05), linear_algebra_1.Vec2.create(0.85, 0.05), linear_algebra_1.Vec2.create(0.86, 0.0),
|
|
116
116
|
], { isEssential: true }), stepsPerCell: param_definition_1.ParamDefinition.Numeric(3, { min: 1, max: 10, step: 1 }), jumpLength: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 20, step: 0.1 }) });
|
|
@@ -172,11 +172,11 @@ var DirectVolume;
|
|
|
172
172
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
173
173
|
var controlPoints = (0, transfer_function_1.getControlPointsFromVec2Array)(props.controlPoints);
|
|
174
174
|
var transferTex = (0, transfer_function_1.createTransferFunctionTexture)(controlPoints);
|
|
175
|
-
return
|
|
175
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('directVolume') }, color), marker), overpaint), transparency), material), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { aPosition: mol_util_1.ValueCell.create(VolumeBox.vertices), elements: mol_util_1.ValueCell.create(VolumeBox.indices), 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)), uBboxMin: bboxMin, uBboxMax: bboxMax, uBboxSize: bboxSize, uMaxSteps: mol_util_1.ValueCell.create(getMaxSteps(gridDimension.ref.value, props.stepsPerCell)), uStepScale: mol_util_1.ValueCell.create(getStepScale(directVolume.cellDim.ref.value, props.stepsPerCell)), uJumpLength: mol_util_1.ValueCell.create(props.jumpLength), uTransform: gridTransform, uGridDim: gridDimension, tTransferTex: transferTex, uTransferScale: mol_util_1.ValueCell.create(getTransferScale(props.stepsPerCell)), dGridTexType: mol_util_1.ValueCell.create(gridTexture.ref.value.getDepth() > 0 ? '3d' : '2d'), uGridTexDim: gridTextureDim, tGridTex: gridTexture, uGridStats: gridStats, uCellDim: directVolume.cellDim, uCartnToUnit: directVolume.cartnToUnit, uUnitToCartn: directVolume.unitToCartn, dPackedGroup: directVolume.packedGroup, dAxisOrder: mol_util_1.ValueCell.create(directVolume.axisOrder.ref.value.join('')), dIgnoreLight: mol_util_1.ValueCell.create(props.ignoreLight), dXrayShaded: mol_util_1.ValueCell.create(props.xrayShaded) });
|
|
176
176
|
}
|
|
177
177
|
function createValuesSimple(directVolume, props, colorValue, sizeValue, transform) {
|
|
178
178
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
179
|
-
var p =
|
|
179
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(DirectVolume.Params)), props);
|
|
180
180
|
return createValues(directVolume, s.transform, s.locationIterator, s.theme, p);
|
|
181
181
|
}
|
|
182
182
|
function updateValues(values, props) {
|
|
@@ -21,7 +21,7 @@ function getControlPointsFromVec2Array(array) {
|
|
|
21
21
|
}
|
|
22
22
|
exports.getControlPointsFromVec2Array = getControlPointsFromVec2Array;
|
|
23
23
|
function createTransferFunctionTexture(controlPoints, texture) {
|
|
24
|
-
var cp =
|
|
24
|
+
var cp = tslib_1.__spreadArray(tslib_1.__spreadArray([
|
|
25
25
|
{ x: 0, alpha: 0 },
|
|
26
26
|
{ x: 0, alpha: 0 }
|
|
27
27
|
], controlPoints, true), [
|
|
@@ -93,7 +93,7 @@ var Image;
|
|
|
93
93
|
return create(imageTexture, corners, groupTexture, image);
|
|
94
94
|
}
|
|
95
95
|
Image.createEmpty = createEmpty;
|
|
96
|
-
Image.Params =
|
|
96
|
+
Image.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { interpolation: param_definition_1.ParamDefinition.Select('bspline', param_definition_1.ParamDefinition.objectToOptions(exports.InterpolationTypes)) });
|
|
97
97
|
Image.Utils = {
|
|
98
98
|
Params: Image.Params,
|
|
99
99
|
createEmpty: createEmpty,
|
|
@@ -117,13 +117,13 @@ var Image;
|
|
|
117
117
|
var counts = { drawCount: QuadIndices.length, vertexCount: util_3.QuadPositions.length / 3, groupCount: groupCount, instanceCount: instanceCount };
|
|
118
118
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(image.boundingSphere);
|
|
119
119
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
120
|
-
return
|
|
120
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('image') }, color), marker), overpaint), transparency), material), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { aPosition: image.cornerBuffer, aUv: mol_util_1.ValueCell.create(QuadUvs), elements: mol_util_1.ValueCell.create(QuadIndices),
|
|
121
121
|
// aGroup is used as a vertex index here, group id is in tGroupTex
|
|
122
122
|
aGroup: mol_util_1.ValueCell.create((0, array_1.fillSerial)(new Float32Array(4))), 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)), dInterpolation: mol_util_1.ValueCell.create(props.interpolation), uImageTexDim: image.imageTextureDim, tImageTex: image.imageTexture, tGroupTex: image.groupTexture });
|
|
123
123
|
}
|
|
124
124
|
function createValuesSimple(image, props, colorValue, sizeValue, transform) {
|
|
125
125
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
126
|
-
var p =
|
|
126
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Image.Params)), props);
|
|
127
127
|
return createValues(image, s.transform, s.locationIterator, s.theme, p);
|
|
128
128
|
}
|
|
129
129
|
function updateValues(values, props) {
|
|
@@ -123,7 +123,7 @@ var Lines;
|
|
|
123
123
|
}
|
|
124
124
|
Lines.transform = transform;
|
|
125
125
|
//
|
|
126
|
-
Lines.Params =
|
|
126
|
+
Lines.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 10, step: 0.1 }), lineSizeAttenuation: param_definition_1.ParamDefinition.Boolean(false) });
|
|
127
127
|
Lines.Utils = {
|
|
128
128
|
Params: Lines.Params,
|
|
129
129
|
createEmpty: createEmpty,
|
|
@@ -168,11 +168,11 @@ var Lines;
|
|
|
168
168
|
var counts = { drawCount: lines.lineCount * 2 * 3, vertexCount: lines.lineCount * 4, groupCount: groupCount, instanceCount: instanceCount };
|
|
169
169
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(lines.boundingSphere);
|
|
170
170
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
171
|
-
return
|
|
171
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('lines'), aMapping: lines.mappingBuffer, aGroup: lines.groupBuffer, aStart: lines.startBuffer, aEnd: lines.endBuffer, elements: lines.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), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor), dLineSizeAttenuation: mol_util_1.ValueCell.create(props.lineSizeAttenuation), uDoubleSided: mol_util_1.ValueCell.create(true), dFlipSided: mol_util_1.ValueCell.create(false) });
|
|
172
172
|
}
|
|
173
173
|
function createValuesSimple(lines, props, colorValue, sizeValue, transform) {
|
|
174
174
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
175
|
-
var p =
|
|
175
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Lines.Params)), props);
|
|
176
176
|
return createValues(lines, s.transform, s.locationIterator, s.theme, p);
|
|
177
177
|
}
|
|
178
178
|
function updateValues(values, props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2021-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
|
*/
|
|
@@ -16,12 +16,14 @@ function calcMeshColorSmoothing(input, resolution, stride, webgl, texture) {
|
|
|
16
16
|
var colorType = input.colorType, vertexCount = input.vertexCount, groupCount = input.groupCount, positionBuffer = input.positionBuffer, transformBuffer = input.transformBuffer, groupBuffer = input.groupBuffer, itemSize = input.itemSize;
|
|
17
17
|
var isInstanceType = colorType.endsWith('Instance');
|
|
18
18
|
var box = geometry_1.Box3D.fromSphere3D((0, geometry_1.Box3D)(), isInstanceType ? input.boundingSphere : input.invariantBoundingSphere);
|
|
19
|
+
var pad = 1 + resolution;
|
|
20
|
+
var expandedBox = geometry_1.Box3D.expand((0, geometry_1.Box3D)(), box, linear_algebra_1.Vec3.create(pad, pad, pad));
|
|
19
21
|
var scaleFactor = 1 / resolution;
|
|
20
|
-
var scaledBox = geometry_1.Box3D.scale((0, geometry_1.Box3D)(),
|
|
22
|
+
var scaledBox = geometry_1.Box3D.scale((0, geometry_1.Box3D)(), expandedBox, scaleFactor);
|
|
21
23
|
var gridDim = geometry_1.Box3D.size((0, linear_algebra_1.Vec3)(), scaledBox);
|
|
22
24
|
linear_algebra_1.Vec3.ceil(gridDim, gridDim);
|
|
23
25
|
linear_algebra_1.Vec3.add(gridDim, gridDim, linear_algebra_1.Vec3.create(2, 2, 2));
|
|
24
|
-
var min =
|
|
26
|
+
var min = expandedBox.min;
|
|
25
27
|
var xn = gridDim[0], yn = gridDim[1];
|
|
26
28
|
var _a = (0, util_2.getVolumeTexture2dLayout)(gridDim), width = _a.width, height = _a.height;
|
|
27
29
|
// console.log({ width, height, dim });
|
|
@@ -554,7 +554,7 @@ var Mesh;
|
|
|
554
554
|
}
|
|
555
555
|
Mesh.smoothEdges = smoothEdges;
|
|
556
556
|
//
|
|
557
|
-
Mesh.Params =
|
|
557
|
+
Mesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), 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) });
|
|
558
558
|
Mesh.Utils = {
|
|
559
559
|
Params: Mesh.Params,
|
|
560
560
|
createEmpty: createEmpty,
|
|
@@ -596,11 +596,11 @@ var Mesh;
|
|
|
596
596
|
var counts = { drawCount: mesh.triangleCount * 3, vertexCount: mesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
|
|
597
597
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(mesh.boundingSphere);
|
|
598
598
|
var boundingSphere = (0, util_3.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
599
|
-
return
|
|
599
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('mesh'), aPosition: mesh.vertexBuffer, aNormal: mesh.normalBuffer, aGroup: mesh.groupBuffer, elements: mesh.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), marker), overpaint), transparency), material), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), 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), meta: mol_util_1.ValueCell.create(mesh.meta) });
|
|
600
600
|
}
|
|
601
601
|
function createValuesSimple(mesh, props, colorValue, sizeValue, transform) {
|
|
602
602
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
603
|
-
var p =
|
|
603
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Mesh.Params)), props);
|
|
604
604
|
return createValues(mesh, s.transform, s.locationIterator, s.theme, p);
|
|
605
605
|
}
|
|
606
606
|
function updateValues(values, props) {
|
|
@@ -43,7 +43,7 @@ export declare namespace Points {
|
|
|
43
43
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
44
44
|
material: PD.Group<PD.Normalize<{
|
|
45
45
|
metalness: number;
|
|
46
|
-
roughness: number;
|
|
46
|
+
roughness: number; /** Number of vertices in the point cloud */
|
|
47
47
|
bumpiness: number;
|
|
48
48
|
}>>;
|
|
49
49
|
clip: PD.Group<PD.Normalize<{
|
|
@@ -94,7 +94,7 @@ var Points;
|
|
|
94
94
|
'fuzzy': 'Fuzzy',
|
|
95
95
|
};
|
|
96
96
|
Points.StyleTypeNames = Object.keys(Points.StyleTypes);
|
|
97
|
-
Points.Params =
|
|
97
|
+
Points.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { sizeFactor: param_definition_1.ParamDefinition.Numeric(3, { min: 0, max: 10, step: 0.1 }), pointSizeAttenuation: param_definition_1.ParamDefinition.Boolean(false), pointStyle: param_definition_1.ParamDefinition.Select('square', param_definition_1.ParamDefinition.objectToOptions(Points.StyleTypes)) });
|
|
98
98
|
Points.Utils = {
|
|
99
99
|
Params: Points.Params,
|
|
100
100
|
createEmpty: createEmpty,
|
|
@@ -137,11 +137,11 @@ var Points;
|
|
|
137
137
|
var counts = { drawCount: points.pointCount, vertexCount: points.pointCount, groupCount: groupCount, instanceCount: instanceCount };
|
|
138
138
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(points.boundingSphere);
|
|
139
139
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
140
|
-
return
|
|
140
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('points'), aPosition: points.centerBuffer, aGroup: points.groupBuffer, 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), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor), dPointSizeAttenuation: mol_util_1.ValueCell.create(props.pointSizeAttenuation), dPointStyle: mol_util_1.ValueCell.create(props.pointStyle) });
|
|
141
141
|
}
|
|
142
142
|
function createValuesSimple(points, props, colorValue, sizeValue, transform) {
|
|
143
143
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
144
|
-
var p =
|
|
144
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Points.Params)), props);
|
|
145
145
|
return createValues(points, s.transform, s.locationIterator, s.theme, p);
|
|
146
146
|
}
|
|
147
147
|
function updateValues(values, props) {
|
|
@@ -56,7 +56,7 @@ function createValueSize(value, sizeData) {
|
|
|
56
56
|
return sizeData;
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
|
-
return
|
|
59
|
+
return tslib_1.__assign(tslib_1.__assign({ uSize: mol_util_1.ValueCell.create(value) }, createEmptySizeTexture()), { dSizeType: mol_util_1.ValueCell.create('uniform') });
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
exports.createValueSize = createValueSize;
|
|
@@ -91,7 +91,7 @@ var Spheres;
|
|
|
91
91
|
mol_util_1.ValueCell.update(spheres.groupBuffer, groups);
|
|
92
92
|
return spheres;
|
|
93
93
|
}
|
|
94
|
-
Spheres.Params =
|
|
94
|
+
Spheres.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 }), 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) });
|
|
95
95
|
Spheres.Utils = {
|
|
96
96
|
Params: Spheres.Params,
|
|
97
97
|
createEmpty: createEmpty,
|
|
@@ -135,11 +135,11 @@ var Spheres;
|
|
|
135
135
|
var padding = spheres.boundingSphere.radius ? (0, size_data_1.getMaxSize)(size) * props.sizeFactor : 0;
|
|
136
136
|
var invariantBoundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), spheres.boundingSphere, padding);
|
|
137
137
|
var boundingSphere = (0, util_1.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
138
|
-
return
|
|
138
|
+
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('spheres'), aPosition: spheres.centerBuffer, aMapping: spheres.mappingBuffer, aGroup: spheres.groupBuffer, elements: spheres.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), 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) });
|
|
139
139
|
}
|
|
140
140
|
function createValuesSimple(spheres, props, colorValue, sizeValue, transform) {
|
|
141
141
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
142
|
-
var p =
|
|
142
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Spheres.Params)), props);
|
|
143
143
|
return createValues(spheres, s.transform, s.locationIterator, s.theme, p);
|
|
144
144
|
}
|
|
145
145
|
function updateValues(values, props) {
|
|
@@ -35,7 +35,7 @@ var FontAtlas = /** @class */ (function () {
|
|
|
35
35
|
this.currentX = 0;
|
|
36
36
|
this.currentY = 0;
|
|
37
37
|
this.cutoff = 0.5;
|
|
38
|
-
var p =
|
|
38
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(exports.FontAtlasParams)), props);
|
|
39
39
|
this.props = p;
|
|
40
40
|
// create measurements
|
|
41
41
|
var fontSize = 32 * (p.fontQuality + 1);
|
|
@@ -11,6 +11,7 @@ var param_definition_1 = require("../../../mol-util/param-definition");
|
|
|
11
11
|
var util_1 = require("../../../mol-data/util");
|
|
12
12
|
var text_1 = require("./text");
|
|
13
13
|
var font_atlas_1 = require("./font-atlas");
|
|
14
|
+
var type_helpers_1 = require("../../../mol-util/type-helpers");
|
|
14
15
|
var quadIndices = new Uint16Array([
|
|
15
16
|
0, 1, 2,
|
|
16
17
|
1, 3, 2
|
|
@@ -33,7 +34,7 @@ var TextBuilder;
|
|
|
33
34
|
var indices = util_1.ChunkedArray.create(Uint32Array, 3, chunkSize, text ? text.indexBuffer.ref.value : initialCount);
|
|
34
35
|
var groups = util_1.ChunkedArray.create(Float32Array, 1, chunkSize, text ? text.groupBuffer.ref.value : initialCount);
|
|
35
36
|
var tcoords = util_1.ChunkedArray.create(Float32Array, 2, chunkSize, text ? text.tcoordBuffer.ref.value : initialCount);
|
|
36
|
-
var p =
|
|
37
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(text_1.Text.Params)), props);
|
|
37
38
|
var attachment = p.attachment, background = p.background, backgroundMargin = p.backgroundMargin, tether = p.tether, tetherLength = p.tetherLength, tetherBaseWidth = p.tetherBaseWidth;
|
|
38
39
|
var fontAtlas = (0, font_atlas_1.getFontAtlas)(p);
|
|
39
40
|
var margin = (1 / 2.5) * backgroundMargin;
|
|
@@ -226,7 +227,7 @@ var TextBuilder;
|
|
|
226
227
|
yBaseCenter = yTop;
|
|
227
228
|
break;
|
|
228
229
|
default:
|
|
229
|
-
|
|
230
|
+
(0, type_helpers_1.assertUnreachable)(attachment);
|
|
230
231
|
}
|
|
231
232
|
caAdd2(mappings, xTip, yTip); // tip
|
|
232
233
|
caAdd2(mappings, xBaseA, yBaseA); // base A
|
|
@@ -103,7 +103,7 @@ var Text;
|
|
|
103
103
|
mol_util_1.ValueCell.update(text.tcoordBuffer, tcoords);
|
|
104
104
|
return text;
|
|
105
105
|
}
|
|
106
|
-
Text.Params =
|
|
106
|
+
Text.Params = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), font_atlas_1.FontAtlasParams), { sizeFactor: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 10, step: 0.1 }), borderWidth: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 0.5, step: 0.01 }), borderColor: param_definition_1.ParamDefinition.Color(names_1.ColorNames.grey), offsetX: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }), offsetY: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }), offsetZ: param_definition_1.ParamDefinition.Numeric(0, { min: 0, max: 10, step: 0.1 }), background: param_definition_1.ParamDefinition.Boolean(false), backgroundMargin: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 1, step: 0.01 }), backgroundColor: param_definition_1.ParamDefinition.Color(names_1.ColorNames.grey), backgroundOpacity: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }), tether: param_definition_1.ParamDefinition.Boolean(false), tetherLength: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 5, step: 0.1 }), tetherBaseWidth: param_definition_1.ParamDefinition.Numeric(0.3, { min: 0, max: 1, step: 0.01 }), attachment: param_definition_1.ParamDefinition.Select('middle-center', [
|
|
107
107
|
['bottom-left', 'bottom-left'], ['bottom-center', 'bottom-center'], ['bottom-right', 'bottom-right'],
|
|
108
108
|
['middle-left', 'middle-left'], ['middle-center', 'middle-center'], ['middle-right', 'middle-right'],
|
|
109
109
|
['top-left', 'top-left'], ['top-center', 'top-center'], ['top-right', 'top-right'],
|
|
@@ -151,11 +151,11 @@ var Text;
|
|
|
151
151
|
var padding = getPadding(text.mappingBuffer.ref.value, text.depthBuffer.ref.value, text.charCount, (0, size_data_1.getMaxSize)(size));
|
|
152
152
|
var invariantBoundingSphere = geometry_1.Sphere3D.expand((0, geometry_1.Sphere3D)(), text.boundingSphere, padding);
|
|
153
153
|
var boundingSphere = (0, util_1.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
154
|
-
return
|
|
154
|
+
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('text'), aPosition: text.centerBuffer, aMapping: text.mappingBuffer, aDepth: text.depthBuffer, aGroup: text.groupBuffer, elements: text.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), substance), clipping), transform), { aTexCoord: text.tcoordBuffer, tFont: text.fontTexture, padding: mol_util_1.ValueCell.create(padding) }), base_1.BaseGeometry.createValues(props, counts)), { uSizeFactor: mol_util_1.ValueCell.create(props.sizeFactor), uBorderWidth: mol_util_1.ValueCell.create((0, interpolate_1.clamp)(props.borderWidth, 0, 0.5)), uBorderColor: mol_util_1.ValueCell.create(color_1.Color.toArrayNormalized(props.borderColor, linear_algebra_1.Vec3.zero(), 0)), uOffsetX: mol_util_1.ValueCell.create(props.offsetX), uOffsetY: mol_util_1.ValueCell.create(props.offsetY), uOffsetZ: mol_util_1.ValueCell.create(props.offsetZ), uBackgroundColor: mol_util_1.ValueCell.create(color_1.Color.toArrayNormalized(props.backgroundColor, linear_algebra_1.Vec3.zero(), 0)), uBackgroundOpacity: mol_util_1.ValueCell.create(props.backgroundOpacity) });
|
|
155
155
|
}
|
|
156
156
|
function createValuesSimple(text, props, colorValue, sizeValue, transform) {
|
|
157
157
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
158
|
-
var p =
|
|
158
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(Text.Params)), props);
|
|
159
159
|
return createValues(text, s.transform, s.locationIterator, s.theme, p);
|
|
160
160
|
}
|
|
161
161
|
function updateValues(values, props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2021-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
|
*/
|
|
@@ -113,7 +113,7 @@ function createAccumulateRenderable(ctx, input, box, resolution, stride) {
|
|
|
113
113
|
uBboxSize: mol_util_1.ValueCell.create(extent),
|
|
114
114
|
uResolution: mol_util_1.ValueCell.create(resolution),
|
|
115
115
|
};
|
|
116
|
-
var schema =
|
|
116
|
+
var schema = tslib_1.__assign({}, exports.ColorAccumulateSchema);
|
|
117
117
|
var shaderCode = (0, shader_code_1.ShaderCode)('accumulate', accumulate_vert_1.accumulate_vert, accumulate_frag_1.accumulate_frag, { drawBuffers: 'required' });
|
|
118
118
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'points', shaderCode, schema, values);
|
|
119
119
|
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
@@ -130,7 +130,7 @@ function setAccumulateDefaults(ctx) {
|
|
|
130
130
|
state.blendEquation(gl.FUNC_ADD);
|
|
131
131
|
}
|
|
132
132
|
//
|
|
133
|
-
exports.ColorNormalizeSchema =
|
|
133
|
+
exports.ColorNormalizeSchema = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadSchema), { tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'float', 'nearest'), tCount: (0, schema_1.TextureSpec)('texture', 'alpha', 'float', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2') });
|
|
134
134
|
var ColorNormalizeName = 'color-normalize';
|
|
135
135
|
function getNormalizeRenderable(ctx, color, count) {
|
|
136
136
|
if (ctx.namedComputeRenderables[ColorNormalizeName]) {
|
|
@@ -146,8 +146,8 @@ function getNormalizeRenderable(ctx, color, count) {
|
|
|
146
146
|
return ctx.namedComputeRenderables[ColorNormalizeName];
|
|
147
147
|
}
|
|
148
148
|
function createColorNormalizeRenderable(ctx, color, count) {
|
|
149
|
-
var values =
|
|
150
|
-
var schema =
|
|
149
|
+
var values = tslib_1.__assign(tslib_1.__assign({}, util_1.QuadValues), { tColor: mol_util_1.ValueCell.create(color), tCount: mol_util_1.ValueCell.create(count), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(color.getWidth(), color.getHeight())) });
|
|
150
|
+
var schema = tslib_1.__assign({}, exports.ColorNormalizeSchema);
|
|
151
151
|
var shaderCode = (0, shader_code_1.ShaderCode)('normalize', quad_vert_1.quad_vert, normalize_frag_1.normalize_frag);
|
|
152
152
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
153
153
|
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
@@ -191,12 +191,14 @@ function calcTextureMeshColorSmoothing(input, resolution, stride, webgl, texture
|
|
|
191
191
|
var gl = webgl.gl, resources = webgl.resources, state = webgl.state, _a = webgl.extensions, colorBufferHalfFloat = _a.colorBufferHalfFloat, textureHalfFloat = _a.textureHalfFloat;
|
|
192
192
|
var isInstanceType = input.colorType.endsWith('Instance');
|
|
193
193
|
var box = geometry_1.Box3D.fromSphere3D((0, geometry_1.Box3D)(), isInstanceType ? input.boundingSphere : input.invariantBoundingSphere);
|
|
194
|
+
var pad = 1 + resolution;
|
|
195
|
+
var expandedBox = geometry_1.Box3D.expand((0, geometry_1.Box3D)(), box, linear_algebra_1.Vec3.create(pad, pad, pad));
|
|
194
196
|
var scaleFactor = 1 / resolution;
|
|
195
|
-
var scaledBox = geometry_1.Box3D.scale((0, geometry_1.Box3D)(),
|
|
197
|
+
var scaledBox = geometry_1.Box3D.scale((0, geometry_1.Box3D)(), expandedBox, scaleFactor);
|
|
196
198
|
var gridDim = geometry_1.Box3D.size((0, linear_algebra_1.Vec3)(), scaledBox);
|
|
197
199
|
linear_algebra_1.Vec3.ceil(gridDim, gridDim);
|
|
198
200
|
linear_algebra_1.Vec3.add(gridDim, gridDim, linear_algebra_1.Vec3.create(2, 2, 2));
|
|
199
|
-
var min =
|
|
201
|
+
var min = expandedBox.min;
|
|
200
202
|
var dx = gridDim[0], dy = gridDim[1], dz = gridDim[2];
|
|
201
203
|
var _b = getTexture2dSize(gridDim), width = _b.texDimX, height = _b.texDimY, texCols = _b.texCols;
|
|
202
204
|
// console.log({ width, height, texCols, dim, resolution });
|
|
@@ -230,7 +232,7 @@ function calcTextureMeshColorSmoothing(input, resolution, stride, webgl, texture
|
|
|
230
232
|
countTexture.define(width, height);
|
|
231
233
|
accumulateTexture.attachFramebuffer(framebuffer, 0);
|
|
232
234
|
countTexture.attachFramebuffer(framebuffer, 1);
|
|
233
|
-
var accumulateRenderable = getAccumulateRenderable(webgl, input,
|
|
235
|
+
var accumulateRenderable = getAccumulateRenderable(webgl, input, expandedBox, resolution, stride);
|
|
234
236
|
state.currentRenderItemId = -1;
|
|
235
237
|
framebuffer.bind();
|
|
236
238
|
drawBuffers.drawBuffers([
|
|
@@ -89,7 +89,7 @@ var TextureMesh;
|
|
|
89
89
|
return create(0, 0, vt, gt, nt, bs, textureMesh);
|
|
90
90
|
}
|
|
91
91
|
TextureMesh.createEmpty = createEmpty;
|
|
92
|
-
TextureMesh.Params =
|
|
92
|
+
TextureMesh.Params = tslib_1.__assign(tslib_1.__assign({}, base_1.BaseGeometry.Params), { doubleSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.CustomQualityParamInfo), flipSided: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), flatShaded: param_definition_1.ParamDefinition.Boolean(false, base_1.BaseGeometry.ShadingCategory), 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) });
|
|
93
93
|
TextureMesh.Utils = {
|
|
94
94
|
Params: TextureMesh.Params,
|
|
95
95
|
createEmpty: createEmpty,
|
|
@@ -113,11 +113,11 @@ var TextureMesh;
|
|
|
113
113
|
var counts = { drawCount: textureMesh.vertexCount, vertexCount: textureMesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
|
|
114
114
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(textureMesh.boundingSphere);
|
|
115
115
|
var boundingSphere = (0, util_1.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
116
|
-
return
|
|
116
|
+
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({ dGeometryType: mol_util_1.ValueCell.create('textureMesh'), uGeoTexDim: textureMesh.geoTextureDim, tPosition: textureMesh.vertexTexture, tGroup: textureMesh.groupTexture, tNormal: textureMesh.normalTexture, 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), marker), overpaint), transparency), substance), clipping), transform), base_1.BaseGeometry.createValues(props, counts)), { uDoubleSided: mol_util_1.ValueCell.create(props.doubleSided), dFlatShaded: mol_util_1.ValueCell.create(props.flatShaded), dFlipSided: mol_util_1.ValueCell.create(props.flipSided), 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), meta: mol_util_1.ValueCell.create(textureMesh.meta) });
|
|
117
117
|
}
|
|
118
118
|
function createValuesSimple(textureMesh, props, colorValue, sizeValue, transform) {
|
|
119
119
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
120
|
-
var p =
|
|
120
|
+
var p = tslib_1.__assign(tslib_1.__assign({}, param_definition_1.ParamDefinition.getDefaultValues(TextureMesh.Params)), props);
|
|
121
121
|
return createValues(textureMesh, s.transform, s.locationIterator, s.theme, p);
|
|
122
122
|
}
|
|
123
123
|
function updateValues(values, props) {
|
|
@@ -14,7 +14,7 @@ exports.DefaultCircleProps = {
|
|
|
14
14
|
thetaLength: Math.PI * 2
|
|
15
15
|
};
|
|
16
16
|
function Circle(props) {
|
|
17
|
-
var _a =
|
|
17
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultCircleProps), props), radius = _a.radius, segments = _a.segments, thetaStart = _a.thetaStart, thetaLength = _a.thetaLength;
|
|
18
18
|
var isFull = thetaLength === Math.PI * 2;
|
|
19
19
|
var count = isFull ? segments + 1 : segments + 2;
|
|
20
20
|
var vertices = new Float32Array(count * 3);
|
|
@@ -21,7 +21,7 @@ exports.DefaultCylinderProps = {
|
|
|
21
21
|
thetaLength: Math.PI * 2
|
|
22
22
|
};
|
|
23
23
|
function Cylinder(props) {
|
|
24
|
-
var _a =
|
|
24
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultCylinderProps), props), radiusTop = _a.radiusTop, radiusBottom = _a.radiusBottom, height = _a.height, radialSegments = _a.radialSegments, heightSegments = _a.heightSegments, topCap = _a.topCap, bottomCap = _a.bottomCap, thetaStart = _a.thetaStart, thetaLength = _a.thetaLength;
|
|
25
25
|
// buffers
|
|
26
26
|
var indices = [];
|
|
27
27
|
var vertices = [];
|
|
@@ -15,7 +15,7 @@ exports.DefaultPolyhedronProps = {
|
|
|
15
15
|
detail: 0
|
|
16
16
|
};
|
|
17
17
|
function Polyhedron(_vertices, _indices, props) {
|
|
18
|
-
var _a =
|
|
18
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultPolyhedronProps), props), radius = _a.radius, detail = _a.detail;
|
|
19
19
|
var builder = createBuilder();
|
|
20
20
|
var vertices = builder.vertices, indices = builder.indices;
|
|
21
21
|
// the subdivision creates the vertex buffer data
|
|
@@ -24,7 +24,7 @@ function Prism(points, props) {
|
|
|
24
24
|
var sideCount = points.length / 3;
|
|
25
25
|
if (sideCount < 3)
|
|
26
26
|
throw new Error('need at least 3 points to build a prism');
|
|
27
|
-
var _a =
|
|
27
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultPrismProps), props), height = _a.height, topCap = _a.topCap, bottomCap = _a.bottomCap;
|
|
28
28
|
var triangleCount = sideCount * 2;
|
|
29
29
|
var vertexCount = sideCount * 4;
|
|
30
30
|
var capCount = (topCap ? 1 : 0) + (bottomCap ? 1 : 0);
|
|
@@ -18,7 +18,7 @@ exports.DefaultStarProps = {
|
|
|
18
18
|
var op = linear_algebra_1.Vec3.zero(), on = linear_algebra_1.Vec3.zero();
|
|
19
19
|
var a = linear_algebra_1.Vec3.zero(), b = linear_algebra_1.Vec3.zero(), c = linear_algebra_1.Vec3.zero();
|
|
20
20
|
function Star(props) {
|
|
21
|
-
var _a =
|
|
21
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultStarProps), props), outerRadius = _a.outerRadius, innerRadius = _a.innerRadius, thickness = _a.thickness, pointCount = _a.pointCount;
|
|
22
22
|
var triangleCount = pointCount * 2 * 2;
|
|
23
23
|
var builder = (0, primitive_1.PrimitiveBuilder)(triangleCount);
|
|
24
24
|
var innerPoints = new Float32Array(pointCount * 2);
|
|
@@ -17,7 +17,7 @@ exports.DefaultTorusProps = {
|
|
|
17
17
|
arc: Math.PI * 2,
|
|
18
18
|
};
|
|
19
19
|
function Torus(props) {
|
|
20
|
-
var _a =
|
|
20
|
+
var _a = tslib_1.__assign(tslib_1.__assign({}, exports.DefaultTorusProps), props), radius = _a.radius, tube = _a.tube, radialSegments = _a.radialSegments, tubularSegments = _a.tubularSegments, arc = _a.arc;
|
|
21
21
|
// buffers
|
|
22
22
|
var indices = [];
|
|
23
23
|
var vertices = [];
|
|
@@ -13,7 +13,7 @@ var tables_1 = require("./tables");
|
|
|
13
13
|
var mol_util_1 = require("../../../mol-util");
|
|
14
14
|
var builder_1 = require("./builder");
|
|
15
15
|
function getInputParams(params) {
|
|
16
|
-
return
|
|
16
|
+
return tslib_1.__assign(tslib_1.__assign({}, params), { bottomLeft: (0, mol_util_1.defaults)(params.bottomLeft, [0, 0, 0]), topRight: (0, mol_util_1.defaults)(params.topRight, params.scalarField.space.dimensions) });
|
|
17
17
|
}
|
|
18
18
|
function getExtent(inputParams) {
|
|
19
19
|
return {
|
|
@@ -24,9 +24,9 @@ function getExtent(inputParams) {
|
|
|
24
24
|
}
|
|
25
25
|
function computeMarchingCubesMesh(params, mesh) {
|
|
26
26
|
var _this = this;
|
|
27
|
-
return mol_task_1.Task.create('Marching Cubes Mesh', function (ctx) { return
|
|
27
|
+
return mol_task_1.Task.create('Marching Cubes Mesh', function (ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
28
28
|
var inputParams, _a, dX, dY, dZ, vertexChunkSize, builder;
|
|
29
|
-
return
|
|
29
|
+
return tslib_1.__generator(this, function (_b) {
|
|
30
30
|
switch (_b.label) {
|
|
31
31
|
case 0:
|
|
32
32
|
inputParams = getInputParams(params);
|
|
@@ -44,9 +44,9 @@ function computeMarchingCubesMesh(params, mesh) {
|
|
|
44
44
|
exports.computeMarchingCubesMesh = computeMarchingCubesMesh;
|
|
45
45
|
function computeMarchingCubesLines(params, lines) {
|
|
46
46
|
var _this = this;
|
|
47
|
-
return mol_task_1.Task.create('Marching Cubes Lines', function (ctx) { return
|
|
47
|
+
return mol_task_1.Task.create('Marching Cubes Lines', function (ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
48
48
|
var inputParams, _a, dX, dY, dZ, vertexChunkSize, builder;
|
|
49
|
-
return
|
|
49
|
+
return tslib_1.__generator(this, function (_b) {
|
|
50
50
|
switch (_b.label) {
|
|
51
51
|
case 0:
|
|
52
52
|
inputParams = getInputParams(params);
|
|
@@ -82,9 +82,9 @@ var MarchingCubesComputation = /** @class */ (function () {
|
|
|
82
82
|
this.sliceSize = (this.maxX - this.minX) * (this.maxY - this.minY);
|
|
83
83
|
}
|
|
84
84
|
MarchingCubesComputation.prototype.doSlices = function () {
|
|
85
|
-
return
|
|
85
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
86
86
|
var done, k;
|
|
87
|
-
return
|
|
87
|
+
return tslib_1.__generator(this, function (_a) {
|
|
88
88
|
switch (_a.label) {
|
|
89
89
|
case 0:
|
|
90
90
|
done = 0;
|
|
@@ -119,8 +119,8 @@ var MarchingCubesComputation = /** @class */ (function () {
|
|
|
119
119
|
this.state.clearEdgeVertexIndexSlice(k);
|
|
120
120
|
};
|
|
121
121
|
MarchingCubesComputation.prototype.run = function () {
|
|
122
|
-
return
|
|
123
|
-
return
|
|
122
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
123
|
+
return tslib_1.__generator(this, function (_a) {
|
|
124
124
|
switch (_a.label) {
|
|
125
125
|
case 0: return [4 /*yield*/, this.doSlices()];
|
|
126
126
|
case 1:
|