react-cheminfo 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/about/core/about.d.ts +9 -0
- package/lib/about/core/about.d.ts.map +1 -1
- package/lib/about/core/about.js +1 -0
- package/lib/about/core/about.js.map +1 -1
- package/lib/about/core/index.d.ts +1 -0
- package/lib/about/core/index.d.ts.map +1 -1
- package/lib/about/core/index.js +1 -0
- package/lib/about/core/index.js.map +1 -1
- package/lib/about/core/repository.d.ts +14 -0
- package/lib/about/core/repository.d.ts.map +1 -0
- package/lib/about/core/repository.js +21 -0
- package/lib/about/core/repository.js.map +1 -0
- package/lib/about/ui/AboutBuild.d.ts +5 -4
- package/lib/about/ui/AboutBuild.d.ts.map +1 -1
- package/lib/about/ui/AboutBuild.js +10 -10
- package/lib/about/ui/AboutBuild.js.map +1 -1
- package/lib/about/ui/AboutPage.d.ts.map +1 -1
- package/lib/about/ui/AboutPage.js +7 -8
- package/lib/about/ui/AboutPage.js.map +1 -1
- package/lib/about/ui/AboutVersion.d.ts +25 -0
- package/lib/about/ui/AboutVersion.d.ts.map +1 -0
- package/lib/about/ui/AboutVersion.js +31 -0
- package/lib/about/ui/AboutVersion.js.map +1 -0
- package/lib/about/ui/index.d.ts +2 -0
- package/lib/about/ui/index.d.ts.map +1 -1
- package/lib/about/ui/index.js +1 -0
- package/lib/about/ui/index.js.map +1 -1
- package/lib/build/core/buildInfo.d.ts +16 -0
- package/lib/build/core/buildInfo.d.ts.map +1 -1
- package/lib/build/core/buildInfo.js +21 -0
- package/lib/build/core/buildInfo.js.map +1 -1
- package/lib/build/core/index.d.ts +1 -1
- package/lib/build/core/index.d.ts.map +1 -1
- package/lib/build/core/index.js +1 -1
- package/lib/build/core/index.js.map +1 -1
- package/lib/build/vite/buildInfo.d.ts.map +1 -1
- package/lib/build/vite/buildInfo.js +2 -2
- package/lib/build/vite/buildInfo.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +12 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/types.d.ts +8 -0
- package/lib/ecosystem/core/types.d.ts.map +1 -1
- package/lib/molecule3d/core/camera.d.ts +89 -0
- package/lib/molecule3d/core/camera.d.ts.map +1 -0
- package/lib/molecule3d/core/camera.js +172 -0
- package/lib/molecule3d/core/camera.js.map +1 -0
- package/lib/molecule3d/core/index.d.ts +2 -0
- package/lib/molecule3d/core/index.d.ts.map +1 -1
- package/lib/molecule3d/core/index.js +1 -0
- package/lib/molecule3d/core/index.js.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.js +14 -37
- package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
- package/lib/molecule3d/ui/camera.d.ts +35 -2
- package/lib/molecule3d/ui/camera.d.ts.map +1 -1
- package/lib/molecule3d/ui/camera.js +113 -4
- package/lib/molecule3d/ui/camera.js.map +1 -1
- package/lib/molecule3d/ui/captureScene.d.ts +14 -0
- package/lib/molecule3d/ui/captureScene.d.ts.map +1 -0
- package/lib/molecule3d/ui/captureScene.js +24 -0
- package/lib/molecule3d/ui/captureScene.js.map +1 -0
- package/lib/molecule3d/ui/createViewer.d.ts +18 -0
- package/lib/molecule3d/ui/createViewer.d.ts.map +1 -0
- package/lib/molecule3d/ui/createViewer.js +19 -0
- package/lib/molecule3d/ui/createViewer.js.map +1 -0
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +21 -0
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
- package/lib/molecule3d/ui/useMoleculeScene.d.ts +47 -0
- package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -0
- package/lib/molecule3d/ui/useMoleculeScene.js +82 -0
- package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -0
- package/lib/molecule3d/ui/useSharedCamera.d.ts +52 -0
- package/lib/molecule3d/ui/useSharedCamera.d.ts.map +1 -0
- package/lib/molecule3d/ui/useSharedCamera.js +82 -0
- package/lib/molecule3d/ui/useSharedCamera.js.map +1 -0
- package/lib/molecule3d/ui/viewer.d.ts +21 -15
- package/lib/molecule3d/ui/viewer.d.ts.map +1 -1
- package/lib/molecule3d/ui/viewer.js +41 -47
- package/lib/molecule3d/ui/viewer.js.map +1 -1
- package/lib/molecule3d/ui/viewerSpec.d.ts +17 -0
- package/lib/molecule3d/ui/viewerSpec.d.ts.map +1 -0
- package/lib/molecule3d/ui/viewerSpec.js +34 -0
- package/lib/molecule3d/ui/viewerSpec.js.map +1 -0
- package/package.json +1 -1
- package/src/about/core/about.ts +11 -0
- package/src/about/core/index.ts +1 -0
- package/src/about/core/repository.ts +22 -0
- package/src/about/ui/AboutBuild.tsx +13 -20
- package/src/about/ui/AboutPage.tsx +30 -22
- package/src/about/ui/AboutVersion.tsx +67 -0
- package/src/about/ui/index.ts +2 -0
- package/src/build/core/buildInfo.ts +24 -0
- package/src/build/core/index.ts +6 -1
- package/src/build/vite/buildInfo.ts +2 -2
- package/src/ecosystem/core/sites.ts +12 -0
- package/src/ecosystem/core/types.ts +8 -0
- package/src/molecule3d/core/camera.ts +212 -0
- package/src/molecule3d/core/index.ts +14 -0
- package/src/molecule3d/ui/MoleculeCanvas3D.tsx +14 -43
- package/src/molecule3d/ui/camera.ts +128 -7
- package/src/molecule3d/ui/captureScene.ts +31 -0
- package/src/molecule3d/ui/createViewer.ts +24 -0
- package/src/molecule3d/ui/moleculeViewer3DProps.ts +21 -0
- package/src/molecule3d/ui/useMoleculeScene.ts +141 -0
- package/src/molecule3d/ui/useSharedCamera.ts +121 -0
- package/src/molecule3d/ui/viewer.ts +45 -50
- package/src/molecule3d/ui/viewerSpec.ts +38 -0
|
@@ -52,6 +52,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
52
52
|
name: { lead: 'openbabel', alt: 'cheminfo', dot: true },
|
|
53
53
|
host: 'openbabel.cheminfo.org',
|
|
54
54
|
repository: 'https://github.com/cheminfo/openbabel.cheminfo.org',
|
|
55
|
+
publicRepository: true,
|
|
55
56
|
tagline: 'Convert a structure between any pair of chemical file formats.',
|
|
56
57
|
group: 'structures',
|
|
57
58
|
brand: '#0f766e',
|
|
@@ -74,6 +75,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
74
75
|
name: { lead: 'dbe', alt: 'cheminfo', dot: true },
|
|
75
76
|
host: 'dbe.cheminfo.org',
|
|
76
77
|
repository: 'https://github.com/cheminfo/dbe.cheminfo.org',
|
|
78
|
+
publicRepository: true,
|
|
77
79
|
tagline: 'Count rings and double bonds from a formula or a structure.',
|
|
78
80
|
group: 'basics',
|
|
79
81
|
brand: '#63123f',
|
|
@@ -87,6 +89,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
87
89
|
name: { lead: 'NMR', alt: 'ium' },
|
|
88
90
|
host: 'www.nmrium.org',
|
|
89
91
|
repository: 'https://github.com/cheminfo/nmrium',
|
|
92
|
+
publicRepository: true,
|
|
90
93
|
tagline: 'Process and assign NMR spectra in the browser.',
|
|
91
94
|
group: 'spectra',
|
|
92
95
|
brand: '#ea580c',
|
|
@@ -123,6 +126,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
123
126
|
name: { lead: 'surge', alt: 'cheminfo', dot: true },
|
|
124
127
|
host: 'surge.cheminfo.org',
|
|
125
128
|
repository: 'https://github.com/cheminfo/surge.cheminfo.org',
|
|
129
|
+
publicRepository: true,
|
|
126
130
|
tagline: 'Every constitutional isomer of a molecular formula.',
|
|
127
131
|
group: 'structures',
|
|
128
132
|
brand: '#4338ca',
|
|
@@ -134,6 +138,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
134
138
|
name: { lead: 'tex', alt: 'cheminfo', dot: true },
|
|
135
139
|
host: 'tex.cheminfo.org',
|
|
136
140
|
repository: 'https://github.com/cheminfo/tex.cheminfo.org',
|
|
141
|
+
publicRepository: true,
|
|
137
142
|
tagline: 'LaTeX formulas rendered to SVG or PNG from a URL.',
|
|
138
143
|
group: 'computing',
|
|
139
144
|
brand: '#a21caf',
|
|
@@ -156,6 +161,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
156
161
|
name: { lead: 'regexp', alt: 'cheminfo', dot: true },
|
|
157
162
|
host: 'regexp.cheminfo.org',
|
|
158
163
|
repository: 'https://github.com/cheminfo/regexp.cheminfo.org',
|
|
164
|
+
publicRepository: true,
|
|
159
165
|
tagline: 'Learn regular expressions in a live playground.',
|
|
160
166
|
group: 'computing',
|
|
161
167
|
brand: '#1e3a8a',
|
|
@@ -167,6 +173,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
167
173
|
name: { lead: 'pdb', alt: 'cheminfo', dot: true },
|
|
168
174
|
host: 'pdb.cheminfo.org',
|
|
169
175
|
repository: 'https://github.com/cheminfo/pdb.cheminfo.org',
|
|
176
|
+
publicRepository: true,
|
|
170
177
|
tagline: 'A fast look at any Protein Data Bank entry.',
|
|
171
178
|
group: 'research',
|
|
172
179
|
brand: '#2563eb',
|
|
@@ -178,6 +185,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
178
185
|
name: { lead: 'elucidation', alt: 'cheminfo', dot: true },
|
|
179
186
|
host: 'elucidation.cheminfo.org',
|
|
180
187
|
repository: 'https://github.com/cheminfo/elucidation.cheminfo.org',
|
|
188
|
+
publicRepository: true,
|
|
181
189
|
tagline: 'A structure from a 1H NMR spectrum and a formula.',
|
|
182
190
|
group: 'spectra',
|
|
183
191
|
brand: '#7e22ce',
|
|
@@ -200,6 +208,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
200
208
|
name: { lead: 'Poly', alt: 'Carp' },
|
|
201
209
|
host: 'polycarp.cheminfo.org',
|
|
202
210
|
repository: 'https://github.com/cheminfo/polycarp.cheminfo.org',
|
|
211
|
+
publicRepository: true,
|
|
203
212
|
tagline: 'Predict the microstructure of a radical copolymerisation.',
|
|
204
213
|
group: 'research',
|
|
205
214
|
brand: '#701a75',
|
|
@@ -233,6 +242,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
233
242
|
name: { lead: 'database', alt: 'cheminfo', dot: true },
|
|
234
243
|
host: 'database.cheminfo.org',
|
|
235
244
|
repository: 'https://github.com/cheminfo/database.cheminfo.org',
|
|
245
|
+
publicRepository: true,
|
|
236
246
|
tagline: 'Query a real chemical dataset in SQL and in Mango.',
|
|
237
247
|
group: 'research',
|
|
238
248
|
brand: '#7c2d12',
|
|
@@ -244,6 +254,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
244
254
|
name: { lead: 'Symme', alt: 'Try' },
|
|
245
255
|
host: 'symmetry.cheminfo.org',
|
|
246
256
|
repository: 'https://github.com/cheminfo/symmetry.cheminfo.org',
|
|
257
|
+
publicRepository: true,
|
|
247
258
|
tagline: 'Find the symmetry of a molecule, a crystal or a pattern.',
|
|
248
259
|
group: 'basics',
|
|
249
260
|
brand: '#9f1239',
|
|
@@ -257,6 +268,7 @@ export const ECOSYSTEM_SITES = [
|
|
|
257
268
|
name: { lead: 'osiris', alt: 'cheminfo', dot: true },
|
|
258
269
|
host: 'osiris.cheminfo.org',
|
|
259
270
|
repository: 'https://github.com/cheminfo/osiris.cheminfo.org',
|
|
271
|
+
publicRepository: true,
|
|
260
272
|
tagline: 'Predicted toxicity risks and properties, one molecule or many.',
|
|
261
273
|
group: 'research',
|
|
262
274
|
brand: '#854d0e',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,gDAAgD;QAC5D,OAAO,EAAE,wDAAwD;QACjE,KAAK,E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,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE;QACnC,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,mDAAmD;QAC/D,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,0DAA0D;QACnE,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,SAAS;QAChB,wEAAwE;QACxE,qEAAqE;QACrE,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACpD,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,iDAAiD;QAC7D,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,gEAAgE;QACzE,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,SAAS;QAChB,2EAA2E;QAC3E,yEAAyE;QACzE,6CAA6C;QAC7C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAmB;IACzC,OAAO,WAAW,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC"}
|
|
@@ -34,6 +34,14 @@ export interface EcosystemSite {
|
|
|
34
34
|
host: string;
|
|
35
35
|
/** Where the sources live, and what a Source link opens. */
|
|
36
36
|
repository: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether a visitor can open that repository. A private one is named
|
|
39
|
+
* nowhere: no licence-and-source section, no link from the version, no issue
|
|
40
|
+
* tracker a reader cannot reach. It is stated rather than assumed, so a site
|
|
41
|
+
* whose record forgets it advertises nothing rather than a dead link.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
publicRepository?: boolean;
|
|
37
45
|
/** One line on what the site does. */
|
|
38
46
|
tagline: string;
|
|
39
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,mCAAmC;AACnC,MAAM,MAAM,MAAM,GACd,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,WAAW,GACX,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,QAAQ,CAAC;AAEb,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,mCAAmC;AACnC,MAAM,MAAM,MAAM,GACd,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,WAAW,GACX,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,QAAQ,CAAC;AAEb,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB;AAED,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the camera stands, in a form a link can carry.
|
|
3
|
+
*
|
|
4
|
+
* A position in ångström would not survive the trip: the molecule a link names
|
|
5
|
+
* is built again on the other side, and a distance that frames a benzene leaves
|
|
6
|
+
* a peptide off screen. So the camera is stored against the scene rather than
|
|
7
|
+
* against the coordinates — a rotation from the front view, a zoom against the
|
|
8
|
+
* distance that frames the whole model, and a target as an offset from the
|
|
9
|
+
* scene centre in bounding-sphere radii. All three read the same whatever the
|
|
10
|
+
* molecule and whatever the size of the canvas showing it.
|
|
11
|
+
*/
|
|
12
|
+
import type { ShareParamCodec } from '../../share/core/params.ts';
|
|
13
|
+
/** A rotation, as a unit quaternion `[x, y, z, w]`. */
|
|
14
|
+
export type Molecule3DRotation = readonly [number, number, number, number];
|
|
15
|
+
/** A point or a direction, `[x, y, z]`. */
|
|
16
|
+
export type Molecule3DVector = readonly [number, number, number];
|
|
17
|
+
/** Where the camera stands, against the scene rather than its coordinates. */
|
|
18
|
+
export interface Molecule3DCamera {
|
|
19
|
+
/**
|
|
20
|
+
* Rotation of the camera from the front view — looking down -z with y up —
|
|
21
|
+
* as a unit quaternion.
|
|
22
|
+
*/
|
|
23
|
+
rotation: Molecule3DRotation;
|
|
24
|
+
/**
|
|
25
|
+
* How close the camera is. `1` frames the whole model, as the reset button
|
|
26
|
+
* does; `2` is twice as close, so the model is drawn twice as large.
|
|
27
|
+
*/
|
|
28
|
+
zoom: number;
|
|
29
|
+
/**
|
|
30
|
+
* Where the camera looks, as an offset from the centre of the model, in
|
|
31
|
+
* bounding-sphere radii. `[0, 0, 0]` looks at the centre.
|
|
32
|
+
*/
|
|
33
|
+
offset: Molecule3DVector;
|
|
34
|
+
}
|
|
35
|
+
/** Looking at the centre of the model from the front, framing all of it. */
|
|
36
|
+
export declare const DEFAULT_MOLECULE_3D_CAMERA: Molecule3DCamera;
|
|
37
|
+
/** The closest and furthest a link may ask the camera to stand. */
|
|
38
|
+
export declare const MOLECULE_3D_ZOOM_RANGE: {
|
|
39
|
+
readonly minimum: 0.01;
|
|
40
|
+
readonly maximum: 100;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Write a camera as the text a link carries.
|
|
44
|
+
*
|
|
45
|
+
* The four components of the rotation come first, then the zoom, then the
|
|
46
|
+
* target offset — which is left out entirely while the camera looks at the
|
|
47
|
+
* centre of the model, as it does until someone pans.
|
|
48
|
+
* @param camera - The camera to write.
|
|
49
|
+
* @returns Comma-separated numbers: five, or eight when the camera is panned.
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatMolecule3DCamera(camera: Molecule3DCamera): string;
|
|
52
|
+
/**
|
|
53
|
+
* Read a camera out of the text a link carries.
|
|
54
|
+
*
|
|
55
|
+
* A rotation that is not a rotation — four zeros, a stray word — is what makes
|
|
56
|
+
* the whole value unusable; everything else is brought back into range rather
|
|
57
|
+
* than rejected, so a link written against an older range still opens.
|
|
58
|
+
* @param raw - The text of the parameter.
|
|
59
|
+
* @returns The camera, or `null` when the text does not describe one.
|
|
60
|
+
*/
|
|
61
|
+
export declare function parseMolecule3DCamera(raw: string): Molecule3DCamera | null;
|
|
62
|
+
/**
|
|
63
|
+
* A camera with its rotation made a unit quaternion and its numbers in range.
|
|
64
|
+
* @param camera - The camera to repair.
|
|
65
|
+
* @returns A camera safe to hand the viewer; the default when the rotation is
|
|
66
|
+
* degenerate.
|
|
67
|
+
*/
|
|
68
|
+
export declare function normalizeMolecule3DCamera(camera: Molecule3DCamera): Molecule3DCamera;
|
|
69
|
+
/**
|
|
70
|
+
* Whether two cameras are the same once written into a link.
|
|
71
|
+
*
|
|
72
|
+
* What a link carries is rounded, so two cameras a drag apart by less than the
|
|
73
|
+
* rounding are one camera as far as the address is concerned — which is what
|
|
74
|
+
* keeps a settling animation from rewriting it a dozen times.
|
|
75
|
+
* @param first - One camera, or `null` for none.
|
|
76
|
+
* @param second - The other.
|
|
77
|
+
* @returns True when a link would carry the same text for both.
|
|
78
|
+
*/
|
|
79
|
+
export declare function sameMolecule3DCamera(first: Molecule3DCamera | null, second: Molecule3DCamera | null): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The codec a site mirrors the camera in the address with.
|
|
82
|
+
*
|
|
83
|
+
* The default framing is written as nothing at all, so the address of a page
|
|
84
|
+
* nobody has turned yet stays a plain link.
|
|
85
|
+
* @returns The codec, whose value is `null` while the camera is where a reset
|
|
86
|
+
* would leave it.
|
|
87
|
+
*/
|
|
88
|
+
export declare function molecule3DCameraParam(): ShareParamCodec<Molecule3DCamera | null>;
|
|
89
|
+
//# sourceMappingURL=camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/camera.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3E,2CAA2C;AAC3C,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjE,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,4EAA4E;AAC5E,eAAO,MAAM,0BAA0B,EAAE,gBAIxC,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;CAA2C,CAAC;AAW/E;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAavE;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAyB1E;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,gBAAgB,GACvB,gBAAgB,CAYlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAC9B,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAC9B,OAAO,CAGT;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAahF"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the camera stands, in a form a link can carry.
|
|
3
|
+
*
|
|
4
|
+
* A position in ångström would not survive the trip: the molecule a link names
|
|
5
|
+
* is built again on the other side, and a distance that frames a benzene leaves
|
|
6
|
+
* a peptide off screen. So the camera is stored against the scene rather than
|
|
7
|
+
* against the coordinates — a rotation from the front view, a zoom against the
|
|
8
|
+
* distance that frames the whole model, and a target as an offset from the
|
|
9
|
+
* scene centre in bounding-sphere radii. All three read the same whatever the
|
|
10
|
+
* molecule and whatever the size of the canvas showing it.
|
|
11
|
+
*/
|
|
12
|
+
import { clamp } from "../../format/core/clamp.js";
|
|
13
|
+
import { roundTo } from "../../format/core/roundTo.js";
|
|
14
|
+
/** Looking at the centre of the model from the front, framing all of it. */
|
|
15
|
+
export const DEFAULT_MOLECULE_3D_CAMERA = {
|
|
16
|
+
rotation: [0, 0, 0, 1],
|
|
17
|
+
zoom: 1,
|
|
18
|
+
offset: [0, 0, 0],
|
|
19
|
+
};
|
|
20
|
+
/** The closest and furthest a link may ask the camera to stand. */
|
|
21
|
+
export const MOLECULE_3D_ZOOM_RANGE = { minimum: 0.01, maximum: 100 };
|
|
22
|
+
/** Furthest a link may push the target from the centre, in radii. */
|
|
23
|
+
const MAX_OFFSET = 100;
|
|
24
|
+
/** Decimals kept of a quaternion component: 0.0001 is under a hundredth of a degree. */
|
|
25
|
+
const ROTATION_DECIMALS = 4;
|
|
26
|
+
/** Decimals kept of the zoom and of the target offset. */
|
|
27
|
+
const POSITION_DECIMALS = 3;
|
|
28
|
+
/**
|
|
29
|
+
* Write a camera as the text a link carries.
|
|
30
|
+
*
|
|
31
|
+
* The four components of the rotation come first, then the zoom, then the
|
|
32
|
+
* target offset — which is left out entirely while the camera looks at the
|
|
33
|
+
* centre of the model, as it does until someone pans.
|
|
34
|
+
* @param camera - The camera to write.
|
|
35
|
+
* @returns Comma-separated numbers: five, or eight when the camera is panned.
|
|
36
|
+
*/
|
|
37
|
+
export function formatMolecule3DCamera(camera) {
|
|
38
|
+
const { rotation, zoom, offset } = normalizeMolecule3DCamera(camera);
|
|
39
|
+
const parts = [];
|
|
40
|
+
for (let index = 0; index < 4; index++) {
|
|
41
|
+
parts.push(String(roundTo(rotation[index] ?? 0, ROTATION_DECIMALS)));
|
|
42
|
+
}
|
|
43
|
+
parts.push(String(roundTo(zoom, POSITION_DECIMALS)));
|
|
44
|
+
if (offset[0] !== 0 || offset[1] !== 0 || offset[2] !== 0) {
|
|
45
|
+
for (const value of offset) {
|
|
46
|
+
parts.push(String(roundTo(value, POSITION_DECIMALS)));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return parts.join(',');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read a camera out of the text a link carries.
|
|
53
|
+
*
|
|
54
|
+
* A rotation that is not a rotation — four zeros, a stray word — is what makes
|
|
55
|
+
* the whole value unusable; everything else is brought back into range rather
|
|
56
|
+
* than rejected, so a link written against an older range still opens.
|
|
57
|
+
* @param raw - The text of the parameter.
|
|
58
|
+
* @returns The camera, or `null` when the text does not describe one.
|
|
59
|
+
*/
|
|
60
|
+
export function parseMolecule3DCamera(raw) {
|
|
61
|
+
const parts = raw.split(',');
|
|
62
|
+
if (parts.length !== 5 && parts.length !== 8)
|
|
63
|
+
return null;
|
|
64
|
+
const numbers = [];
|
|
65
|
+
for (const part of parts) {
|
|
66
|
+
const value = Number(part.trim());
|
|
67
|
+
if (!Number.isFinite(value))
|
|
68
|
+
return null;
|
|
69
|
+
numbers.push(value);
|
|
70
|
+
}
|
|
71
|
+
const rotation = normalizeRotation([
|
|
72
|
+
numbers[0] ?? 0,
|
|
73
|
+
numbers[1] ?? 0,
|
|
74
|
+
numbers[2] ?? 0,
|
|
75
|
+
numbers[3] ?? 1,
|
|
76
|
+
]);
|
|
77
|
+
if (rotation === null)
|
|
78
|
+
return null;
|
|
79
|
+
return {
|
|
80
|
+
rotation,
|
|
81
|
+
zoom: clampZoom(numbers[4] ?? 1),
|
|
82
|
+
offset: [
|
|
83
|
+
clampOffset(numbers[5] ?? 0),
|
|
84
|
+
clampOffset(numbers[6] ?? 0),
|
|
85
|
+
clampOffset(numbers[7] ?? 0),
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A camera with its rotation made a unit quaternion and its numbers in range.
|
|
91
|
+
* @param camera - The camera to repair.
|
|
92
|
+
* @returns A camera safe to hand the viewer; the default when the rotation is
|
|
93
|
+
* degenerate.
|
|
94
|
+
*/
|
|
95
|
+
export function normalizeMolecule3DCamera(camera) {
|
|
96
|
+
const rotation = normalizeRotation(camera.rotation);
|
|
97
|
+
if (rotation === null)
|
|
98
|
+
return DEFAULT_MOLECULE_3D_CAMERA;
|
|
99
|
+
return {
|
|
100
|
+
rotation,
|
|
101
|
+
zoom: clampZoom(camera.zoom),
|
|
102
|
+
offset: [
|
|
103
|
+
clampOffset(camera.offset[0]),
|
|
104
|
+
clampOffset(camera.offset[1]),
|
|
105
|
+
clampOffset(camera.offset[2]),
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Whether two cameras are the same once written into a link.
|
|
111
|
+
*
|
|
112
|
+
* What a link carries is rounded, so two cameras a drag apart by less than the
|
|
113
|
+
* rounding are one camera as far as the address is concerned — which is what
|
|
114
|
+
* keeps a settling animation from rewriting it a dozen times.
|
|
115
|
+
* @param first - One camera, or `null` for none.
|
|
116
|
+
* @param second - The other.
|
|
117
|
+
* @returns True when a link would carry the same text for both.
|
|
118
|
+
*/
|
|
119
|
+
export function sameMolecule3DCamera(first, second) {
|
|
120
|
+
if (first === null || second === null)
|
|
121
|
+
return first === second;
|
|
122
|
+
return formatMolecule3DCamera(first) === formatMolecule3DCamera(second);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The codec a site mirrors the camera in the address with.
|
|
126
|
+
*
|
|
127
|
+
* The default framing is written as nothing at all, so the address of a page
|
|
128
|
+
* nobody has turned yet stays a plain link.
|
|
129
|
+
* @returns The codec, whose value is `null` while the camera is where a reset
|
|
130
|
+
* would leave it.
|
|
131
|
+
*/
|
|
132
|
+
export function molecule3DCameraParam() {
|
|
133
|
+
return {
|
|
134
|
+
parse(raw) {
|
|
135
|
+
return raw === null ? null : parseMolecule3DCamera(raw);
|
|
136
|
+
},
|
|
137
|
+
serialize(value) {
|
|
138
|
+
if (value === null)
|
|
139
|
+
return null;
|
|
140
|
+
const text = formatMolecule3DCamera(value);
|
|
141
|
+
return text === formatMolecule3DCamera(DEFAULT_MOLECULE_3D_CAMERA)
|
|
142
|
+
? null
|
|
143
|
+
: text;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function normalizeRotation(rotation) {
|
|
148
|
+
let squared = 0;
|
|
149
|
+
for (let index = 0; index < 4; index++) {
|
|
150
|
+
const value = rotation[index] ?? 0;
|
|
151
|
+
if (!Number.isFinite(value))
|
|
152
|
+
return null;
|
|
153
|
+
squared += value * value;
|
|
154
|
+
}
|
|
155
|
+
if (squared <= 0)
|
|
156
|
+
return null;
|
|
157
|
+
const scale = 1 / Math.sqrt(squared);
|
|
158
|
+
return [
|
|
159
|
+
rotation[0] * scale,
|
|
160
|
+
rotation[1] * scale,
|
|
161
|
+
rotation[2] * scale,
|
|
162
|
+
rotation[3] * scale,
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
function clampZoom(zoom) {
|
|
166
|
+
const { minimum, maximum } = MOLECULE_3D_ZOOM_RANGE;
|
|
167
|
+
return clamp(zoom, minimum, maximum, 1);
|
|
168
|
+
}
|
|
169
|
+
function clampOffset(value) {
|
|
170
|
+
return clamp(value, -MAX_OFFSET, MAX_OFFSET, 0);
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=camera.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../../src/molecule3d/core/camera.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AA8BvD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GAAqB;IAC1D,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAClB,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,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QACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACzC,OAAO,IAAI,KAAK,GAAG,KAAK,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO;QACL,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK;QACnB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK;QACnB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK;QACnB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC;IACpD,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { Molecule3DCamera, Molecule3DRotation, Molecule3DVector, } from './camera.ts';
|
|
2
|
+
export { DEFAULT_MOLECULE_3D_CAMERA, MOLECULE_3D_ZOOM_RANGE, formatMolecule3DCamera, molecule3DCameraParam, normalizeMolecule3DCamera, parseMolecule3DCamera, sameMolecule3DCamera, } from './camera.ts';
|
|
1
3
|
export type { ImageSize } from './exportImage.ts';
|
|
2
4
|
export { dataUriBytes, rasterSvgMarkup } from './exportImage.ts';
|
|
3
5
|
export type { Molecule3DGesture, Molecule3DGestureKey } from './gestures.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { DEFAULT_MOLECULE_3D_CAMERA, MOLECULE_3D_ZOOM_RANGE, formatMolecule3DCamera, molecule3DCameraParam, normalizeMolecule3DCamera, parseMolecule3DCamera, sameMolecule3DCamera, } from "./camera.js";
|
|
1
2
|
export { dataUriBytes, rasterSvgMarkup } from "./exportImage.js";
|
|
2
3
|
export { MOLECULE_3D_GESTURES } from "./gestures.js";
|
|
3
4
|
export { MEASUREMENT_ATOM_COUNTS, MEASUREMENT_KINDS, MEASUREMENT_LABELS, } from "./measurement.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAMrD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoleculeCanvas3D.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MoleculeCanvas3D.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAczD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOxE,yCAAyC;AACzC,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,qBAAqB,EACrB,UAAU,GAAG,mBAAmB,CACjC;IACC,2EAA2E;IAC3E,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CA6I3E"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { normalizeMolecule3DSettings, resolveMolecule3DTools, } from "../core/settings.js";
|
|
4
4
|
import { Molecule3DExport } from "./Molecule3DExport.js";
|
|
5
5
|
import { Molecule3DOptions } from "./Molecule3DOptions.js";
|
|
6
6
|
import { Molecule3DToolbar } from "./Molecule3DToolbar.js";
|
|
7
7
|
import { DEFAULT_SPIN_SPEED } from "./camera.js";
|
|
8
|
-
import {
|
|
8
|
+
import { createMolecule3DViewer } from "./createViewer.js";
|
|
9
9
|
import { useControlledState } from "./useControlledState.js";
|
|
10
10
|
import { useImageExport } from "./useImageExport.js";
|
|
11
|
+
import { useMoleculeScene } from "./useMoleculeScene.js";
|
|
11
12
|
import { usePolarSurfaceArea } from "./usePolarSurfaceArea.js";
|
|
12
|
-
import { createMolecule3DViewer } from "./viewer.js";
|
|
13
13
|
/**
|
|
14
14
|
* Mount one molstar canvas and keep it showing what the props describe.
|
|
15
15
|
* @param props - See {@link MoleculeCanvas3DProps}.
|
|
@@ -27,7 +27,6 @@ export function MoleculeCanvas3D(props) {
|
|
|
27
27
|
// effect keyed on it runs again, in order, after the viewer exists.
|
|
28
28
|
const [container, setContainer] = useState(null);
|
|
29
29
|
const viewerRef = useRef(null);
|
|
30
|
-
const framedRef = useRef(null);
|
|
31
30
|
// The viewer is created once, so what its callbacks read is kept fresh here.
|
|
32
31
|
const latest = useRef({
|
|
33
32
|
measurements,
|
|
@@ -64,45 +63,23 @@ export function MoleculeCanvas3D(props) {
|
|
|
64
63
|
viewer.dispose();
|
|
65
64
|
};
|
|
66
65
|
}, [container]);
|
|
67
|
-
// One animation frame of coalescing, so dragging a slider costs one rebuild.
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
const viewer = viewerRef.current;
|
|
70
|
-
if (container === null || viewer === null)
|
|
71
|
-
return;
|
|
72
|
-
let cancelled = false;
|
|
73
|
-
const frame = requestAnimationFrame(() => {
|
|
74
|
-
// Framed on a new molecule or a new viewer, never on a restyle: a slider
|
|
75
|
-
// that snapped the camera back would undo the reader's orientation.
|
|
76
|
-
const framed = framedRef.current;
|
|
77
|
-
const isNew = molfile !== null &&
|
|
78
|
-
(framed?.molfile !== molfile || framed.viewer !== viewer);
|
|
79
|
-
framedRef.current = molfile === null ? null : { molfile, viewer };
|
|
80
|
-
const frameCamera = isNew ? frameNewMolecule : 'none';
|
|
81
|
-
void drawScene(viewer, molfile, settings, measurements, frameCamera)
|
|
82
|
-
.then(() => {
|
|
83
|
-
if (!cancelled)
|
|
84
|
-
latest.current.onFailureChange(null);
|
|
85
|
-
})
|
|
86
|
-
.catch((error) => {
|
|
87
|
-
if (cancelled)
|
|
88
|
-
return;
|
|
89
|
-
latest.current.onFailureChange(error instanceof Error ? error.message : String(error));
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
return () => {
|
|
93
|
-
cancelled = true;
|
|
94
|
-
cancelAnimationFrame(frame);
|
|
95
|
-
};
|
|
96
|
-
}, [container, molfile, frameNewMolecule, settings, measurements]);
|
|
97
66
|
useEffect(() => {
|
|
98
67
|
void viewerRef.current?.setSpin(spinning, spinSpeed);
|
|
99
68
|
}, [container, spinning, spinSpeed]);
|
|
100
69
|
useEffect(() => {
|
|
101
70
|
void viewerRef.current?.setMeasureKind(measureKind);
|
|
102
71
|
}, [container, measureKind]);
|
|
103
|
-
const resetView =
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
const { resetView } = useMoleculeScene({
|
|
73
|
+
container,
|
|
74
|
+
viewerRef,
|
|
75
|
+
molfile,
|
|
76
|
+
frameNewMolecule,
|
|
77
|
+
settings,
|
|
78
|
+
measurements,
|
|
79
|
+
spinning,
|
|
80
|
+
onFailureChange,
|
|
81
|
+
camera: props,
|
|
82
|
+
});
|
|
106
83
|
const { canvasSize, exportImage } = useImageExport(container, viewerRef, fileName);
|
|
107
84
|
return (_jsxs("div", { style: { ...STAGE_STYLE, minHeight }, children: [_jsx("div", { ref: setContainer, style: CANVAS_STYLE, "data-testid": "molecule3d" }), molfile !== null && (_jsx("div", { style: OVERLAY_STYLE, children: _jsx(Molecule3DToolbar, { tools: tools, measureKind: measureKind, onMeasureKindChange: setMeasureKind, measurementCount: measurements.length, onClearMeasurements: () => {
|
|
108
85
|
setMeasurements(NO_MEASUREMENTS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoleculeCanvas3D.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MoleculeCanvas3D.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAY/D;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IAC3D,MAAM,EACJ,OAAO,EACP,gBAAgB,GAAG,MAAM,EACzB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EAAE,YAAY,EACtB,eAAe,GA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,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,YAAY,GAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAEvE,MAAM,aAAa,GAAkB;IACnC,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,YAAY;IACxB,GAAG,EAAE,CAAC;IACN,aAAa,EAAE,MAAM;CACtB,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
2
|
+
* The camera moves the molecule viewer needs: frame whatever is on screen, the
|
|
3
|
+
* slow spin that makes a still picture of a 3D molecule readable, and the two
|
|
4
|
+
* directions between molstar's camera and the scene-relative camera a link
|
|
5
|
+
* carries.
|
|
4
6
|
*/
|
|
5
7
|
import type { PluginContext } from 'molstar/lib/mol-plugin/context.js';
|
|
8
|
+
import type { Molecule3DCamera } from '../core/camera.ts';
|
|
6
9
|
/** Transition length used when the caller does not pick one, milliseconds. */
|
|
7
10
|
export declare const DEFAULT_CAMERA_DURATION = 250;
|
|
8
11
|
/** Turn rate used when the caller does not pick one, in molstar's spin unit. */
|
|
@@ -28,4 +31,34 @@ export declare function resetCamera(plugin: PluginContext, durationMilliseconds?
|
|
|
28
31
|
* @param speed - Turn rate, in molstar's own spin unit.
|
|
29
32
|
*/
|
|
30
33
|
export declare function setSpin(plugin: PluginContext, spinning: boolean, speed?: number): void;
|
|
34
|
+
/**
|
|
35
|
+
* Where the camera stands, against the scene rather than its coordinates.
|
|
36
|
+
*
|
|
37
|
+
* An empty scene has no camera to read: a canvas showing nothing still has one,
|
|
38
|
+
* pointing at the origin from molstar's default distance, and measuring that
|
|
39
|
+
* against a sphere of no radius describes a view that means nothing — which
|
|
40
|
+
* would then be applied to the first molecule drawn.
|
|
41
|
+
* @param plugin - The molstar context.
|
|
42
|
+
* @returns The camera, or `null` when there is no canvas or nothing to measure
|
|
43
|
+
* it against.
|
|
44
|
+
*/
|
|
45
|
+
export declare function readCamera(plugin: PluginContext): Molecule3DCamera | null;
|
|
46
|
+
/**
|
|
47
|
+
* Put the camera back where a link says it stood.
|
|
48
|
+
*
|
|
49
|
+
* Ordered through `requestCameraReset` for the same reason {@link resetCamera}
|
|
50
|
+
* is: the bounding sphere the camera is measured against is only refreshed when
|
|
51
|
+
* the canvas commits the scene, so the move is computed then rather than now.
|
|
52
|
+
* @param plugin - The molstar context.
|
|
53
|
+
* @param camera - Where to stand.
|
|
54
|
+
* @param durationMilliseconds - Transition length. Pass 0 for an instant jump.
|
|
55
|
+
*/
|
|
56
|
+
export declare function applyCamera(plugin: PluginContext, camera: Molecule3DCamera, durationMilliseconds?: number): void;
|
|
57
|
+
/**
|
|
58
|
+
* Follow the camera, however it moves — a drag, the reset button, the spin.
|
|
59
|
+
* @param plugin - The molstar context.
|
|
60
|
+
* @param listener - Called after every move, with the camera it left.
|
|
61
|
+
* @returns A function that stops calling the listener.
|
|
62
|
+
*/
|
|
63
|
+
export declare function watchCamera(plugin: PluginContext, listener: (camera: Molecule3DCamera | null) => void): () => void;
|
|
31
64
|
//# sourceMappingURL=camera.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/camera.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/camera.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAqCxC;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,aAAa,EACrB,oBAAoB,SAA0B,EAC9C,SAAS,UAAQ,GAChB,IAAI,CAWN;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,OAAO,EACjB,KAAK,SAAqB,GACzB,IAAI,CAQN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,gBAAgB,GAAG,IAAI,CA8BzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,gBAAgB,EACxB,oBAAoB,SAAI,GACvB,IAAI,CAoBN;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,GAClD,MAAM,IAAI,CASZ"}
|