An Enthusiastic Developer

'Blogs on Web programming :-)';

Experimenting with Web Audio API + Three.js (WebGL)

May. 9, 2013

Here is a post about my experiment of Web Audio API. Throughout this article, I will show how I made the sound visualizer in WebGL.

Sound Visualizer (Web Audio API and WebGL)Sound Visualizer (Web Audio API and WebGL)
See the live demo (works with the latest Google Chrome and Firefox Nightly)

Now, let’s see how we load the music and make the cube moving. As usual, you can find all the source code on my github account.

  1. Web Audio API part: Load the music and get the frequency data
  2. WebGL part: Make the cubes react regarding the sound
  3. Useful links and free resources

→ Read more

Making-of: Pure CSS3 logos

Nov. 18, 2012

You guys have probably seen some awesome logos designed in pure CSS3 around the Web such as Opera, Internet Exporer, Twitter and many more. I wanted to try to make ones, so I decided to make logos of my working company (this totally was a personal choice and a personal work).
After a couple of hours of work, here is the result:

Pure CSS3 logos of Ubisoft/Owlient
Click here to see live demo

Of course, for better results you need to use latest browser versions which support radial gradient backgrounds, transformations, border radius, etc. If you are using the latest Chrome, Safari, Firefox, Opera or Internet Explorer 10, that will be fine.

  1. The first approach
  2. Browser rendering results
    1. Google Chrome (10, 11, 14, 23)
    2. Mozilla Firefox (3.6, 4, 5, 16)
    3. Opera (10.50, 11.11, 11.64, 12.0)
    4. Internet Explorer (7, 8, 9, 10 preview)
  3. Debugging/Helping tools

→ Read more

Microsoft, Mozilla and W3C Talks on Mobile Web Apps

Aug. 6, 2012

Here I was, the W3café event took place in the conference center of Microsoft France on June 29, 2012. I admit this post comes a bit late but interesting things were discussed during this event. The main subject was: Mobile applications build with HTML5.

During this Friday afternoon, there were 2 different talks including “Internet Explorer 10 and development with HTML5 on Windows 8″ and “Mozilla and the Mobile Web: from Firefox for Android to Boot to Gecko”. Between both talks, we had to choose a workshop: I took the “Creation of a Mobile Web app based on HTML5″ introduced by a W3C member, Dominique Hazael-Massieux.

Here is the list of talks that I attended:

  • IE10 and development with HTML5 on Windows 8
    by David Rousset (Microsoft France)
  • Creation of a Mobile Web app based on HTML5
    by Dominique Hazael-Massieux (W3C)
  • Mozilla and the Mobile Web: from Firefox for Android to Boot to Gecko
    by Tristan Nitot (Mozilla Europe)

I wrote a summary of hot topics that have been discussed during these conferences:

  1. Internet Explorer 10 for autumn 2012, what’s new?
  2. Mobile: Web app vs. Native app
  3. Mozilla’s B2G and Marketplace

→ Read more

Set up Belkin F5D7051 on Ubuntu

Apr. 15, 2012

This is an unusual post but it might help few people who are trying to set up Wi-Fi connection with a Belkin F5D7051. This was tested on Ubuntu 11.10 32-bit.

Belkin F5D7051 Wi-Fi USB dongle

Cause

During the installation of Ubuntu, the Wi-Fi has been successfully connected but after rebooting: no network interface (wlan0). This is due to a conflict between 2 modules: rt2500usb and rndis_wlan. In fact, there are 2 types of F5D7051 based on the Broadcom BCM4320 and Ralink RT2500USB chipsets. The problem is that both have the same ID vendor:product that is to say 050d:7051, so the kernel could load the wrong one. Here are the steps to fix the issue.

Troubleshoot

The following solution is to blacklist the wrong module.

  1. Ensure that you have the right component by typing in the terminal:
    lsusb

    It should display something like:

    Bus 001 Device 003: ID 050d:7051 Belkin Components F5D7051
    802.11g Adapter v1000 [Broadcom 4320 USB]

    Note that 050d:7051 is the unique identifier of the component and [Broadcom 4320 USB] is the based chipset.

  2. Check loaded modules with:
    lsmod

    If you see both modules: rt2500usb and rndis_wlan, edit the /etc/modprobe.d/blacklist.conf and add the following line at the end of the file (to edit you need to be root; if you have a Ralink chipset, replace rt2500usb by rndis_wlan):

    blacklist rt2500usb

    Then, unload the module by typing in the terminal:

    sudo modprobe -r rt2500usb

    Finally, save the file and reboot the computer.

Hope it helps. :)

Terrain generation: the diamond-square algorithm and Three.js

Feb. 26, 2012

Well, I get started learning 3D concepts/coding, so this is all new for me. 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). I have tested it on Firefox 9, 10 and Chrome 16, 17. Sorry for Internet Explorer fans, that app doesn’t support because it uses the WebGL context (perhaps switching in canvas rendering would work, I haven’t tested yet).

Random terrain generation application
Go to the live demo page

You can run the live demo at this address. As always, you can find the source code on my GitHub profile.
Here are some screenshots of what the app can do but not only:

A random terrain with a textureRandom terrain with wireframes (mesh)

Of course, the application gives us more features than applying a texture or showing a mesh. I invite you to discover and to play with it. By the way, I would really appreciate your feedback. :-)

  1. The diamond-square algorithm
  2. The scene
    1. Working with shapes, vertices, meshes and textures
    2. The camera
    3. The rendering
  3. Changeable parameters
  4. Performance
  5. Bottom line

→ Read more

Build a real-time application using HTML5 WebSockets

Dec. 30, 2011

In this very first post on my new blog, I show you how I’ve carried out a simple push system using WebSocket specified by the RFC 6455 document. Unfortunately, I can’t bring you a live demo because of some hosting service restrictions that don’t allow me to create sockets. So, I worked on localhost with my own computer using Ubuntu, Apache and PHP-CLI. Nevertheless, you can download scripts on my github account.

You’ll find one of several basic implementations of a communication between clients and a server by WebSocket in PHP. I deliberately didn’t complicate the code (by adding other features or improvements) to make it easy to understand.

  1. How does a WebSocket basically work?
  2. The server side
    1. Handshake
    2. Unmasking/Encoding data frames
    3. Pushing data
  3. The client side
    1. Receiving data
    2. Leave the application
  4. More information

→ Read more