Posts

Showing posts from November, 2013

Three.js Tutorials

Image

Three.js - 2 - Getting Started Part 2

Image
Three.js - 2 - Getting Started Part TwoTHREE.JS TUTORIALS
VIEW THE DEMO

DOWNLOAD THE SOURCE CODE Introduction In the last tutorial we got a very basic three.js application up and running. This tutorial will continue on from that, adding a stats counter and dealing with window resizing. Stats Counter A number of the example three.js applications have a neat little stats counter showing the number of frames per second, and displaying a graph of the frame rate over the last few seconds. This information is invaluable when testing the performance of your 3D application.
The JavaScript library responsible for this stats counter is not actually part of three.js. It is a separate library that can be found on GitHub at https://github.com/mrdoob/stats.js/. The file that we need to include in our project can be found at https://github.com/mrdoob/stats.js/blob/master/build/stats.min.jshttps://github.com/mrdoob/stats.js/blob/master/build/stats.min.js. This JavaScript file is included lik…

MinHash for dummies

Duplicate document detection is becoming increasingly important for businesses that have huge collections of email, web pages and documents with multiple copies that may or may not be kept up to date.

MinHash is a fairly simple algorithm that from all my Googling has been explained very poorly in blogs or in the kind of mathematical terms that I forgot long ago. So in this article I will attempt to explain how MinHash works at a practical code level.

Before I start, please take a look at http://infolab.stanford.edu/~ullman/mmds/ch3.pdf. That document goes into a lot of theory, and was ultimately where my understanding on MinHash came from. Unfortunately it approaches the algorithm from a theoretical standpoint, but if I gloss over some aspect of the MinHash algorithm here, you will almost certainly find a fuller explanation in the PDF.

I'll also be using pseudo Java in these examples instead of traditional math. This means when I use terms like Set, I am referring to the group of …

Three.js 1 - Getting Started

Image
Three.js - 1 - Getting StartedTHREE.JS TUTORIALS

VIEW THE DEMO

DOWNLOAD THE SOURCE CODE
Introduction After Apple's war on Flash, relying on plugins in your web pages is just not a viable option. Flash (and maybe, thanks to Netflix, Silverlight) were the last of a dying breed of browser plugins. In their place are a host of new technologies being standardised as part of HTML5.

WebGL is one of these technologies, and is supported by all major browsers. Microsoft is even getting on board with IE 11. Combine that with the ever increasing performance of JavaScript engines and it is now possible to create some impressive 3D applications in a web browser without the aid of plugins.

Three.js is one of the more powerful and mature JavaScript 3D engines available. This article will show you how to get a simple 3D application running with three.js.
What to download Using three.js requires only a single JavaScript file called three.min.js. You can grab the latest version of file from GitHub.
T…