twinf
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

The World Is Not Flat

NPM package license

Rendering shapes defined by latitude and longitude with WebGL2.

Only tested on Chrome so far.

Build

npm run test

Demo

click me!

Use arrow keys to pan and +/- to zoom in/out

Concepts

TWINF allows to draw shapes defined by latitude and longitude on a canvas using the WebGL2 context.

The following transformations are applied to shapes:

  • In the CPU: conversion from latitude/longitude coordinate system to geocentric coordinate system assuming a spherical earth model
  • In the CPU: triangulation of spherical and planar polygons
  • In the GPU: conversion from geocentric coordinate system to stereographic coordinate system
  • In the GPU: conversion from stereographic coordinate system to canvas coordinate system
  • In the GPU: conversion from canvas to WebGL clipspace

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    0
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i twinf

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

299 kB

Total Files

71

Last publish

Collaborators

  • ofmooseandmen