openframe-tangram
Advanced tools
Comparing version 0.2.9 to 0.2.10
var pjson = require('./package.json'), | ||
debug = require('debug')('openframe:tangram'), | ||
yaml = require('yaml-js'), | ||
Extension = require('openframe-extension'); | ||
Extension = require('openframe-extension'), | ||
fs = require('fs'), | ||
yaml = require('yaml-js'); | ||
@@ -21,10 +22,25 @@ /** | ||
// how do start this type of artwork? currently two token replacements, $filepath and $url | ||
'start_command': function(_config) { | ||
'start_command': function(_config, _tokens) { | ||
debug('Artwork config: ', _config); | ||
var config = _config || {}, | ||
command = 'tangram -m '; | ||
var config = _config || {}; | ||
var command = 'tangram -m '; | ||
console.log("CONFIG:", _config); | ||
var data = fs.readFileSync(tokens['$filepath']); | ||
var scene = yaml.load(data); | ||
if (scene.scene) { | ||
if (scene.scene.zoom) { | ||
command += ' -z ' + scene.scene.zoom; | ||
} | ||
if (scene.scene.tilt) { | ||
command += ' -t ' + scene.scene.tilt; | ||
} | ||
if (scene.scene.lon) { | ||
command += ' -lon ' + scene.scene.lon; | ||
} | ||
if (scene.scene.lat) { | ||
command += ' -lat ' + scene.scene.lat; | ||
} | ||
} | ||
if (config.w) { | ||
@@ -31,0 +47,0 @@ command += ' -w ' + config.w; |
{ | ||
"name": "openframe-tangram", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Openframe extension which adds support for maps via tangram-es", | ||
@@ -5,0 +5,0 @@ "main": "extension.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43679538
52
1