<commit_before>
# Author @patriciogv - 2015
scene:
    background:
        color: grey
cameras:
    camera1:
        type: perspective
        focal_length: 2
styles:
    tilt:
        animated: true
        shaders:
            defines:
                PI: 3.1415926535897932384626433832795
                HALF_PI: 1.5707963267948966192313216916398
            uniforms:
                u_offset: [0,0]
            blocks:
                global: |
                    mat3 rotateX3D(float phi){
                        return mat3(
                            vec3(1.,0.,0.),
                            vec3(0.,cos(phi),-sin(phi)),
                            vec3(0.,sin(phi),cos(phi)));
                    }
                    mat3 rotateZ3D(float psi){
                        return mat3(
                            vec3(cos(psi),-sin(psi),0.),
                            vec3(sin(psi),cos(psi),0.),
                            vec3(0.,0.,1.));
                    }
                position: |
                    // position.xyz = rotateX3D(abs(cos(u_offset.x))) * rotateZ3D(cos(u_offset.y)) * position.xyz;
                    float z = smoothstep(0.7,1.,max((u_map_position.z)/20.,0.));
                    position.xyz = rotateX3D(z*HALF_PI) * rotateZ3D(cos(u_offset.y)*z) * position.xyz;
                    position.y -= u_offset.x*(z*100.);
                    position.z -= u_offset.x*(z*100.);
    roads:
        mix: tilt  
        data: { source: osm }
        filter:
            not: { kind: ["path", "rail"] }
        draw:
            lines:
                order: function() { return feature.sort_key; }
                color: gray
                width: 8
                cap: round
        highway:
            filter:
                kind: highway
            draw:
                lines:
                    order: function() { return feature.sort_key; }
                    color: '#cc6666'
                    width: 12
                    outline:
                        color: grey
                        width: 1.5
        minor_road:
            filter:
                kind: minor_road
            draw:
                lines:
                    order: function() { return feature.sort_key; }
                    color: lightgrey
                    width: 5
    walls:
        mix: tilt  
        base: polygons
        texcoords: true
        blend: overlay
        shaders:
            blocks:
                color: |
                    color = vec4(0, 1, 0, 0.1);
    walls-outline:
        mix: tilt  
        base: lines
        lighting: false
sources:
    osm:
        type: TopoJSON
        url:  //vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-JUsa0Gc
layers:
    water:
        data: { source: osm }
        draw:
            outline:
                order: 3
                color: [0.654,0.897,1.000]
                width: 1px
                tile_edges: false
    roads:
        data: { source: osm }
        filter: { not: { kind: [rail, ferry] } }
        draw:
            roads:
                order: 4
                color: [1, 1, 1]
                width: 8
        oneway:
            filter: { oneway: yes }
            draw: { roads: { color: red } }

        highway:
            filter:
                kind: highway
            draw:
                roads:
                    order: 5
                    width: 12
                outline:
                    order: 4
                    color: [0.654,0.897,1.000]
                    width: 13
        tunnel:
            filter:
                is_tunnel: yes
            rail:
                filter:
                    kind: rail
                visible: false
        minor_road:
            filter:
                kind: minor_road
            draw:
                roads:
                    width: 5
        path:
            filter:
                kind: path
            draw:
                roads:
                    width: 3
        rail:
            filter:
                kind: rail
                is_tunnel: no
            draw:
                roads:
                    width: 3
    buildings:
        data: { source: osm }
        draw:
            walls:
                order: 6
                color: [1, 1, 1]
            baseline:
                order: 5
                width: [[12, .1px], [18, 0.5m]]
                color: [0.654,0.897,1.000]
            walls-outline:
                order: 7
                color: [0.654,0.897,1.000]
                width: 1px
        extruded:
            filter: { $zoom: { min: 13 } }
            draw:
                walls:
                    extrude: true
                walls-outline:
                    order: 7
                    width: [[12, .1px], [14, 0.1px], [15, 0.5px], [17, 1.0px], [18, 1px]]
                    extrude: true
                    color: [0.654,0.897,1.000]
 <commit_msg>Add roads and water<commit_after>
# Author @patriciogv - 2015
scene:
    background:
        color: grey
cameras:
    camera1:
        type: perspective
        focal_length: 2
styles:
    tilt:
        animated: true
        shaders:
            defines:
                PI: 3.1415926535897932384626433832795
                HALF_PI: 1.5707963267948966192313216916398
            uniforms:
                u_offset: [0,0]
            blocks:
                global: |
                    mat3 rotateX3D(float phi){
                        return mat3(
                            vec3(1.,0.,0.),
                            vec3(0.,cos(phi),-sin(phi)),
                            vec3(0.,sin(phi),cos(phi)));
                    }
                    mat3 rotateZ3D(float psi){
                        return mat3(
                            vec3(cos(psi),-sin(psi),0.),
                            vec3(sin(psi),cos(psi),0.),
                            vec3(0.,0.,1.));
                    }
                position: |
                    // position.xyz = rotateX3D(abs(cos(u_offset.x))) * rotateZ3D(cos(u_offset.y)) * position.xyz;
                    float z = smoothstep(0.7,1.,max((u_map_position.z)/20.,0.));
                    position.xyz = rotateX3D(z*HALF_PI) * rotateZ3D(cos(u_offset.y)*z) * position.xyz;
                    position.y -= u_offset.x*(z*100.);
                    position.z -= u_offset.x*(z*100.);
    lin:
      base: lines
      mix: tilt
    roads:
        base: lines
        mix: tilt  
    water:
        base: polygons
        mix: tilt
    walls:
        mix: tilt  
        base: polygons
        texcoords: true
        blend: overlay
        shaders:
            blocks:
                color: |
                    color = vec4(0, 1, 0, 0.1);
    walls-outline:
        mix: tilt  
        base: lines
        lighting: false
sources:
    osm:
        type: TopoJSON
        url:  //vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson?api_key=vector-tiles-JUsa0Gc
layers:
    roads:
        data: { source: osm }
        filter:
            not: { kind: ["path", "rail"] }
        draw:
            roads:
                order: 3
                color: [0.4, 0.4, 0.4]
                width: 8
            outline:
                style: lin
                order: 2
                color: [0.6, 0.6, 0.6]
                width: 10
    water:
        data: { source: osm }
        draw:
            water:
                order: 1
                color: [0.2, 0.2, 0.5]
            outline:
                order: 2
                style: lin
                color: [0.3, 0.3, 0.6]
                width: 2px
                tile_edges: false
    buildings:
        data: { source: osm }
        extruded:
            filter: { $zoom: { min: 13 } }
            draw:
                walls:
                    extrude: true
                walls-outline:
                    order: 7
                    width: [[12, .1px], [14, 0.5px], [15, 1px], [17, 1.5px], [18, 2px]]
                    extrude: true
                    color: [0.654,0.897,1.000]
 
{'fraction_non_alphanumeric': 0.10407578212638664, 'fraction_numerical': 0.05222485354605509, 'mean_word_length': 0.8818011257035647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1393607', 'n_tokens_mistral': 2610, 'n_tokens_neox': 2260, 'n_words': 494}