3dmol
Advanced tools
Comparing version 1.7.1 to 1.8.0
@@ -315,2 +315,13 @@ | ||
var m = viewer.addModel(); | ||
if (query.indexOf(':') < 0) { | ||
//no type specifier, guess | ||
if(query.length == 4) { | ||
query = 'pdb:'+query; | ||
} else if(!isNaN(query)) { | ||
query = 'cid:'+query; | ||
} else { | ||
query = 'url:'+query; | ||
} | ||
} | ||
if (query.substr(0, 5) === 'mmtf:') { | ||
@@ -385,3 +396,3 @@ pdbUri = options && options.pdbUri ? options.pdbUri : "https://mmtf.rcsb.org/v1.0/full/"; | ||
pdbUri = options && options.pdbUri ? options.pdbUri : "https://files.rcsb.org/view/"; | ||
uri = pdbUri + query + "." + type; | ||
uri = pdbUri + query + ".pdb"; | ||
console.log("falling back to pdb format"); | ||
@@ -651,2 +662,10 @@ $.get(uri, function(ret) { | ||
//since we don't use the require optimizer to combine modules | ||
if(typeof(_3dmol_saved_define) !== 'undefined') { | ||
/** When pulling in external sources, disable amd to ensure they | ||
* populate the global namespace as expected. Restore it so code | ||
* using amd still works. */ | ||
/*global _3dmol_saved_define, _3dmol_saved_require, define:true, require:true */ | ||
define = _3dmol_saved_define; | ||
require = _3dmol_saved_require; | ||
} | ||
if( typeof(define) === 'function' && define.amd) { | ||
@@ -653,0 +672,0 @@ define('$3Dmol',[], function() { return $3Dmol; }); |
@@ -604,3 +604,3 @@ | ||
" float t = dot(mvPosition.xyz-p1,n)/dot(pnorm,n);", | ||
" mvPosition.xyz = p1+t*pnorm;", | ||
" mvPosition.xyz = p1+t*pnorm;", | ||
" } else {", //orthographic | ||
@@ -616,3 +616,3 @@ " mvPosition.xyz = p1;", | ||
" mvPosition.xyz = p2;", | ||
" }", | ||
" }", | ||
" mult *= -1.0;", | ||
@@ -622,3 +622,3 @@ " }", | ||
" vec3 doublecr = normalize(cross(mvPosition.xyz,cr))*radius;", | ||
" mvPosition.xy += mult*(cr + doublecr).xy;", | ||
" mvPosition.xyz += mult*(cr + doublecr).xyz;", | ||
" cposition = mvPosition.xyz;", | ||
@@ -625,0 +625,0 @@ " gl_Position = projectionMatrix * mvPosition;", |
@@ -12,3 +12,3 @@ const { series, parallel, src, watch, dest} = require('gulp'); | ||
coresrc = ['3Dmol/3dmol.js','3Dmol/WebGL/math.js','3Dmol/WebGL/shapes.js','3Dmol/WebGL/core.js','3Dmol/WebGL/**.js','3Dmol/**.js','!3Dmol/SurfaceWorker.js','3Dmol/SurfaceWorker.js']; | ||
extsrc = ['js/mmtf.js','node_modules/pako/dist/pako_inflate.js','node_modules/netcdfjs/dist/netcdfjs.js']; | ||
extsrc = ['js/disable_amd.js','js/mmtf.js','node_modules/pako/dist/pako.js','node_modules/netcdfjs/dist/netcdfjs.js','node_modules/upng-js/UPNG.js']; | ||
uisrc = ['3Dmol/ui/ui.js', '3Dmol/ui/state.js', '3Dmol/ui/icon.js', '3Dmol/ui/form.js', '3Dmol/ui/defaultValues.js']; | ||
@@ -41,2 +41,3 @@ jqsrc = ['node_modules/jquery/dist/jquery.js']; | ||
'pako':false, | ||
'UPNG':false, | ||
'netcdfjs':false, | ||
@@ -52,4 +53,7 @@ 'XMLHttpRequest':false, | ||
'TextDecoder': false, | ||
'define':false}})) | ||
.pipe(jshint.reporter('default')); | ||
'FileReader': false, | ||
'define':false, | ||
'require':false}})) | ||
.pipe(jshint.reporter('default')) | ||
.pipe(jshint.reporter('fail')); | ||
} | ||
@@ -56,0 +60,0 @@ |
{ | ||
"name": "3dmol", | ||
"version": "1.7.1", | ||
"version": "1.8.0", | ||
"description": "Object oriented Javascript molecular visualization library", | ||
@@ -39,4 +39,5 @@ "repository": { | ||
"pako": "^2.0.4", | ||
"yargs-parser": "^20.2.9" | ||
"yargs-parser": "^20.2.9", | ||
"upng-js": "^2.1.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
81063038
271
306508
6
2
51
7
+ Addedupng-js@^2.1.0
+ Addedpako@1.0.11(transitive)
+ Addedupng-js@2.1.0(transitive)