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
|
@@ -34,11 +34,24 @@ export declare namespace Spheres {
|
|
|
34
34
|
doubleSided: PD.BooleanParam;
|
|
35
35
|
ignoreLight: PD.BooleanParam;
|
|
36
36
|
xrayShaded: PD.BooleanParam;
|
|
37
|
+
bumpFrequency: PD.Numeric;
|
|
38
|
+
bumpAmplitude: PD.Numeric;
|
|
37
39
|
alpha: PD.Numeric;
|
|
38
40
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
39
41
|
material: PD.Group<PD.Normalize<{
|
|
40
42
|
metalness: number;
|
|
41
43
|
roughness: number;
|
|
44
|
+
bumpiness: number;
|
|
45
|
+
}>>;
|
|
46
|
+
clip: PD.Group<PD.Normalize<{
|
|
47
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
48
|
+
objects: PD.Normalize<{
|
|
49
|
+
type: any;
|
|
50
|
+
invert: any;
|
|
51
|
+
position: any;
|
|
52
|
+
rotation: any;
|
|
53
|
+
scale: any;
|
|
54
|
+
}>[];
|
|
42
55
|
}>>;
|
|
43
56
|
};
|
|
44
57
|
type Params = typeof Params;
|
|
@@ -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 = (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 }), 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) });
|
|
94
|
+
Spheres.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 }), 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,7 +135,7 @@ 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 (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)({ 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),
|
|
138
|
+
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)({ 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);
|
|
@@ -145,9 +145,11 @@ var Spheres;
|
|
|
145
145
|
function updateValues(values, props) {
|
|
146
146
|
base_1.BaseGeometry.updateValues(values, props);
|
|
147
147
|
mol_util_1.ValueCell.updateIfChanged(values.uSizeFactor, props.sizeFactor);
|
|
148
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
148
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
149
149
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
150
150
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
151
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
152
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
151
153
|
}
|
|
152
154
|
function updateBoundingSphere(values, spheres) {
|
|
153
155
|
var padding = spheres.boundingSphere.radius
|
|
@@ -13,14 +13,14 @@ var texture_1 = require("../../mol-gl/webgl/texture");
|
|
|
13
13
|
var material_1 = require("../../mol-util/material");
|
|
14
14
|
function applySubstanceMaterial(array, start, end, material) {
|
|
15
15
|
for (var i = start; i < end; ++i) {
|
|
16
|
-
material_1.Material.toArray(material, array, i *
|
|
17
|
-
array[i *
|
|
16
|
+
material_1.Material.toArray(material, array, i * 4);
|
|
17
|
+
array[i * 4 + 3] = 255;
|
|
18
18
|
}
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
21
|
exports.applySubstanceMaterial = applySubstanceMaterial;
|
|
22
22
|
function clearSubstance(array, start, end) {
|
|
23
|
-
array.fill(0, start *
|
|
23
|
+
array.fill(0, start * 4, end * 4);
|
|
24
24
|
return true;
|
|
25
25
|
}
|
|
26
26
|
exports.clearSubstance = clearSubstance;
|
|
@@ -63,6 +63,17 @@ export declare namespace Text {
|
|
|
63
63
|
material: PD.Group<PD.Normalize<{
|
|
64
64
|
metalness: number;
|
|
65
65
|
roughness: number;
|
|
66
|
+
bumpiness: number;
|
|
67
|
+
}>>;
|
|
68
|
+
clip: PD.Group<PD.Normalize<{
|
|
69
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
70
|
+
objects: PD.Normalize<{
|
|
71
|
+
type: any;
|
|
72
|
+
invert: any;
|
|
73
|
+
position: any;
|
|
74
|
+
rotation: any;
|
|
75
|
+
scale: any;
|
|
76
|
+
}>[];
|
|
66
77
|
}>>;
|
|
67
78
|
};
|
|
68
79
|
type Params = typeof Params;
|
|
@@ -404,10 +404,10 @@ function applyTextureMeshSubstanceSmoothing(values, resolution, stride, webgl, c
|
|
|
404
404
|
if (!isSupportedSubstanceType(values.dSubstanceType.ref.value))
|
|
405
405
|
return;
|
|
406
406
|
stride *= 3; // triple because TextureMesh is never indexed (no elements buffer)
|
|
407
|
-
if (!webgl.namedTextures[
|
|
408
|
-
webgl.namedTextures[
|
|
407
|
+
if (!webgl.namedTextures[ColorSmoothingRgbaName]) {
|
|
408
|
+
webgl.namedTextures[ColorSmoothingRgbaName] = webgl.resources.texture('image-uint8', 'rgba', 'ubyte', 'nearest');
|
|
409
409
|
}
|
|
410
|
-
var colorData = webgl.namedTextures[
|
|
410
|
+
var colorData = webgl.namedTextures[ColorSmoothingRgbaName];
|
|
411
411
|
colorData.load(values.tSubstance.ref.value);
|
|
412
412
|
var smoothingData = calcTextureMeshColorSmoothing({
|
|
413
413
|
vertexCount: values.uVertexCount.ref.value,
|
|
@@ -45,11 +45,24 @@ export declare namespace TextureMesh {
|
|
|
45
45
|
flatShaded: PD.BooleanParam;
|
|
46
46
|
ignoreLight: PD.BooleanParam;
|
|
47
47
|
xrayShaded: PD.BooleanParam;
|
|
48
|
+
bumpFrequency: PD.Numeric;
|
|
49
|
+
bumpAmplitude: PD.Numeric;
|
|
48
50
|
alpha: PD.Numeric;
|
|
49
51
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
50
52
|
material: PD.Group<PD.Normalize<{
|
|
51
53
|
metalness: number;
|
|
52
54
|
roughness: number;
|
|
55
|
+
bumpiness: number;
|
|
56
|
+
}>>;
|
|
57
|
+
clip: PD.Group<PD.Normalize<{
|
|
58
|
+
variant: import("../../../mol-util/clip").Clip.Variant;
|
|
59
|
+
objects: PD.Normalize<{
|
|
60
|
+
type: any;
|
|
61
|
+
invert: any;
|
|
62
|
+
position: any;
|
|
63
|
+
rotation: any;
|
|
64
|
+
scale: any;
|
|
65
|
+
}>[];
|
|
53
66
|
}>>;
|
|
54
67
|
};
|
|
55
68
|
type Params = typeof Params;
|
|
@@ -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 = (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) });
|
|
92
|
+
TextureMesh.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) });
|
|
93
93
|
TextureMesh.Utils = {
|
|
94
94
|
Params: TextureMesh.Params,
|
|
95
95
|
createEmpty: createEmpty,
|
|
@@ -113,7 +113,7 @@ 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 (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)({ 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)), {
|
|
116
|
+
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)({ 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), dGeoTexture: mol_util_1.ValueCell.create(true), 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);
|
|
@@ -122,11 +122,13 @@ var TextureMesh;
|
|
|
122
122
|
}
|
|
123
123
|
function updateValues(values, props) {
|
|
124
124
|
base_1.BaseGeometry.updateValues(values, props);
|
|
125
|
-
mol_util_1.ValueCell.updateIfChanged(values.
|
|
125
|
+
mol_util_1.ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
126
126
|
mol_util_1.ValueCell.updateIfChanged(values.dFlatShaded, props.flatShaded);
|
|
127
127
|
mol_util_1.ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
|
|
128
128
|
mol_util_1.ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
129
129
|
mol_util_1.ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
130
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
131
|
+
mol_util_1.ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
130
132
|
}
|
|
131
133
|
function updateBoundingSphere(values, textureMesh) {
|
|
132
134
|
var invariantBoundingSphere = geometry_1.Sphere3D.clone(textureMesh.boundingSphere);
|
|
@@ -14,6 +14,7 @@ import { TextValues } from './renderable/text';
|
|
|
14
14
|
import { TextureMeshValues } from './renderable/texture-mesh';
|
|
15
15
|
import { ImageValues } from './renderable/image';
|
|
16
16
|
import { CylindersValues } from './renderable/cylinders';
|
|
17
|
+
import { GraphicsRenderVariant } from './webgl/render-item';
|
|
17
18
|
export declare const getNextMaterialId: () => number;
|
|
18
19
|
export interface GraphicsRenderObject<T extends RenderObjectType = RenderObjectType> {
|
|
19
20
|
readonly id: number;
|
|
@@ -25,4 +26,4 @@ export interface GraphicsRenderObject<T extends RenderObjectType = RenderObjectT
|
|
|
25
26
|
export declare type RenderObjectType = 'mesh' | 'points' | 'spheres' | 'cylinders' | 'text' | 'lines' | 'direct-volume' | 'image' | 'texture-mesh';
|
|
26
27
|
export declare type RenderObjectValues<T extends RenderObjectType> = T extends 'mesh' ? MeshValues : T extends 'points' ? PointsValues : T extends 'spheres' ? SpheresValues : T extends 'cylinders' ? CylindersValues : T extends 'text' ? TextValues : T extends 'lines' ? LinesValues : T extends 'direct-volume' ? DirectVolumeValues : T extends 'image' ? ImageValues : T extends 'texture-mesh' ? TextureMeshValues : never;
|
|
27
28
|
export declare function createRenderObject<T extends RenderObjectType>(type: T, values: RenderObjectValues<T>, state: RenderableState, materialId: number): GraphicsRenderObject<T>;
|
|
28
|
-
export declare function createRenderable<T extends RenderObjectType>(ctx: WebGLContext, o: GraphicsRenderObject<T
|
|
29
|
+
export declare function createRenderable<T extends RenderObjectType>(ctx: WebGLContext, o: GraphicsRenderObject<T>, variants: GraphicsRenderVariant[]): Renderable<any>;
|
|
@@ -23,17 +23,17 @@ function createRenderObject(type, values, state, materialId) {
|
|
|
23
23
|
return { id: getNextId(), type: type, values: values, state: state, materialId: materialId };
|
|
24
24
|
}
|
|
25
25
|
exports.createRenderObject = createRenderObject;
|
|
26
|
-
function createRenderable(ctx, o) {
|
|
26
|
+
function createRenderable(ctx, o, variants) {
|
|
27
27
|
switch (o.type) {
|
|
28
|
-
case 'mesh': return (0, mesh_1.MeshRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
29
|
-
case 'points': return (0, points_1.PointsRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
30
|
-
case 'spheres': return (0, spheres_1.SpheresRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
31
|
-
case 'cylinders': return (0, cylinders_1.CylindersRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
32
|
-
case 'text': return (0, text_1.TextRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
33
|
-
case 'lines': return (0, lines_1.LinesRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
34
|
-
case 'direct-volume': return (0, direct_volume_1.DirectVolumeRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
35
|
-
case 'image': return (0, image_1.ImageRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
36
|
-
case 'texture-mesh': return (0, texture_mesh_1.TextureMeshRenderable)(ctx, o.id, o.values, o.state, o.materialId);
|
|
28
|
+
case 'mesh': return (0, mesh_1.MeshRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
29
|
+
case 'points': return (0, points_1.PointsRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
30
|
+
case 'spheres': return (0, spheres_1.SpheresRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
31
|
+
case 'cylinders': return (0, cylinders_1.CylindersRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
32
|
+
case 'text': return (0, text_1.TextRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
33
|
+
case 'lines': return (0, lines_1.LinesRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
34
|
+
case 'direct-volume': return (0, direct_volume_1.DirectVolumeRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
35
|
+
case 'image': return (0, image_1.ImageRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
36
|
+
case 'texture-mesh': return (0, texture_mesh_1.TextureMeshRenderable)(ctx, o.id, o.values, o.state, o.materialId, variants);
|
|
37
37
|
}
|
|
38
38
|
throw new Error('unsupported type');
|
|
39
39
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
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
|
*/
|
|
6
6
|
import { Renderable, RenderableState } from '../renderable';
|
|
7
7
|
import { WebGLContext } from '../webgl/context';
|
|
8
|
-
import {
|
|
8
|
+
import { GraphicsRenderVariant } from '../webgl/render-item';
|
|
9
|
+
import { AttributeSpec, Values, ElementsSpec, ValueSpec, DefineSpec, UniformSpec } from './schema';
|
|
9
10
|
export declare const CylindersSchema: {
|
|
10
11
|
aGroup: AttributeSpec<"float32">;
|
|
11
12
|
aStart: AttributeSpec<"float32">;
|
|
@@ -15,24 +16,34 @@ export declare const CylindersSchema: {
|
|
|
15
16
|
aCap: AttributeSpec<"float32">;
|
|
16
17
|
elements: ElementsSpec<"uint32">;
|
|
17
18
|
padding: ValueSpec<"number">;
|
|
18
|
-
|
|
19
|
+
uDoubleSided: UniformSpec<"b">;
|
|
19
20
|
dIgnoreLight: DefineSpec<"boolean">;
|
|
20
21
|
dXrayShaded: DefineSpec<"boolean">;
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
uBumpFrequency: UniformSpec<"f">;
|
|
23
|
+
uBumpAmplitude: UniformSpec<"f">;
|
|
24
|
+
uSize: UniformSpec<"f">;
|
|
25
|
+
uSizeTexDim: UniformSpec<"v2">;
|
|
23
26
|
tSize: import("./schema").TextureSpec<"image-uint8">;
|
|
24
27
|
dSizeType: DefineSpec<"string">;
|
|
25
|
-
uSizeFactor:
|
|
28
|
+
uSizeFactor: UniformSpec<"f">;
|
|
26
29
|
dLightCount: DefineSpec<"number">;
|
|
30
|
+
dClipObjectCount: DefineSpec<"number">;
|
|
31
|
+
dClipVariant: DefineSpec<"string">;
|
|
32
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
33
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
34
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
35
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
36
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
27
37
|
aInstance: AttributeSpec<"float32">;
|
|
28
38
|
aTransform: AttributeSpec<"float32">;
|
|
29
|
-
uAlpha:
|
|
30
|
-
uMetalness:
|
|
31
|
-
uRoughness:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
uAlpha: UniformSpec<"f">;
|
|
40
|
+
uMetalness: UniformSpec<"f">;
|
|
41
|
+
uRoughness: UniformSpec<"f">;
|
|
42
|
+
uBumpiness: UniformSpec<"f">;
|
|
43
|
+
uVertexCount: UniformSpec<"i">;
|
|
44
|
+
uInstanceCount: UniformSpec<"i">;
|
|
45
|
+
uGroupCount: UniformSpec<"i">;
|
|
46
|
+
uInvariantBoundingSphere: UniformSpec<"v4">;
|
|
36
47
|
drawCount: ValueSpec<"number">;
|
|
37
48
|
instanceCount: ValueSpec<"number">;
|
|
38
49
|
alpha: ValueSpec<"number">;
|
|
@@ -42,43 +53,40 @@ export declare const CylindersSchema: {
|
|
|
42
53
|
hasReflection: ValueSpec<"boolean">;
|
|
43
54
|
boundingSphere: ValueSpec<"sphere">;
|
|
44
55
|
invariantBoundingSphere: ValueSpec<"sphere">;
|
|
45
|
-
|
|
46
|
-
dClipVariant: DefineSpec<"string">;
|
|
47
|
-
uClippingTexDim: import("./schema").UniformSpec<"v2">;
|
|
56
|
+
uClippingTexDim: UniformSpec<"v2">;
|
|
48
57
|
tClipping: import("./schema").TextureSpec<"image-uint8">;
|
|
49
58
|
dClipping: DefineSpec<"boolean">;
|
|
50
|
-
uSubstanceTexDim:
|
|
59
|
+
uSubstanceTexDim: UniformSpec<"v2">;
|
|
51
60
|
tSubstance: import("./schema").TextureSpec<"image-uint8">;
|
|
52
61
|
dSubstance: DefineSpec<"boolean">;
|
|
53
|
-
uSubstanceGridDim:
|
|
54
|
-
uSubstanceGridTransform:
|
|
62
|
+
uSubstanceGridDim: UniformSpec<"v3">;
|
|
63
|
+
uSubstanceGridTransform: UniformSpec<"v4">;
|
|
55
64
|
tSubstanceGrid: import("./schema").TextureSpec<"texture">;
|
|
56
65
|
dSubstanceType: DefineSpec<"string">;
|
|
57
|
-
uTransparencyTexDim:
|
|
66
|
+
uTransparencyTexDim: UniformSpec<"v2">;
|
|
58
67
|
tTransparency: import("./schema").TextureSpec<"image-uint8">;
|
|
59
68
|
dTransparency: DefineSpec<"boolean">;
|
|
60
69
|
transparencyAverage: ValueSpec<"number">;
|
|
61
|
-
uTransparencyGridDim:
|
|
62
|
-
uTransparencyGridTransform:
|
|
70
|
+
uTransparencyGridDim: UniformSpec<"v3">;
|
|
71
|
+
uTransparencyGridTransform: UniformSpec<"v4">;
|
|
63
72
|
tTransparencyGrid: import("./schema").TextureSpec<"texture">;
|
|
64
73
|
dTransparencyType: DefineSpec<"string">;
|
|
65
|
-
uOverpaintTexDim:
|
|
74
|
+
uOverpaintTexDim: UniformSpec<"v2">;
|
|
66
75
|
tOverpaint: import("./schema").TextureSpec<"image-uint8">;
|
|
67
76
|
dOverpaint: DefineSpec<"boolean">;
|
|
68
|
-
uOverpaintGridDim:
|
|
69
|
-
uOverpaintGridTransform:
|
|
77
|
+
uOverpaintGridDim: UniformSpec<"v3">;
|
|
78
|
+
uOverpaintGridTransform: UniformSpec<"v4">;
|
|
70
79
|
tOverpaintGrid: import("./schema").TextureSpec<"texture">;
|
|
71
80
|
dOverpaintType: DefineSpec<"string">;
|
|
72
|
-
uMarker:
|
|
73
|
-
uMarkerTexDim:
|
|
81
|
+
uMarker: UniformSpec<"f">;
|
|
82
|
+
uMarkerTexDim: UniformSpec<"v2">;
|
|
74
83
|
tMarker: import("./schema").TextureSpec<"image-uint8">;
|
|
75
|
-
dMarkerType: DefineSpec<"string">;
|
|
76
84
|
markerAverage: ValueSpec<"number">;
|
|
77
85
|
markerStatus: ValueSpec<"number">;
|
|
78
|
-
uColor:
|
|
79
|
-
uColorTexDim:
|
|
80
|
-
uColorGridDim:
|
|
81
|
-
uColorGridTransform:
|
|
86
|
+
uColor: UniformSpec<"v3">;
|
|
87
|
+
uColorTexDim: UniformSpec<"v2">;
|
|
88
|
+
uColorGridDim: UniformSpec<"v3">;
|
|
89
|
+
uColorGridTransform: UniformSpec<"v4">;
|
|
82
90
|
tColor: import("./schema").TextureSpec<"image-uint8">;
|
|
83
91
|
tPalette: import("./schema").TextureSpec<"image-uint8">;
|
|
84
92
|
tColorGrid: import("./schema").TextureSpec<"texture">;
|
|
@@ -87,4 +95,4 @@ export declare const CylindersSchema: {
|
|
|
87
95
|
};
|
|
88
96
|
export declare type CylindersSchema = typeof CylindersSchema;
|
|
89
97
|
export declare type CylindersValues = Values<CylindersSchema>;
|
|
90
|
-
export declare function CylindersRenderable(ctx: WebGLContext, id: number, values: CylindersValues, state: RenderableState, materialId: number): Renderable<CylindersValues>;
|
|
98
|
+
export declare function CylindersRenderable(ctx: WebGLContext, id: number, values: CylindersValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<CylindersValues>;
|
|
@@ -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
|
*/
|
|
@@ -12,14 +12,14 @@ var render_item_1 = require("../webgl/render-item");
|
|
|
12
12
|
var schema_1 = require("./schema");
|
|
13
13
|
var shader_code_1 = require("../shader-code");
|
|
14
14
|
var mol_util_1 = require("../../mol-util");
|
|
15
|
-
exports.CylindersSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aStart: (0, schema_1.AttributeSpec)('float32', 3, 0), aEnd: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 3, 0), aScale: (0, schema_1.AttributeSpec)('float32', 1, 0), aCap: (0, schema_1.AttributeSpec)('float32', 1, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'),
|
|
16
|
-
function CylindersRenderable(ctx, id, values, state, materialId) {
|
|
15
|
+
exports.CylindersSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.BaseSchema), schema_1.SizeSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aStart: (0, schema_1.AttributeSpec)('float32', 3, 0), aEnd: (0, schema_1.AttributeSpec)('float32', 3, 0), aMapping: (0, schema_1.AttributeSpec)('float32', 3, 0), aScale: (0, schema_1.AttributeSpec)('float32', 1, 0), aCap: (0, schema_1.AttributeSpec)('float32', 1, 0), elements: (0, schema_1.ElementsSpec)('uint32'), padding: (0, schema_1.ValueSpec)('number'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean'), uBumpFrequency: (0, schema_1.UniformSpec)('f'), uBumpAmplitude: (0, schema_1.UniformSpec)('f') });
|
|
16
|
+
function CylindersRenderable(ctx, id, values, state, materialId, variants) {
|
|
17
17
|
var schema = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.CylindersSchema);
|
|
18
18
|
var internalValues = {
|
|
19
19
|
uObjectId: mol_util_1.ValueCell.create(id),
|
|
20
20
|
};
|
|
21
21
|
var shaderCode = shader_code_1.CylindersShaderCode;
|
|
22
|
-
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId);
|
|
22
|
+
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId, variants);
|
|
23
23
|
return (0, renderable_1.createRenderable)(renderItem, values, state);
|
|
24
24
|
}
|
|
25
25
|
exports.CylindersRenderable = CylindersRenderable;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Renderable, RenderableState } from '../renderable';
|
|
7
7
|
import { WebGLContext } from '../webgl/context';
|
|
8
|
+
import { GraphicsRenderVariant } from '../webgl/render-item';
|
|
8
9
|
import { AttributeSpec, Values, UniformSpec, TextureSpec, ElementsSpec, DefineSpec } from './schema';
|
|
9
10
|
export declare const DirectVolumeSchema: {
|
|
10
11
|
aPosition: AttributeSpec<"float32">;
|
|
@@ -34,17 +35,25 @@ export declare const DirectVolumeSchema: {
|
|
|
34
35
|
uCartnToUnit: UniformSpec<"m4">;
|
|
35
36
|
uUnitToCartn: UniformSpec<"m4">;
|
|
36
37
|
dPackedGroup: DefineSpec<"boolean">;
|
|
37
|
-
|
|
38
|
+
uDoubleSided: UniformSpec<"b">;
|
|
38
39
|
dFlipSided: DefineSpec<"boolean">;
|
|
39
40
|
dFlatShaded: DefineSpec<"boolean">;
|
|
40
41
|
dIgnoreLight: DefineSpec<"boolean">;
|
|
41
42
|
dXrayShaded: DefineSpec<"boolean">;
|
|
42
43
|
dLightCount: DefineSpec<"number">;
|
|
44
|
+
dClipObjectCount: DefineSpec<"number">;
|
|
45
|
+
dClipVariant: DefineSpec<"string">;
|
|
46
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
47
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
48
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
49
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
50
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
43
51
|
aInstance: AttributeSpec<"float32">;
|
|
44
52
|
aTransform: AttributeSpec<"float32">;
|
|
45
53
|
uAlpha: UniformSpec<"f">;
|
|
46
54
|
uMetalness: UniformSpec<"f">;
|
|
47
55
|
uRoughness: UniformSpec<"f">;
|
|
56
|
+
uBumpiness: UniformSpec<"f">;
|
|
48
57
|
uVertexCount: UniformSpec<"i">;
|
|
49
58
|
uInstanceCount: UniformSpec<"i">;
|
|
50
59
|
uGroupCount: UniformSpec<"i">;
|
|
@@ -58,8 +67,6 @@ export declare const DirectVolumeSchema: {
|
|
|
58
67
|
hasReflection: import("./schema").ValueSpec<"boolean">;
|
|
59
68
|
boundingSphere: import("./schema").ValueSpec<"sphere">;
|
|
60
69
|
invariantBoundingSphere: import("./schema").ValueSpec<"sphere">;
|
|
61
|
-
dClipObjectCount: DefineSpec<"number">;
|
|
62
|
-
dClipVariant: DefineSpec<"string">;
|
|
63
70
|
uClippingTexDim: UniformSpec<"v2">;
|
|
64
71
|
tClipping: TextureSpec<"image-uint8">;
|
|
65
72
|
dClipping: DefineSpec<"boolean">;
|
|
@@ -88,7 +95,6 @@ export declare const DirectVolumeSchema: {
|
|
|
88
95
|
uMarker: UniformSpec<"f">;
|
|
89
96
|
uMarkerTexDim: UniformSpec<"v2">;
|
|
90
97
|
tMarker: TextureSpec<"image-uint8">;
|
|
91
|
-
dMarkerType: DefineSpec<"string">;
|
|
92
98
|
markerAverage: import("./schema").ValueSpec<"number">;
|
|
93
99
|
markerStatus: import("./schema").ValueSpec<"number">;
|
|
94
100
|
uColorGridDim: UniformSpec<"v3">;
|
|
@@ -99,4 +105,4 @@ export declare const DirectVolumeSchema: {
|
|
|
99
105
|
};
|
|
100
106
|
export declare type DirectVolumeSchema = typeof DirectVolumeSchema;
|
|
101
107
|
export declare type DirectVolumeValues = Values<DirectVolumeSchema>;
|
|
102
|
-
export declare function DirectVolumeRenderable(ctx: WebGLContext, id: number, values: DirectVolumeValues, state: RenderableState, materialId: number): Renderable<DirectVolumeValues>;
|
|
108
|
+
export declare function DirectVolumeRenderable(ctx: WebGLContext, id: number, values: DirectVolumeValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<DirectVolumeValues>;
|
|
@@ -12,8 +12,8 @@ var render_item_1 = require("../webgl/render-item");
|
|
|
12
12
|
var schema_1 = require("./schema");
|
|
13
13
|
var shader_code_1 = require("../shader-code");
|
|
14
14
|
var mol_util_1 = require("../../mol-util");
|
|
15
|
-
exports.DirectVolumeSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.BaseSchema), { aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), elements: (0, schema_1.ElementsSpec)('uint32'), uColor: (0, schema_1.UniformSpec)('v3'), uColorTexDim: (0, schema_1.UniformSpec)('v2'), tColor: (0, schema_1.TextureSpec)('image-uint8', 'rgb', 'ubyte', 'nearest'), dColorType: (0, schema_1.DefineSpec)('string', ['uniform', 'attribute', 'instance', 'group', 'groupInstance', 'vertex', 'vertexInstance']), uIsoValue: (0, schema_1.UniformSpec)('v2'), uBboxMin: (0, schema_1.UniformSpec)('v3'), uBboxMax: (0, schema_1.UniformSpec)('v3'), uBboxSize: (0, schema_1.UniformSpec)('v3'), uMaxSteps: (0, schema_1.UniformSpec)('i'), uStepScale: (0, schema_1.UniformSpec)('f'), uJumpLength: (0, schema_1.UniformSpec)('f'), uTransform: (0, schema_1.UniformSpec)('m4'), uGridDim: (0, schema_1.UniformSpec)('v3'), dRenderMode: (0, schema_1.DefineSpec)('string', ['isosurface', 'volume']), dSingleLayer: (0, schema_1.DefineSpec)('boolean'), tTransferTex: (0, schema_1.TextureSpec)('image-uint8', 'rgba', 'ubyte', 'linear'), uTransferScale: (0, schema_1.UniformSpec)('f'), dGridTexType: (0, schema_1.DefineSpec)('string', ['2d', '3d']), uGridTexDim: (0, schema_1.UniformSpec)('v3'), tGridTex: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'), uGridStats: (0, schema_1.UniformSpec)('v4'), uCellDim: (0, schema_1.UniformSpec)('v3'), uCartnToUnit: (0, schema_1.UniformSpec)('m4'), uUnitToCartn: (0, schema_1.UniformSpec)('m4'), dPackedGroup: (0, schema_1.DefineSpec)('boolean'),
|
|
16
|
-
function DirectVolumeRenderable(ctx, id, values, state, materialId) {
|
|
15
|
+
exports.DirectVolumeSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.BaseSchema), { aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), elements: (0, schema_1.ElementsSpec)('uint32'), uColor: (0, schema_1.UniformSpec)('v3'), uColorTexDim: (0, schema_1.UniformSpec)('v2'), tColor: (0, schema_1.TextureSpec)('image-uint8', 'rgb', 'ubyte', 'nearest'), dColorType: (0, schema_1.DefineSpec)('string', ['uniform', 'attribute', 'instance', 'group', 'groupInstance', 'vertex', 'vertexInstance']), uIsoValue: (0, schema_1.UniformSpec)('v2'), uBboxMin: (0, schema_1.UniformSpec)('v3'), uBboxMax: (0, schema_1.UniformSpec)('v3'), uBboxSize: (0, schema_1.UniformSpec)('v3'), uMaxSteps: (0, schema_1.UniformSpec)('i'), uStepScale: (0, schema_1.UniformSpec)('f'), uJumpLength: (0, schema_1.UniformSpec)('f'), uTransform: (0, schema_1.UniformSpec)('m4'), uGridDim: (0, schema_1.UniformSpec)('v3'), dRenderMode: (0, schema_1.DefineSpec)('string', ['isosurface', 'volume']), dSingleLayer: (0, schema_1.DefineSpec)('boolean'), tTransferTex: (0, schema_1.TextureSpec)('image-uint8', 'rgba', 'ubyte', 'linear'), uTransferScale: (0, schema_1.UniformSpec)('f'), dGridTexType: (0, schema_1.DefineSpec)('string', ['2d', '3d']), uGridTexDim: (0, schema_1.UniformSpec)('v3'), tGridTex: (0, schema_1.TextureSpec)('texture', 'rgba', 'ubyte', 'linear'), uGridStats: (0, schema_1.UniformSpec)('v4'), uCellDim: (0, schema_1.UniformSpec)('v3'), uCartnToUnit: (0, schema_1.UniformSpec)('m4'), uUnitToCartn: (0, schema_1.UniformSpec)('m4'), dPackedGroup: (0, schema_1.DefineSpec)('boolean'), uDoubleSided: (0, schema_1.UniformSpec)('b'), dFlipSided: (0, schema_1.DefineSpec)('boolean'), dFlatShaded: (0, schema_1.DefineSpec)('boolean'), dIgnoreLight: (0, schema_1.DefineSpec)('boolean'), dXrayShaded: (0, schema_1.DefineSpec)('boolean') });
|
|
16
|
+
function DirectVolumeRenderable(ctx, id, values, state, materialId, variants) {
|
|
17
17
|
var schema = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.DirectVolumeSchema);
|
|
18
18
|
if (!ctx.isWebGL2) {
|
|
19
19
|
// workaround for webgl1 limitation that loop counters need to be `const`
|
|
@@ -23,7 +23,7 @@ function DirectVolumeRenderable(ctx, id, values, state, materialId) {
|
|
|
23
23
|
uObjectId: mol_util_1.ValueCell.create(id),
|
|
24
24
|
};
|
|
25
25
|
var shaderCode = shader_code_1.DirectVolumeShaderCode;
|
|
26
|
-
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId);
|
|
26
|
+
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId, variants);
|
|
27
27
|
return (0, renderable_1.createRenderable)(renderItem, values, state);
|
|
28
28
|
}
|
|
29
29
|
exports.DirectVolumeRenderable = DirectVolumeRenderable;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Renderable, RenderableState } from '../renderable';
|
|
7
7
|
import { WebGLContext } from '../webgl/context';
|
|
8
|
+
import { GraphicsRenderVariant } from '../webgl/render-item';
|
|
8
9
|
import { AttributeSpec, Values, TextureSpec, ElementsSpec, DefineSpec, UniformSpec } from './schema';
|
|
9
10
|
export declare const ImageSchema: {
|
|
10
11
|
aGroup: AttributeSpec<"float32">;
|
|
@@ -16,11 +17,19 @@ export declare const ImageSchema: {
|
|
|
16
17
|
tGroupTex: TextureSpec<"image-uint8">;
|
|
17
18
|
dInterpolation: DefineSpec<"string">;
|
|
18
19
|
dLightCount: DefineSpec<"number">;
|
|
20
|
+
dClipObjectCount: DefineSpec<"number">;
|
|
21
|
+
dClipVariant: DefineSpec<"string">;
|
|
22
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
23
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
24
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
25
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
26
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
19
27
|
aInstance: AttributeSpec<"float32">;
|
|
20
28
|
aTransform: AttributeSpec<"float32">;
|
|
21
29
|
uAlpha: UniformSpec<"f">;
|
|
22
30
|
uMetalness: UniformSpec<"f">;
|
|
23
31
|
uRoughness: UniformSpec<"f">;
|
|
32
|
+
uBumpiness: UniformSpec<"f">;
|
|
24
33
|
uVertexCount: UniformSpec<"i">;
|
|
25
34
|
uInstanceCount: UniformSpec<"i">;
|
|
26
35
|
uGroupCount: UniformSpec<"i">;
|
|
@@ -34,8 +43,6 @@ export declare const ImageSchema: {
|
|
|
34
43
|
hasReflection: import("./schema").ValueSpec<"boolean">;
|
|
35
44
|
boundingSphere: import("./schema").ValueSpec<"sphere">;
|
|
36
45
|
invariantBoundingSphere: import("./schema").ValueSpec<"sphere">;
|
|
37
|
-
dClipObjectCount: DefineSpec<"number">;
|
|
38
|
-
dClipVariant: DefineSpec<"string">;
|
|
39
46
|
uClippingTexDim: UniformSpec<"v2">;
|
|
40
47
|
tClipping: TextureSpec<"image-uint8">;
|
|
41
48
|
dClipping: DefineSpec<"boolean">;
|
|
@@ -64,7 +71,6 @@ export declare const ImageSchema: {
|
|
|
64
71
|
uMarker: UniformSpec<"f">;
|
|
65
72
|
uMarkerTexDim: UniformSpec<"v2">;
|
|
66
73
|
tMarker: TextureSpec<"image-uint8">;
|
|
67
|
-
dMarkerType: DefineSpec<"string">;
|
|
68
74
|
markerAverage: import("./schema").ValueSpec<"number">;
|
|
69
75
|
markerStatus: import("./schema").ValueSpec<"number">;
|
|
70
76
|
uColor: UniformSpec<"v3">;
|
|
@@ -79,4 +85,4 @@ export declare const ImageSchema: {
|
|
|
79
85
|
};
|
|
80
86
|
export declare type ImageSchema = typeof ImageSchema;
|
|
81
87
|
export declare type ImageValues = Values<ImageSchema>;
|
|
82
|
-
export declare function ImageRenderable(ctx: WebGLContext, id: number, values: ImageValues, state: RenderableState, materialId: number): Renderable<ImageValues>;
|
|
88
|
+
export declare function ImageRenderable(ctx: WebGLContext, id: number, values: ImageValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<ImageValues>;
|
|
@@ -14,13 +14,13 @@ var shader_code_1 = require("../shader-code");
|
|
|
14
14
|
var mol_util_1 = require("../../mol-util");
|
|
15
15
|
var image_1 = require("../../mol-geo/geometry/image/image");
|
|
16
16
|
exports.ImageSchema = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.BaseSchema), { aGroup: (0, schema_1.AttributeSpec)('float32', 1, 0), aPosition: (0, schema_1.AttributeSpec)('float32', 3, 0), aUv: (0, schema_1.AttributeSpec)('float32', 2, 0), elements: (0, schema_1.ElementsSpec)('uint32'), uImageTexDim: (0, schema_1.UniformSpec)('v2'), tImageTex: (0, schema_1.TextureSpec)('image-uint8', 'rgba', 'ubyte', 'nearest'), tGroupTex: (0, schema_1.TextureSpec)('image-uint8', 'rgba', 'ubyte', 'nearest'), dInterpolation: (0, schema_1.DefineSpec)('string', image_1.InterpolationTypeNames) });
|
|
17
|
-
function ImageRenderable(ctx, id, values, state, materialId) {
|
|
17
|
+
function ImageRenderable(ctx, id, values, state, materialId, variants) {
|
|
18
18
|
var schema = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, schema_1.GlobalUniformSchema), schema_1.GlobalTextureSchema), schema_1.InternalSchema), exports.ImageSchema);
|
|
19
19
|
var internalValues = {
|
|
20
20
|
uObjectId: mol_util_1.ValueCell.create(id),
|
|
21
21
|
};
|
|
22
22
|
var shaderCode = shader_code_1.ImageShaderCode;
|
|
23
|
-
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId);
|
|
23
|
+
var renderItem = (0, render_item_1.createGraphicsRenderItem)(ctx, 'triangles', shaderCode, schema, (0, tslib_1.__assign)((0, tslib_1.__assign)({}, values), internalValues), materialId, variants);
|
|
24
24
|
return (0, renderable_1.createRenderable)(renderItem, values, state);
|
|
25
25
|
}
|
|
26
26
|
exports.ImageRenderable = ImageRenderable;
|