|
@@ -28,7 +28,12 @@
|
|
// resource URL
|
|
// resource URL
|
|
'models/molecules/caffeine.pdb',
|
|
'models/molecules/caffeine.pdb',
|
|
// Function when resource is loaded
|
|
// Function when resource is loaded
|
|
- function ( geometryAtoms, geometryBonds, json ) {
|
|
|
|
|
|
+ function ( pdb ) {
|
|
|
|
+
|
|
|
|
+ var geometryAtoms = pdb.geometryAtoms;
|
|
|
|
+ var geometryBonds = pdb.geometryBonds;
|
|
|
|
+ var json = pdb.json;
|
|
|
|
+
|
|
console.log( 'This molecule has ' + json.atoms.length + ' atoms' );
|
|
console.log( 'This molecule has ' + json.atoms.length + ' atoms' );
|
|
},
|
|
},
|
|
// Function called when download progresses
|
|
// Function called when download progresses
|
|
@@ -71,7 +76,7 @@
|
|
Begin loading from url and call onLoad with the parsed response content.
|
|
Begin loading from url and call onLoad with the parsed response content.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Object parsePDB]( [page:String text] )</h3>
|
|
|
|
|
|
+ <h3>[method:Object parse]( [page:String text] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:String text] — The textual <em>pdb</em> structure to parse.
|
|
[page:String text] — The textual <em>pdb</em> structure to parse.
|
|
</div>
|
|
</div>
|
|
@@ -79,16 +84,6 @@
|
|
Parse a <em>pdb</em> text and return a <em>JSON</em> structure.<br />
|
|
Parse a <em>pdb</em> text and return a <em>JSON</em> structure.<br />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:null createModel]( [page:Object json], [page:Function callback] )</h3>
|
|
|
|
- <div>
|
|
|
|
- [page:Object json] — The <em>(JSON) pdb</em> structure to parse.<br />
|
|
|
|
- [page:Function callback] — Will be called when parse completes, with three arguments: [page:BufferGeometry geometryAtoms], [page:BufferGeometry geometryBonds] and the original [page:Object json].<br />
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- Parse a <em>(JSON) pdb</em> structure and return two [page:BufferGeometry]: one for atoms, one for bonds.<br />
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<h2>Source</h2>
|
|
<h2>Source</h2>
|
|
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PDBLoader.js examples/js/loaders/PDBLoader.js]
|
|
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PDBLoader.js examples/js/loaders/PDBLoader.js]
|