molstar 3.0.0-dev.3 → 3.0.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/viewer/embedded.html +5 -5
- package/build/viewer/index.html +25 -17
- package/build/viewer/molstar.css +1 -1
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.d.ts +2 -1
- package/lib/apps/docking-viewer/index.html +8 -8
- package/lib/apps/docking-viewer/index.js +87 -74
- package/lib/apps/docking-viewer/viewport.js +2 -1
- package/lib/apps/viewer/embedded.html +5 -5
- package/lib/apps/viewer/index.d.ts +36 -215
- package/lib/apps/viewer/index.html +25 -17
- package/lib/apps/viewer/index.js +139 -52
- package/lib/cli/cifschema/index.d.ts +1 -1
- package/lib/cli/cifschema/index.js +15 -35
- package/lib/commonjs/apps/docking-viewer/index.d.ts +2 -1
- package/lib/commonjs/apps/docking-viewer/index.js +86 -73
- package/lib/commonjs/apps/docking-viewer/viewport.js +2 -1
- package/lib/commonjs/apps/viewer/index.d.ts +36 -215
- package/lib/commonjs/apps/viewer/index.js +139 -52
- package/lib/commonjs/cli/cifschema/index.d.ts +1 -1
- package/lib/commonjs/cli/cifschema/index.js +15 -35
- package/lib/commonjs/examples/alpha-orbitals/index.js +2 -3
- package/lib/commonjs/examples/basic-wrapper/index.js +23 -11
- package/lib/commonjs/examples/lighting/index.d.ts +1 -1
- package/lib/commonjs/examples/lighting/index.js +58 -41
- package/lib/commonjs/examples/proteopedia-wrapper/index.js +26 -14
- package/lib/commonjs/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/commonjs/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/commonjs/extensions/anvil/behavior.d.ts +7 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +63 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +13 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/behavior.js +236 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/plddt.js +125 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/color/qmean.js +111 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/commonjs/extensions/model-archive/quality-assessment/prop.js +130 -0
- package/lib/commonjs/extensions/mp4-export/controls.d.ts +1 -0
- package/lib/commonjs/extensions/mp4-export/controls.js +9 -7
- package/lib/commonjs/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/behavior.d.ts +7 -0
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +65 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +8 -8
- package/lib/commonjs/mol-canvas3d/canvas3d.js +12 -4
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +7 -0
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +7 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +6 -0
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +2 -1
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +4 -2
- package/lib/commonjs/mol-canvas3d/passes/pick.js +9 -9
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +6 -4
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/commonjs/mol-geo/geometry/base.d.ts +20 -0
- package/lib/commonjs/mol-geo/geometry/base.js +20 -1
- package/lib/commonjs/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/commonjs/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +5 -3
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +12 -0
- package/lib/commonjs/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/marker-data.js +0 -4
- package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +13 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +5 -3
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +13 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +5 -3
- package/lib/commonjs/mol-geo/geometry/substance-data.js +3 -3
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +11 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +13 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
- package/lib/commonjs/mol-gl/render-object.d.ts +2 -1
- package/lib/commonjs/mol-gl/render-object.js +10 -10
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +41 -33
- package/lib/commonjs/mol-gl/renderable/cylinders.js +4 -4
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/commonjs/mol-gl/renderable/image.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/image.js +2 -2
- package/lib/commonjs/mol-gl/renderable/lines.d.ts +38 -32
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +38 -30
- package/lib/commonjs/mol-gl/renderable/mesh.js +4 -4
- package/lib/commonjs/mol-gl/renderable/points.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/points.js +2 -2
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/commonjs/mol-gl/renderable/schema.js +6 -12
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +41 -33
- package/lib/commonjs/mol-gl/renderable/spheres.js +4 -4
- package/lib/commonjs/mol-gl/renderable/text.d.ts +10 -4
- package/lib/commonjs/mol-gl/renderable/text.js +2 -2
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +13 -5
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/commonjs/mol-gl/renderable.d.ts +0 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +12 -12
- package/lib/commonjs/mol-gl/renderer.js +12 -74
- package/lib/commonjs/mol-gl/scene.d.ts +2 -2
- package/lib/commonjs/mol-gl/scene.js +7 -5
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.vert.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/mesh.vert.js +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader-code.d.ts +3 -1
- package/lib/commonjs/mol-gl/shader-code.js +42 -13
- package/lib/commonjs/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/commonjs/mol-gl/webgl/render-item.js +10 -8
- package/lib/commonjs/mol-gl/webgl/resources.js +8 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/commonjs/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/commonjs/mol-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/commonjs/mol-math/linear-algebra/3d/quat.js +20 -1
- package/lib/commonjs/mol-model/structure/model/model.d.ts +1 -0
- package/lib/commonjs/mol-model/structure/model/model.js +15 -5
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/commonjs/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-derived.js +4 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/commonjs/mol-model/structure/model/types.js +9 -0
- package/lib/commonjs/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/commonjs/mol-model-formats/shape/ply.d.ts +26 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +39 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/commonjs/mol-plugin/commands.d.ts +4 -4
- package/lib/commonjs/mol-plugin/config.d.ts +2 -0
- package/lib/commonjs/mol-plugin/config.js +10 -3
- package/lib/commonjs/mol-plugin/spec.js +1 -0
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +21 -0
- package/lib/commonjs/mol-plugin-state/actions/structure.d.ts +7 -1
- package/lib/commonjs/mol-plugin-state/actions/structure.js +150 -72
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy-preset.js +13 -8
- package/lib/commonjs/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/commonjs/mol-plugin-state/helpers/structure-selection-query.js +33 -19
- package/lib/commonjs/mol-plugin-state/manager/structure/component.d.ts +15 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +13 -8
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +54 -0
- package/lib/commonjs/mol-plugin-ui/controls/parameters.d.ts +3 -2
- package/lib/commonjs/mol-plugin-ui/controls/parameters.js +11 -6
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/hooks/use-behavior.js +8 -17
- package/lib/commonjs/mol-plugin-ui/index.d.ts +4 -4
- package/lib/commonjs/mol-plugin-ui/index.js +13 -16
- package/lib/commonjs/mol-plugin-ui/plugin.d.ts +1 -1
- package/lib/commonjs/mol-plugin-ui/plugin.js +76 -10
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +11 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +13 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +72 -0
- package/lib/commonjs/mol-repr/structure/params.d.ts +96 -0
- package/lib/commonjs/mol-repr/structure/registry.d.ts +175 -1
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +36 -3
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +33 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.js +2 -1
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +39 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +96 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +13 -2
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +2 -2
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/polymer-tube-mesh.d.ts +13 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/commonjs/mol-repr/visual.js +11 -7
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +33 -0
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +76 -0
- package/lib/commonjs/mol-repr/volume/isosurface.js +2 -1
- package/lib/commonjs/mol-repr/volume/registry.d.ts +35 -0
- package/lib/commonjs/mol-repr/volume/representation.d.ts +11 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +33 -0
- package/lib/commonjs/mol-theme/clipping.d.ts +7 -15
- package/lib/commonjs/mol-theme/clipping.js +5 -12
- package/lib/commonjs/mol-theme/color/illustrative.d.ts +2 -0
- package/lib/commonjs/mol-theme/color/illustrative.js +2 -2
- package/lib/commonjs/mol-theme/color.d.ts +1 -0
- package/lib/commonjs/mol-util/clip.d.ts +49 -0
- package/lib/commonjs/mol-util/clip.js +97 -0
- package/lib/commonjs/mol-util/material.d.ts +5 -1
- package/lib/commonjs/mol-util/material.js +9 -7
- package/lib/examples/alpha-orbitals/index.html +1 -0
- package/lib/examples/alpha-orbitals/index.js +3 -4
- package/lib/examples/basic-wrapper/index.html +3 -2
- package/lib/examples/basic-wrapper/index.js +24 -12
- package/lib/examples/lighting/index.d.ts +1 -1
- package/lib/examples/lighting/index.html +4 -2
- package/lib/examples/lighting/index.js +59 -42
- package/lib/examples/proteopedia-wrapper/index.html +4 -3
- package/lib/examples/proteopedia-wrapper/index.js +27 -15
- package/lib/extensions/alpha-orbitals/transforms.d.ts +0 -1
- package/lib/extensions/alpha-orbitals/transforms.js +1 -14
- package/lib/extensions/anvil/behavior.d.ts +7 -0
- package/lib/extensions/anvil/representation.d.ts +63 -0
- package/lib/extensions/cellpack/representation.d.ts +13 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +39 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.d.ts +68 -0
- package/lib/extensions/model-archive/quality-assessment/behavior.js +233 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.d.ts +14 -0
- package/lib/extensions/model-archive/quality-assessment/color/plddt.js +120 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.d.ts +12 -0
- package/lib/extensions/model-archive/quality-assessment/color/qmean.js +106 -0
- package/lib/extensions/model-archive/quality-assessment/prop.d.ts +28 -0
- package/lib/extensions/model-archive/quality-assessment/prop.js +127 -0
- package/lib/extensions/mp4-export/controls.d.ts +1 -0
- package/lib/extensions/mp4-export/controls.js +9 -7
- package/lib/extensions/pdbe/structure-quality-report/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/behavior.d.ts +7 -0
- package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +13 -0
- package/lib/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +65 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +8 -8
- package/lib/mol-canvas3d/canvas3d.js +12 -4
- package/lib/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +7 -0
- package/lib/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +7 -0
- package/lib/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/mol-canvas3d/helper/helper.d.ts +6 -0
- package/lib/mol-canvas3d/passes/image.d.ts +4 -0
- package/lib/mol-canvas3d/passes/multi-sample.d.ts +2 -1
- package/lib/mol-canvas3d/passes/multi-sample.js +4 -2
- package/lib/mol-canvas3d/passes/pick.js +9 -9
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +6 -4
- package/lib/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/mol-geo/geometry/base.d.ts +20 -0
- package/lib/mol-geo/geometry/base.js +20 -1
- package/lib/mol-geo/geometry/clipping-data.d.ts +1 -3
- package/lib/mol-geo/geometry/clipping-data.js +3 -8
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +14 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +5 -3
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +11 -0
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +2 -2
- package/lib/mol-geo/geometry/image/image.d.ts +11 -0
- package/lib/mol-geo/geometry/lines/lines.d.ts +12 -0
- package/lib/mol-geo/geometry/lines/lines.js +1 -1
- package/lib/mol-geo/geometry/marker-data.d.ts +0 -1
- package/lib/mol-geo/geometry/marker-data.js +0 -4
- package/lib/mol-geo/geometry/mesh/color-smoothing.js +1 -1
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +13 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +5 -3
- package/lib/mol-geo/geometry/points/points.d.ts +11 -0
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +13 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +5 -3
- package/lib/mol-geo/geometry/substance-data.js +3 -3
- package/lib/mol-geo/geometry/text/text.d.ts +11 -0
- package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +3 -3
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +13 -0
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +5 -3
- package/lib/mol-gl/render-object.d.ts +2 -1
- package/lib/mol-gl/render-object.js +10 -10
- package/lib/mol-gl/renderable/cylinders.d.ts +41 -33
- package/lib/mol-gl/renderable/cylinders.js +5 -5
- package/lib/mol-gl/renderable/direct-volume.d.ts +11 -5
- package/lib/mol-gl/renderable/direct-volume.js +3 -3
- package/lib/mol-gl/renderable/image.d.ts +10 -4
- package/lib/mol-gl/renderable/image.js +2 -2
- package/lib/mol-gl/renderable/lines.d.ts +38 -32
- package/lib/mol-gl/renderable/lines.js +4 -4
- package/lib/mol-gl/renderable/mesh.d.ts +38 -30
- package/lib/mol-gl/renderable/mesh.js +5 -5
- package/lib/mol-gl/renderable/points.d.ts +10 -4
- package/lib/mol-gl/renderable/points.js +2 -2
- package/lib/mol-gl/renderable/schema.d.ts +10 -11
- package/lib/mol-gl/renderable/schema.js +6 -12
- package/lib/mol-gl/renderable/spheres.d.ts +41 -33
- package/lib/mol-gl/renderable/spheres.js +5 -5
- package/lib/mol-gl/renderable/text.d.ts +10 -4
- package/lib/mol-gl/renderable/text.js +2 -2
- package/lib/mol-gl/renderable/texture-mesh.d.ts +13 -5
- package/lib/mol-gl/renderable/texture-mesh.js +3 -3
- package/lib/mol-gl/renderable.d.ts +0 -1
- package/lib/mol-gl/renderer.d.ts +12 -12
- package/lib/mol-gl/renderer.js +13 -75
- package/lib/mol-gl/scene.d.ts +2 -2
- package/lib/mol-gl/scene.js +7 -5
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-light-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-color-varying.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-marker-varying.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/color-vert-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-vert-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/light-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/cylinders.frag.d.ts +1 -1
- package/lib/mol-gl/shader/cylinders.frag.js +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.frag.js +1 -1
- package/lib/mol-gl/shader/mesh.frag.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.frag.js +1 -1
- package/lib/mol-gl/shader/mesh.vert.d.ts +1 -1
- package/lib/mol-gl/shader/mesh.vert.js +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/mol-gl/shader/spheres.frag.d.ts +1 -1
- package/lib/mol-gl/shader/spheres.frag.js +1 -1
- package/lib/mol-gl/shader-code.d.ts +3 -1
- package/lib/mol-gl/shader-code.js +42 -13
- package/lib/mol-gl/webgl/render-item.d.ts +7 -6
- package/lib/mol-gl/webgl/render-item.js +8 -6
- package/lib/mol-gl/webgl/resources.js +8 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +326 -1
- package/lib/mol-io/reader/cif/schema/mmcif.js +326 -1
- package/lib/mol-math/geometry/symmetry-operator.js +3 -2
- package/lib/mol-math/linear-algebra/3d/quat.d.ts +9 -1
- package/lib/mol-math/linear-algebra/3d/quat.js +20 -1
- package/lib/mol-model/structure/model/model.d.ts +1 -0
- package/lib/mol-model/structure/model/model.js +15 -5
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.d.ts +6 -1
- package/lib/mol-model/structure/model/properties/atomic/hierarchy.js +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-derived.js +5 -2
- package/lib/mol-model/structure/model/properties/utils/atomic-index.d.ts +1 -1
- package/lib/mol-model/structure/model/properties/utils/atomic-index.js +12 -1
- package/lib/mol-model/structure/model/types.js +9 -0
- package/lib/mol-model/structure/structure/unit/rings.js +2 -0
- package/lib/mol-model-formats/shape/ply.d.ts +26 -0
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +13 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +13 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +39 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +52 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +12 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/mol-plugin/commands.d.ts +4 -4
- package/lib/mol-plugin/config.d.ts +2 -0
- package/lib/mol-plugin/config.js +9 -3
- package/lib/mol-plugin/spec.js +1 -0
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +21 -0
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/actions/structure.d.ts +7 -1
- package/lib/mol-plugin-state/actions/structure.js +150 -72
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.d.ts +5 -355
- package/lib/mol-plugin-state/builder/structure/hierarchy-preset.js +14 -9
- package/lib/mol-plugin-state/builder/structure/hierarchy.d.ts +1 -71
- package/lib/mol-plugin-state/helpers/structure-clipping.d.ts +1 -1
- package/lib/mol-plugin-state/helpers/structure-clipping.js +1 -1
- package/lib/mol-plugin-state/helpers/structure-selection-query.js +34 -20
- package/lib/mol-plugin-state/manager/structure/component.d.ts +15 -1
- package/lib/mol-plugin-state/manager/structure/component.js +14 -9
- package/lib/mol-plugin-state/transforms/representation.d.ts +54 -0
- package/lib/mol-plugin-ui/controls/parameters.d.ts +3 -2
- package/lib/mol-plugin-ui/controls/parameters.js +12 -7
- package/lib/mol-plugin-ui/hooks/use-behavior.d.ts +1 -1
- package/lib/mol-plugin-ui/hooks/use-behavior.js +9 -18
- package/lib/mol-plugin-ui/index.d.ts +4 -4
- package/lib/mol-plugin-ui/index.js +11 -13
- package/lib/mol-plugin-ui/plugin.d.ts +1 -1
- package/lib/mol-plugin-ui/plugin.js +76 -10
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +27 -0
- package/lib/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/mol-repr/shape/loci/angle.d.ts +13 -0
- package/lib/mol-repr/shape/loci/common.d.ts +11 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +13 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +11 -0
- package/lib/mol-repr/shape/loci/label.d.ts +11 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +13 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +13 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +13 -0
- package/lib/mol-repr/structure/complex-visual.d.ts +72 -0
- package/lib/mol-repr/structure/params.d.ts +96 -0
- package/lib/mol-repr/structure/registry.d.ts +175 -1
- package/lib/mol-repr/structure/representation/backbone.d.ts +39 -0
- package/lib/mol-repr/structure/representation/backbone.js +2 -1
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +39 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.js +2 -1
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +39 -0
- package/lib/mol-repr/structure/representation/carbohydrate.js +2 -1
- package/lib/mol-repr/structure/representation/cartoon.d.ts +39 -0
- package/lib/mol-repr/structure/representation/cartoon.js +2 -1
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +39 -0
- package/lib/mol-repr/structure/representation/ellipsoid.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +39 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.js +2 -1
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +33 -0
- package/lib/mol-repr/structure/representation/label.d.ts +36 -3
- package/lib/mol-repr/structure/representation/line.d.ts +33 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +39 -0
- package/lib/mol-repr/structure/representation/molecular-surface.js +2 -1
- package/lib/mol-repr/structure/representation/orientation.d.ts +39 -0
- package/lib/mol-repr/structure/representation/orientation.js +2 -1
- package/lib/mol-repr/structure/representation/point.d.ts +33 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +39 -0
- package/lib/mol-repr/structure/representation/putty.js +2 -1
- package/lib/mol-repr/structure/representation/spacefill.d.ts +39 -0
- package/lib/mol-repr/structure/representation/spacefill.js +2 -1
- package/lib/mol-repr/structure/units-visual.d.ts +96 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +26 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +11 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +26 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -2
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.d.ts +11 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-line.js +2 -2
- package/lib/mol-repr/structure/visual/carbohydrate-link-cylinder.d.ts +13 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +13 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +11 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +11 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +26 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +52 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +11 -0
- package/lib/mol-repr/structure/visual/label-text.d.ts +13 -2
- package/lib/mol-repr/structure/visual/label-text.js +2 -2
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +11 -0
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +26 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +26 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +13 -0
- package/lib/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/mol-repr/visual.js +11 -7
- package/lib/mol-repr/volume/direct-volume.d.ts +33 -0
- package/lib/mol-repr/volume/isosurface.d.ts +76 -0
- package/lib/mol-repr/volume/isosurface.js +2 -1
- package/lib/mol-repr/volume/registry.d.ts +35 -0
- package/lib/mol-repr/volume/representation.d.ts +11 -0
- package/lib/mol-repr/volume/slice.d.ts +33 -0
- package/lib/mol-theme/clipping.d.ts +7 -15
- package/lib/mol-theme/clipping.js +5 -12
- package/lib/mol-theme/color/illustrative.d.ts +2 -0
- package/lib/mol-theme/color/illustrative.js +2 -2
- package/lib/mol-theme/color.d.ts +1 -0
- package/lib/mol-util/clip.d.ts +49 -0
- package/lib/mol-util/clip.js +93 -0
- package/lib/mol-util/material.d.ts +5 -1
- package/lib/mol-util/material.js +9 -7
- package/package.json +5 -3
|
@@ -27,8 +27,8 @@ function getComposeRenderable(ctx, colorTexture) {
|
|
|
27
27
|
return (0, renderable_1.createComputeRenderable)(renderItem, values);
|
|
28
28
|
}
|
|
29
29
|
exports.MultiSampleParams = {
|
|
30
|
-
mode: param_definition_1.ParamDefinition.Select('
|
|
31
|
-
sampleLevel: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 5, step: 1 }),
|
|
30
|
+
mode: param_definition_1.ParamDefinition.Select('temporal', [['off', 'Off'], ['on', 'On'], ['temporal', 'Temporal']]),
|
|
31
|
+
sampleLevel: param_definition_1.ParamDefinition.Numeric(2, { min: 0, max: 5, step: 1 }, { description: 'Take level^2 samples.' }),
|
|
32
32
|
};
|
|
33
33
|
var MultiSamplePass = /** @class */ (function () {
|
|
34
34
|
function MultiSamplePass(webgl, drawPass) {
|
|
@@ -266,8 +266,10 @@ var MultiSampleHelper = /** @class */ (function () {
|
|
|
266
266
|
this.sampleIndex = -1;
|
|
267
267
|
return props.mode === 'temporal' ? this.sampleIndex !== -2 : false;
|
|
268
268
|
};
|
|
269
|
+
/** Return `true` while more samples are needed */
|
|
269
270
|
MultiSampleHelper.prototype.render = function (renderer, camera, scene, helper, toDrawingBuffer, transparentBackground, props) {
|
|
270
271
|
this.sampleIndex = this.multiSamplePass.render(this.sampleIndex, renderer, camera, scene, helper, toDrawingBuffer, transparentBackground, props);
|
|
272
|
+
return this.sampleIndex < 0;
|
|
271
273
|
};
|
|
272
274
|
return MultiSampleHelper;
|
|
273
275
|
}());
|
|
@@ -46,29 +46,29 @@ var PickPass = /** @class */ (function () {
|
|
|
46
46
|
this.depthPickTarget.setSize(this.pickWidth, this.pickHeight);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
PickPass.prototype.renderVariant = function (renderer, camera, scene, helper, variant) {
|
|
49
|
+
PickPass.prototype.renderVariant = function (renderer, camera, scene, helper, variant, pickType) {
|
|
50
50
|
var depth = this.drawPass.depthTexturePrimitives;
|
|
51
51
|
renderer.clear(false);
|
|
52
52
|
renderer.update(camera);
|
|
53
|
-
renderer.renderPick(scene.primitives, camera, variant, null);
|
|
54
|
-
renderer.renderPick(scene.volumes, camera, variant, depth);
|
|
55
|
-
renderer.renderPick(helper.handle.scene, camera, variant, null);
|
|
53
|
+
renderer.renderPick(scene.primitives, camera, variant, null, pickType);
|
|
54
|
+
renderer.renderPick(scene.volumes, camera, variant, depth, pickType);
|
|
55
|
+
renderer.renderPick(helper.handle.scene, camera, variant, null, pickType);
|
|
56
56
|
if (helper.camera.isEnabled) {
|
|
57
57
|
helper.camera.update(camera);
|
|
58
58
|
renderer.update(helper.camera.camera);
|
|
59
|
-
renderer.renderPick(helper.camera.scene, helper.camera.camera, variant, null);
|
|
59
|
+
renderer.renderPick(helper.camera.scene, helper.camera.camera, variant, null, pickType);
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
PickPass.prototype.render = function (renderer, camera, scene, helper) {
|
|
63
63
|
this.objectPickTarget.bind();
|
|
64
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
64
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 1 /* Object */);
|
|
65
65
|
this.instancePickTarget.bind();
|
|
66
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
66
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 2 /* Instance */);
|
|
67
67
|
this.groupPickTarget.bind();
|
|
68
|
-
this.renderVariant(renderer, camera, scene, helper, '
|
|
68
|
+
this.renderVariant(renderer, camera, scene, helper, 'pick', 3 /* Group */);
|
|
69
69
|
// printTexture(this.webgl, this.groupPickTarget.texture, { id: 'group' })
|
|
70
70
|
this.depthPickTarget.bind();
|
|
71
|
-
this.renderVariant(renderer, camera, scene, helper, 'depth');
|
|
71
|
+
this.renderVariant(renderer, camera, scene, helper, 'depth', 0 /* None */);
|
|
72
72
|
};
|
|
73
73
|
return PickPass;
|
|
74
74
|
}());
|
|
@@ -20,6 +20,7 @@ export declare const PostprocessingParams: {
|
|
|
20
20
|
outline: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
21
21
|
scale: number;
|
|
22
22
|
threshold: number;
|
|
23
|
+
color: Color;
|
|
23
24
|
}>, "on">>;
|
|
24
25
|
antialiasing: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
|
|
25
26
|
edgeThreshold: number;
|
|
@@ -34,7 +34,7 @@ function getOutlinesRenderable(ctx, depthTexture) {
|
|
|
34
34
|
}
|
|
35
35
|
var SsaoSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uSamples: (0, schema_1.UniformSpec)('v3[]'), dNSamples: (0, schema_1.DefineSpec)('number'), uProjection: (0, schema_1.UniformSpec)('m4'), uInvProjection: (0, schema_1.UniformSpec)('m4'), uBounds: (0, schema_1.UniformSpec)('v4'), uTexSize: (0, schema_1.UniformSpec)('v2'), uRadius: (0, schema_1.UniformSpec)('f'), uBias: (0, schema_1.UniformSpec)('f') });
|
|
36
36
|
function getSsaoRenderable(ctx, depthTexture) {
|
|
37
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tDepth: mol_util_1.ValueCell.create(depthTexture), uSamples: mol_util_1.ValueCell.create([0.0, 0.0, 1.0]), dNSamples: mol_util_1.ValueCell.create(
|
|
37
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tDepth: mol_util_1.ValueCell.create(depthTexture), uSamples: mol_util_1.ValueCell.create([0.0, 0.0, 1.0]), dNSamples: mol_util_1.ValueCell.create(32), uProjection: mol_util_1.ValueCell.create(linear_algebra_1.Mat4.identity()), uInvProjection: mol_util_1.ValueCell.create(linear_algebra_1.Mat4.identity()), uBounds: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ctx.gl.drawingBufferWidth, ctx.gl.drawingBufferHeight)), uRadius: mol_util_1.ValueCell.create(8.0), uBias: mol_util_1.ValueCell.create(0.025) });
|
|
38
38
|
var schema = (0, tslib_1.__assign)({}, SsaoSchema);
|
|
39
39
|
var shaderCode = (0, shader_code_1.ShaderCode)('ssao', quad_vert_1.quad_vert, ssao_frag_1.ssao_frag);
|
|
40
40
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -42,7 +42,7 @@ function getSsaoRenderable(ctx, depthTexture) {
|
|
|
42
42
|
}
|
|
43
43
|
var SsaoBlurSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), uKernel: (0, schema_1.UniformSpec)('f[]'), dOcclusionKernelSize: (0, schema_1.DefineSpec)('number'), uBlurDirectionX: (0, schema_1.UniformSpec)('f'), uBlurDirectionY: (0, schema_1.UniformSpec)('f'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uBounds: (0, schema_1.UniformSpec)('v4'), dOrthographic: (0, schema_1.DefineSpec)('number') });
|
|
44
44
|
function getSsaoBlurRenderable(ctx, ssaoDepthTexture, direction) {
|
|
45
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ssaoDepthTexture.getWidth(), ssaoDepthTexture.getHeight())), uKernel: mol_util_1.ValueCell.create([0.0]), dOcclusionKernelSize: mol_util_1.ValueCell.create(
|
|
45
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(ssaoDepthTexture.getWidth(), ssaoDepthTexture.getHeight())), uKernel: mol_util_1.ValueCell.create([0.0]), dOcclusionKernelSize: mol_util_1.ValueCell.create(15), uBlurDirectionX: mol_util_1.ValueCell.create(direction === 'horizontal' ? 1 : 0), uBlurDirectionY: mol_util_1.ValueCell.create(direction === 'vertical' ? 1 : 0), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), uNear: mol_util_1.ValueCell.create(0.0), uFar: mol_util_1.ValueCell.create(10000.0), uBounds: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dOrthographic: mol_util_1.ValueCell.create(0) });
|
|
46
46
|
var schema = (0, tslib_1.__assign)({}, SsaoBlurSchema);
|
|
47
47
|
var shaderCode = (0, shader_code_1.ShaderCode)('ssao_blur', quad_vert_1.quad_vert, ssao_blur_frag_1.ssaoBlur_frag);
|
|
48
48
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -68,9 +68,9 @@ function getSamples(vectorSamples, nSamples) {
|
|
|
68
68
|
}
|
|
69
69
|
return samples;
|
|
70
70
|
}
|
|
71
|
-
var PostprocessingSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uFogNear: (0, schema_1.UniformSpec)('f'), uFogFar: (0, schema_1.UniformSpec)('f'), uFogColor: (0, schema_1.UniformSpec)('v3'), uTransparentBackground: (0, schema_1.UniformSpec)('b'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), dOcclusionEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineScale: (0, schema_1.DefineSpec)('number'), uOutlineThreshold: (0, schema_1.UniformSpec)('f') });
|
|
71
|
+
var PostprocessingSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadSchema), { tSsaoDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tColor: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tDepth: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: (0, schema_1.UniformSpec)('v2'), dOrthographic: (0, schema_1.DefineSpec)('number'), uNear: (0, schema_1.UniformSpec)('f'), uFar: (0, schema_1.UniformSpec)('f'), uFogNear: (0, schema_1.UniformSpec)('f'), uFogFar: (0, schema_1.UniformSpec)('f'), uFogColor: (0, schema_1.UniformSpec)('v3'), uOutlineColor: (0, schema_1.UniformSpec)('v3'), uTransparentBackground: (0, schema_1.UniformSpec)('b'), uMaxPossibleViewZDiff: (0, schema_1.UniformSpec)('f'), dOcclusionEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineEnable: (0, schema_1.DefineSpec)('boolean'), dOutlineScale: (0, schema_1.DefineSpec)('number'), uOutlineThreshold: (0, schema_1.UniformSpec)('f') });
|
|
72
72
|
function getPostprocessingRenderable(ctx, colorTexture, depthTexture, outlinesTexture, ssaoDepthTexture) {
|
|
73
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepth: mol_util_1.ValueCell.create(depthTexture), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(
|
|
73
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tSsaoDepth: mol_util_1.ValueCell.create(ssaoDepthTexture), tColor: mol_util_1.ValueCell.create(colorTexture), tDepth: mol_util_1.ValueCell.create(depthTexture), tOutlines: mol_util_1.ValueCell.create(outlinesTexture), uTexSize: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: mol_util_1.ValueCell.create(0), uNear: mol_util_1.ValueCell.create(1), uFar: mol_util_1.ValueCell.create(10000), uFogNear: mol_util_1.ValueCell.create(10000), uFogFar: mol_util_1.ValueCell.create(10000), uFogColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(1, 1, 1)), uOutlineColor: mol_util_1.ValueCell.create(linear_algebra_1.Vec3.create(0, 0, 0)), uTransparentBackground: mol_util_1.ValueCell.create(false), uMaxPossibleViewZDiff: mol_util_1.ValueCell.create(0.5), dOcclusionEnable: mol_util_1.ValueCell.create(true), dOutlineEnable: mol_util_1.ValueCell.create(false), dOutlineScale: mol_util_1.ValueCell.create(1), uOutlineThreshold: mol_util_1.ValueCell.create(0.33) });
|
|
74
74
|
var schema = (0, tslib_1.__assign)({}, PostprocessingSchema);
|
|
75
75
|
var shaderCode = (0, shader_code_1.ShaderCode)('postprocessing', quad_vert_1.quad_vert, postprocessing_frag_1.postprocessing_frag);
|
|
76
76
|
var renderItem = (0, render_item_1.createComputeRenderItem)(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -90,6 +90,7 @@ exports.PostprocessingParams = {
|
|
|
90
90
|
on: param_definition_1.ParamDefinition.Group({
|
|
91
91
|
scale: param_definition_1.ParamDefinition.Numeric(1, { min: 1, max: 5, step: 1 }),
|
|
92
92
|
threshold: param_definition_1.ParamDefinition.Numeric(0.33, { min: 0.01, max: 1, step: 0.01 }),
|
|
93
|
+
color: param_definition_1.ParamDefinition.Color((0, color_1.Color)(0x000000)),
|
|
93
94
|
}),
|
|
94
95
|
off: param_definition_1.ParamDefinition.Group({})
|
|
95
96
|
}, { cycle: true, description: 'Draw outline around 3D objects' }),
|
|
@@ -223,6 +224,7 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
223
224
|
mol_util_1.ValueCell.updateIfChanged(this.outlinesRenderable.values.uNear, camera.near);
|
|
224
225
|
mol_util_1.ValueCell.updateIfChanged(this.outlinesRenderable.values.uFar, camera.far);
|
|
225
226
|
mol_util_1.ValueCell.updateIfChanged(this.outlinesRenderable.values.uMaxPossibleViewZDiff, maxPossibleViewZDiff);
|
|
227
|
+
mol_util_1.ValueCell.update(this.renderable.values.uOutlineColor, color_1.Color.toVec3Normalized(this.renderable.values.uOutlineColor.ref.value, props.outline.params.color));
|
|
226
228
|
mol_util_1.ValueCell.updateIfChanged(this.renderable.values.uMaxPossibleViewZDiff, maxPossibleViewZDiff);
|
|
227
229
|
if (this.renderable.values.dOutlineScale.ref.value !== outlineScale) {
|
|
228
230
|
needsUpdateMain = true;
|
|
@@ -138,7 +138,7 @@ function getWeightsRenderable(ctx, edgesTexture) {
|
|
|
138
138
|
var height = edgesTexture.getHeight();
|
|
139
139
|
var areaTexture = (0, texture_1.createTexture)(ctx.gl, ctx.extensions, 'image-uint8', 'rgb', 'ubyte', 'linear');
|
|
140
140
|
var searchTexture = (0, texture_1.createTexture)(ctx.gl, ctx.extensions, 'image-uint8', 'rgba', 'ubyte', 'nearest');
|
|
141
|
-
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tEdges: mol_util_1.ValueCell.create(edgesTexture), tArea: mol_util_1.ValueCell.create(areaTexture), tSearch: mol_util_1.ValueCell.create(searchTexture), uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)), uViewport: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dMaxSearchSteps: mol_util_1.ValueCell.create(
|
|
141
|
+
var values = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, util_1.QuadValues), { tEdges: mol_util_1.ValueCell.create(edgesTexture), tArea: mol_util_1.ValueCell.create(areaTexture), tSearch: mol_util_1.ValueCell.create(searchTexture), uTexSizeInv: mol_util_1.ValueCell.create(linear_algebra_1.Vec2.create(1 / width, 1 / height)), uViewport: mol_util_1.ValueCell.create((0, linear_algebra_1.Vec4)()), dMaxSearchSteps: mol_util_1.ValueCell.create(16) });
|
|
142
142
|
// Note: loading image textures requires `HTMLImageElement` to be available
|
|
143
143
|
(0, texture_1.loadImageTexture)(getAreaTexture(), values.tArea, areaTexture);
|
|
144
144
|
(0, texture_1.loadImageTexture)(getSearchTexture(), values.tSearch, searchTexture);
|
|
@@ -10,6 +10,7 @@ import { LocationIterator } from '../util/location-iterator';
|
|
|
10
10
|
import { ParamDefinition as PD } from '../../mol-util/param-definition';
|
|
11
11
|
import { TransformData } from './transform-data';
|
|
12
12
|
import { Theme } from '../../mol-theme/theme';
|
|
13
|
+
import { Clip } from '../../mol-util/clip';
|
|
13
14
|
export declare const VisualQualityInfo: {
|
|
14
15
|
custom: {};
|
|
15
16
|
auto: {};
|
|
@@ -46,6 +47,17 @@ export declare namespace BaseGeometry {
|
|
|
46
47
|
material: PD.Group<PD.Normalize<{
|
|
47
48
|
metalness: number;
|
|
48
49
|
roughness: number;
|
|
50
|
+
bumpiness: number;
|
|
51
|
+
}>>;
|
|
52
|
+
clip: PD.Group<PD.Normalize<{
|
|
53
|
+
variant: Clip.Variant;
|
|
54
|
+
objects: PD.Normalize<{
|
|
55
|
+
type: any;
|
|
56
|
+
invert: any;
|
|
57
|
+
position: any;
|
|
58
|
+
rotation: any;
|
|
59
|
+
scale: any;
|
|
60
|
+
}>[];
|
|
49
61
|
}>>;
|
|
50
62
|
};
|
|
51
63
|
type Params = typeof Params;
|
|
@@ -68,7 +80,15 @@ export declare namespace BaseGeometry {
|
|
|
68
80
|
drawCount: ValueCell<number, never>;
|
|
69
81
|
uMetalness: ValueCell<number, never>;
|
|
70
82
|
uRoughness: ValueCell<number, never>;
|
|
83
|
+
uBumpiness: ValueCell<number, never>;
|
|
71
84
|
dLightCount: ValueCell<number, never>;
|
|
85
|
+
dClipObjectCount: ValueCell<number, never>;
|
|
86
|
+
dClipVariant: ValueCell<Clip.Variant, never>;
|
|
87
|
+
uClipObjectType: ValueCell<number[], never>;
|
|
88
|
+
uClipObjectInvert: ValueCell<boolean[], never>;
|
|
89
|
+
uClipObjectPosition: ValueCell<number[], never>;
|
|
90
|
+
uClipObjectRotation: ValueCell<number[], never>;
|
|
91
|
+
uClipObjectScale: ValueCell<number[], never>;
|
|
72
92
|
};
|
|
73
93
|
function updateValues(values: BaseValues, props: PD.Values<Params>): void;
|
|
74
94
|
function createRenderableState(props?: Partial<PD.Values<Params>>): RenderableState;
|
|
@@ -16,6 +16,7 @@ var uniform_1 = require("../../mol-theme/color/uniform");
|
|
|
16
16
|
var uniform_2 = require("../../mol-theme/size/uniform");
|
|
17
17
|
var interpolate_1 = require("../../mol-math/interpolate");
|
|
18
18
|
var material_1 = require("../../mol-util/material");
|
|
19
|
+
var clip_1 = require("../../mol-util/clip");
|
|
19
20
|
exports.VisualQualityInfo = {
|
|
20
21
|
'custom': {},
|
|
21
22
|
'auto': {},
|
|
@@ -76,6 +77,7 @@ var BaseGeometry;
|
|
|
76
77
|
alpha: param_definition_1.ParamDefinition.Numeric(1, { min: 0, max: 1, step: 0.01 }, { label: 'Opacity', isEssential: true, description: 'How opaque/transparent the representation is rendered.' }),
|
|
77
78
|
quality: param_definition_1.ParamDefinition.Select('auto', exports.VisualQualityOptions, { isEssential: true, description: 'Visual/rendering quality of the representation.' }),
|
|
78
79
|
material: material_1.Material.getParam(),
|
|
80
|
+
clip: param_definition_1.ParamDefinition.Group(clip_1.Clip.Params),
|
|
79
81
|
};
|
|
80
82
|
function createSimple(colorValue, sizeValue, transform) {
|
|
81
83
|
if (colorValue === void 0) { colorValue = names_1.ColorNames.grey; }
|
|
@@ -91,6 +93,7 @@ var BaseGeometry;
|
|
|
91
93
|
}
|
|
92
94
|
BaseGeometry.createSimple = createSimple;
|
|
93
95
|
function createValues(props, counts) {
|
|
96
|
+
var clip = clip_1.Clip.getClip(props.clip);
|
|
94
97
|
return {
|
|
95
98
|
alpha: mol_util_1.ValueCell.create(props.alpha),
|
|
96
99
|
uAlpha: mol_util_1.ValueCell.create(props.alpha),
|
|
@@ -99,7 +102,15 @@ var BaseGeometry;
|
|
|
99
102
|
drawCount: mol_util_1.ValueCell.create(counts.drawCount),
|
|
100
103
|
uMetalness: mol_util_1.ValueCell.create(props.material.metalness),
|
|
101
104
|
uRoughness: mol_util_1.ValueCell.create(props.material.roughness),
|
|
105
|
+
uBumpiness: mol_util_1.ValueCell.create(props.material.bumpiness),
|
|
102
106
|
dLightCount: mol_util_1.ValueCell.create(1),
|
|
107
|
+
dClipObjectCount: mol_util_1.ValueCell.create(clip.objects.count),
|
|
108
|
+
dClipVariant: mol_util_1.ValueCell.create(clip.variant),
|
|
109
|
+
uClipObjectType: mol_util_1.ValueCell.create(clip.objects.type),
|
|
110
|
+
uClipObjectInvert: mol_util_1.ValueCell.create(clip.objects.invert),
|
|
111
|
+
uClipObjectPosition: mol_util_1.ValueCell.create(clip.objects.position),
|
|
112
|
+
uClipObjectRotation: mol_util_1.ValueCell.create(clip.objects.rotation),
|
|
113
|
+
uClipObjectScale: mol_util_1.ValueCell.create(clip.objects.scale),
|
|
103
114
|
};
|
|
104
115
|
}
|
|
105
116
|
BaseGeometry.createValues = createValues;
|
|
@@ -107,6 +118,15 @@ var BaseGeometry;
|
|
|
107
118
|
mol_util_1.ValueCell.updateIfChanged(values.alpha, props.alpha); // `uAlpha` is set in renderable.render
|
|
108
119
|
mol_util_1.ValueCell.updateIfChanged(values.uMetalness, props.material.metalness);
|
|
109
120
|
mol_util_1.ValueCell.updateIfChanged(values.uRoughness, props.material.roughness);
|
|
121
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpiness, props.material.bumpiness);
|
|
122
|
+
var clip = clip_1.Clip.getClip(props.clip);
|
|
123
|
+
mol_util_1.ValueCell.update(values.dClipObjectCount, clip.objects.count);
|
|
124
|
+
mol_util_1.ValueCell.update(values.dClipVariant, clip.variant);
|
|
125
|
+
mol_util_1.ValueCell.update(values.uClipObjectType, clip.objects.type);
|
|
126
|
+
mol_util_1.ValueCell.update(values.uClipObjectInvert, clip.objects.invert);
|
|
127
|
+
mol_util_1.ValueCell.update(values.uClipObjectPosition, clip.objects.position);
|
|
128
|
+
mol_util_1.ValueCell.update(values.uClipObjectRotation, clip.objects.rotation);
|
|
129
|
+
mol_util_1.ValueCell.update(values.uClipObjectScale, clip.objects.scale);
|
|
110
130
|
}
|
|
111
131
|
BaseGeometry.updateValues = updateValues;
|
|
112
132
|
function createRenderableState(props) {
|
|
@@ -120,7 +140,6 @@ var BaseGeometry;
|
|
|
120
140
|
colorOnly: false,
|
|
121
141
|
opaque: opaque,
|
|
122
142
|
writeDepth: opaque,
|
|
123
|
-
noClip: false,
|
|
124
143
|
};
|
|
125
144
|
}
|
|
126
145
|
BaseGeometry.createRenderableState = createRenderableState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
2
|
+
* Copyright (c) 2020-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -8,8 +8,6 @@ import { Vec2 } from '../../mol-math/linear-algebra';
|
|
|
8
8
|
import { TextureImage } from '../../mol-gl/renderable/util';
|
|
9
9
|
import { Clipping } from '../../mol-theme/clipping';
|
|
10
10
|
export declare type ClippingData = {
|
|
11
|
-
dClipObjectCount: ValueCell<number>;
|
|
12
|
-
dClipVariant: ValueCell<string>;
|
|
13
11
|
tClipping: ValueCell<TextureImage<Uint8Array>>;
|
|
14
12
|
uClippingTexDim: ValueCell<Vec2>;
|
|
15
13
|
dClipping: ValueCell<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
* Copyright (c) 2020-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
4
4
|
*
|
|
5
5
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
6
6
|
*/
|
|
@@ -10,9 +10,7 @@ var value_cell_1 = require("../../mol-util/value-cell");
|
|
|
10
10
|
var linear_algebra_1 = require("../../mol-math/linear-algebra");
|
|
11
11
|
var util_1 = require("../../mol-gl/renderable/util");
|
|
12
12
|
function applyClippingGroups(array, start, end, groups) {
|
|
13
|
-
|
|
14
|
-
array[i] = groups;
|
|
15
|
-
}
|
|
13
|
+
array.fill(groups, start, end);
|
|
16
14
|
return true;
|
|
17
15
|
}
|
|
18
16
|
exports.applyClippingGroups = applyClippingGroups;
|
|
@@ -30,8 +28,6 @@ function createClipping(count, clippingData) {
|
|
|
30
28
|
}
|
|
31
29
|
else {
|
|
32
30
|
return {
|
|
33
|
-
dClipObjectCount: value_cell_1.ValueCell.create(0),
|
|
34
|
-
dClipVariant: value_cell_1.ValueCell.create('instance'),
|
|
35
31
|
tClipping: value_cell_1.ValueCell.create(clipping),
|
|
36
32
|
uClippingTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(clipping.width, clipping.height)),
|
|
37
33
|
dClipping: value_cell_1.ValueCell.create(count > 0),
|
|
@@ -44,12 +40,11 @@ function createEmptyClipping(clippingData) {
|
|
|
44
40
|
if (clippingData) {
|
|
45
41
|
value_cell_1.ValueCell.update(clippingData.tClipping, emptyClippingTexture);
|
|
46
42
|
value_cell_1.ValueCell.update(clippingData.uClippingTexDim, linear_algebra_1.Vec2.create(1, 1));
|
|
43
|
+
value_cell_1.ValueCell.updateIfChanged(clippingData.dClipping, false);
|
|
47
44
|
return clippingData;
|
|
48
45
|
}
|
|
49
46
|
else {
|
|
50
47
|
return {
|
|
51
|
-
dClipObjectCount: value_cell_1.ValueCell.create(0),
|
|
52
|
-
dClipVariant: value_cell_1.ValueCell.create('instance'),
|
|
53
48
|
tClipping: value_cell_1.ValueCell.create(emptyClippingTexture),
|
|
54
49
|
uClippingTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(1, 1)),
|
|
55
50
|
dClipping: value_cell_1.ValueCell.create(false),
|
|
@@ -43,11 +43,24 @@ export declare namespace Cylinders {
|
|
|
43
43
|
doubleSided: PD.BooleanParam;
|
|
44
44
|
ignoreLight: PD.BooleanParam;
|
|
45
45
|
xrayShaded: PD.BooleanParam;
|
|
46
|
+
bumpFrequency: PD.Numeric;
|
|
47
|
+
bumpAmplitude: PD.Numeric;
|
|
46
48
|
alpha: PD.Numeric;
|
|
47
49
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
48
50
|
material: PD.Group<PD.Normalize<{
|
|
49
|
-
metalness: number;
|
|
51
|
+
metalness: number; /** Number of cylinders */
|
|
50
52
|
roughness: number;
|
|
53
|
+
bumpiness: number;
|
|
54
|
+
}>>;
|
|
55
|
+
clip: PD.Group<PD.Normalize<{
|
|
56
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
57
|
+
objects: PD.Normalize<{
|
|
58
|
+
type: any;
|
|
59
|
+
invert: any;
|
|
60
|
+
position: any;
|
|
61
|
+
rotation: any;
|
|
62
|
+
scale: any;
|
|
63
|
+
}>[];
|
|
51
64
|
}>>;
|
|
52
65
|
};
|
|
53
66
|
type Params = typeof Params;
|
|
@@ -110,7 +110,7 @@ var Cylinders;
|
|
|
110
110
|
}
|
|
111
111
|
Cylinders.transform = transform;
|
|
112
112
|
//
|
|
113
|
-
Cylinders.Params = (0, tslib_1.__assign)((0, 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) });
|
|
113
|
+
Cylinders.Params = (0, tslib_1.__assign)((0, 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,7 +156,7 @@ var Cylinders;
|
|
|
156
156
|
var padding = (0, size_data_1.getMaxSize)(size) * props.sizeFactor;
|
|
157
157
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(cylinders.boundingSphere);
|
|
158
158
|
var boundingSphere = (0, util_2.calculateTransformBoundingSphere)(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
159
|
-
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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),
|
|
159
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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);
|
|
@@ -166,9 +166,11 @@ var Cylinders;
|
|
|
166
166
|
function updateValues(values, props) {
|
|
167
167
|
base_1.BaseGeometry.updateValues(values, props);
|
|
168
168
|
mol_util_1.ValueCell.updateIfChanged(values.uSizeFactor, props.sizeFactor * props.sizeAspectRatio);
|
|
169
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
169
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
170
170
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
171
171
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
172
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
173
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
172
174
|
}
|
|
173
175
|
function updateBoundingSphere(values, cylinders) {
|
|
174
176
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(cylinders.boundingSphere);
|
|
@@ -76,6 +76,17 @@ export declare namespace DirectVolume {
|
|
|
76
76
|
material: PD.Group<PD.Normalize<{
|
|
77
77
|
metalness: number;
|
|
78
78
|
roughness: number;
|
|
79
|
+
bumpiness: number;
|
|
80
|
+
}>>;
|
|
81
|
+
clip: PD.Group<PD.Normalize<{
|
|
82
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
83
|
+
objects: PD.Normalize<{
|
|
84
|
+
type: any;
|
|
85
|
+
invert: any;
|
|
86
|
+
position: any;
|
|
87
|
+
rotation: any;
|
|
88
|
+
scale: any;
|
|
89
|
+
}>[];
|
|
79
90
|
}>>;
|
|
80
91
|
};
|
|
81
92
|
type Params = typeof Params;
|
|
@@ -207,7 +207,7 @@ var DirectVolume;
|
|
|
207
207
|
var singleLayer = props.renderMode.name === 'isosurface'
|
|
208
208
|
? props.renderMode.params.singleLayer
|
|
209
209
|
: false;
|
|
210
|
-
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, 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)), uIsoValue: mol_util_1.ValueCell.create(getNormalizedIsoValue((0, linear_algebra_1.Vec2)(), isoValue, directVolume.gridStats.ref.value)), 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, dRenderMode: mol_util_1.ValueCell.create(props.renderMode.name), 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, dSingleLayer: mol_util_1.ValueCell.create(singleLayer),
|
|
210
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, 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)), uIsoValue: mol_util_1.ValueCell.create(getNormalizedIsoValue((0, linear_algebra_1.Vec2)(), isoValue, directVolume.gridStats.ref.value)), 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, dRenderMode: mol_util_1.ValueCell.create(props.renderMode.name), 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, dSingleLayer: mol_util_1.ValueCell.create(singleLayer), 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) });
|
|
211
211
|
}
|
|
212
212
|
function createValuesSimple(directVolume, props, colorValue, sizeValue, transform) {
|
|
213
213
|
var s = base_1.BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -216,7 +216,7 @@ var DirectVolume;
|
|
|
216
216
|
}
|
|
217
217
|
function updateValues(values, props) {
|
|
218
218
|
base_1.BaseGeometry.updateValues(values, props);
|
|
219
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
219
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
220
220
|
mol_util_1.ValueCell.updateIfChanged(values.dFlatShaded, props.flatShaded);
|
|
221
221
|
mol_util_1.ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
|
|
222
222
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
@@ -37,6 +37,17 @@ declare namespace Image {
|
|
|
37
37
|
material: PD.Group<PD.Normalize<{
|
|
38
38
|
metalness: number;
|
|
39
39
|
roughness: number;
|
|
40
|
+
bumpiness: number;
|
|
41
|
+
}>>;
|
|
42
|
+
clip: PD.Group<PD.Normalize<{
|
|
43
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
44
|
+
objects: PD.Normalize<{
|
|
45
|
+
type: any;
|
|
46
|
+
invert: any;
|
|
47
|
+
position: any;
|
|
48
|
+
rotation: any;
|
|
49
|
+
scale: any;
|
|
50
|
+
}>[];
|
|
40
51
|
}>>;
|
|
41
52
|
};
|
|
42
53
|
type Params = typeof Params;
|
|
@@ -44,6 +44,18 @@ export declare namespace Lines {
|
|
|
44
44
|
material: PD.Group<PD.Normalize<{
|
|
45
45
|
metalness: number;
|
|
46
46
|
roughness: number;
|
|
47
|
+
/** Number of lines */
|
|
48
|
+
bumpiness: number;
|
|
49
|
+
}>>;
|
|
50
|
+
clip: PD.Group<PD.Normalize<{
|
|
51
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
52
|
+
objects: PD.Normalize<{
|
|
53
|
+
type: any;
|
|
54
|
+
invert: any;
|
|
55
|
+
position: any;
|
|
56
|
+
rotation: any;
|
|
57
|
+
scale: any;
|
|
58
|
+
}>[];
|
|
47
59
|
}>>;
|
|
48
60
|
};
|
|
49
61
|
type Params = typeof Params;
|
|
@@ -168,7 +168,7 @@ 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 (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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),
|
|
171
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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);
|
|
@@ -10,7 +10,6 @@ export declare type MarkerData = {
|
|
|
10
10
|
uMarker: ValueCell<number>;
|
|
11
11
|
tMarker: ValueCell<TextureImage<Uint8Array>>;
|
|
12
12
|
uMarkerTexDim: ValueCell<Vec2>;
|
|
13
|
-
dMarkerType: ValueCell<string>;
|
|
14
13
|
markerAverage: ValueCell<number>;
|
|
15
14
|
markerStatus: ValueCell<number>;
|
|
16
15
|
};
|
|
@@ -56,7 +56,6 @@ function createMarkers(count, markerData) {
|
|
|
56
56
|
value_cell_1.ValueCell.updateIfChanged(markerData.uMarker, 0);
|
|
57
57
|
value_cell_1.ValueCell.update(markerData.tMarker, markers);
|
|
58
58
|
value_cell_1.ValueCell.update(markerData.uMarkerTexDim, linear_algebra_1.Vec2.create(markers.width, markers.height));
|
|
59
|
-
value_cell_1.ValueCell.updateIfChanged(markerData.dMarkerType, status === -1 ? 'groupInstance' : 'uniform');
|
|
60
59
|
value_cell_1.ValueCell.updateIfChanged(markerData.markerAverage, average);
|
|
61
60
|
value_cell_1.ValueCell.updateIfChanged(markerData.markerStatus, status);
|
|
62
61
|
return markerData;
|
|
@@ -68,7 +67,6 @@ function createMarkers(count, markerData) {
|
|
|
68
67
|
uMarkerTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(markers.width, markers.height)),
|
|
69
68
|
markerAverage: value_cell_1.ValueCell.create(average),
|
|
70
69
|
markerStatus: value_cell_1.ValueCell.create(status),
|
|
71
|
-
dMarkerType: value_cell_1.ValueCell.create('uniform'),
|
|
72
70
|
};
|
|
73
71
|
}
|
|
74
72
|
}
|
|
@@ -79,7 +77,6 @@ function createEmptyMarkers(markerData) {
|
|
|
79
77
|
value_cell_1.ValueCell.updateIfChanged(markerData.uMarker, 0);
|
|
80
78
|
value_cell_1.ValueCell.update(markerData.tMarker, emptyMarkerTexture);
|
|
81
79
|
value_cell_1.ValueCell.update(markerData.uMarkerTexDim, linear_algebra_1.Vec2.create(1, 1));
|
|
82
|
-
value_cell_1.ValueCell.updateIfChanged(markerData.dMarkerType, 'uniform');
|
|
83
80
|
value_cell_1.ValueCell.updateIfChanged(markerData.markerAverage, 0);
|
|
84
81
|
value_cell_1.ValueCell.updateIfChanged(markerData.markerStatus, 0);
|
|
85
82
|
return markerData;
|
|
@@ -91,7 +88,6 @@ function createEmptyMarkers(markerData) {
|
|
|
91
88
|
uMarkerTexDim: value_cell_1.ValueCell.create(linear_algebra_1.Vec2.create(1, 1)),
|
|
92
89
|
markerAverage: value_cell_1.ValueCell.create(0),
|
|
93
90
|
markerStatus: value_cell_1.ValueCell.create(0),
|
|
94
|
-
dMarkerType: value_cell_1.ValueCell.create('uniform'),
|
|
95
91
|
};
|
|
96
92
|
}
|
|
97
93
|
}
|
|
@@ -306,7 +306,7 @@ function applyMeshSubstanceSmoothing(values, resolution, stride, webgl, colorTex
|
|
|
306
306
|
colorType: values.dSubstanceType.ref.value,
|
|
307
307
|
boundingSphere: values.boundingSphere.ref.value,
|
|
308
308
|
invariantBoundingSphere: values.invariantBoundingSphere.ref.value,
|
|
309
|
-
itemSize:
|
|
309
|
+
itemSize: 4
|
|
310
310
|
}, resolution, stride, webgl, colorTexture);
|
|
311
311
|
if (smoothingData.kind === 'volume') {
|
|
312
312
|
mol_util_1.ValueCell.updateIfChanged(values.dSubstanceType, smoothingData.type);
|
|
@@ -62,11 +62,24 @@ export declare namespace Mesh {
|
|
|
62
62
|
flatShaded: PD.BooleanParam;
|
|
63
63
|
ignoreLight: PD.BooleanParam;
|
|
64
64
|
xrayShaded: PD.BooleanParam;
|
|
65
|
+
bumpFrequency: PD.Numeric;
|
|
66
|
+
bumpAmplitude: PD.Numeric;
|
|
65
67
|
alpha: PD.Numeric;
|
|
66
68
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
67
69
|
material: PD.Group<PD.Normalize<{
|
|
68
70
|
metalness: number;
|
|
69
71
|
roughness: number;
|
|
72
|
+
bumpiness: number;
|
|
73
|
+
}>>;
|
|
74
|
+
clip: PD.Group<PD.Normalize<{
|
|
75
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
76
|
+
objects: PD.Normalize<{
|
|
77
|
+
type: any;
|
|
78
|
+
invert: any;
|
|
79
|
+
position: any;
|
|
80
|
+
rotation: any;
|
|
81
|
+
scale: any;
|
|
82
|
+
}>[];
|
|
70
83
|
}>>;
|
|
71
84
|
};
|
|
72
85
|
type Params = typeof Params;
|
|
@@ -554,7 +554,7 @@ var Mesh;
|
|
|
554
554
|
}
|
|
555
555
|
Mesh.smoothEdges = smoothEdges;
|
|
556
556
|
//
|
|
557
|
-
Mesh.Params = (0, tslib_1.__assign)((0, 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) });
|
|
557
|
+
Mesh.Params = (0, tslib_1.__assign)((0, 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,7 +596,7 @@ 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 (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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)), {
|
|
599
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({ 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);
|
|
@@ -605,11 +605,13 @@ var Mesh;
|
|
|
605
605
|
}
|
|
606
606
|
function updateValues(values, props) {
|
|
607
607
|
base_1.BaseGeometry.updateValues(values, props);
|
|
608
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
608
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
609
609
|
mol_util_1.ValueCell.updateIfChanged(values.dFlatShaded, props.flatShaded);
|
|
610
610
|
mol_util_1.ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
|
|
611
611
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
612
612
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
613
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
614
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
613
615
|
}
|
|
614
616
|
function updateBoundingSphere(values, mesh) {
|
|
615
617
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(mesh.boundingSphere);
|
|
@@ -44,6 +44,17 @@ export declare namespace Points {
|
|
|
44
44
|
material: PD.Group<PD.Normalize<{
|
|
45
45
|
metalness: number;
|
|
46
46
|
roughness: number;
|
|
47
|
+
bumpiness: number;
|
|
48
|
+
}>>;
|
|
49
|
+
clip: PD.Group<PD.Normalize<{
|
|
50
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
51
|
+
objects: PD.Normalize<{
|
|
52
|
+
type: any;
|
|
53
|
+
invert: any;
|
|
54
|
+
position: any;
|
|
55
|
+
rotation: any;
|
|
56
|
+
scale: any;
|
|
57
|
+
}>[];
|
|
47
58
|
}>>;
|
|
48
59
|
};
|
|
49
60
|
type Params = typeof Params;
|