background preloader

Libs

Facebook Twitter

HTML5 Canvas 3D / 2D Animation Library - taccgl. Creating a 3D game with Three.js and WebGL. Prerequisites A browser with WebGL - this game has been tested on Chrome and Firefox.

Creating a 3D game with Three.js and WebGL

IE still doesn’t support WebGL, unless you’re using Windows 8.1 with IE11. Three.js library available for download from the Three.js website The Keyboard.js helper library I used for this project, created by Arthur Schreiber at No Karma. Download it from my GitHub repository A basic understanding of what Three.js does. Read this super simple, super quick tutorial by Paul Lewis. Setup Get a base index.html running Step one when making a web-based game is to create the host index.html file. Import Keyboard.js and Three.js Three.js is a library contained in just one JavaScript file, so we can grab the minified version from the website. For Keyboard input, we will need to referencethe aforementioned JavaScript file in our index.html as well. Create setup() and draw() functions The setup() function will be the start point for the game code.

Basic World Set up the Three.js world and camera Add a camera to the scene. HTML5 Charts for your website. Highcharts - Interactive JavaScript charts for your webpage. D3.js - Data-Driven Documents. Morris.js. Specificity Calculator. HTML(.js) - Befriend the DOM! HTML document.documentElement The global HTML is the actual document root element and all element tags queried via the dot operator are descendants.

HTML(.js) - Befriend the DOM!

HTML.tag... Element|Array HTML allows you to access document elements via their tag name. If multiple elements of the same tag exist, a proper array of elements is returned; otherwise, an Element is returned. HTML.body.header; HTML.body.header.textContent = "A Better Header! " HTML.query(selector) Element|Array 0.10.0 HTML.query acts as a proxy for querySelectorAll and returns the selected element(s). HTML.query("#example"); HTML.query(".example"); HTML.query("#example").h1.em; HTML.tag....query(selector) Element|Array 0.10.0 You can, of course, use query on any "HTML-ified" element(s) to search only the children thereof.

HTML.body.div.query(".example"); HTML.query(selector limit) Element|Array 0.11.0 HTML.query acts as a proxy for querySelector or querySelectorAll (as appropriate) and returns no more than the specified number of selected element(s). Create.js - Make anything editable. Everyone farts. And now your web pages can too. Everyone farts.

Everyone farts. And now your web pages can too.

And now your web pages can too. Include "fartscroll.js" in your page. You can include the latest version straight from our CDN: <script src=" Initialize the fartscroll plugin after the page has loaded: // Fart every 400 pixels scrolled in the window fartscroll(); // Fart every 800 pixels scrolled fartscroll(800); // Fart every 100 pixels scrolled (probably a bit much) fartscroll(100); // Now I'm just adding more examples to make the page longer fartscroll(50); // SO MANY FARTS fartscroll(5); // I should register fart.io for this fartscroll(500); // I should register fart.io for this fartscroll(400); // Dammit, fart.io is taken fartscroll(600); // Alright, that's probably enough examples fartscroll(400); SHAMELESS PLUG: Want to work on technology that changes the world?

Or just technology that farts? Modernizr.