Scene definition reorganization

Widespread reorganization of scene definition & styling rules. Combines changes from `mode-reorg` and `iwillig/style-work` branches. Renames render `modes` to `styles`. Implements new nested style rule parsing. Style rules are still WIP (and the main demo stylesheet is currently broken) but this is a functional implementation.
it's 'of' not 'in'

On Fri, Dec 5, 2014 at 6:48 PM, Brett Camper <brettcamper@gmail.com> wrote:

> I believe this is part of the ES6 spec for arrays.
>
> On Fri, Dec 5, 2014 at 6:47 PM, Ivan Willig <notifications@github.com>
> wrote:
>
>> In src/tile.js:
>>
>> > -                    }
>> > -                    else if (feature.geometry.type === 'MultiPoint') {
>> > -                        mode.buildPoints(feature.geometry.coordinates, style, mode_vertex_data);
>> > +                    feature = geom.features[f];
>> > +
>> > +                    feature.layer = name;
>> > +
>> > +                    // Find matching rules
>> > +                    var matchedRules = [];
>> > +                    Object.keys(rules[name]).forEach((_rule_name) => {
>> > +                        var rule = rules[name][_rule_name];
>> > +                        matchedRules = rule.matchFeature(feature).concat(matchedRules);
>> > +                    });
>> > +
>> > +                    // Parse & render styles
>> > +                    for (var rule of matchedRules) {
>>
>> matchedRules is a array right? Some people consider this dangours. The
>> reason beinging if someone extends Array's prototype, the forin will now
>> iterate of those methods. Something to consider since this is a library and
>> we don't control what people include in their site.
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/tangrams/tangram/pull/73/files#r21409154>.
>>
>
>