Constructive Solid Geometry 3D Modeling in JavaScript

Constructive Solid Geometry (CSG) is a modeling technique that uses Boolean operations like union and intersection to combine 3D solids. This library implements CSG operations on meshes elegantly and concisely using BSP trees, and is meant to serve as an easily understandable implementation of the algorithm. This library provides three CSG operations: union, subtract, and […]

Javascript Codec/File Format Implementations

Over the past few months, quite a few Javascript implementations to creating/displaying certain files without the need for native plugins have been created. Although some are still premature, the basic idea is there. Above that they clearly demonstrate the importance of the rendering/scripting speed improvements browser vendors have been/are implementing into their browsers. pdf.js: Rendering […]

punycode.js

A robust javascript Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms Allows you to do stuff like: // encode/decode domain names punycode.toASCII(‘mañana.com’); // ‘xn--maana-pta.com’ punycode.toUnicode(‘xn--maana-pta.com’); // ‘mañana.com’ punycode.toASCII(‘☃-⌘.com’); // ‘xn—-dqo34k.com’ punycode.toUnicode(‘xn—-dqo34k.com’); // ‘☃-⌘.com’ // encode/decode domain name parts punycode.encode(‘mañana’); // ‘maana-pta’ punycode.decode(‘maana-pta’); // ‘mañana’ punycode.encode(‘☃-⌘’); […]

Photoshop-style blend modes for HTML Canvas Contexts

Adobe Photoshop has a variety of helpful blend modes for compositing images from multiple RGBA layers. This small library provides the same functionality for HTML Canvas Contexts, with the goal of producing the same results as Photoshop. Allows you to do stuff like: // Likely an ‘offscreen’ (not in the DOM) canvas var over = […]

Instagram Unshredder Challenge: Javascript Solutions

Recently the engineers at Instagram challenged the interwebs to write some code that unshreds a chopped up image. Some of us took the liberty of solving the problem in Javascript, although it wasn’t one of the languages suggested. Solution by Joe Lambert Solution by Ron Ilan Solution by Diego Ferreiro Be sure to check and […]