Created
April 28, 2015 15:34
-
-
Save AppWerft/82f6d3a4edcf3f19b3b4 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"> | |
<meta charset="utf-8"> | |
<title>GLmol embedding examples</title> | |
<style type="text/css"> * {margin:0;padding:0}</style> | |
</head> | |
<body> | |
<div id="glmol" style="width: 500px; height: 400px;background-color:#fff"> </div> | |
<script src="./jquery.javascript"></script> | |
<script src="./three.javascript"></script> | |
<script src="./glmol.javascript"></script> | |
<script type="text/javascript"> | |
var glmol = new GLmol('glmol', true); | |
glmol.initializeScene(); | |
glmol.setBackground(0xdddddd); | |
Ti.App.addEventListener('setMol', function(_event) { | |
glmol.setMolecule(undefined, _event.sdf); | |
glmol.rebuildScene(); | |
}); | |
Ti.App.addEventListener('setDims', function(_event) { | |
$('#glmol').css('width', 1.2*_event.width); | |
$('#glmol').css('height',1.2*_event.height); | |
console.log(_event); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment