Added antialias world option

0.2
Robin Hawkes 2015-03-30 15:00:49 +01:00
rodzic 124f7f5eed
commit 15c24ab078
5 zmienionych plików z 20 dodań i 10 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
/*! ViziCities - v0.2.0 - 2015-03-13 */
/*! ViziCities - v0.2.0 - 2015-03-30 */
// Underscore.js 1.7.0
// http://underscorejs.org
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@ -6601,7 +6601,10 @@ if (typeof window === undefined) {
// var zoom = Math.floor(19 - Math.log(altitude / 1000) / Math.LN2);
// https://social.msdn.microsoft.com/Forums/en-US/5454d549-5eeb-43a5-b188-63121d3f0cc1/how-to-set-zoomlevel-for-particular-altitude?forum=bingmaps
var zoom = 19 - Math.log2(altitude * 0.05);
// TODO: Use Math.log2 with a shim
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2#Polyfill
// var zoom = 19 - Math.log2(altitude * 0.05);
var zoom = 19 - (Math.log(altitude * 0.05) / Math.LN2);
// http://stackoverflow.com/a/13159839
// var scale = altitude / 500;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
build/vizi.min.js vendored

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -21,7 +21,8 @@
zoom: 16,
suppressRenderer: false, // Set true for tests
layersUI: true,
picking: false
picking: false,
antialias: false
});
if (!self.options.viewport) {
@ -54,6 +55,7 @@
// TODO: Ability to override this with a scene passed into the options
// TODO: Pass-through options that tweak scene (antialias, etc)
self.scene = new VIZI.Scene({
antialias: self.options.antialias,
viewport: self.options.viewport,
// TODO: Remove this when running WebGL tests on Travis is solved
suppressRenderer: self.options.suppressRenderer,