mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Polyline Renderer with pre-iOS10 Fallback #48

Closed jim-martin closed 6 years ago

jim-martin commented 6 years ago

This contains two public additions:

  1. PolylineNode class
    • Stores smooth splines that represent a polyline's position, color and size
    • Allows the position, color, and size to be sampled at any point on the line, which is good for animation.
    • Draws the splines differently based on the available renderer and build target
  2. addPolyline() extension to TerrainNode
    • Converts terrainnode locations to Scenekit vectors.

To address issues that came up in the last PR, there is now an internal PolylineRenderer protocol to abstract rendering. I've pulled parts of @natalia-osa's implementation using cylinders as a fallback on pre-iOS10 devices, and in the simulator.

avi-c commented 6 years ago

Merging PR.