Skip to content

Commit

Permalink
split up into subfolders
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaefer committed Nov 25, 2013
1 parent 1fe81bd commit ef30d74
Show file tree
Hide file tree
Showing 38 changed files with 51 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/js/shaders.js
/js/render/shaders.js
/dist
/cache
/editor/dist
/node_modules
/tiles-original
Expand Down
2 changes: 1 addition & 1 deletion bin/build-shaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports = function() {
var code = "// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.\n\n";
code += "module.exports = " + JSON.stringify(shaders, null, 4) + ";\n";

fs.writeFileSync('js/shaders.js', code);
fs.writeFileSync('js/render/shaders.js', code);
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion js/vectortilepoint.js → js/format/vectortilepoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ function VectorTilePoint(x, y) {

VectorTilePoint.prototype.toString = function() {
return "Point(" + this.x + ", " + this.y + ")";
};
};
File renamed without changes.
2 changes: 1 addition & 1 deletion js/geometry.js → js/geometry/geometry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var util = require('./util.js');
var util = require('../util/util.js');
var VertexBuffer = require('./vertexbuffer.js');
var FillBuffer = require('./fillbuffer.js');
var GlyphVertexBuffer = require('./glyphvertexbuffer.js');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions js/llmr.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

if (typeof window === 'undefined') {
require('./worker.js');
require('./worker/worker.js');
} else {
exports.Map = require('./map.js');
exports.Style = require('./style.js');
exports.StyleLayer = require('./stylelayer.js');
exports.evented = require('./evented.js');
exports.Map = require('./ui/map.js');
exports.Style = require('./style/style.js');
exports.StyleLayer = require('./style/stylelayer.js');
exports.evented = require('./lib/evented.js');
exports.chroma = require('./lib/chroma.js');
exports.util = require('./util.js');
exports.util = require('./util/util.js');
}
File renamed without changes.
6 changes: 3 additions & 3 deletions js/painter.js → js/render/painter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

require('./glutil.js');
var GlyphAtlas = require('./glyphatlas.js');
var glmatrix = require('./lib/glmatrix.js');
var chroma = require('./lib/chroma.js');
var GlyphAtlas = require('../text/glyphatlas.js');
var glmatrix = require('../lib/glmatrix.js');
var chroma = require('../lib/chroma.js');
var mat4 = glmatrix.mat4;
var mat2 = glmatrix.mat2;

Expand Down
2 changes: 1 addition & 1 deletion js/imagesprite.js → js/style/imagesprite.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var evented = require('./evented.js');
var evented = require('../lib/evented.js');

module.exports = ImageSprite;
evented(ImageSprite);
Expand Down
7 changes: 4 additions & 3 deletions js/style.js → js/style/style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
var evented = require('./evented.js');
var chroma = require('./lib/chroma.js');
var evented = require('../lib/evented.js');
var chroma = require('../lib/chroma.js');

var util = require('../util/util.js');

var util = require('./util.js');
var StyleLayer = require('./stylelayer.js');
var ImageSprite = require('./imagesprite.js');

Expand Down
2 changes: 1 addition & 1 deletion js/stylelayer.js → js/style/stylelayer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var evented = require('./evented.js');
var evented = require('../lib/evented.js');

module.exports = StyleLayer;
function StyleLayer(data, style) {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions js/collision.js → js/text/collision.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//'use strict';

var rbush = require('./lib/rbush.js');
var util = require('./util');
var rbush = require('../lib/rbush.js');
var util = require('../util/util.js');
var rotationRange = require('./rotationrange.js');
var console = require('./console.js');
var console = require('../worker/console.js');

module.exports = Collision;

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions js/placement.js → js/text/placement.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

var util = require('./util');
var util = require('../util/util.js');
var rotationRange = require('./rotationrange.js');
var console = require('./console.js');
var console = require('../worker/console.js');

module.exports = Placement;

Expand Down
2 changes: 1 addition & 1 deletion js/rotationrange.js → js/text/rotationrange.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var util = require('./util.js');
var util = require('../util/util.js');

module.exports = {
rotationRange: rotationRange,
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions js/layer.js → js/ui/layer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

var MRUCache = require('../util/mrucache.js');
var Coordinate = require('../util/coordinate.js');
var util = require('../util/util.js');
var evented = require('../lib/evented.js');

var Tile = require('./tile.js');
var RasterTile = require('./rastertile.js');
var MRUCache = require('./mrucache.js');
var Coordinate = require('./coordinate.js');
var util = require('./util.js');
var evented = require('./evented.js');

module.exports = Layer;
evented(Layer);
Expand Down
12 changes: 7 additions & 5 deletions js/map.js → js/ui/map.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
'use strict';

var Dispatcher = require('../util/dispatcher.js');
var util = require('../util/util.js');
var evented = require('../lib/evented.js');

var Style = require('../style/style.js');
var GLPainter = require('../render/painter.js');

var Transform = require('./transform.js');
var Hash = require('./hash.js');
var Style = require('./style.js');
var GLPainter = require('./painter.js');
var Interaction = require('./interaction.js');
var Dispatcher = require('./dispatcher.js');
var Layer = require('./layer.js');
var util = require('./util.js');
var evented = require('./evented.js');

module.exports = Map;
function Map(config) {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions js/tile.js → js/ui/tile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

var VertexBuffer = require('./vertexbuffer.js');
var FillBuffer = require('./fillbuffer.js');
var GlyphVertexBuffer = require('./glyphvertexbuffer.js');
var VertexBuffer = require('../geometry/vertexbuffer.js');
var FillBuffer = require('../geometry/fillbuffer.js');
var GlyphVertexBuffer = require('../geometry/glyphvertexbuffer.js');

/*
* Tiles are generally represented as packed integer ids constructed by
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions js/worker.js → js/worker/worker.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
'use strict';

var Actor = require('./actor.js');
var Geometry = require('./geometry.js');
var util = require('./util.js');
var Protobuf = require('./protobuf.js');
var VectorTile = require('./vectortile.js');
var VectorTileFeature = require('./vectortilefeature.js');
var rbush = require('./lib/rbush.js');
var rotationRange = require('./rotationrange.js');
var Placement = require('./placement.js');
var Collision = require('./collision.js');
var Actor = require('../util/actor.js');
var Geometry = require('../geometry/geometry.js');
var util = require('../util/util.js');
var Protobuf = require('../format/protobuf.js');
var VectorTile = require('../format/vectortile.js');
var VectorTileFeature = require('../format/vectortilefeature.js');
var rbush = require('../lib/rbush.js');
var rotationRange = require('../text/rotationrange.js');
var Placement = require('../text/placement.js');
var Collision = require('../text/collision.js');
var console = require('./console.js');

var actor = new Actor(self, self);
Expand Down

0 comments on commit ef30d74

Please sign in to comment.