molstar 3.0.0-dev.4 → 3.0.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +187 -187
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -95
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.d.ts +2 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/docking-viewer/index.js +87 -74
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.d.ts +37 -215
- package/lib/apps/viewer/index.html +106 -95
- package/lib/apps/viewer/index.js +141 -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/viewer/index.d.ts +37 -215
- package/lib/commonjs/apps/viewer/index.js +141 -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 +3 -4
- 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 +57 -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 +4 -0
- package/lib/commonjs/extensions/anvil/representation.d.ts +50 -0
- package/lib/commonjs/extensions/cellpack/representation.d.ts +10 -0
- package/lib/commonjs/extensions/dnatco/confal-pyramids/representation.d.ts +30 -0
- package/lib/commonjs/extensions/geo-export/mesh-exporter.js +4 -4
- 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 +6 -2
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/commonjs/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/commonjs/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +3 -9
- package/lib/commonjs/mol-canvas3d/canvas3d.js +38 -26
- package/lib/commonjs/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +4 -0
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/commonjs/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +13 -1
- package/lib/commonjs/mol-canvas3d/passes/draw.js +16 -15
- package/lib/commonjs/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/image.js +3 -2
- package/lib/commonjs/mol-canvas3d/passes/marking.js +1 -1
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.d.ts +10 -2
- package/lib/commonjs/mol-canvas3d/passes/multi-sample.js +18 -14
- package/lib/commonjs/mol-canvas3d/passes/pick.js +12 -12
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +3 -3
- package/lib/commonjs/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/commonjs/mol-geo/geometry/base.d.ts +18 -0
- package/lib/commonjs/mol-geo/geometry/base.js +18 -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/color-data.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/color-data.js +22 -0
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +12 -2
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.d.ts +15 -38
- package/lib/commonjs/mol-geo/geometry/direct-volume/direct-volume.js +21 -66
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.d.ts +2 -4
- package/lib/commonjs/mol-geo/geometry/direct-volume/transfer-function.js +4 -7
- package/lib/commonjs/mol-geo/geometry/image/image.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/image/image.js +1 -1
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +11 -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 +13 -9
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +11 -1
- package/lib/commonjs/mol-geo/geometry/points/points.js +1 -1
- package/lib/commonjs/mol-geo/geometry/size-data.js +5 -5
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/commonjs/mol-geo/geometry/text/text.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/text/text.js +1 -1
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +10 -0
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/commonjs/mol-gl/compute/histogram-pyramid/sum.js +2 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.d.ts +2 -2
- package/lib/commonjs/mol-gl/compute/marching-cubes/isosurface.js +10 -9
- 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 +11 -5
- package/lib/commonjs/mol-gl/renderable/cylinders.js +3 -3
- package/lib/commonjs/mol-gl/renderable/direct-volume.d.ts +15 -14
- 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 +39 -33
- package/lib/commonjs/mol-gl/renderable/lines.js +3 -3
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/mesh.js +3 -3
- 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 +4 -10
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +11 -5
- package/lib/commonjs/mol-gl/renderable/spheres.js +3 -3
- 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 +11 -6
- 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 +23 -92
- 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-group.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-group.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/assign-position.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-position.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-size.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/wboit-write.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/compute/color-smoothing/accumulate.vert.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/gaussian-density.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/gaussian-density.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/histogram-pyramid/reduction.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/marching-cubes/isosurface.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/marching-cubes/isosurface.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/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 +43 -14
- 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/gaussian-density/gpu.js +2 -2
- 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 +8 -2
- 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 +20 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-model-props/computed/representations/interactions.d.ts +30 -0
- package/lib/commonjs/mol-model-props/integrative/cross-link-restraint/representation.d.ts +40 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/representation.js +4 -6
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +11 -0
- package/lib/commonjs/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin/commands.d.ts +1 -4
- package/lib/commonjs/mol-plugin/config.d.ts +1 -1
- package/lib/commonjs/mol-plugin/config.js +5 -25
- package/lib/commonjs/mol-plugin/features.d.ts +9 -0
- package/lib/commonjs/mol-plugin/features.js +38 -0
- package/lib/commonjs/mol-plugin/spec.js +1 -0
- package/lib/commonjs/mol-plugin/util/viewport-screenshot.d.ts +12 -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/builder/structure/representation-preset.d.ts +4 -4
- 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 +13 -1
- package/lib/commonjs/mol-plugin-state/manager/structure/component.js +13 -8
- package/lib/commonjs/mol-plugin-state/manager/structure/selection.js +3 -1
- package/lib/commonjs/mol-plugin-state/transforms/representation.d.ts +32 -0
- package/lib/commonjs/mol-plugin-state/transforms/representation.js +2 -2
- 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.js +1 -1
- package/lib/commonjs/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/commonjs/mol-repr/shape/loci/angle.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/common.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/dihedral.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/distance.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/label.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/orientation.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/loci/plane.d.ts +10 -0
- package/lib/commonjs/mol-repr/shape/model/unitcell.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/complex-representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/complex-visual.d.ts +61 -19
- package/lib/commonjs/mol-repr/structure/params.d.ts +81 -19
- package/lib/commonjs/mol-repr/structure/registry.d.ts +141 -19
- package/lib/commonjs/mol-repr/structure/representation/backbone.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/ball-and-stick.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/carbohydrate.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/cartoon.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/ellipsoid.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.d.ts +34 -58
- package/lib/commonjs/mol-repr/structure/representation/gaussian-volume.js +2 -7
- package/lib/commonjs/mol-repr/structure/representation/label.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/label.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/line.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/commonjs/mol-repr/structure/representation/orientation.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/point.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/putty.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/representation/spacefill.d.ts +30 -0
- package/lib/commonjs/mol-repr/structure/units-representation.js +1 -1
- package/lib/commonjs/mol-repr/structure/units-visual.d.ts +81 -19
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-line.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +20 -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 +10 -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 +10 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-cross.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-point.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/element-sphere.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/ellipsoid-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -38
- package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +8 -6
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +40 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +11 -8
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/label-text.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/label-text.js +1 -2
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +20 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-direction-wedge.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +10 -0
- package/lib/commonjs/mol-repr/structure/visual/polymer-trace-mesh.d.ts +10 -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 +10 -0
- package/lib/commonjs/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +3 -2
- package/lib/commonjs/mol-repr/structure/visual/util/common.js +2 -5
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.d.ts +7 -6
- package/lib/commonjs/mol-repr/structure/visual/util/gaussian.js +12 -12
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.d.ts +2 -1
- package/lib/commonjs/mol-repr/structure/visual/util/molecular-surface.js +4 -4
- package/lib/commonjs/mol-repr/visual.js +11 -7
- package/lib/commonjs/mol-repr/volume/direct-volume.d.ts +33 -57
- package/lib/commonjs/mol-repr/volume/direct-volume.js +8 -12
- package/lib/commonjs/mol-repr/volume/isosurface.d.ts +60 -0
- package/lib/commonjs/mol-repr/volume/isosurface.js +11 -2
- package/lib/commonjs/mol-repr/volume/registry.d.ts +31 -19
- package/lib/commonjs/mol-repr/volume/representation.d.ts +10 -0
- package/lib/commonjs/mol-repr/volume/slice.d.ts +30 -0
- package/lib/commonjs/mol-repr/volume/slice.js +2 -2
- package/lib/commonjs/mol-repr/volume/util.js +2 -2
- package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
- 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/volume-value.d.ts +17 -0
- package/lib/commonjs/mol-theme/color/volume-value.js +57 -0
- package/lib/commonjs/mol-theme/color.d.ts +3 -0
- package/lib/commonjs/mol-theme/color.js +2 -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/number-packing.d.ts +11 -0
- package/lib/commonjs/mol-util/{float-packing.js → number-packing.js} +10 -19
- package/lib/examples/alpha-orbitals/index.html +61 -60
- package/lib/examples/alpha-orbitals/index.js +4 -5
- package/lib/examples/basic-wrapper/index.html +137 -136
- package/lib/examples/basic-wrapper/index.js +24 -12
- package/lib/examples/lighting/index.d.ts +1 -1
- package/lib/examples/lighting/index.html +88 -86
- package/lib/examples/lighting/index.js +58 -42
- package/lib/examples/proteopedia-wrapper/index.html +236 -235
- 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 +4 -0
- package/lib/extensions/anvil/representation.d.ts +50 -0
- package/lib/extensions/cellpack/representation.d.ts +10 -0
- package/lib/extensions/dnatco/confal-pyramids/representation.d.ts +30 -0
- package/lib/extensions/geo-export/mesh-exporter.js +4 -4
- 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 +6 -2
- package/lib/extensions/rcsb/assembly-symmetry/prop.js +1 -1
- package/lib/extensions/rcsb/assembly-symmetry/representation.d.ts +10 -0
- package/lib/extensions/rcsb/validation-report/prop.js +1 -1
- package/lib/extensions/rcsb/validation-report/representation.d.ts +50 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +3 -9
- package/lib/mol-canvas3d/canvas3d.js +38 -26
- package/lib/mol-canvas3d/helper/bounding-sphere-helper.js +3 -2
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +4 -0
- package/lib/mol-canvas3d/helper/camera-helper.js +2 -2
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +4 -0
- package/lib/mol-canvas3d/helper/handle-helper.js +2 -2
- package/lib/mol-canvas3d/helper/helper.d.ts +2 -0
- package/lib/mol-canvas3d/passes/draw.d.ts +13 -1
- package/lib/mol-canvas3d/passes/draw.js +16 -15
- package/lib/mol-canvas3d/passes/image.d.ts +1 -0
- package/lib/mol-canvas3d/passes/image.js +3 -2
- package/lib/mol-canvas3d/passes/marking.js +1 -1
- package/lib/mol-canvas3d/passes/multi-sample.d.ts +10 -2
- package/lib/mol-canvas3d/passes/multi-sample.js +18 -14
- package/lib/mol-canvas3d/passes/pick.js +11 -11
- package/lib/mol-canvas3d/passes/postprocessing.js +3 -3
- package/lib/mol-canvas3d/passes/smaa.js +1 -1
- package/lib/mol-geo/geometry/base.d.ts +18 -0
- package/lib/mol-geo/geometry/base.js +18 -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/color-data.d.ts +1 -1
- package/lib/mol-geo/geometry/color-data.js +22 -0
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +12 -2
- package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/mol-geo/geometry/direct-volume/direct-volume.d.ts +15 -38
- package/lib/mol-geo/geometry/direct-volume/direct-volume.js +22 -67
- package/lib/mol-geo/geometry/direct-volume/transfer-function.d.ts +2 -4
- package/lib/mol-geo/geometry/direct-volume/transfer-function.js +4 -7
- package/lib/mol-geo/geometry/image/image.d.ts +10 -0
- package/lib/mol-geo/geometry/image/image.js +1 -1
- package/lib/mol-geo/geometry/lines/lines.d.ts +11 -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 +13 -9
- package/lib/mol-geo/geometry/mesh/mesh.d.ts +10 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/mol-geo/geometry/points/points.d.ts +11 -1
- package/lib/mol-geo/geometry/points/points.js +1 -1
- package/lib/mol-geo/geometry/size-data.js +5 -5
- package/lib/mol-geo/geometry/spheres/spheres.d.ts +10 -0
- package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/mol-geo/geometry/text/text.d.ts +10 -0
- package/lib/mol-geo/geometry/text/text.js +1 -1
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.d.ts +10 -0
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/mol-gl/compute/histogram-pyramid/sum.js +2 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.d.ts +2 -2
- package/lib/mol-gl/compute/marching-cubes/isosurface.js +10 -9
- 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 +11 -5
- package/lib/mol-gl/renderable/cylinders.js +3 -3
- package/lib/mol-gl/renderable/direct-volume.d.ts +15 -14
- 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 +39 -33
- package/lib/mol-gl/renderable/lines.js +4 -4
- package/lib/mol-gl/renderable/mesh.d.ts +11 -5
- package/lib/mol-gl/renderable/mesh.js +3 -3
- 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 +4 -10
- package/lib/mol-gl/renderable/spheres.d.ts +11 -5
- package/lib/mol-gl/renderable/spheres.js +3 -3
- 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 +11 -6
- 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 +24 -93
- 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-group.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-group.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/assign-position.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-position.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-size.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-size.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/wboit-write.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.d.ts +1 -1
- package/lib/mol-gl/shader/compute/color-smoothing/accumulate.vert.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/gaussian-density.frag.d.ts +1 -1
- package/lib/mol-gl/shader/gaussian-density.frag.js +1 -1
- package/lib/mol-gl/shader/histogram-pyramid/reduction.frag.d.ts +1 -1
- package/lib/mol-gl/shader/histogram-pyramid/reduction.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/marching-cubes/isosurface.frag.d.ts +1 -1
- package/lib/mol-gl/shader/marching-cubes/isosurface.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/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 +43 -14
- 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/gaussian-density/gpu.js +2 -2
- 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 +8 -2
- 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 +20 -0
- package/lib/mol-model-props/computed/representations/interactions-inter-unit-cylinder.d.ts +10 -0
- package/lib/mol-model-props/computed/representations/interactions-intra-unit-cylinder.d.ts +10 -0
- package/lib/mol-model-props/computed/representations/interactions.d.ts +30 -0
- package/lib/mol-model-props/integrative/cross-link-restraint/representation.d.ts +40 -0
- package/lib/mol-plugin/behavior/dynamic/representation.js +4 -6
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.d.ts +11 -0
- package/lib/mol-plugin/behavior/dynamic/selection/structure-focus-representation.js +3 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/commands.d.ts +1 -4
- package/lib/mol-plugin/config.d.ts +1 -1
- package/lib/mol-plugin/config.js +4 -23
- package/lib/mol-plugin/features.d.ts +9 -0
- package/lib/mol-plugin/features.js +35 -0
- package/lib/mol-plugin/spec.js +1 -0
- package/lib/mol-plugin/util/viewport-screenshot.d.ts +12 -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/builder/structure/representation-preset.d.ts +4 -4
- 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 +13 -1
- package/lib/mol-plugin-state/manager/structure/component.js +14 -9
- package/lib/mol-plugin-state/manager/structure/selection.js +3 -1
- package/lib/mol-plugin-state/transforms/representation.d.ts +32 -0
- package/lib/mol-plugin-state/transforms/representation.js +2 -2
- 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.js +1 -1
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/viewport/simple-settings.js +2 -6
- package/lib/mol-repr/shape/loci/angle.d.ts +10 -0
- package/lib/mol-repr/shape/loci/common.d.ts +10 -0
- package/lib/mol-repr/shape/loci/dihedral.d.ts +10 -0
- package/lib/mol-repr/shape/loci/distance.d.ts +10 -0
- package/lib/mol-repr/shape/loci/label.d.ts +10 -0
- package/lib/mol-repr/shape/loci/orientation.d.ts +10 -0
- package/lib/mol-repr/shape/loci/plane.d.ts +10 -0
- package/lib/mol-repr/shape/model/unitcell.d.ts +10 -0
- package/lib/mol-repr/structure/complex-representation.js +1 -1
- package/lib/mol-repr/structure/complex-visual.d.ts +61 -19
- package/lib/mol-repr/structure/params.d.ts +81 -19
- package/lib/mol-repr/structure/registry.d.ts +141 -19
- package/lib/mol-repr/structure/representation/backbone.d.ts +30 -0
- package/lib/mol-repr/structure/representation/ball-and-stick.d.ts +30 -0
- package/lib/mol-repr/structure/representation/carbohydrate.d.ts +30 -0
- package/lib/mol-repr/structure/representation/cartoon.d.ts +30 -0
- package/lib/mol-repr/structure/representation/ellipsoid.d.ts +30 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.d.ts +30 -0
- package/lib/mol-repr/structure/representation/gaussian-surface.js +1 -1
- package/lib/mol-repr/structure/representation/gaussian-volume.d.ts +34 -58
- package/lib/mol-repr/structure/representation/gaussian-volume.js +2 -7
- package/lib/mol-repr/structure/representation/label.d.ts +30 -0
- package/lib/mol-repr/structure/representation/label.js +1 -1
- package/lib/mol-repr/structure/representation/line.d.ts +30 -0
- package/lib/mol-repr/structure/representation/molecular-surface.d.ts +30 -0
- package/lib/mol-repr/structure/representation/molecular-surface.js +1 -1
- package/lib/mol-repr/structure/representation/orientation.d.ts +30 -0
- package/lib/mol-repr/structure/representation/point.d.ts +30 -0
- package/lib/mol-repr/structure/representation/putty.d.ts +30 -0
- package/lib/mol-repr/structure/representation/spacefill.d.ts +30 -0
- package/lib/mol-repr/structure/units-representation.js +1 -1
- package/lib/mol-repr/structure/units-visual.d.ts +81 -19
- package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.d.ts +20 -0
- package/lib/mol-repr/structure/visual/bond-inter-unit-line.d.ts +10 -0
- package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.d.ts +20 -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 +10 -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 +10 -0
- package/lib/mol-repr/structure/visual/carbohydrate-symbol-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/carbohydrate-terminal-link-cylinder.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-cross.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-point.d.ts +10 -0
- package/lib/mol-repr/structure/visual/element-sphere.d.ts +20 -0
- package/lib/mol-repr/structure/visual/ellipsoid-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/gaussian-density-volume.d.ts +22 -38
- package/lib/mol-repr/structure/visual/gaussian-density-volume.js +8 -6
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +40 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +11 -8
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +10 -0
- package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +1 -1
- package/lib/mol-repr/structure/visual/label-text.d.ts +10 -0
- package/lib/mol-repr/structure/visual/label-text.js +1 -2
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +10 -0
- package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +1 -1
- package/lib/mol-repr/structure/visual/nucleotide-block-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/nucleotide-ring-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/orientation-ellipsoid-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-cylinder.d.ts +20 -0
- package/lib/mol-repr/structure/visual/polymer-backbone-sphere.d.ts +20 -0
- package/lib/mol-repr/structure/visual/polymer-direction-wedge.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-gap-cylinder.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/polymer-trace-mesh.js +1 -1
- package/lib/mol-repr/structure/visual/polymer-tube-mesh.d.ts +10 -0
- package/lib/mol-repr/structure/visual/util/bond.js +1 -1
- package/lib/mol-repr/structure/visual/util/common.d.ts +3 -2
- package/lib/mol-repr/structure/visual/util/common.js +2 -5
- package/lib/mol-repr/structure/visual/util/gaussian.d.ts +7 -6
- package/lib/mol-repr/structure/visual/util/gaussian.js +12 -12
- package/lib/mol-repr/structure/visual/util/molecular-surface.d.ts +2 -1
- package/lib/mol-repr/structure/visual/util/molecular-surface.js +4 -4
- package/lib/mol-repr/visual.js +11 -7
- package/lib/mol-repr/volume/direct-volume.d.ts +33 -57
- package/lib/mol-repr/volume/direct-volume.js +8 -12
- package/lib/mol-repr/volume/isosurface.d.ts +60 -0
- package/lib/mol-repr/volume/isosurface.js +11 -2
- package/lib/mol-repr/volume/registry.d.ts +31 -19
- package/lib/mol-repr/volume/representation.d.ts +10 -0
- package/lib/mol-repr/volume/slice.d.ts +30 -0
- package/lib/mol-repr/volume/slice.js +2 -2
- package/lib/mol-repr/volume/util.js +2 -2
- package/lib/mol-script/language/builder.d.ts +0 -1
- package/lib/mol-theme/clipping.d.ts +7 -15
- package/lib/mol-theme/clipping.js +5 -12
- package/lib/mol-theme/color/volume-value.d.ts +17 -0
- package/lib/mol-theme/color/volume-value.js +52 -0
- package/lib/mol-theme/color.d.ts +3 -0
- package/lib/mol-theme/color.js +2 -0
- package/lib/mol-util/clip.d.ts +49 -0
- package/lib/mol-util/clip.js +93 -0
- package/lib/mol-util/number-packing.d.ts +11 -0
- package/lib/mol-util/{float-packing.js → number-packing.js} +7 -14
- package/package.json +162 -162
- package/lib/commonjs/mol-util/float-packing.d.ts +0 -15
- package/lib/mol-util/float-packing.d.ts +0 -15
|
@@ -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, ElementsSpec, ValueSpec, DefineSpec, UniformSpec } from './schema';
|
|
9
10
|
export declare const SpheresSchema: {
|
|
10
11
|
aGroup: AttributeSpec<"float32">;
|
|
@@ -12,7 +13,7 @@ export declare const SpheresSchema: {
|
|
|
12
13
|
aMapping: AttributeSpec<"float32">;
|
|
13
14
|
elements: ElementsSpec<"uint32">;
|
|
14
15
|
padding: ValueSpec<"number">;
|
|
15
|
-
|
|
16
|
+
uDoubleSided: UniformSpec<"b">;
|
|
16
17
|
dIgnoreLight: DefineSpec<"boolean">;
|
|
17
18
|
dXrayShaded: DefineSpec<"boolean">;
|
|
18
19
|
uBumpFrequency: UniformSpec<"f">;
|
|
@@ -23,6 +24,13 @@ export declare const SpheresSchema: {
|
|
|
23
24
|
dSizeType: DefineSpec<"string">;
|
|
24
25
|
uSizeFactor: UniformSpec<"f">;
|
|
25
26
|
dLightCount: DefineSpec<"number">;
|
|
27
|
+
dClipObjectCount: DefineSpec<"number">;
|
|
28
|
+
dClipVariant: DefineSpec<"string">;
|
|
29
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
30
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
31
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
32
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
33
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
26
34
|
aInstance: AttributeSpec<"float32">;
|
|
27
35
|
aTransform: AttributeSpec<"float32">;
|
|
28
36
|
uAlpha: UniformSpec<"f">;
|
|
@@ -42,8 +50,6 @@ export declare const SpheresSchema: {
|
|
|
42
50
|
hasReflection: ValueSpec<"boolean">;
|
|
43
51
|
boundingSphere: ValueSpec<"sphere">;
|
|
44
52
|
invariantBoundingSphere: ValueSpec<"sphere">;
|
|
45
|
-
dClipObjectCount: DefineSpec<"number">;
|
|
46
|
-
dClipVariant: DefineSpec<"string">;
|
|
47
53
|
uClippingTexDim: UniformSpec<"v2">;
|
|
48
54
|
tClipping: import("./schema").TextureSpec<"image-uint8">;
|
|
49
55
|
dClipping: DefineSpec<"boolean">;
|
|
@@ -72,7 +78,6 @@ export declare const SpheresSchema: {
|
|
|
72
78
|
uMarker: UniformSpec<"f">;
|
|
73
79
|
uMarkerTexDim: UniformSpec<"v2">;
|
|
74
80
|
tMarker: import("./schema").TextureSpec<"image-uint8">;
|
|
75
|
-
dMarkerType: DefineSpec<"string">;
|
|
76
81
|
markerAverage: ValueSpec<"number">;
|
|
77
82
|
markerStatus: ValueSpec<"number">;
|
|
78
83
|
uColor: UniformSpec<"v3">;
|
|
@@ -84,7 +89,8 @@ export declare const SpheresSchema: {
|
|
|
84
89
|
tColorGrid: import("./schema").TextureSpec<"texture">;
|
|
85
90
|
dColorType: DefineSpec<"string">;
|
|
86
91
|
dUsePalette: DefineSpec<"boolean">;
|
|
92
|
+
dGeometryType: DefineSpec<"string">;
|
|
87
93
|
};
|
|
88
94
|
export declare type SpheresSchema = typeof SpheresSchema;
|
|
89
95
|
export declare type SpheresValues = Values<SpheresSchema>;
|
|
90
|
-
export declare function SpheresRenderable(ctx: WebGLContext, id: number, values: SpheresValues, state: RenderableState, materialId: number): Renderable<SpheresValues>;
|
|
96
|
+
export declare function SpheresRenderable(ctx: WebGLContext, id: number, values: SpheresValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<SpheresValues>;
|
|
@@ -9,14 +9,14 @@ import { createGraphicsRenderItem } from '../webgl/render-item';
|
|
|
9
9
|
import { GlobalUniformSchema, BaseSchema, AttributeSpec, InternalSchema, SizeSchema, ElementsSpec, ValueSpec, DefineSpec, GlobalTextureSchema, UniformSpec } from './schema';
|
|
10
10
|
import { SpheresShaderCode } from '../shader-code';
|
|
11
11
|
import { ValueCell } from '../../mol-util';
|
|
12
|
-
export var SpheresSchema = __assign(__assign(__assign({}, BaseSchema), SizeSchema), { aGroup: AttributeSpec('float32', 1, 0), aPosition: AttributeSpec('float32', 3, 0), aMapping: AttributeSpec('float32', 2, 0), elements: ElementsSpec('uint32'), padding: ValueSpec('number'),
|
|
13
|
-
export function SpheresRenderable(ctx, id, values, state, materialId) {
|
|
12
|
+
export var SpheresSchema = __assign(__assign(__assign({}, BaseSchema), SizeSchema), { aGroup: AttributeSpec('float32', 1, 0), aPosition: AttributeSpec('float32', 3, 0), aMapping: AttributeSpec('float32', 2, 0), elements: ElementsSpec('uint32'), padding: ValueSpec('number'), uDoubleSided: UniformSpec('b'), dIgnoreLight: DefineSpec('boolean'), dXrayShaded: DefineSpec('boolean'), uBumpFrequency: UniformSpec('f'), uBumpAmplitude: UniformSpec('f') });
|
|
13
|
+
export function SpheresRenderable(ctx, id, values, state, materialId, variants) {
|
|
14
14
|
var schema = __assign(__assign(__assign(__assign({}, GlobalUniformSchema), GlobalTextureSchema), InternalSchema), SpheresSchema);
|
|
15
15
|
var internalValues = {
|
|
16
16
|
uObjectId: ValueCell.create(id),
|
|
17
17
|
};
|
|
18
18
|
var shaderCode = SpheresShaderCode;
|
|
19
|
-
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId);
|
|
19
|
+
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId, variants);
|
|
20
20
|
return createRenderable(renderItem, values, state);
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=spheres.js.map
|
|
@@ -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, UniformSpec, Values, TextureSpec, ElementsSpec, ValueSpec } from './schema';
|
|
9
10
|
export declare const TextSchema: {
|
|
10
11
|
aGroup: AttributeSpec<"float32">;
|
|
@@ -28,6 +29,13 @@ export declare const TextSchema: {
|
|
|
28
29
|
dSizeType: import("./schema").DefineSpec<"string">;
|
|
29
30
|
uSizeFactor: UniformSpec<"f">;
|
|
30
31
|
dLightCount: import("./schema").DefineSpec<"number">;
|
|
32
|
+
dClipObjectCount: import("./schema").DefineSpec<"number">;
|
|
33
|
+
dClipVariant: import("./schema").DefineSpec<"string">;
|
|
34
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
35
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
36
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
37
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
38
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
31
39
|
aInstance: AttributeSpec<"float32">;
|
|
32
40
|
aTransform: AttributeSpec<"float32">;
|
|
33
41
|
uAlpha: UniformSpec<"f">;
|
|
@@ -47,8 +55,6 @@ export declare const TextSchema: {
|
|
|
47
55
|
hasReflection: ValueSpec<"boolean">;
|
|
48
56
|
boundingSphere: ValueSpec<"sphere">;
|
|
49
57
|
invariantBoundingSphere: ValueSpec<"sphere">;
|
|
50
|
-
dClipObjectCount: import("./schema").DefineSpec<"number">;
|
|
51
|
-
dClipVariant: import("./schema").DefineSpec<"string">;
|
|
52
58
|
uClippingTexDim: UniformSpec<"v2">;
|
|
53
59
|
tClipping: TextureSpec<"image-uint8">;
|
|
54
60
|
dClipping: import("./schema").DefineSpec<"boolean">;
|
|
@@ -77,7 +83,6 @@ export declare const TextSchema: {
|
|
|
77
83
|
uMarker: UniformSpec<"f">;
|
|
78
84
|
uMarkerTexDim: UniformSpec<"v2">;
|
|
79
85
|
tMarker: TextureSpec<"image-uint8">;
|
|
80
|
-
dMarkerType: import("./schema").DefineSpec<"string">;
|
|
81
86
|
markerAverage: ValueSpec<"number">;
|
|
82
87
|
markerStatus: ValueSpec<"number">;
|
|
83
88
|
uColor: UniformSpec<"v3">;
|
|
@@ -89,7 +94,8 @@ export declare const TextSchema: {
|
|
|
89
94
|
tColorGrid: TextureSpec<"texture">;
|
|
90
95
|
dColorType: import("./schema").DefineSpec<"string">;
|
|
91
96
|
dUsePalette: import("./schema").DefineSpec<"boolean">;
|
|
97
|
+
dGeometryType: import("./schema").DefineSpec<"string">;
|
|
92
98
|
};
|
|
93
99
|
export declare type TextSchema = typeof TextSchema;
|
|
94
100
|
export declare type TextValues = Values<TextSchema>;
|
|
95
|
-
export declare function TextRenderable(ctx: WebGLContext, id: number, values: TextValues, state: RenderableState, materialId: number): Renderable<TextValues>;
|
|
101
|
+
export declare function TextRenderable(ctx: WebGLContext, id: number, values: TextValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<TextValues>;
|
|
@@ -10,13 +10,13 @@ import { GlobalUniformSchema, BaseSchema, AttributeSpec, UniformSpec, InternalSc
|
|
|
10
10
|
import { TextShaderCode } from '../shader-code';
|
|
11
11
|
import { ValueCell } from '../../mol-util';
|
|
12
12
|
export var TextSchema = __assign(__assign(__assign({}, BaseSchema), SizeSchema), { aGroup: AttributeSpec('float32', 1, 0), aPosition: AttributeSpec('float32', 3, 0), aMapping: AttributeSpec('float32', 2, 0), aDepth: AttributeSpec('float32', 1, 0), elements: ElementsSpec('uint32'), aTexCoord: AttributeSpec('float32', 2, 0), tFont: TextureSpec('image-uint8', 'alpha', 'ubyte', 'linear'), padding: ValueSpec('number'), uBorderWidth: UniformSpec('f'), uBorderColor: UniformSpec('v3'), uOffsetX: UniformSpec('f'), uOffsetY: UniformSpec('f'), uOffsetZ: UniformSpec('f'), uBackgroundColor: UniformSpec('v3'), uBackgroundOpacity: UniformSpec('f') });
|
|
13
|
-
export function TextRenderable(ctx, id, values, state, materialId) {
|
|
13
|
+
export function TextRenderable(ctx, id, values, state, materialId, variants) {
|
|
14
14
|
var schema = __assign(__assign(__assign(__assign({}, GlobalUniformSchema), GlobalTextureSchema), InternalSchema), TextSchema);
|
|
15
15
|
var internalValues = {
|
|
16
16
|
uObjectId: ValueCell.create(id),
|
|
17
17
|
};
|
|
18
18
|
var shaderCode = TextShaderCode;
|
|
19
|
-
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId);
|
|
19
|
+
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId, variants);
|
|
20
20
|
return createRenderable(renderItem, values, state);
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=text.js.map
|
|
@@ -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 { DefineSpec, Values, UniformSpec, TextureSpec, ValueSpec } from './schema';
|
|
9
10
|
export declare const TextureMeshSchema: {
|
|
10
11
|
uGeoTexDim: UniformSpec<"v2">;
|
|
@@ -12,15 +13,21 @@ export declare const TextureMeshSchema: {
|
|
|
12
13
|
tGroup: TextureSpec<"texture">;
|
|
13
14
|
tNormal: TextureSpec<"texture">;
|
|
14
15
|
dFlatShaded: DefineSpec<"boolean">;
|
|
15
|
-
|
|
16
|
+
uDoubleSided: UniformSpec<"b">;
|
|
16
17
|
dFlipSided: DefineSpec<"boolean">;
|
|
17
18
|
dIgnoreLight: DefineSpec<"boolean">;
|
|
18
19
|
dXrayShaded: DefineSpec<"boolean">;
|
|
19
|
-
dGeoTexture: DefineSpec<"boolean">;
|
|
20
20
|
uBumpFrequency: UniformSpec<"f">;
|
|
21
21
|
uBumpAmplitude: UniformSpec<"f">;
|
|
22
22
|
meta: ValueSpec<"unknown">;
|
|
23
23
|
dLightCount: DefineSpec<"number">;
|
|
24
|
+
dClipObjectCount: DefineSpec<"number">;
|
|
25
|
+
dClipVariant: DefineSpec<"string">;
|
|
26
|
+
uClipObjectType: UniformSpec<"i[]">;
|
|
27
|
+
uClipObjectInvert: UniformSpec<"b[]">;
|
|
28
|
+
uClipObjectPosition: UniformSpec<"v3[]">;
|
|
29
|
+
uClipObjectRotation: UniformSpec<"v4[]">;
|
|
30
|
+
uClipObjectScale: UniformSpec<"v3[]">;
|
|
24
31
|
aInstance: import("./schema").AttributeSpec<"float32">;
|
|
25
32
|
aTransform: import("./schema").AttributeSpec<"float32">;
|
|
26
33
|
uAlpha: UniformSpec<"f">;
|
|
@@ -40,8 +47,6 @@ export declare const TextureMeshSchema: {
|
|
|
40
47
|
hasReflection: ValueSpec<"boolean">;
|
|
41
48
|
boundingSphere: ValueSpec<"sphere">;
|
|
42
49
|
invariantBoundingSphere: ValueSpec<"sphere">;
|
|
43
|
-
dClipObjectCount: DefineSpec<"number">;
|
|
44
|
-
dClipVariant: DefineSpec<"string">;
|
|
45
50
|
uClippingTexDim: UniformSpec<"v2">;
|
|
46
51
|
tClipping: TextureSpec<"image-uint8">;
|
|
47
52
|
dClipping: DefineSpec<"boolean">;
|
|
@@ -70,7 +75,6 @@ export declare const TextureMeshSchema: {
|
|
|
70
75
|
uMarker: UniformSpec<"f">;
|
|
71
76
|
uMarkerTexDim: UniformSpec<"v2">;
|
|
72
77
|
tMarker: TextureSpec<"image-uint8">;
|
|
73
|
-
dMarkerType: DefineSpec<"string">;
|
|
74
78
|
markerAverage: ValueSpec<"number">;
|
|
75
79
|
markerStatus: ValueSpec<"number">;
|
|
76
80
|
uColor: UniformSpec<"v3">;
|
|
@@ -82,7 +86,8 @@ export declare const TextureMeshSchema: {
|
|
|
82
86
|
tColorGrid: TextureSpec<"texture">;
|
|
83
87
|
dColorType: DefineSpec<"string">;
|
|
84
88
|
dUsePalette: DefineSpec<"boolean">;
|
|
89
|
+
dGeometryType: DefineSpec<"string">;
|
|
85
90
|
};
|
|
86
91
|
export declare type TextureMeshSchema = typeof TextureMeshSchema;
|
|
87
92
|
export declare type TextureMeshValues = Values<TextureMeshSchema>;
|
|
88
|
-
export declare function TextureMeshRenderable(ctx: WebGLContext, id: number, values: TextureMeshValues, state: RenderableState, materialId: number): Renderable<TextureMeshValues>;
|
|
93
|
+
export declare function TextureMeshRenderable(ctx: WebGLContext, id: number, values: TextureMeshValues, state: RenderableState, materialId: number, variants: GraphicsRenderVariant[]): Renderable<TextureMeshValues>;
|
|
@@ -9,14 +9,14 @@ import { createGraphicsRenderItem } from '../webgl/render-item';
|
|
|
9
9
|
import { GlobalUniformSchema, BaseSchema, DefineSpec, InternalSchema, UniformSpec, TextureSpec, GlobalTextureSchema, ValueSpec } from './schema';
|
|
10
10
|
import { MeshShaderCode } from '../shader-code';
|
|
11
11
|
import { ValueCell } from '../../mol-util';
|
|
12
|
-
export var TextureMeshSchema = __assign(__assign({}, BaseSchema), { uGeoTexDim: UniformSpec('v2', 'buffered'), tPosition: TextureSpec('texture', 'rgb', 'float', 'nearest'), tGroup: TextureSpec('texture', 'alpha', 'float', 'nearest'), tNormal: TextureSpec('texture', 'rgb', 'float', 'nearest'), dFlatShaded: DefineSpec('boolean'),
|
|
13
|
-
export function TextureMeshRenderable(ctx, id, values, state, materialId) {
|
|
12
|
+
export var TextureMeshSchema = __assign(__assign({}, BaseSchema), { uGeoTexDim: UniformSpec('v2', 'buffered'), tPosition: TextureSpec('texture', 'rgb', 'float', 'nearest'), tGroup: TextureSpec('texture', 'alpha', 'float', 'nearest'), tNormal: TextureSpec('texture', 'rgb', 'float', 'nearest'), dFlatShaded: DefineSpec('boolean'), uDoubleSided: UniformSpec('b'), dFlipSided: DefineSpec('boolean'), dIgnoreLight: DefineSpec('boolean'), dXrayShaded: DefineSpec('boolean'), uBumpFrequency: UniformSpec('f'), uBumpAmplitude: UniformSpec('f'), meta: ValueSpec('unknown') });
|
|
13
|
+
export function TextureMeshRenderable(ctx, id, values, state, materialId, variants) {
|
|
14
14
|
var schema = __assign(__assign(__assign(__assign({}, GlobalUniformSchema), GlobalTextureSchema), InternalSchema), TextureMeshSchema);
|
|
15
15
|
var internalValues = {
|
|
16
16
|
uObjectId: ValueCell.create(id),
|
|
17
17
|
};
|
|
18
18
|
var shaderCode = MeshShaderCode;
|
|
19
|
-
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId);
|
|
19
|
+
var renderItem = createGraphicsRenderItem(ctx, 'triangles', shaderCode, schema, __assign(__assign({}, values), internalValues), materialId, variants);
|
|
20
20
|
return createRenderable(renderItem, values, state);
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=texture-mesh.js.map
|
package/lib/mol-gl/renderer.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { WebGLContext } from './webgl/context';
|
|
|
9
9
|
import { Color } from '../mol-util/color';
|
|
10
10
|
import { GraphicsRenderVariant } from './webgl/render-item';
|
|
11
11
|
import { ParamDefinition as PD } from '../mol-util/param-definition';
|
|
12
|
-
import { Clipping } from '../mol-theme/clipping';
|
|
13
12
|
import { Texture } from './webgl/texture';
|
|
14
13
|
export interface RendererStats {
|
|
15
14
|
programCount: number;
|
|
@@ -24,13 +23,24 @@ export interface RendererStats {
|
|
|
24
23
|
instanceCount: number;
|
|
25
24
|
instancedDrawCount: number;
|
|
26
25
|
}
|
|
26
|
+
export declare const enum PickType {
|
|
27
|
+
None = 0,
|
|
28
|
+
Object = 1,
|
|
29
|
+
Instance = 2,
|
|
30
|
+
Group = 3
|
|
31
|
+
}
|
|
32
|
+
export declare const enum MarkingType {
|
|
33
|
+
None = 0,
|
|
34
|
+
Depth = 1,
|
|
35
|
+
Mask = 2
|
|
36
|
+
}
|
|
27
37
|
interface Renderer {
|
|
28
38
|
readonly stats: RendererStats;
|
|
29
39
|
readonly props: Readonly<RendererProps>;
|
|
30
40
|
clear: (toBackgroundColor: boolean) => void;
|
|
31
41
|
clearDepth: () => void;
|
|
32
42
|
update: (camera: ICamera) => void;
|
|
33
|
-
renderPick: (group: Scene.Group, camera: ICamera, variant: GraphicsRenderVariant, depthTexture: Texture | null) => void;
|
|
43
|
+
renderPick: (group: Scene.Group, camera: ICamera, variant: GraphicsRenderVariant, depthTexture: Texture | null, pickType: PickType) => void;
|
|
34
44
|
renderDepth: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
|
|
35
45
|
renderMarkingDepth: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
|
|
36
46
|
renderMarkingMask: (group: Scene.Group, camera: ICamera, depthTexture: Texture | null) => void;
|
|
@@ -68,16 +78,6 @@ export declare const RendererParams: {
|
|
|
68
78
|
}>>;
|
|
69
79
|
ambientColor: PD.Color;
|
|
70
80
|
ambientIntensity: PD.Numeric;
|
|
71
|
-
clip: PD.Group<PD.Normalize<{
|
|
72
|
-
variant: Clipping.Variant;
|
|
73
|
-
objects: PD.Normalize<{
|
|
74
|
-
type: any;
|
|
75
|
-
invert: any;
|
|
76
|
-
position: any;
|
|
77
|
-
rotation: any;
|
|
78
|
-
scale: any;
|
|
79
|
-
}>[];
|
|
80
|
-
}>>;
|
|
81
81
|
};
|
|
82
82
|
export declare type RendererProps = PD.Values<typeof RendererParams>;
|
|
83
83
|
declare namespace Renderer {
|
package/lib/mol-gl/renderer.js
CHANGED
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
6
6
|
import { Viewport } from '../mol-canvas3d/camera/util';
|
|
7
|
-
import { Mat4, Vec3, Vec4, Vec2
|
|
7
|
+
import { Mat4, Vec3, Vec4, Vec2 } from '../mol-math/linear-algebra';
|
|
8
8
|
import { Color } from '../mol-util/color';
|
|
9
9
|
import { ValueCell, deepEqual } from '../mol-util';
|
|
10
10
|
import { ParamDefinition as PD } from '../mol-util/param-definition';
|
|
11
|
-
import { Clipping } from '../mol-theme/clipping';
|
|
12
|
-
import { stringToWords } from '../mol-util/string';
|
|
13
11
|
import { degToRad } from '../mol-math/misc';
|
|
14
12
|
import { createNullTexture } from './webgl/texture';
|
|
15
13
|
import { arrayMapUpsert } from '../mol-util/array';
|
|
@@ -22,8 +20,8 @@ export var RendererParams = {
|
|
|
22
20
|
interiorColor: PD.Color(Color.fromNormalizedRgb(0.3, 0.3, 0.3)),
|
|
23
21
|
highlightColor: PD.Color(Color.fromNormalizedRgb(1.0, 0.4, 0.6)),
|
|
24
22
|
selectColor: PD.Color(Color.fromNormalizedRgb(0.2, 1.0, 0.1)),
|
|
25
|
-
highlightStrength: PD.Numeric(0.
|
|
26
|
-
selectStrength: PD.Numeric(0.
|
|
23
|
+
highlightStrength: PD.Numeric(0.3, { min: 0.0, max: 1.0, step: 0.1 }),
|
|
24
|
+
selectStrength: PD.Numeric(0.3, { min: 0.0, max: 1.0, step: 0.1 }),
|
|
27
25
|
markerPriority: PD.Select(1, [[1, 'Highlight'], [2, 'Select']]),
|
|
28
26
|
xrayEdgeFalloff: PD.Numeric(1, { min: 0.0, max: 3.0, step: 0.1 }),
|
|
29
27
|
light: PD.ObjectList({
|
|
@@ -39,19 +37,6 @@ export var RendererParams = {
|
|
|
39
37
|
}] }),
|
|
40
38
|
ambientColor: PD.Color(Color.fromNormalizedRgb(1.0, 1.0, 1.0)),
|
|
41
39
|
ambientIntensity: PD.Numeric(0.4, { min: 0.0, max: 1.0, step: 0.01 }),
|
|
42
|
-
clip: PD.Group({
|
|
43
|
-
variant: PD.Select('instance', PD.arrayToOptions(['instance', 'pixel'])),
|
|
44
|
-
objects: PD.ObjectList({
|
|
45
|
-
type: PD.Select('plane', PD.objectToOptions(Clipping.Type, function (t) { return stringToWords(t); })),
|
|
46
|
-
invert: PD.Boolean(false),
|
|
47
|
-
position: PD.Vec3(Vec3()),
|
|
48
|
-
rotation: PD.Group({
|
|
49
|
-
axis: PD.Vec3(Vec3.create(1, 0, 0)),
|
|
50
|
-
angle: PD.Numeric(0, { min: -180, max: 180, step: 1 }, { description: 'Angle in Degrees' }),
|
|
51
|
-
}, { isExpanded: true }),
|
|
52
|
-
scale: PD.Vec3(Vec3.create(1, 1, 1)),
|
|
53
|
-
}, function (o) { return stringToWords(o.type); })
|
|
54
|
-
})
|
|
55
40
|
};
|
|
56
41
|
var tmpDir = Vec3();
|
|
57
42
|
var tmpColor = Vec3();
|
|
@@ -69,36 +54,13 @@ function getLight(props, light) {
|
|
|
69
54
|
}
|
|
70
55
|
return { count: props.length, direction: direction, color: color };
|
|
71
56
|
}
|
|
72
|
-
var tmpQuat = Quat();
|
|
73
|
-
function getClip(props, clip) {
|
|
74
|
-
var _a = (clip === null || clip === void 0 ? void 0 : clip.objects) || {
|
|
75
|
-
type: (new Array(5)).fill(1),
|
|
76
|
-
invert: (new Array(5)).fill(false),
|
|
77
|
-
position: (new Array(5 * 3)).fill(0),
|
|
78
|
-
rotation: (new Array(5 * 4)).fill(0),
|
|
79
|
-
scale: (new Array(5 * 3)).fill(1),
|
|
80
|
-
}, type = _a.type, invert = _a.invert, position = _a.position, rotation = _a.rotation, scale = _a.scale;
|
|
81
|
-
for (var i = 0, il = props.objects.length; i < il; ++i) {
|
|
82
|
-
var p = props.objects[i];
|
|
83
|
-
type[i] = Clipping.Type[p.type];
|
|
84
|
-
invert[i] = p.invert;
|
|
85
|
-
Vec3.toArray(p.position, position, i * 3);
|
|
86
|
-
Quat.toArray(Quat.setAxisAngle(tmpQuat, p.rotation.axis, degToRad(p.rotation.angle)), rotation, i * 4);
|
|
87
|
-
Vec3.toArray(p.scale, scale, i * 3);
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
variant: props.variant,
|
|
91
|
-
objects: { count: props.objects.length, type: type, invert: invert, position: position, rotation: rotation, scale: scale }
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
57
|
var Renderer;
|
|
95
58
|
(function (Renderer) {
|
|
96
59
|
function create(ctx, props) {
|
|
97
60
|
if (props === void 0) { props = {}; }
|
|
98
|
-
var gl = ctx.gl, state = ctx.state, stats = ctx.stats
|
|
61
|
+
var gl = ctx.gl, state = ctx.state, stats = ctx.stats;
|
|
99
62
|
var p = PD.merge(RendererParams, PD.getDefaultValues(RendererParams), props);
|
|
100
63
|
var light = getLight(p.light);
|
|
101
|
-
var clip = getClip(p.clip);
|
|
102
64
|
var viewport = Viewport();
|
|
103
65
|
var drawingBufferSize = Vec2.create(gl.drawingBufferWidth, gl.drawingBufferHeight);
|
|
104
66
|
var bgColor = Color.toVec3Normalized(Vec3(), p.backgroundColor);
|
|
@@ -142,12 +104,9 @@ var Renderer;
|
|
|
142
104
|
uFogColor: ValueCell.create(bgColor),
|
|
143
105
|
uRenderWboit: ValueCell.create(false),
|
|
144
106
|
uMarkingDepthTest: ValueCell.create(false),
|
|
107
|
+
uPickType: ValueCell.create(0 /* None */),
|
|
108
|
+
uMarkingType: ValueCell.create(0 /* None */),
|
|
145
109
|
uTransparentBackground: ValueCell.create(false),
|
|
146
|
-
uClipObjectType: ValueCell.create(clip.objects.type),
|
|
147
|
-
uClipObjectInvert: ValueCell.create(clip.objects.invert),
|
|
148
|
-
uClipObjectPosition: ValueCell.create(clip.objects.position),
|
|
149
|
-
uClipObjectRotation: ValueCell.create(clip.objects.rotation),
|
|
150
|
-
uClipObjectScale: ValueCell.create(clip.objects.scale),
|
|
151
110
|
uLightDirection: ValueCell.create(light.direction),
|
|
152
111
|
uLightColor: ValueCell.create(light.color),
|
|
153
112
|
uAmbientColor: ValueCell.create(ambientColor),
|
|
@@ -165,26 +124,10 @@ var Renderer;
|
|
|
165
124
|
var globalUniformList = Object.entries(globalUniforms);
|
|
166
125
|
var globalUniformsNeedUpdate = true;
|
|
167
126
|
var renderObject = function (r, variant) {
|
|
168
|
-
if (r.state.disposed || !r.state.visible || (!r.state.pickable && variant
|
|
127
|
+
if (r.state.disposed || !r.state.visible || (!r.state.pickable && variant === 'pick')) {
|
|
169
128
|
return;
|
|
170
129
|
}
|
|
171
130
|
var definesNeedUpdate = false;
|
|
172
|
-
if (r.state.noClip) {
|
|
173
|
-
if (r.values.dClipObjectCount.ref.value !== 0) {
|
|
174
|
-
ValueCell.update(r.values.dClipObjectCount, 0);
|
|
175
|
-
definesNeedUpdate = true;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
if (r.values.dClipObjectCount.ref.value !== clip.objects.count) {
|
|
180
|
-
ValueCell.update(r.values.dClipObjectCount, clip.objects.count);
|
|
181
|
-
definesNeedUpdate = true;
|
|
182
|
-
}
|
|
183
|
-
if (r.values.dClipVariant.ref.value !== clip.variant) {
|
|
184
|
-
ValueCell.update(r.values.dClipVariant, clip.variant);
|
|
185
|
-
definesNeedUpdate = true;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
131
|
if (r.values.dLightCount.ref.value !== light.count) {
|
|
189
132
|
ValueCell.update(r.values.dLightCount, light.count);
|
|
190
133
|
definesNeedUpdate = true;
|
|
@@ -202,29 +145,22 @@ var Renderer;
|
|
|
202
145
|
program.setUniforms(globalUniformList);
|
|
203
146
|
globalUniformsNeedUpdate = false;
|
|
204
147
|
}
|
|
205
|
-
if (r.values.
|
|
206
|
-
if (
|
|
207
|
-
return; //
|
|
148
|
+
if (r.values.dGeometryType.ref.value === 'directVolume') {
|
|
149
|
+
if (variant !== 'colorWboit' && variant !== 'colorBlended') {
|
|
150
|
+
return; // only color supported
|
|
208
151
|
}
|
|
209
152
|
// culling done in fragment shader
|
|
210
153
|
state.disable(gl.CULL_FACE);
|
|
211
154
|
state.frontFace(gl.CCW);
|
|
212
155
|
if (variant === 'colorBlended') {
|
|
213
156
|
// depth test done manually in shader against `depthTexture`
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
state.disable(gl.DEPTH_TEST);
|
|
217
|
-
state.depthMask(false);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
state.enable(gl.DEPTH_TEST);
|
|
221
|
-
state.depthMask(r.values.uAlpha.ref.value === 1.0);
|
|
222
|
-
}
|
|
157
|
+
state.disable(gl.DEPTH_TEST);
|
|
158
|
+
state.depthMask(false);
|
|
223
159
|
}
|
|
224
160
|
}
|
|
225
161
|
else {
|
|
226
|
-
if (r.values.
|
|
227
|
-
if (r.values.
|
|
162
|
+
if (r.values.uDoubleSided) {
|
|
163
|
+
if (r.values.uDoubleSided.ref.value || r.values.hasReflection.ref.value) {
|
|
228
164
|
state.disable(gl.CULL_FACE);
|
|
229
165
|
}
|
|
230
166
|
else {
|
|
@@ -285,11 +221,12 @@ var Renderer;
|
|
|
285
221
|
globalUniformsNeedUpdate = true;
|
|
286
222
|
state.currentRenderItemId = -1;
|
|
287
223
|
};
|
|
288
|
-
var renderPick = function (group, camera, variant, depthTexture) {
|
|
224
|
+
var renderPick = function (group, camera, variant, depthTexture, pickType) {
|
|
289
225
|
state.disable(gl.BLEND);
|
|
290
226
|
state.enable(gl.DEPTH_TEST);
|
|
291
227
|
state.depthMask(true);
|
|
292
228
|
updateInternal(group, camera, depthTexture, false, false);
|
|
229
|
+
ValueCell.updateIfChanged(globalUniforms.uPickType, pickType);
|
|
293
230
|
var renderables = group.renderables;
|
|
294
231
|
for (var i = 0, il = renderables.length; i < il; ++i) {
|
|
295
232
|
if (!renderables[i].state.colorOnly) {
|
|
@@ -312,11 +249,12 @@ var Renderer;
|
|
|
312
249
|
state.enable(gl.DEPTH_TEST);
|
|
313
250
|
state.depthMask(true);
|
|
314
251
|
updateInternal(group, camera, depthTexture, false, false);
|
|
252
|
+
ValueCell.updateIfChanged(globalUniforms.uMarkingType, 1 /* Depth */);
|
|
315
253
|
var renderables = group.renderables;
|
|
316
254
|
for (var i = 0, il = renderables.length; i < il; ++i) {
|
|
317
255
|
var r = renderables[i];
|
|
318
256
|
if (r.values.markerAverage.ref.value !== 1) {
|
|
319
|
-
renderObject(renderables[i], '
|
|
257
|
+
renderObject(renderables[i], 'marking');
|
|
320
258
|
}
|
|
321
259
|
}
|
|
322
260
|
};
|
|
@@ -325,11 +263,12 @@ var Renderer;
|
|
|
325
263
|
state.enable(gl.DEPTH_TEST);
|
|
326
264
|
state.depthMask(true);
|
|
327
265
|
updateInternal(group, camera, depthTexture, false, !!depthTexture);
|
|
266
|
+
ValueCell.updateIfChanged(globalUniforms.uMarkingType, 2 /* Mask */);
|
|
328
267
|
var renderables = group.renderables;
|
|
329
268
|
for (var i = 0, il = renderables.length; i < il; ++i) {
|
|
330
269
|
var r = renderables[i];
|
|
331
270
|
if (r.values.markerAverage.ref.value > 0) {
|
|
332
|
-
renderObject(renderables[i], '
|
|
271
|
+
renderObject(renderables[i], 'marking');
|
|
333
272
|
}
|
|
334
273
|
}
|
|
335
274
|
};
|
|
@@ -409,7 +348,7 @@ var Renderer;
|
|
|
409
348
|
}
|
|
410
349
|
};
|
|
411
350
|
var renderWboitOpaque = function (group, camera, depthTexture) {
|
|
412
|
-
var _a, _b
|
|
351
|
+
var _a, _b;
|
|
413
352
|
state.disable(gl.BLEND);
|
|
414
353
|
state.enable(gl.DEPTH_TEST);
|
|
415
354
|
state.depthMask(true);
|
|
@@ -420,13 +359,13 @@ var Renderer;
|
|
|
420
359
|
// TODO: simplify, handle in renderable.state???
|
|
421
360
|
// uAlpha is updated in "render" so we need to recompute it here
|
|
422
361
|
var alpha = clamp(r.values.alpha.ref.value * r.state.alphaFactor, 0, 1);
|
|
423
|
-
if (alpha === 1 && r.values.transparencyAverage.ref.value !== 1 &&
|
|
362
|
+
if (alpha === 1 && r.values.transparencyAverage.ref.value !== 1 && r.values.dGeometryType.ref.value !== 'directVolume' && ((_a = r.values.dPointStyle) === null || _a === void 0 ? void 0 : _a.ref.value) !== 'fuzzy' && !((_b = r.values.dXrayShaded) === null || _b === void 0 ? void 0 : _b.ref.value)) {
|
|
424
363
|
renderObject(r, 'colorWboit');
|
|
425
364
|
}
|
|
426
365
|
}
|
|
427
366
|
};
|
|
428
367
|
var renderWboitTransparent = function (group, camera, depthTexture) {
|
|
429
|
-
var _a, _b
|
|
368
|
+
var _a, _b;
|
|
430
369
|
updateInternal(group, camera, depthTexture, true, false);
|
|
431
370
|
var renderables = group.renderables;
|
|
432
371
|
for (var i = 0, il = renderables.length; i < il; ++i) {
|
|
@@ -434,7 +373,7 @@ var Renderer;
|
|
|
434
373
|
// TODO: simplify, handle in renderable.state???
|
|
435
374
|
// uAlpha is updated in "render" so we need to recompute it here
|
|
436
375
|
var alpha = clamp(r.values.alpha.ref.value * r.state.alphaFactor, 0, 1);
|
|
437
|
-
if (alpha < 1 || r.values.transparencyAverage.ref.value > 0 ||
|
|
376
|
+
if (alpha < 1 || r.values.transparencyAverage.ref.value > 0 || r.values.dGeometryType.ref.value === 'directVolume' || ((_a = r.values.dPointStyle) === null || _a === void 0 ? void 0 : _a.ref.value) === 'fuzzy' || !!r.values.uBackgroundColor || ((_b = r.values.dXrayShaded) === null || _b === void 0 ? void 0 : _b.ref.value)) {
|
|
438
377
|
renderObject(r, 'colorWboit');
|
|
439
378
|
}
|
|
440
379
|
}
|
|
@@ -536,14 +475,6 @@ var Renderer;
|
|
|
536
475
|
Vec3.scale(ambientColor, Color.toArrayNormalized(p.ambientColor, ambientColor, 0), p.ambientIntensity);
|
|
537
476
|
ValueCell.update(globalUniforms.uAmbientColor, ambientColor);
|
|
538
477
|
}
|
|
539
|
-
if (props.clip !== undefined && !deepEqual(props.clip, p.clip)) {
|
|
540
|
-
p.clip = props.clip;
|
|
541
|
-
Object.assign(clip, getClip(props.clip, clip));
|
|
542
|
-
ValueCell.update(globalUniforms.uClipObjectPosition, clip.objects.position);
|
|
543
|
-
ValueCell.update(globalUniforms.uClipObjectRotation, clip.objects.rotation);
|
|
544
|
-
ValueCell.update(globalUniforms.uClipObjectScale, clip.objects.scale);
|
|
545
|
-
ValueCell.update(globalUniforms.uClipObjectType, clip.objects.type);
|
|
546
|
-
}
|
|
547
478
|
},
|
|
548
479
|
setViewport: function (x, y, width, height) {
|
|
549
480
|
gl.viewport(x, y, width, height);
|
package/lib/mol-gl/scene.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-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
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -31,6 +31,6 @@ declare namespace Scene {
|
|
|
31
31
|
interface Group extends Object3D {
|
|
32
32
|
readonly renderables: ReadonlyArray<GraphicsRenderable>;
|
|
33
33
|
}
|
|
34
|
-
function create(ctx: WebGLContext): Scene;
|
|
34
|
+
function create(ctx: WebGLContext, variants?: ("depth" | "colorBlended" | "colorWboit" | "pick" | "marking")[]): Scene;
|
|
35
35
|
}
|
|
36
36
|
export { Scene };
|
package/lib/mol-gl/scene.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2018-
|
|
2
|
+
* Copyright (c) 2018-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
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
@@ -12,6 +12,7 @@ import { now } from '../mol-util/now';
|
|
|
12
12
|
import { arraySetRemove } from '../mol-util/array';
|
|
13
13
|
import { BoundaryHelper } from '../mol-math/geometry/boundary-helper';
|
|
14
14
|
import { hash1 } from '../mol-data/util';
|
|
15
|
+
import { GraphicsRenderVariants } from './webgl/render-item';
|
|
15
16
|
var boundaryHelper = new BoundaryHelper('98');
|
|
16
17
|
function calculateBoundingSphere(renderables, boundingSphere, onlyVisible) {
|
|
17
18
|
boundaryHelper.reset();
|
|
@@ -35,8 +36,8 @@ function calculateBoundingSphere(renderables, boundingSphere, onlyVisible) {
|
|
|
35
36
|
return boundaryHelper.getSphere(boundingSphere);
|
|
36
37
|
}
|
|
37
38
|
function renderableSort(a, b) {
|
|
38
|
-
var drawProgramIdA = a.getProgram('colorBlended').id;
|
|
39
|
-
var drawProgramIdB = b.getProgram('colorBlended').id;
|
|
39
|
+
var drawProgramIdA = (a.getProgram('colorBlended') || a.getProgram('colorWboit')).id;
|
|
40
|
+
var drawProgramIdB = (b.getProgram('colorBlended') || a.getProgram('colorWboit')).id;
|
|
40
41
|
var materialIdA = a.materialId;
|
|
41
42
|
var materialIdB = b.materialId;
|
|
42
43
|
if (drawProgramIdA !== drawProgramIdB) {
|
|
@@ -53,7 +54,8 @@ function renderableSort(a, b) {
|
|
|
53
54
|
}
|
|
54
55
|
var Scene;
|
|
55
56
|
(function (Scene) {
|
|
56
|
-
function create(ctx) {
|
|
57
|
+
function create(ctx, variants) {
|
|
58
|
+
if (variants === void 0) { variants = GraphicsRenderVariants; }
|
|
57
59
|
var renderableMap = new Map();
|
|
58
60
|
var renderables = [];
|
|
59
61
|
var boundingSphere = Sphere3D();
|
|
@@ -66,7 +68,7 @@ var Scene;
|
|
|
66
68
|
var view = object3d.view, position = object3d.position, direction = object3d.direction, up = object3d.up;
|
|
67
69
|
function add(o) {
|
|
68
70
|
if (!renderableMap.has(o)) {
|
|
69
|
-
var renderable = createRenderable(ctx, o);
|
|
71
|
+
var renderable = createRenderable(ctx, o, variants);
|
|
70
72
|
renderables.push(renderable);
|
|
71
73
|
if (o.type === 'direct-volume') {
|
|
72
74
|
volumes.push(renderable);
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* adapted from three.js (https://github.com/mrdoob/three.js/)
|
|
7
7
|
* which under the MIT License, Copyright © 2010-2021 three.js authors
|
|
8
8
|
*/
|
|
9
|
-
export declare const apply_light_color = "\n#ifdef bumpEnabled\n if (uBumpFrequency > 0.0 && uBumpAmplitude > 0.0) {\n vec3 bumpNormal = perturbNormal(-vViewPosition, normal, fbm(vModelPosition * uBumpFrequency), (uBumpAmplitude * bumpiness) / uBumpFrequency);\n #ifdef enabledFragDepth\n if (!
|
|
9
|
+
export declare const apply_light_color = "\n#ifdef bumpEnabled\n if (uBumpFrequency > 0.0 && uBumpAmplitude > 0.0) {\n vec3 bumpNormal = perturbNormal(-vViewPosition, normal, fbm(vModelPosition * uBumpFrequency), (uBumpAmplitude * bumpiness) / uBumpFrequency);\n #ifdef enabledFragDepth\n if (!isNaN(bumpNormal.x) && !isNaN(bumpNormal.y) && !isNaN(bumpNormal.z)) {\n normal = bumpNormal;\n }\n #else\n normal = bumpNormal;\n #endif\n }\n#endif\n\nvec4 color = material;\n\nReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));\n\nPhysicalMaterial physicalMaterial;\nphysicalMaterial.diffuseColor = color.rgb * (1.0 - metalness);\n#ifdef enabledFragDepth\n physicalMaterial.roughness = min(max(roughness, 0.0525), 1.0);\n#else\n vec3 dxy = max(abs(dFdx(normal)), abs(dFdy(normal)));\n float geometryRoughness = max(max(dxy.x, dxy.y), dxy.z);\n physicalMaterial.roughness = min(max(roughness, 0.0525) + geometryRoughness, 1.0);\n#endif\nphysicalMaterial.specularColor = mix(vec3(0.04), color.rgb, metalness);\nphysicalMaterial.specularF90 = 1.0;\n\nGeometricContext geometry;\ngeometry.position = -vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize(vViewPosition);\n\nIncidentLight directLight;\n#pragma unroll_loop_start\nfor (int i = 0; i < dLightCount; ++i) {\n directLight.direction = uLightDirection[i];\n directLight.color = uLightColor[i] * PI; // * PI for punctual light\n RE_Direct_Physical(directLight, geometry, physicalMaterial, reflectedLight);\n}\n#pragma unroll_loop_end\n\nvec3 irradiance = uAmbientColor * PI; // * PI for punctual light\nRE_IndirectDiffuse_Physical(irradiance, geometry, physicalMaterial, reflectedLight);\n\n// indirect specular only metals\nvec3 radiance = uAmbientColor * metalness;\nvec3 iblIrradiance = uAmbientColor * metalness;\nvec3 clearcoatRadiance = vec3(0.0);\nRE_IndirectSpecular_Physical(radiance, iblIrradiance, clearcoatRadiance, geometry, physicalMaterial, reflectedLight);\n\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\ngl_FragColor = vec4(outgoingLight, color.a);\n\n#ifdef dXrayShaded\n gl_FragColor.a *= 1.0 - pow(abs(dot(normal, vec3(0.0, 0.0, 1.0))), uXrayEdgeFalloff);\n#endif\n";
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* adapted from three.js (https://github.com/mrdoob/three.js/)
|
|
7
7
|
* which under the MIT License, Copyright © 2010-2021 three.js authors
|
|
8
8
|
*/
|
|
9
|
-
export var apply_light_color = "\n#ifdef bumpEnabled\n if (uBumpFrequency > 0.0 && uBumpAmplitude > 0.0) {\n vec3 bumpNormal = perturbNormal(-vViewPosition, normal, fbm(vModelPosition * uBumpFrequency), (uBumpAmplitude * bumpiness) / uBumpFrequency);\n #ifdef enabledFragDepth\n if (!
|
|
9
|
+
export var apply_light_color = "\n#ifdef bumpEnabled\n if (uBumpFrequency > 0.0 && uBumpAmplitude > 0.0) {\n vec3 bumpNormal = perturbNormal(-vViewPosition, normal, fbm(vModelPosition * uBumpFrequency), (uBumpAmplitude * bumpiness) / uBumpFrequency);\n #ifdef enabledFragDepth\n if (!isNaN(bumpNormal.x) && !isNaN(bumpNormal.y) && !isNaN(bumpNormal.z)) {\n normal = bumpNormal;\n }\n #else\n normal = bumpNormal;\n #endif\n }\n#endif\n\nvec4 color = material;\n\nReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));\n\nPhysicalMaterial physicalMaterial;\nphysicalMaterial.diffuseColor = color.rgb * (1.0 - metalness);\n#ifdef enabledFragDepth\n physicalMaterial.roughness = min(max(roughness, 0.0525), 1.0);\n#else\n vec3 dxy = max(abs(dFdx(normal)), abs(dFdy(normal)));\n float geometryRoughness = max(max(dxy.x, dxy.y), dxy.z);\n physicalMaterial.roughness = min(max(roughness, 0.0525) + geometryRoughness, 1.0);\n#endif\nphysicalMaterial.specularColor = mix(vec3(0.04), color.rgb, metalness);\nphysicalMaterial.specularF90 = 1.0;\n\nGeometricContext geometry;\ngeometry.position = -vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize(vViewPosition);\n\nIncidentLight directLight;\n#pragma unroll_loop_start\nfor (int i = 0; i < dLightCount; ++i) {\n directLight.direction = uLightDirection[i];\n directLight.color = uLightColor[i] * PI; // * PI for punctual light\n RE_Direct_Physical(directLight, geometry, physicalMaterial, reflectedLight);\n}\n#pragma unroll_loop_end\n\nvec3 irradiance = uAmbientColor * PI; // * PI for punctual light\nRE_IndirectDiffuse_Physical(irradiance, geometry, physicalMaterial, reflectedLight);\n\n// indirect specular only metals\nvec3 radiance = uAmbientColor * metalness;\nvec3 iblIrradiance = uAmbientColor * metalness;\nvec3 clearcoatRadiance = vec3(0.0);\nRE_IndirectSpecular_Physical(radiance, iblIrradiance, clearcoatRadiance, geometry, physicalMaterial, reflectedLight);\n\nvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\ngl_FragColor = vec4(outgoingLight, color.a);\n\n#ifdef dXrayShaded\n gl_FragColor.a *= 1.0 - pow(abs(dot(normal, vec3(0.0, 0.0, 1.0))), uXrayEdgeFalloff);\n#endif\n";
|
|
10
10
|
//# sourceMappingURL=apply-light-color.glsl.js.map
|