molstar 3.31.2 → 3.31.4

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.
Files changed (80) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -202
  3. package/build/viewer/embedded.html +52 -52
  4. package/build/viewer/index.html +115 -115
  5. package/build/viewer/molstar.js +1 -1
  6. package/lib/apps/docking-viewer/index.html +36 -36
  7. package/lib/apps/viewer/embedded.html +52 -52
  8. package/lib/apps/viewer/index.html +115 -115
  9. package/lib/commonjs/extensions/meshes/mesh-extension.d.ts +4 -2
  10. package/lib/commonjs/extensions/meshes/mesh-streaming/behavior.d.ts +2 -0
  11. package/lib/commonjs/mol-canvas3d/canvas3d.js +2 -1
  12. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  13. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
  14. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  15. package/lib/commonjs/mol-gl/shader/cylinders.vert.d.ts +2 -2
  16. package/lib/commonjs/mol-gl/shader/cylinders.vert.js +2 -2
  17. package/lib/commonjs/mol-gl/shader/spheres.vert.d.ts +2 -2
  18. package/lib/commonjs/mol-gl/shader/spheres.vert.js +2 -2
  19. package/lib/commonjs/mol-math/linear-algebra/matrix/principal-axes.js +1 -1
  20. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  21. package/lib/commonjs/mol-plugin/context.js +1 -0
  22. package/lib/commonjs/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -1
  23. package/lib/commonjs/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -1
  24. package/lib/commonjs/mol-repr/structure/visual/util/link.d.ts +1 -0
  25. package/lib/commonjs/mol-repr/structure/visual/util/link.js +27 -9
  26. package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
  27. package/lib/commonjs/mol-util/data-source.js +2 -1
  28. package/lib/examples/alpha-orbitals/index.html +72 -72
  29. package/lib/examples/basic-wrapper/index.html +137 -137
  30. package/lib/examples/lighting/index.html +88 -88
  31. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  32. package/lib/extensions/meshes/mesh-extension.d.ts +4 -2
  33. package/lib/extensions/meshes/mesh-streaming/behavior.d.ts +2 -0
  34. package/lib/mol-canvas3d/canvas3d.js +2 -1
  35. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
  36. package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
  37. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  38. package/lib/mol-gl/shader/cylinders.vert.d.ts +2 -2
  39. package/lib/mol-gl/shader/cylinders.vert.js +2 -2
  40. package/lib/mol-gl/shader/spheres.vert.d.ts +2 -2
  41. package/lib/mol-gl/shader/spheres.vert.js +2 -2
  42. package/lib/mol-math/linear-algebra/matrix/principal-axes.js +1 -1
  43. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  44. package/lib/mol-plugin/context.js +1 -0
  45. package/lib/mol-plugin/version.js +2 -2
  46. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  47. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  48. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  49. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  50. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  51. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  52. package/lib/mol-plugin-ui/skin/base/components/misc.scss +663 -663
  53. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  54. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  55. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  56. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  57. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  58. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +137 -137
  59. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  60. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  61. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  62. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  63. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  64. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  65. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  66. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  67. package/lib/mol-plugin-ui/skin/base/variables.scss +88 -88
  68. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  69. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  70. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  71. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  72. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  73. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  74. package/lib/mol-repr/structure/visual/bond-inter-unit-cylinder.js +2 -1
  75. package/lib/mol-repr/structure/visual/bond-intra-unit-cylinder.js +2 -1
  76. package/lib/mol-repr/structure/visual/util/link.d.ts +1 -0
  77. package/lib/mol-repr/structure/visual/util/link.js +27 -9
  78. package/lib/mol-script/language/builder.d.ts +1 -0
  79. package/lib/mol-util/data-source.js +2 -1
  80. package/package.json +178 -177
@@ -1,37 +1,37 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
- <title>Mol* Docking Viewer</title>
7
- <style>
8
- #app {
9
- position: absolute;
10
- left: 100px;
11
- top: 100px;
12
- width: 800px;
13
- height: 600px;
14
- }
15
- </style>
16
- <link rel="stylesheet" type="text/css" href="molstar.css" />
17
- </head>
18
- <body>
19
- <div id="app"></div>
20
- <script type="text/javascript" src="./molstar.js"></script>
21
- <script type="text/javascript">
22
- function getParam(name, regex) {
23
- var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
24
- return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
25
- }
26
- var pdbqt = getParam('pdbqt', '[^&]+').trim() || '../../examples/ace2.pdbqt';
27
- var mol2 = getParam('mol2', '[^&]+').trim() || '../../examples/ace2-hit.mol2';
28
-
29
- DockingViewer.create('app', [0x33DD22, 0x1133EE], true).then(viewer => {
30
- viewer.loadStructuresFromUrlsAndMerge([
31
- { url: pdbqt, format: 'pdbqt' },
32
- { url: mol2, format: 'mol2' }
33
- ]);
34
- });
35
- </script>
36
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
+ <title>Mol* Docking Viewer</title>
7
+ <style>
8
+ #app {
9
+ position: absolute;
10
+ left: 100px;
11
+ top: 100px;
12
+ width: 800px;
13
+ height: 600px;
14
+ }
15
+ </style>
16
+ <link rel="stylesheet" type="text/css" href="molstar.css" />
17
+ </head>
18
+ <body>
19
+ <div id="app"></div>
20
+ <script type="text/javascript" src="./molstar.js"></script>
21
+ <script type="text/javascript">
22
+ function getParam(name, regex) {
23
+ var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
24
+ return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
25
+ }
26
+ var pdbqt = getParam('pdbqt', '[^&]+').trim() || '../../examples/ace2.pdbqt';
27
+ var mol2 = getParam('mol2', '[^&]+').trim() || '../../examples/ace2-hit.mol2';
28
+
29
+ DockingViewer.create('app', [0x33DD22, 0x1133EE], true).then(viewer => {
30
+ viewer.loadStructuresFromUrlsAndMerge([
31
+ { url: pdbqt, format: 'pdbqt' },
32
+ { url: mol2, format: 'mol2' }
33
+ ]);
34
+ });
35
+ </script>
36
+ </body>
37
37
  </html>
@@ -1,53 +1,53 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
- <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
- <title>Embedded Mol* Viewer</title>
8
- <style>
9
- #app {
10
- position: absolute;
11
- left: 100px;
12
- top: 100px;
13
- width: 800px;
14
- height: 600px;
15
- }
16
- </style>
17
- <link rel="stylesheet" type="text/css" href="molstar.css" />
18
- </head>
19
- <body>
20
- <div id="app"></div>
21
- <script type="text/javascript" src="./molstar.js"></script>
22
- <script type="text/javascript">
23
- molstar.Viewer.create('app', {
24
- layoutIsExpanded: true,
25
- layoutShowControls: false,
26
- layoutShowRemoteState: false,
27
- layoutShowSequence: true,
28
- layoutShowLog: false,
29
- layoutShowLeftPanel: true,
30
-
31
- viewportShowExpand: true,
32
- viewportShowSelectionMode: false,
33
- viewportShowAnimation: false,
34
-
35
- pdbProvider: 'rcsb',
36
- emdbProvider: 'rcsb',
37
- }).then(viewer => {
38
- viewer.loadPdb('7bv2');
39
- viewer.loadEmdb('EMD-30210', { detail: 6 });
40
- // viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
41
- // viewer.loadStructureFromUrl('my url', 'pdb', false, {
42
- // representationParams: {
43
- // theme: {
44
- // globalName: 'uniform',
45
- // globalColorParams: { value: 0xff0000 }
46
- // }
47
- // },
48
- // label: 'my structure'
49
- // });
50
- });
51
- </script>
52
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
+ <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
+ <title>Embedded Mol* Viewer</title>
8
+ <style>
9
+ #app {
10
+ position: absolute;
11
+ left: 100px;
12
+ top: 100px;
13
+ width: 800px;
14
+ height: 600px;
15
+ }
16
+ </style>
17
+ <link rel="stylesheet" type="text/css" href="molstar.css" />
18
+ </head>
19
+ <body>
20
+ <div id="app"></div>
21
+ <script type="text/javascript" src="./molstar.js"></script>
22
+ <script type="text/javascript">
23
+ molstar.Viewer.create('app', {
24
+ layoutIsExpanded: true,
25
+ layoutShowControls: false,
26
+ layoutShowRemoteState: false,
27
+ layoutShowSequence: true,
28
+ layoutShowLog: false,
29
+ layoutShowLeftPanel: true,
30
+
31
+ viewportShowExpand: true,
32
+ viewportShowSelectionMode: false,
33
+ viewportShowAnimation: false,
34
+
35
+ pdbProvider: 'rcsb',
36
+ emdbProvider: 'rcsb',
37
+ }).then(viewer => {
38
+ viewer.loadPdb('7bv2');
39
+ viewer.loadEmdb('EMD-30210', { detail: 6 });
40
+ // viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
41
+ // viewer.loadStructureFromUrl('my url', 'pdb', false, {
42
+ // representationParams: {
43
+ // theme: {
44
+ // globalName: 'uniform',
45
+ // globalColorParams: { value: 0xff0000 }
46
+ // }
47
+ // },
48
+ // label: 'my structure'
49
+ // });
50
+ });
51
+ </script>
52
+ </body>
53
53
  </html>
@@ -1,116 +1,116 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
- <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
- <title>Mol* Viewer</title>
8
- <style>
9
- * {
10
- margin: 0;
11
- padding: 0;
12
- box-sizing: border-box;
13
- }
14
- html, body {
15
- width: 100%;
16
- height: 100%;
17
- overflow: hidden;
18
- }
19
- hr {
20
- margin: 10px;
21
- }
22
- h1, h2, h3, h4, h5 {
23
- margin-top: 5px;
24
- margin-bottom: 3px;
25
- }
26
- button {
27
- padding: 2px;
28
- }
29
- #app {
30
- position: absolute;
31
- left: 100px;
32
- top: 100px;
33
- width: 800px;
34
- height: 600px;
35
- }
36
- </style>
37
- <link rel="stylesheet" type="text/css" href="molstar.css" />
38
- </head>
39
- <body>
40
- <div id="app"></div>
41
- <script type="text/javascript" src="./molstar.js"></script>
42
- <script type="text/javascript">
43
- function getParam(name, regex) {
44
- var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
45
- return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
46
- }
47
-
48
- var debugMode = getParam('debug-mode', '[^&]+').trim() === '1';
49
- if (debugMode) molstar.setDebugMode(debugMode);
50
-
51
- var timingMode = getParam('timing-mode', '[^&]+').trim() === '1';
52
- if (timingMode) molstar.setTimingMode(timingMode);
53
-
54
- var hideControls = getParam('hide-controls', '[^&]+').trim() === '1';
55
- var collapseLeftPanel = getParam('collapse-left-panel', '[^&]+').trim() === '1';
56
- var pdbProvider = getParam('pdb-provider', '[^&]+').trim().toLowerCase();
57
- var emdbProvider = getParam('emdb-provider', '[^&]+').trim().toLowerCase();
58
- var mapProvider = getParam('map-provider', '[^&]+').trim().toLowerCase();
59
- var pixelScale = getParam('pixel-scale', '[^&]+').trim();
60
- var pickScale = getParam('pick-scale', '[^&]+').trim();
61
- var pickPadding = getParam('pick-padding', '[^&]+').trim();
62
- var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1';
63
- var enableDpoit = getParam('enable-dpoit', '[^&]+').trim() === '1';
64
- var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0;
65
- var allowMajorPerformanceCaveat = getParam('allow-major-performance-caveat', '[^&]+').trim() === '1';
66
- var powerPreference = getParam('power-preference', '[^&]+').trim().toLowerCase();
67
-
68
- molstar.Viewer.create('app', {
69
- layoutShowControls: !hideControls,
70
- viewportShowExpand: false,
71
- collapseLeftPanel: collapseLeftPanel,
72
- pdbProvider: pdbProvider || 'pdbe',
73
- emdbProvider: emdbProvider || 'pdbe',
74
- volumeStreamingServer: (mapProvider || 'pdbe') === 'rcsb'
75
- ? 'https://maps.rcsb.org'
76
- : 'https://www.ebi.ac.uk/pdbe/densities',
77
- pixelScale: parseFloat(pixelScale) || 1,
78
- pickScale: parseFloat(pickScale) || 0.25,
79
- pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding),
80
- enableWboit: (disableWboit || enableDpoit) ? false : void 0, // use default value if disable-wboit is not set
81
- enableDpoit: enableDpoit ? true : void 0,
82
- preferWebgl1: preferWebgl1,
83
- allowMajorPerformanceCaveat: allowMajorPerformanceCaveat,
84
- powerPreference: powerPreference || 'high-performance',
85
- }).then(viewer => {
86
- var snapshotId = getParam('snapshot-id', '[^&]+').trim();
87
- if (snapshotId) viewer.setRemoteSnapshot(snapshotId);
88
-
89
- var snapshotUrl = getParam('snapshot-url', '[^&]+').trim();
90
- var snapshotUrlType = getParam('snapshot-url-type', '[^&]+').toLowerCase().trim() || 'molj';
91
- if (snapshotUrl && snapshotUrlType) viewer.loadSnapshotFromUrl(snapshotUrl, snapshotUrlType);
92
-
93
- var structureUrl = getParam('structure-url', '[^&]+').trim();
94
- var structureUrlFormat = getParam('structure-url-format', '[a-z]+').toLowerCase().trim();
95
- var structureUrlIsBinary = getParam('structure-url-is-binary', '[^&]+').trim() === '1';
96
- if (structureUrl) viewer.loadStructureFromUrl(structureUrl, structureUrlFormat, structureUrlIsBinary);
97
-
98
- var pdb = getParam('pdb', '[^&]+').trim();
99
- if (pdb) viewer.loadPdb(pdb);
100
-
101
- var pdbDev = getParam('pdb-dev', '[^&]+').trim();
102
- if (pdbDev) viewer.loadPdbDev(pdbDev);
103
-
104
- var emdb = getParam('emdb', '[^&]+').trim();
105
- if (emdb) viewer.loadEmdb(emdb);
106
-
107
- var afdb = getParam('afdb', '[^&]+').trim();
108
- if (afdb) viewer.loadAlphaFoldDb(afdb);
109
-
110
- var modelArchive = getParam('model-archive', '[^&]+').trim();
111
- if (modelArchive) viewer.loadModelArchive(modelArchive);
112
- });
113
- </script>
114
- <!-- __MOLSTAR_ANALYTICS__ -->
115
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
6
+ <link rel="icon" href="./favicon.ico" type="image/x-icon">
7
+ <title>Mol* Viewer</title>
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ }
14
+ html, body {
15
+ width: 100%;
16
+ height: 100%;
17
+ overflow: hidden;
18
+ }
19
+ hr {
20
+ margin: 10px;
21
+ }
22
+ h1, h2, h3, h4, h5 {
23
+ margin-top: 5px;
24
+ margin-bottom: 3px;
25
+ }
26
+ button {
27
+ padding: 2px;
28
+ }
29
+ #app {
30
+ position: absolute;
31
+ left: 100px;
32
+ top: 100px;
33
+ width: 800px;
34
+ height: 600px;
35
+ }
36
+ </style>
37
+ <link rel="stylesheet" type="text/css" href="molstar.css" />
38
+ </head>
39
+ <body>
40
+ <div id="app"></div>
41
+ <script type="text/javascript" src="./molstar.js"></script>
42
+ <script type="text/javascript">
43
+ function getParam(name, regex) {
44
+ var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
45
+ return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
46
+ }
47
+
48
+ var debugMode = getParam('debug-mode', '[^&]+').trim() === '1';
49
+ if (debugMode) molstar.setDebugMode(debugMode);
50
+
51
+ var timingMode = getParam('timing-mode', '[^&]+').trim() === '1';
52
+ if (timingMode) molstar.setTimingMode(timingMode);
53
+
54
+ var hideControls = getParam('hide-controls', '[^&]+').trim() === '1';
55
+ var collapseLeftPanel = getParam('collapse-left-panel', '[^&]+').trim() === '1';
56
+ var pdbProvider = getParam('pdb-provider', '[^&]+').trim().toLowerCase();
57
+ var emdbProvider = getParam('emdb-provider', '[^&]+').trim().toLowerCase();
58
+ var mapProvider = getParam('map-provider', '[^&]+').trim().toLowerCase();
59
+ var pixelScale = getParam('pixel-scale', '[^&]+').trim();
60
+ var pickScale = getParam('pick-scale', '[^&]+').trim();
61
+ var pickPadding = getParam('pick-padding', '[^&]+').trim();
62
+ var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1';
63
+ var enableDpoit = getParam('enable-dpoit', '[^&]+').trim() === '1';
64
+ var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0;
65
+ var allowMajorPerformanceCaveat = getParam('allow-major-performance-caveat', '[^&]+').trim() === '1';
66
+ var powerPreference = getParam('power-preference', '[^&]+').trim().toLowerCase();
67
+
68
+ molstar.Viewer.create('app', {
69
+ layoutShowControls: !hideControls,
70
+ viewportShowExpand: false,
71
+ collapseLeftPanel: collapseLeftPanel,
72
+ pdbProvider: pdbProvider || 'pdbe',
73
+ emdbProvider: emdbProvider || 'pdbe',
74
+ volumeStreamingServer: (mapProvider || 'pdbe') === 'rcsb'
75
+ ? 'https://maps.rcsb.org'
76
+ : 'https://www.ebi.ac.uk/pdbe/densities',
77
+ pixelScale: parseFloat(pixelScale) || 1,
78
+ pickScale: parseFloat(pickScale) || 0.25,
79
+ pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding),
80
+ enableWboit: (disableWboit || enableDpoit) ? false : void 0, // use default value if disable-wboit is not set
81
+ enableDpoit: enableDpoit ? true : void 0,
82
+ preferWebgl1: preferWebgl1,
83
+ allowMajorPerformanceCaveat: allowMajorPerformanceCaveat,
84
+ powerPreference: powerPreference || 'high-performance',
85
+ }).then(viewer => {
86
+ var snapshotId = getParam('snapshot-id', '[^&]+').trim();
87
+ if (snapshotId) viewer.setRemoteSnapshot(snapshotId);
88
+
89
+ var snapshotUrl = getParam('snapshot-url', '[^&]+').trim();
90
+ var snapshotUrlType = getParam('snapshot-url-type', '[^&]+').toLowerCase().trim() || 'molj';
91
+ if (snapshotUrl && snapshotUrlType) viewer.loadSnapshotFromUrl(snapshotUrl, snapshotUrlType);
92
+
93
+ var structureUrl = getParam('structure-url', '[^&]+').trim();
94
+ var structureUrlFormat = getParam('structure-url-format', '[a-z]+').toLowerCase().trim();
95
+ var structureUrlIsBinary = getParam('structure-url-is-binary', '[^&]+').trim() === '1';
96
+ if (structureUrl) viewer.loadStructureFromUrl(structureUrl, structureUrlFormat, structureUrlIsBinary);
97
+
98
+ var pdb = getParam('pdb', '[^&]+').trim();
99
+ if (pdb) viewer.loadPdb(pdb);
100
+
101
+ var pdbDev = getParam('pdb-dev', '[^&]+').trim();
102
+ if (pdbDev) viewer.loadPdbDev(pdbDev);
103
+
104
+ var emdb = getParam('emdb', '[^&]+').trim();
105
+ if (emdb) viewer.loadEmdb(emdb);
106
+
107
+ var afdb = getParam('afdb', '[^&]+').trim();
108
+ if (afdb) viewer.loadAlphaFoldDb(afdb);
109
+
110
+ var modelArchive = getParam('model-archive', '[^&]+').trim();
111
+ if (modelArchive) viewer.loadModelArchive(modelArchive);
112
+ });
113
+ </script>
114
+ <!-- __MOLSTAR_ANALYTICS__ -->
115
+ </body>
116
116
  </html>
@@ -40,18 +40,20 @@ declare const MeshlistStateObject_base: {
40
40
  description?: string | undefined;
41
41
  } | undefined): {
42
42
  id: import("../../mol-util/uuid").UUID;
43
- /** Data type for `MeshlistStateObject` - list of meshes */
44
43
  type: PluginStateObject.TypeInfo;
44
+ /** Data type for `MeshlistStateObject` - list of meshes */
45
45
  label: string;
46
+ /** Data type for `MeshlistStateObject` - list of meshes */
46
47
  description?: string | undefined;
47
48
  data: MeshlistData;
48
49
  };
49
50
  type: PluginStateObject.TypeInfo;
50
51
  is(obj?: import("../../mol-state/object").StateObject<any, import("../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
51
52
  id: import("../../mol-util/uuid").UUID;
52
- /** Data type for `MeshlistStateObject` - list of meshes */
53
53
  type: PluginStateObject.TypeInfo;
54
+ /** Data type for `MeshlistStateObject` - list of meshes */
54
55
  label: string;
56
+ /** Data type for `MeshlistStateObject` - list of meshes */
55
57
  description?: string | undefined;
56
58
  data: MeshlistData;
57
59
  };
@@ -20,6 +20,7 @@ declare const MeshStreaming_base: {
20
20
  label: string;
21
21
  description?: string | undefined;
22
22
  } | undefined): {
23
+ /** Segments whose bounding box volume is above this value (relative to the overall bounding box) are considered as background segments */
23
24
  id: UUID;
24
25
  type: PluginStateObject.TypeInfo;
25
26
  label: string;
@@ -28,6 +29,7 @@ declare const MeshStreaming_base: {
28
29
  };
29
30
  type: PluginStateObject.TypeInfo;
30
31
  is(obj?: import("../../../mol-state/object").StateObject<any, import("../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
32
+ /** Segments whose bounding box volume is above this value (relative to the overall bounding box) are considered as background segments */
31
33
  id: UUID;
32
34
  type: PluginStateObject.TypeInfo;
33
35
  label: string;
@@ -62,7 +62,7 @@ exports.Canvas3DParams = {
62
62
  cameraClipping: param_definition_1.ParamDefinition.Group({
63
63
  radius: param_definition_1.ParamDefinition.Numeric(100, { min: 0, max: 99, step: 1 }, { label: 'Clipping', description: 'How much of the scene to show.' }),
64
64
  far: param_definition_1.ParamDefinition.Boolean(true, { description: 'Hide scene in the distance' }),
65
- minNear: param_definition_1.ParamDefinition.Numeric(5, { min: 0.1, max: 10, step: 0.1 }, { description: 'Note, may cause performance issues rendering impostors when set too small and cause issues with outline rendering when too close to 0.' }),
65
+ minNear: param_definition_1.ParamDefinition.Numeric(5, { min: 0.1, max: 100, step: 0.1 }, { description: 'Note, may cause performance issues rendering impostors when set too small and cause issues with outline rendering when too close to 0.' }),
66
66
  }, { pivot: 'radius' }),
67
67
  viewport: param_definition_1.ParamDefinition.MappedStatic('canvas', {
68
68
  canvas: param_definition_1.ParamDefinition.Group({}),
@@ -779,6 +779,7 @@ var Canvas3D;
779
779
  },
780
780
  dispose: function () {
781
781
  contextRestoredSub.unsubscribe();
782
+ cancelAnimationFrame(animationFrameHandle);
782
783
  markBuffer = [];
783
784
  scene.clear();
784
785
  helper.debug.clear();
@@ -51,8 +51,8 @@ export declare namespace Cylinders {
51
51
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
52
52
  material: PD.Group<PD.Normalize<{
53
53
  metalness: number;
54
- /** Number of cylinders */
55
54
  roughness: number;
55
+ /** Number of cylinders */
56
56
  bumpiness: number;
57
57
  }>>;
58
58
  clip: PD.Group<PD.Normalize<{
@@ -44,7 +44,6 @@ export declare namespace Lines {
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
46
  roughness: number;
47
- /** Number of lines */
48
47
  bumpiness: number;
49
48
  }>>;
50
49
  clip: PD.Group<PD.Normalize<{
@@ -43,7 +43,7 @@ export declare namespace Points {
43
43
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
- roughness: number;
46
+ roughness: number; /** Number of vertices in the point cloud */
47
47
  bumpiness: number;
48
48
  }>>;
49
49
  clip: PD.Group<PD.Normalize<{
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2020-2023 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
- export declare const cylinders_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec3 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\nattribute float aScale;\nattribute float aCap;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform float uIsOrtho;\nuniform vec3 uCameraDir;\n\nvoid main() {\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelTransform = uModel * aTransform;\n\n vTransform = aTransform;\n vStart = (modelTransform * vec4(aStart, 1.0)).xyz;\n vEnd = (modelTransform * vec4(aEnd, 1.0)).xyz;\n vSize = size * aScale;\n vCap = aCap;\n\n vModelPosition = (vStart + vEnd) * 0.5;\n vec3 camDir = -mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 dir = vEnd - vStart;\n // ensure cylinder 'dir' is pointing towards the camera\n if(dot(camDir, dir) < 0.0) {\n dir = -dir;\n }\n\n vec3 left = cross(camDir, dir);\n vec3 up = cross(left, dir);\n left = vSize * normalize(left);\n up = vSize * normalize(up);\n\n // move vertex in object-space from center to corner\n vModelPosition += aMapping.x * dir + aMapping.y * left + aMapping.z * up;\n\n vec4 mvPosition = uView * vec4(vModelPosition, 1.0);\n vViewPosition = mvPosition.xyz;\n gl_Position = uProjection * mvPosition;\n\n mvPosition.z -= 2.0 * (length(vEnd - vStart) + vSize); // avoid clipping\n gl_Position.z = (uProjection * mvPosition).z;\n\n #include clip_instance\n}\n";
6
+ export declare const cylinders_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec3 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\nattribute float aScale;\nattribute float aCap;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform float uIsOrtho;\nuniform vec3 uCameraDir;\n\nvoid main() {\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelTransform = uModel * aTransform;\n\n vTransform = aTransform;\n vStart = (modelTransform * vec4(aStart, 1.0)).xyz;\n vEnd = (modelTransform * vec4(aEnd, 1.0)).xyz;\n vSize = size * aScale;\n vCap = aCap;\n\n vModelPosition = (vStart + vEnd) * 0.5;\n vec3 camDir = -mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 dir = vEnd - vStart;\n // ensure cylinder 'dir' is pointing towards the camera\n if(dot(camDir, dir) < 0.0) {\n dir = -dir;\n }\n\n vec3 left = cross(camDir, dir);\n vec3 up = cross(left, dir);\n left = vSize * normalize(left);\n up = vSize * normalize(up);\n\n // move vertex in object-space from center to corner\n vModelPosition += aMapping.x * dir + aMapping.y * left + aMapping.z * up;\n\n vec4 mvPosition = uView * vec4(vModelPosition, 1.0);\n vViewPosition = mvPosition.xyz;\n gl_Position = uProjection * mvPosition;\n\n if (gl_Position.z < -gl_Position.w) {\n mvPosition.z -= 2.0 * (length(vEnd - vStart) + vSize); // avoid clipping\n gl_Position.z = (uProjection * mvPosition).z;\n }\n\n #include clip_instance\n}\n";
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2020-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.cylinders_vert = void 0;
9
- exports.cylinders_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec3 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\nattribute float aScale;\nattribute float aCap;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform float uIsOrtho;\nuniform vec3 uCameraDir;\n\nvoid main() {\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelTransform = uModel * aTransform;\n\n vTransform = aTransform;\n vStart = (modelTransform * vec4(aStart, 1.0)).xyz;\n vEnd = (modelTransform * vec4(aEnd, 1.0)).xyz;\n vSize = size * aScale;\n vCap = aCap;\n\n vModelPosition = (vStart + vEnd) * 0.5;\n vec3 camDir = -mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 dir = vEnd - vStart;\n // ensure cylinder 'dir' is pointing towards the camera\n if(dot(camDir, dir) < 0.0) {\n dir = -dir;\n }\n\n vec3 left = cross(camDir, dir);\n vec3 up = cross(left, dir);\n left = vSize * normalize(left);\n up = vSize * normalize(up);\n\n // move vertex in object-space from center to corner\n vModelPosition += aMapping.x * dir + aMapping.y * left + aMapping.z * up;\n\n vec4 mvPosition = uView * vec4(vModelPosition, 1.0);\n vViewPosition = mvPosition.xyz;\n gl_Position = uProjection * mvPosition;\n\n mvPosition.z -= 2.0 * (length(vEnd - vStart) + vSize); // avoid clipping\n gl_Position.z = (uProjection * mvPosition).z;\n\n #include clip_instance\n}\n";
9
+ exports.cylinders_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\n\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nattribute vec3 aMapping;\nattribute vec3 aStart;\nattribute vec3 aEnd;\nattribute float aScale;\nattribute float aCap;\n\nvarying mat4 vTransform;\nvarying vec3 vStart;\nvarying vec3 vEnd;\nvarying float vSize;\nvarying float vCap;\n\nuniform float uIsOrtho;\nuniform vec3 uCameraDir;\n\nvoid main() {\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n mat4 modelTransform = uModel * aTransform;\n\n vTransform = aTransform;\n vStart = (modelTransform * vec4(aStart, 1.0)).xyz;\n vEnd = (modelTransform * vec4(aEnd, 1.0)).xyz;\n vSize = size * aScale;\n vCap = aCap;\n\n vModelPosition = (vStart + vEnd) * 0.5;\n vec3 camDir = -mix(normalize(vModelPosition - uCameraPosition), uCameraDir, uIsOrtho);\n vec3 dir = vEnd - vStart;\n // ensure cylinder 'dir' is pointing towards the camera\n if(dot(camDir, dir) < 0.0) {\n dir = -dir;\n }\n\n vec3 left = cross(camDir, dir);\n vec3 up = cross(left, dir);\n left = vSize * normalize(left);\n up = vSize * normalize(up);\n\n // move vertex in object-space from center to corner\n vModelPosition += aMapping.x * dir + aMapping.y * left + aMapping.z * up;\n\n vec4 mvPosition = uView * vec4(vModelPosition, 1.0);\n vViewPosition = mvPosition.xyz;\n gl_Position = uProjection * mvPosition;\n\n if (gl_Position.z < -gl_Position.w) {\n mvPosition.z -= 2.0 * (length(vEnd - vStart) + vSize); // avoid clipping\n gl_Position.z = (uProjection * mvPosition).z;\n }\n\n #include clip_instance\n}\n";
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2019-2023 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
- export declare const spheres_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\nuniform mat4 uInvProjection;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\n#include matrix_scale\n\nconst mat4 D = mat4(\n 1.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0, 0.0,\n 0.0, 0.0, 0.0, -1.0\n);\n\n/**\n * Compute point size and center using the technique described in:\n * \"GPU-Based Ray-Casting of Quadratic Surfaces\" http://dl.acm.org/citation.cfm?id=2386396\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\n */\nvoid quadraticProjection(const in float radius, const in vec3 position){\n vec2 xbc, ybc;\n\n mat4 T = mat4(\n radius, 0.0, 0.0, 0.0,\n 0.0, radius, 0.0, 0.0,\n 0.0, 0.0, radius, 0.0,\n position.x, position.y, position.z, 1.0\n );\n\n mat4 R = transpose4(uProjection * uModelView * aTransform * T);\n float A = dot(R[3], D * R[3]);\n float B = -2.0 * dot(R[0], D * R[3]);\n float C = dot(R[0], D * R[0]);\n xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sx = abs(xbc[0] - xbc[1]) * 0.5;\n\n A = dot(R[3], D * R[3]);\n B = -2.0 * dot(R[1], D * R[3]);\n C = dot(R[1], D * R[1]);\n ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sy = abs(ybc[0] - ybc[1]) * 0.5;\n\n gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\n gl_Position.xy -= aMapping * vec2(sx, sy);\n gl_Position.xy *= gl_Position.w;\n}\n\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vRadius = size * matrixScale(uModelView);\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n\n gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\n quadraticProjection(size, aPosition);\n\n vRadiusSq = vRadius * vRadius;\n vec4 vPoint4 = uInvProjection * gl_Position;\n vPoint = vPoint4.xyz / vPoint4.w;\n vPointViewPosition = -mvPosition.xyz / mvPosition.w;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n mvPosition.z -= 2.0 * vRadius; // avoid clipping\n gl_Position.z = (uProjection * vec4(mvPosition.xyz, 1.0)).z;\n\n #include clip_instance\n}\n";
6
+ export declare const spheres_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\nuniform mat4 uInvProjection;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\n#include matrix_scale\n\nconst mat4 D = mat4(\n 1.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0, 0.0,\n 0.0, 0.0, 0.0, -1.0\n);\n\n/**\n * Compute point size and center using the technique described in:\n * \"GPU-Based Ray-Casting of Quadratic Surfaces\" http://dl.acm.org/citation.cfm?id=2386396\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\n */\nvoid quadraticProjection(const in float radius, const in vec3 position){\n vec2 xbc, ybc;\n\n mat4 T = mat4(\n radius, 0.0, 0.0, 0.0,\n 0.0, radius, 0.0, 0.0,\n 0.0, 0.0, radius, 0.0,\n position.x, position.y, position.z, 1.0\n );\n\n mat4 R = transpose4(uProjection * uModelView * aTransform * T);\n float A = dot(R[3], D * R[3]);\n float B = -2.0 * dot(R[0], D * R[3]);\n float C = dot(R[0], D * R[0]);\n xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sx = abs(xbc[0] - xbc[1]) * 0.5;\n\n A = dot(R[3], D * R[3]);\n B = -2.0 * dot(R[1], D * R[3]);\n C = dot(R[1], D * R[1]);\n ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sy = abs(ybc[0] - ybc[1]) * 0.5;\n\n gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\n gl_Position.xy -= aMapping * vec2(sx, sy);\n gl_Position.xy *= gl_Position.w;\n}\n\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vRadius = size * matrixScale(uModelView);\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n\n gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\n quadraticProjection(size, aPosition);\n\n vRadiusSq = vRadius * vRadius;\n vec4 vPoint4 = uInvProjection * gl_Position;\n vPoint = vPoint4.xyz / vPoint4.w;\n vPointViewPosition = -mvPosition.xyz / mvPosition.w;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n if (gl_Position.z < -gl_Position.w) {\n mvPosition.z -= 2.0 * vRadius; // avoid clipping\n gl_Position.z = (uProjection * vec4(mvPosition.xyz, 1.0)).z;\n }\n\n #include clip_instance\n}\n";
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
+ * Copyright (c) 2019-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
4
4
  *
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.spheres_vert = void 0;
9
- exports.spheres_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\nuniform mat4 uInvProjection;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\n#include matrix_scale\n\nconst mat4 D = mat4(\n 1.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0, 0.0,\n 0.0, 0.0, 0.0, -1.0\n);\n\n/**\n * Compute point size and center using the technique described in:\n * \"GPU-Based Ray-Casting of Quadratic Surfaces\" http://dl.acm.org/citation.cfm?id=2386396\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\n */\nvoid quadraticProjection(const in float radius, const in vec3 position){\n vec2 xbc, ybc;\n\n mat4 T = mat4(\n radius, 0.0, 0.0, 0.0,\n 0.0, radius, 0.0, 0.0,\n 0.0, 0.0, radius, 0.0,\n position.x, position.y, position.z, 1.0\n );\n\n mat4 R = transpose4(uProjection * uModelView * aTransform * T);\n float A = dot(R[3], D * R[3]);\n float B = -2.0 * dot(R[0], D * R[3]);\n float C = dot(R[0], D * R[0]);\n xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sx = abs(xbc[0] - xbc[1]) * 0.5;\n\n A = dot(R[3], D * R[3]);\n B = -2.0 * dot(R[1], D * R[3]);\n C = dot(R[1], D * R[1]);\n ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sy = abs(ybc[0] - ybc[1]) * 0.5;\n\n gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\n gl_Position.xy -= aMapping * vec2(sx, sy);\n gl_Position.xy *= gl_Position.w;\n}\n\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vRadius = size * matrixScale(uModelView);\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n\n gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\n quadraticProjection(size, aPosition);\n\n vRadiusSq = vRadius * vRadius;\n vec4 vPoint4 = uInvProjection * gl_Position;\n vPoint = vPoint4.xyz / vPoint4.w;\n vPointViewPosition = -mvPosition.xyz / mvPosition.w;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n mvPosition.z -= 2.0 * vRadius; // avoid clipping\n gl_Position.z = (uProjection * vec4(mvPosition.xyz, 1.0)).z;\n\n #include clip_instance\n}\n";
9
+ exports.spheres_vert = "\nprecision highp float;\nprecision highp int;\n\n#include common\n#include read_from_texture\n#include common_vert_params\n#include color_vert_params\n#include size_vert_params\n#include common_clip\n\nuniform mat4 uModelView;\nuniform mat4 uInvProjection;\n\nattribute vec3 aPosition;\nattribute vec2 aMapping;\nattribute mat4 aTransform;\nattribute float aInstance;\nattribute float aGroup;\n\nvarying float vRadius;\nvarying float vRadiusSq;\nvarying vec3 vPoint;\nvarying vec3 vPointViewPosition;\n\n#include matrix_scale\n\nconst mat4 D = mat4(\n 1.0, 0.0, 0.0, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n 0.0, 0.0, 1.0, 0.0,\n 0.0, 0.0, 0.0, -1.0\n);\n\n/**\n * Compute point size and center using the technique described in:\n * \"GPU-Based Ray-Casting of Quadratic Surfaces\" http://dl.acm.org/citation.cfm?id=2386396\n * by Christian Sigg, Tim Weyrich, Mario Botsch, Markus Gross.\n */\nvoid quadraticProjection(const in float radius, const in vec3 position){\n vec2 xbc, ybc;\n\n mat4 T = mat4(\n radius, 0.0, 0.0, 0.0,\n 0.0, radius, 0.0, 0.0,\n 0.0, 0.0, radius, 0.0,\n position.x, position.y, position.z, 1.0\n );\n\n mat4 R = transpose4(uProjection * uModelView * aTransform * T);\n float A = dot(R[3], D * R[3]);\n float B = -2.0 * dot(R[0], D * R[3]);\n float C = dot(R[0], D * R[0]);\n xbc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n xbc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sx = abs(xbc[0] - xbc[1]) * 0.5;\n\n A = dot(R[3], D * R[3]);\n B = -2.0 * dot(R[1], D * R[3]);\n C = dot(R[1], D * R[1]);\n ybc[0] = (-B - sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n ybc[1] = (-B + sqrt(B * B - 4.0 * A * C)) / (2.0 * A);\n float sy = abs(ybc[0] - ybc[1]) * 0.5;\n\n gl_Position.xy = vec2(0.5 * (xbc.x + xbc.y), 0.5 * (ybc.x + ybc.y));\n gl_Position.xy -= aMapping * vec2(sx, sy);\n gl_Position.xy *= gl_Position.w;\n}\n\n\nvoid main(void){\n #include assign_group\n #include assign_color_varying\n #include assign_marker_varying\n #include assign_clipping_varying\n #include assign_size\n\n vRadius = size * matrixScale(uModelView);\n\n vec4 position4 = vec4(aPosition, 1.0);\n vec4 mvPosition = uModelView * aTransform * position4;\n\n gl_Position = uProjection * vec4(mvPosition.xyz, 1.0);\n quadraticProjection(size, aPosition);\n\n vRadiusSq = vRadius * vRadius;\n vec4 vPoint4 = uInvProjection * gl_Position;\n vPoint = vPoint4.xyz / vPoint4.w;\n vPointViewPosition = -mvPosition.xyz / mvPosition.w;\n\n vModelPosition = (uModel * aTransform * position4).xyz; // for clipping in frag shader\n\n if (gl_Position.z < -gl_Position.w) {\n mvPosition.z -= 2.0 * vRadius; // avoid clipping\n gl_Position.z = (uProjection * vec4(mvPosition.xyz, 1.0)).z;\n }\n\n #include clip_instance\n}\n";
@@ -21,7 +21,7 @@ var PrincipalAxes;
21
21
  PrincipalAxes.ofPositions = ofPositions;
22
22
  function calculateMomentsAxes(positions) {
23
23
  if (positions.length === 3) {
24
- return geometry_1.Axes3D.create(vec3_1.Vec3.fromArray((0, vec3_1.Vec3)(), positions, 0), vec3_1.Vec3.create(1, 0, 0), vec3_1.Vec3.create(0, 1, 0), vec3_1.Vec3.create(0, 1, 0));
24
+ return geometry_1.Axes3D.create(vec3_1.Vec3.fromArray((0, vec3_1.Vec3)(), positions, 0), vec3_1.Vec3.create(1, 0, 0), vec3_1.Vec3.create(0, 1, 0), vec3_1.Vec3.create(0, 0, 1));
25
25
  }
26
26
  var points = matrix_1.Matrix.fromArray(positions, 3, positions.length / 3);
27
27
  var n = points.rows;
@@ -9,12 +9,12 @@ import { Volume } from '../../../../mol-model/volume';
9
9
  import { Structure } from '../../../../mol-model/structure';
10
10
  declare const VolumeServerInfo_base: {
11
11
  new (data: VolumeServerInfo.Data, props?: {
12
- label: string; /** Precision data the server can show. */
12
+ /** Precision data the server can show. */
13
+ label: string;
13
14
  description?: string | undefined;
14
15
  } | undefined): {
15
16
  id: import("../../../../mol-util/uuid").UUID;
16
17
  type: PluginStateObject.TypeInfo;
17
- /** The value are stored in blockSize^3 cubes */
18
18
  label: string;
19
19
  description?: string | undefined;
20
20
  data: VolumeServerInfo.Data;
@@ -23,7 +23,6 @@ declare const VolumeServerInfo_base: {
23
23
  is(obj?: import("../../../../mol-state/object").StateObject<any, import("../../../../mol-state/object").StateObject.Type<any>> | undefined): obj is {
24
24
  id: import("../../../../mol-util/uuid").UUID;
25
25
  type: PluginStateObject.TypeInfo;
26
- /** The value are stored in blockSize^3 cubes */
27
26
  label: string;
28
27
  description?: string | undefined;
29
28
  data: VolumeServerInfo.Data;