Export renderers

This commit is contained in:
Raul Ochoa 2014-12-09 16:20:29 +01:00
parent 7463b461e6
commit 2e8813c9ff
4 changed files with 9 additions and 21 deletions

View File

@ -1,7 +1,3 @@
(function(exports) {
exports.torque = exports.torque || {};
var TAU = Math.PI*2;
// min value to render a line.
// it does not make sense to render a line of a width is not even visible
@ -79,11 +75,8 @@
ctx.drawImage(img, 0, 0, w, h);
}
exports.torque.cartocss = exports.torque.cartocss || {};
exports.torque.cartocss = {
module.exports = {
renderPoint: renderPoint,
renderSprite: renderSprite,
renderRectangle: renderRectangle
};
})(typeof exports === "undefined" ? this : exports);

View File

@ -0,0 +1,5 @@
module.exports = {
cartocss: require('./cartocss_render'),
Point: require('./point'),
Rectangle: require('./rectangle')
};

View File

@ -1,6 +1,3 @@
(function(exports) {
exports.torque = exports.torque || {};
exports.torque.renderer = exports.torque.renderer || {};
var TAU = Math.PI * 2;
var DEFAULT_CARTOCSS = [
@ -237,6 +234,4 @@
// exports public api
exports.torque.renderer.Point = PointRenderer;
})(typeof exports === "undefined" ? this : exports);
module.exports = PointRenderer;

View File

@ -1,6 +1,3 @@
(function(exports) {
exports.torque = exports.torque || {};
exports.torque.renderer = exports.torque.renderer || {};
var DEFAULT_CARTOCSS = [
'#layer {',
@ -158,6 +155,4 @@
// exports public api
exports.torque.renderer.Rectangle = RectanbleRenderer;
})(typeof exports === "undefined" ? this : exports);
module.exports = RectanbleRenderer;