background preloader

WebGL

Facebook Twitter

Introducing the Canvas Debugger in Firefox Developer Tools. The Canvas Debugger is a new tool we’ll be demoing at the Game Developers Conference in San Francisco.

Introducing the Canvas Debugger in Firefox Developer Tools

It’s a tool for debugging animation frames rendered on a Canvas element. Whether you’re creating a visualization, animation or debugging a game, this tool will help you understand and optimize your animation loop. It will let you debug either a WebGL or 2D Canvas context. You can debug an animation using a traditional debugger, like our own JavaScript Debugger in Firefox’ Developer Tools. However, this can be difficult as it becomes a manual search for all of the various canvas methods you may wish to step through. How it works The Canvas Debugger works by creating a snapshot of everything that happens while rendering a frame. Certain types of Canvas context functions are highlighted to make them easier to spot in the snapshot.

Each draw call has an associated screenshot arranged in a timeline at the bottom of the screen as a “film-strip” view. Stepping Around Future Work. Raw WebGL 101 — Part 1: getting started. By Erik Möller, Chris Mills Introduction WebGL allows you to create real 3D content and render it in a web browser.

Raw WebGL 101 — Part 1: getting started

WebGL is the web implementation of OpenGL ES2 (Embedded Systems 2), and therefore allows us to run real 3D across any system with a browser that supports it and the graphics capabilities to handle such visually rich content. In web technology terms, WebGL is the 3D drawing context of the HTML5 <canvas> element. This tutorial series, created by Erik Möller in video format (with Chris Mills transcribing to create the written articles), will take you through Raw WebGL (no libraries) from the beginning, building up to more complicated topics with each successive article to help you really understand what is going on under the hood. This article gets you started with the basics, and forms a transcription of the material covered in Erik's WebGL video tutorial from the beginning to time 22:25.

Getting prepared To get started with WebGL, and this article series, you should have: if (! Terrain generation: the diamond-square algorithm and Three.js – An enthusiastic developer's blog. Well, I get started learning 3D concepts/coding, so this is all new for me.

Terrain generation: the diamond-square algorithm and Three.js – An enthusiastic developer's blog

I've done a first try to build an application that runs in WebGL-enabled browsers. After spending some days on it, I finally have something fit to be seen. This post deals with how I've made that little random terrain generation application using the Three.js framework and the diamond-square algorithm. Obviously, this works with the new generation of web-browsers (with WebGL support). Latest Google Chrome versions, Mozilla Firefox versions and Internet Explorer 11 are supporting the WebGL context. Of course, the application gives us more features than applying a texture or showing a mesh.

View live demo The diamond-square algorithm As I said above, I have used the diamond-square algorithm to generate a random fractal terrain. First of all, that algorithm only works on 2D arrays of 2n+1 dimensions (e.g. 129×129, 1025×1025, etc.). The scene In this part, I explain how I have basically made the scene. How to build a game with Three.js. With its awesome 3D rendering power, WebGL is worth considering to build your next game.

How to build a game with Three.js

This article explores what it takes to put together a simple game using free and open source tools for WebGL. This is by no means a complete look at WebGL game development, but it should get you thinking about how to do this on your own. We'll take a tour of a one-level car-racing game. The rules are simple: get to the finish line as fast as you can and don't crash. Let's look at how it's done. Download all the files you'll need for this tutorial.

GLSL Sandbox Gallery. Terrain building with three.js. The Beginner's Guide to three.js. In this step-by-step guide, we’re going to create a 3D version of the Treehouse logo using three.js, which is a 3D graphics framework built on top of WebGL.

The Beginner's Guide to three.js

Click and drag your mouse to orbit the camera! You can also use your mousewheel to zoom in and out. See the Demo Download the Code View on CodePen Note: You’ll need the desktop version of either Chrome, Firefox, or Safari. See browser compatibility below. 3D graphics can be difficult, especially 3D in the browser. Even though three.js might look complex at first, it would actually take even more code to write the same thing in pure WebGL, mostly because we’d need to write a rendering engine. Browser Compatibility For this tutorial, you’ll need the desktop version of either Chrome, Firefox, or Safari. Also, if you’re using Safari, you need to enable WebGL first. Open the Preferences menu.Click on the Advanced tab.Click the checkbox that says Show Develop menu in menu bar.Open the Develop menu from the menu bar and select Enable WebGL.