Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set custom layers and extrusion examples to use antialias: true #8474

Merged
merged 1 commit into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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