This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Quick script to check cif parsing in NGL by attempting to | |
* autoLoad all entries from a local mirror. | |
* Smoke test rather than thorough validation! | |
*/ | |
const _ = require('browser-env')() | |
const fs = require('fs'); | |
const path = require('path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Watches a structure component and maintains a list of atoms | |
* currently displayed in atomistic form. | |
* | |
* Provides a signal AtomMonitor.signals.updated | |
*/ | |
const COMPONENT_SIGNALS = [ | |
'representationAdded', | |
'representationRemoved', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// These functions pulled out of prototype method, `this` has `stage` attribute | |
{ | |
/** Returns a promise that resolves to an Image object/element */ | |
getImage: function( params ) { | |
params = Object.assign( { | |
trim: false, | |
antialias: true, | |
transparent: false }, params ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getThumbnail(stage) { | |
var canvas, context, image = new Image(); | |
function setupCanvas() { | |
canvas = document.createElement( 'canvas' ); | |
canvas.style.visibility = "hidden"; | |
canvas.width = 100; | |
canvas.height = 100; | |
document.body.append( canvas ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file Bond Store | |
* @author Alexander Rose <alexander.rose@weirdbyte.de> | |
* @private | |
*/ | |
import Store from "./store.js"; | |
import BondProxy from "../proxy/bond-proxy.js"; |