Skip to content

Commit

Permalink
set antialias to true for custom layers and extrusion examples (#8474)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey authored Jul 16, 2019
1 parent e71afb6 commit dc916cb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/pages/example/3d-buildings.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
zoom: 15.5,
pitch: 45,
bearing: -17.6,
container: 'map'
container: 'map',
antialias: true
});

// The 'building' layer in the mapbox-streets vector source contains building-height
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/example/3d-extrusion-floorplan.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
center: [-87.61694, 41.86625],
zoom: 15.99,
pitch: 40,
bearing: 20
bearing: 20,
antialias: true
});

map.on('load', function() {
Expand Down
10 changes: 6 additions & 4 deletions docs/pages/example/add-3d-model.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<script src='https://unpkg.com/three@0.102.0/build/three.min.js'></script>
<script src="https://unpkg.com/three@0.102.0/examples/js/loaders/GLTFLoader.js"></script>
<script src='https://unpkg.com/three@0.106.2/build/three.min.js'></script>
<script src="https://unpkg.com/three@0.106.2/examples/js/loaders/GLTFLoader.js"></script>
<div id='map'></div>
<script>
var map = window.map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
zoom: 17.5,
center: [148.9819, -35.3981],
pitch: 60
pitch: 60,
antialias: true // create the gl context with MSAA antialiasing, so custom layers are antialiased
});

// parameters to ensure the model is georeferenced correctly on the map
Expand Down Expand Up @@ -57,7 +58,8 @@
// use the Mapbox GL JS map canvas for three.js
this.renderer = new THREE.WebGLRenderer({
canvas: map.getCanvas(),
context: gl
context: gl,
antialias: true
});

this.renderer.autoClear = false;
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/example/custom-style-layer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
container: 'map',
zoom: 3,
center: [7.5, 58],
style: 'mapbox://styles/mapbox/light-v10'
style: 'mapbox://styles/mapbox/light-v10',
antialias: true // create the gl context with MSAA antialiasing, so custom layers are antialiased
});


Expand Down
3 changes: 2 additions & 1 deletion docs/pages/example/dancing-buildings.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
zoom: 15,
pitch: 55,
container: 'map'
container: 'map',
antialias: true
});

map.addControl(new mapboxgl.FullscreenControl());
Expand Down

0 comments on commit dc916cb

Please sign in to comment.