forked from nglviewer/ngl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathngl.js
414 lines (363 loc) · 9.43 KB
/
ngl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
/**
* @file ngl
* @private
* @author Alexander Rose <[email protected]>
*/
import "./polyfills";
import _Promise from "../lib/promise.es6.js";
if( typeof window !== 'undefined' && !window.Promise ){
window.Promise = _Promise;
}
/**
* The NGL module. These members are available in the `NGL` namespace when using the {@link https://github.com/umdjs/umd|UMD} build in the `ngl.js` file.
* @module NGL
*/
import {
Debug, setDebug,
ColormakerRegistry, DatasourceRegistry, ParserRegistry, RepresentationRegistry
} from "./globals.js";
import { autoLoad, getDataInfo } from "./loader/loader-utils.js";
import Selection from "./selection.js";
import PdbWriter from "./writer/pdb-writer.js";
import Stage from "./stage/stage.js";
import Collection from "./component/collection.js";
import ComponentCollection from "./component/component-collection.js";
import RepresentationCollection from "./component/representation-collection.js";
import Assembly from "./symmetry/assembly.js";
import TrajectoryPlayer from "./trajectory/trajectory-player.js";
import { superpose } from "./align/align-utils.js";
import { guessElement } from "./structure/structure-utils.js";
import { throttle, download, getQuery, uniqueArray, getFileInfo } from "./utils.js";
import Queue from "./utils/queue.js";
import Counter from "./utils/counter.js";
//
import Colormaker from "./color/colormaker.js";
import "./color/atomindex-colormaker.js";
import "./color/bfactor-colormaker.js";
import "./color/chainid-colormaker.js";
import "./color/chainindex-colormaker.js";
import "./color/chainname-colormaker.js";
import "./color/element-colormaker.js";
import "./color/entityindex-colormaker.js";
import "./color/entitytype-colormaker.js";
import "./color/hydrophobicity-colormaker.js";
import "./color/modelindex-colormaker.js";
import "./color/moleculetype-colormaker.js";
import "./color/occupancy-colormaker.js";
import "./color/picking-colormaker.js";
import "./color/random-colormaker.js";
import "./color/residueindex-colormaker.js";
import "./color/resname-colormaker.js";
import "./color/sstruc-colormaker.js";
import "./color/uniform-colormaker.js";
import "./color/value-colormaker.js";
import "./color/volume-colormaker.js";
//
import "./component/script-component.js";
import "./component/shape-component.js";
import "./component/structure-component.js";
import "./component/surface-component.js";
import "./component/volume-component.js";
//
import "./representation/axes-representation.js";
import "./representation/backbone-representation.js";
import "./representation/ballandstick-representation.js";
import "./representation/base-representation.js";
import "./representation/cartoon-representation.js";
import "./representation/contact-representation.js";
import "./representation/distance-representation.js";
import "./representation/helixorient-representation.js";
import "./representation/hyperball-representation.js";
import "./representation/label-representation.js";
import "./representation/licorice-representation.js";
import "./representation/line-representation.js";
import "./representation/molecularsurface-representation.js";
import "./representation/point-representation.js";
import "./representation/ribbon-representation.js";
import "./representation/rocket-representation.js";
import "./representation/rope-representation.js";
import "./representation/spacefill-representation.js";
import "./representation/trace-representation.js";
import "./representation/tube-representation.js";
import "./representation/unitcell-representation.js";
import BufferRepresentation from "./representation/buffer-representation.js";
import ArrowBuffer from "./buffer/arrow-buffer.js";
import ConeBuffer from "./buffer/cone-buffer.js";
import CylinderBuffer from "./buffer/cylinder-buffer.js";
import EllipsoidBuffer from "./buffer/ellipsoid-buffer.js";
import SphereBuffer from "./buffer/sphere-buffer.js";
import TextBuffer from "./buffer/text-buffer.js";
//
import "./parser/gro-parser.js";
import "./parser/pdb-parser.js";
import "./parser/pqr-parser.js";
import "./parser/cif-parser.js";
import "./parser/sdf-parser.js";
import "./parser/mol2-parser.js";
import "./parser/mmtf-parser.js";
import "./parser/dcd-parser.js";
import "./parser/mrc-parser.js";
import "./parser/cube-parser.js";
import "./parser/dx-parser.js";
import "./parser/dxbin-parser.js";
import "./parser/xplor-parser.js";
import "./parser/ply-parser.js";
import "./parser/obj-parser.js";
import "./parser/text-parser.js";
import "./parser/csv-parser.js";
import "./parser/json-parser.js";
import "./parser/xml-parser.js";
//
import Shape from "./geometry/shape.js";
import Kdtree from "./geometry/kdtree.js";
import SpatialHash from "./geometry/spatial-hash.js";
//
import "./utils/gzip-decompressor.js";
//
import "./datasource/rcsb-datasource.js";
import "./datasource/pubchem-datasource.js";
import "./datasource/passthrough-datasource.js";
import StaticDatasource from "./datasource/static-datasource.js";
//
import Signal from "../lib/signals.es6.js";
import {
Matrix3, Matrix4, Vector2, Vector3, Box3, Quaternion, Plane, Color
} from "../lib/three.es6.js";
//
import { version as Version } from "../package.json";
/**
* Promise class
* @name Promise
* @class
* @global
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise}
*/
/**
* Blob class
* @name Blob
* @class
* @global
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob}
*/
/**
* File class
* @name File
* @class
* @global
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File}
*/
/**
* Signal class, used to dispatch events
* @name Signal
* @class
* @global
* @see {@link https://millermedeiros.github.io/js-signals/docs/symbols/Signal.html}
*
* @example
* function onHover( pickingData ){
* // ...
* }
* stage.signals.hovered.add( onHover ); // add listener
* stage.signals.hovered.remove( onHover ); // remove listener
*
* @example
* function onClick( pickingData ){
* // ...
* }
* // add listener that is removed after first execution
* stage.signals.hovered.addOnce( onHover );
*/
/**
* 3x3 matrix from three.js
* @name Matrix3
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Matrix3}
*/
/**
* 4x4 transformation matrix from three.js
* @name Matrix4
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Matrix4}
*/
/**
* 2d vector class from three.js
* @name Vector2
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Vector2}
*/
/**
* 3d vector class from three.js
* @name Vector3
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Vector3}
*/
/**
* 3d vector class from three.js
* @name Box3
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Box3}
*/
/**
* Quaternion class from three.js
* @name Quaternion
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Quaternion}
*/
/**
* Plane class from three.js
* @name Plane
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Plane}
*/
/**
* Color class from three.js
* @name Color
* @class
* @global
* @see {@link http://threejs.org/docs/#Reference/Math/Color}
*/
export {
/**
* Version name
* @static
* @type {String}
*/
Version,
Debug,
setDebug,
DatasourceRegistry,
StaticDatasource,
ParserRegistry,
/**
* autoLoad function
* @see {@link autoLoad}
*/
autoLoad,
RepresentationRegistry,
ColormakerRegistry,
Colormaker,
Selection,
PdbWriter,
/**
* Stage class
* @see {@link Stage}
*/
Stage,
Collection,
ComponentCollection,
RepresentationCollection,
/**
* Assembly class
* @see {@link Assembly}
*/
Assembly,
TrajectoryPlayer,
/**
* superpose function
* @see {@link superpose}
*/
superpose,
guessElement,
Queue,
Counter,
throttle,
download,
getQuery,
getDataInfo,
getFileInfo,
uniqueArray,
/**
* Buffer representation class
* @see {@link BufferRepresentation}
*/
BufferRepresentation,
/**
* Sphere buffer class
* @see {@link SphereBuffer}
*/
SphereBuffer,
/**
* Ellipsoid buffer class
* @see {@link EllipsoidBuffer}
*/
EllipsoidBuffer,
/**
* Cylinder buffer class
* @see {@link CylinderBuffer}
*/
CylinderBuffer,
/**
* Cone buffer class
* @see {@link ConeBuffer}
*/
ConeBuffer,
/**
* Arrow buffer class
* @see {@link ArrowBuffer}
*/
ArrowBuffer,
/**
* Text buffer class
* @see {@link TextBuffer}
*/
TextBuffer,
/**
* Shape class
* @see {@link Shape}
*/
Shape,
Kdtree,
SpatialHash,
/**
* Signal class
* @see {@link Signal}
*/
Signal,
/**
* Matrix3 class
* @see {@link Matrix3}
*/
Matrix3,
/**
* Matrix4 class
* @see {@link Matrix4}
*/
Matrix4,
/**
* Vector2 class
* @see {@link Vector2}
*/
Vector2,
/**
* Vector3 class
* @see {@link Vector3}
*/
Vector3,
/**
* Box3 class
* @see {@link Box3}
*/
Box3,
/**
* Quaternion class
* @see {@link Quaternion}
*/
Quaternion,
/**
* Plane class
* @see {@link Plane}
*/
Plane,
/**
* Color class
* @see {@link Color}
*/
Color
};