polyline-normals - gets miter normals for a 2D polyline

  •        35

Computes the normals of a polyline, using miter joins where multiple segments meet. This is mainly useful to expand thick lines in a vertex shader on the GPU.See the 2d test for an example of how these lines would be extruded.



polyline-miter-util : ^1.0.1



Related Projects

polyline - polyline encoding and decoding in javascript

  •    Javascript

A simple google-esque polyline implementation in Javascript. Compatible with nodejs (npm install @mapbox/polyline and the browser (copy src/polyline.js)).Encodes/decodes into lat/lng coordinate pairs. Use fromGeoJSON() to encode from GeoJSON objects.

glsl-lighting-walkthrough - :bulb: phong shading tutorial with glslify

  •    Javascript

It is not intended as a full-blown beginner's guide, and assumes prior knowledge of WebGL and stackgl rendering. Although it is implemented with stackgl, the same concepts and shader code could be used in ThreeJS and other frameworks. If you have questions, comments or improvements, please post a new issue.

regl - 👑 Functional WebGL

  •    Javascript

Check out the gallery. The source code of all the gallery examples can be found here. To try out regl right away, you can use the live editor in the gallery.

simplify-js - Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library

  •    Javascript

Simplify.js is a high-performance JavaScript 2D/3D polyline simplification library

Leaflet.AnimatedMarker - A Leaflet plugin to animated a Marker along a polyline

  •    CSS

It uses CSS3 animations to move the marker from point to point at a specific rate (meter per millisecond). For ancient browsers that don't support CSS3, the polyline is chunked into distance segments and moved per interval (not so great). The following code will create an AnimatedMarker that moves along line, assuming a Leaflet.Map called map.

geojson-google-maps - A simple utility to convert GeoJSON objects to Google Maps vector objects (Marker, Polyline, Polygon)

  •    Javascript

Google Maps now has proper support for GeoJSON, so you should probably use that instead. GeoJSON is used to create Google Maps API v3 vectors (Marker, Polyline, Polygon) from GeoJSON objects (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, Feature, GeometryCollection, FeatureCollection). Specifically, I'm translating some GeoJSON types to arrays of Google Maps vectors as there aren't really Google Maps equivalents of MultiPoint, MultiLineString, etc.

THREE.MeshLine - Mesh replacement for THREE.Line

  •    Javascript

First, create the list of vertices that will define the line. MeshLine accepts THREE.Geometry (looking up the .vertices in it) and Array/Float32Array. THREE.BufferGeometry coming soon, and may be others like Array of THREE.Vector3. Once you have that, you can create a new MeshLine, and call .setGeometry() passing the vertices.

webgl-workshop - :mortar_board: The sequel to shader-school: Learn the WebGL API

  •    Javascript

Learn the basics of WebGL in small, manageable chunks. The sequel to shader-school, created for CampJS IV by Mikola Lysenko and Hugh Kennedy. The script will ask you if you want to create an answer directory, press y to accept. This will populate your current directory with shader files for you to edit for each lesson.

glslCanvas - Simple tool to load GLSL shaders on HTML Canvas using WebGL

  •    Javascript

GlslCanvas is JavaScript Library that helps you easily load GLSL Fragment and Vertex Shaders into an HTML canvas. I have used this in my Book of Shaders and glslEditor. That's all! glslCanvas will automatically load a WebGL context in that <canvas> element, compile the shader and animate it for you.

glsl-optimizer - GLSL optimizer based on Mesa's GLSL compiler

  •    C++

A C++ library that takes GLSL shaders, does some GPU-independent optimizations on them and outputs GLSL or Metal source back. Optimizations are function inlining, dead code removal, copy propagation, constant folding, constant propagation, arithmetic optimizations and so on. Apparently quite a few mobile platforms are pretty bad at optimizing shaders; and unfortunately they also lack offline shader compilers. So using a GLSL optimizer offline before can make the shader run much faster on a platform like that. See performance numbers in this blog post.

awesome-webgl - A curated list of awesome WebGL libraries, resources and much more


This is a curated list of awesome WebGL libraries, resources and much more. WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D computer graphics and 2D graphics within any compatible web browser without the use of plug-ins. WebGL is integrated completely into all the web standards of the browser allowing GPU accelerated usage of physics and image processing and effects as part of the web page canvas.

ShaderParticleEngine - A GLSL-heavy particle engine for THREE

  •    Javascript

The purpose of this library is to make creating particle effects using THREE.js and WebGL as simple as possible. The heavy-lifting is done by the GPU, freeing up CPU cycles. Emitters are created by first creating an instance of SPE.Group. It is in the group where ShaderMaterial settings are applied, and the texture for all emitters added to that group is set. Multiple groups can be created, but if efficiency is a high-priority then as few groups as possible should be created. The group takes care of uploading emitter data to the GPU for simulation and rendering, so the fewer chunks of data that get sent the better.

glslEditor - Simple WebGL Fragment Shader Editor

  •    Javascript

Friendly GLSL Shader editor based on Codemirror compatible with glslViewer (C++/OpenGL ES) and glslCanvas (JS/WebGL). Was originaly develop to work as a embebed editor for The Book of Shaders. But now have grown as a stand alone Web app. Thanks to their compatibility with other apps of this ecosystems like glslViewer that runs in the RaspberryPi directly from console, GlslEditor interact with other projects like OpenFrame.io allowing the user to export the shaders to frames with only one button.

ShaderEditorExtension - Google Chrome DevTools extension to live edit WebGL GLSL shaders

  •    Javascript

Alternatively, you can pack the extension yourself and load by dropping the .crx file in the Extensions page.

HTML-GL - Get as many FPS as you need and amazing effects by rendering HTML/CSS in WebGL

  •    Javascript

HTML GL solves "the slow DOM problem" by creating WebGL representations of DOM elements and hiding actual DOM after. This speeds up HTML/CSS animations and transformations by using 3D hardware acceleration and allows to apply OpenGL effects as modern 3D games have. Using HTML GL you still work with HTML/CSS as you are common to, but DOM elements are just facades to their WebGL representations. These GPU accelerated textures are very effective from resources consuming perspective and are very cheap to transform or animate.


  •    Javascript

Just a simple utility to convert GeoJSON objects to Google Maps vector objects (Marker, Polyline, Polygon)

DXF to PostGIS converter

  •    VB

A tool to convert DXF files to PostGIS geometry tables. A single DXF file is converted to a PostgreSQL - PostGIS SQL script to create and populate five tables, using the AutoCAD information of point, line, polyline, text, circle, insert, and layer.

ESRI Shapefile Reader

  •    DotNet

Shapefile is a .NET library that supports read only enumeration of ESRI shapefiles, including any metadata. All 2D shapes are supported: Point, MultiPoint, PolyLine and Polygon.

WPF Shape Demo

  •    WPF

This WPF application demos shape objects in WPF,such as Point,Rectangle,Polygon,Polyline and so on.

leaflet-omnivore - universal format parser for Leaflet & Mapbox.js

  •    Javascript

Leaflet supports the GeoJSON format by default. What if you have something else? That's where omnivore comes in.Omnivore also includes an AJAX library, corslite, so you can specify what you want to add to the map with just a URL.