Releases: tangrams/tangram
Releases · tangrams/tangram
v0.10.3
v0.10.2
v0.10.1
Enhancements
- Re-apply
global
property substitution whenScene.updateConfig()
is called #412- While technically not a bug fix, this was likely the expected behavior for many.
- Labels will not re-fade in by default when
Scene.rebuild()
orScene.updateConfig()
is called- As above, this is the more likely expected behavior and is less distracting when using dynamic rebuilding, such as when tied to a GUI or user interaction.
fade_in: true
option can be set to enable this if desired, e.g.scene.rebuild({ fade_in: true })
.
Bug Fixes
- Fix pixel density adjustment for default text size (e.g. retina text was too small when a
font:size
was not specified) - Fix error messages on invalid scene layer definitions. In some cases, construction of the error message itself was throwing an exception!
v0.10.0
New + Improved Functionality
- Labels
- Data sources
-
Tiled data sources can specify a min/max display zooms and/or bounding box to limit tile visibility #394
min_display_zoom
: tiles will not be requested or displayed below this zoommax_display_zoom
: tiles will not be requested or displayed above this zoombounds
: tiles will not be requested or displayed outside of this bounding box, specified as latitude/longitude in[w, s, e, n]
format.- Example:
mapzen: type: TopoJSON url: https://vector.mapzen.com/osm/all/{z}/{x}/{y}.topojson min_display_zoom: 9 max_display_zoom: 18 bounds: [-74.1274, 40.5780, -73.8004, 40.8253] # [w, s, e, n]
-
Support added for TMS tiled data sources #401
- The source definition can set
tms: true
- The source definition can set
-
- Filters
- Add ability to filter geometry properties by zoom-independent screen area #395
- This is done through a new
px2
unit type that can be applied to range filters, e.g.:filter: { area: { min: 500px2 } }
- This example only shows features that cover a 500 pixel screen area at the current zoom level. Note that to use this feature, the property (
area
in this example) must already be in square mercator meter units. Mapzen Vector Tiles include such properties for many polygon features.
- This is done through a new
- Add error handling for JS function
filter
values #373
- Add ability to filter geometry properties by zoom-independent screen area #395
- Misc
- Improved default lighting #407
- The previous default provided 100% omnidirectional diffuse light. This was a poor default for extruded geometry such as buildings, which displayed as silhouettes with no depth. The new default (when no
lights
are defined in the scene) is a directional light that maintains 100% illumination for ground plane objects, with typical flat shading for extruded objects.
- The previous default provided 100% omnidirectional diffuse light. This was a poor default for extruded geometry such as buildings, which displayed as silhouettes with no depth. The new default (when no
- Video capture #408
- To complement Tangram's existing screenshot capability, new methods have been added for capturing video clips of Tangram maps using the MediaRecorder API. The new
Scene.startVideoCapture()
andScene.stopVideoCapture()
methods will capture a WebM-encoded video stream. This feature is currently only available in Chrome and Firefox. Also see here for more info.
- To complement Tangram's existing screenshot capability, new methods have been added for capturing video clips of Tangram maps using the MediaRecorder API. The new
- Allow dashed line patterns to use fractional widths #404 #355
- CSS Color Level 4 (a fancy way of saying "support
rebeccapurple
") #389 - For
opaque
blending, multiplymaterial
's alpha channel into its RGB (415f32c)
- Improved default lighting #407
Bug Fixes
- Fix lighting handling of alpha channel #407
- Fix points
angle
parameter to be interpreted in degrees instead of radians (regression) - Fix serialization of JS functions added to scene config when a
load
event fires
Internal
- Upgrade build process to use Babel 6 #387
v0.9.5
v0.9.4
v0.9.3
Bug Fixes
- Fix base path override support.
- For Tangram Play, scenes are modified in the editor but must refer to an external base path (the path from which they were originally loaded) for resolving local resources. This path is passed by Play to Tangram's
Scene.load()
method as an optional second parameter.
- For Tangram Play, scenes are modified in the editor but must refer to an external base path (the path from which they were originally loaded) for resolving local resources. This path is passed by Play to Tangram's
v0.9.2
v0.9.1
Deprecated
- Removes
GeoJSONTiles
andTopoJSONTiles
legacy compatibility for data source types. UseGeoJSON
andTopoJSON
instead.
Bug Fixes
- Fix cases where non-tiled data sources would not render (due to pending tiles never being marked as complete) (#383).
- Fix zoom-based interpolation for text
fill
andstroke
colors (509962a). - Fix loading of .zip bundles with nested imports (zip that imports a scene, that imports another scene within the same zip) (d381b4b).
- Fix filters matching a property on
0
value (#362). - Remove mistaken
for..in
loops on arrays to prevent interfering withArray.prototype
modifications (#374).
Internal
- Upgrades build process to Babel 6 (includes Browserify upgrade as well (#387).
- Remove some unnecessary tests and dependencies/
v0.9.0
Enhancements
-
Scenes can be loaded from .zip-file bundles (#358)
- Allows all scene resources (imported scene YAMLs, images, and fonts) to be consolidated into one package for easier distribution and decreased network overhead.
- Zip bundles must contain a single scene YAML file at the top-level directory, to act as the "root scene".
-
Improved handling of points w/attached text labels:
- Will only render by default if both the text and point pass collision (#349).
- Text can be made optional with
optional
flag, allowing point to render with or without text, as collision allows:
- Text can be made optional with
draw: points: ... text: optional: true ...
- Multiple anchor placement candidates for substantial increase in the number of labels placed (#351).
anchor
can accept an array of possible placements, evaluated in priority order.- Default is now:
anchor: [bottom, top, right, left]
- Example of all anchor candidates for maximum label placement (speed/# of labels trade-off):
anchor: [bottom, top, right, left, bottom-right, bottom-left, top-right, top-left]
- Attached text and point objects will not collide with each other (enables rendering of highway shields and similar symbols).
- Will only render by default if both the text and point pass collision (#349).
-
Incremental tile build (#367)
- Polygon and line features will display more quickly, while label rendering and collision for point and text features completes in the background.
- Labels for new tile areas will fade-in to provide a gentler transition (note, not all labels are faded in, such as higher zoom tiles when replacing lower zooms, to avoid label "flicker" from rapid fade out/in).
-
Improved proxy tile behavior for lines
- Adjust line width based on zoom level, to prevent proxied lines from being either too small or too big.
Bug Fixes
- Scene global properties can be set to "false-y" values such as
null
. - Fix map size initialization issue between Leaflet + Tangram, avoiding initial single-tile render.
- Fix scaling of camera
vanishing_point
(#372). - Fix behavior when
0px
text stroke is specified (#370). - Add
try/catch
and error message for function-basedfilters
(#364).
Internal
- Fonts: use native FontFace API when available to load fonts
- Add debug drawing options for text label collision and texture boxes.