Tag Archives: javascript

javascript programming

Shader x-ray effect with Three.js .

This source code running with Three.js javascript library. I used just three.min.js, OBJLoader.js and ColladaLoader.js to make the x-ray effect. I load one 3d object and using vertex and fragment shaders I rendered it. The object is a castle and is named: cube2.dae. This object is loaded with load function from OBJLoader.js. Then all steps… Read More »

WebGL – sound visualizer with Three.js .

First you need to create one html5 default webpage. Also you need to add the three.js library to your file. Add your MP3 file to your folder project. I named my mp3 file with your_sound_file.mp3. Because you used three.js javascript file you need to have this functions:init, animate, onError. To used the audio file you… Read More »

JavaScript – clickable area example.

This example use a simple way to see the mouse position. The area where you make click with the mouse. You have two variables: mouseXPos, mouseYPos. The function(e) take the mouse position and show the result. <!DOCTYPE html> <html> <head> <title>Title of the document</title> <script src=”../js/jquery-2.2.0.js”></script> <style type=”text/css”> html, body { text-align: center; } div… Read More »

Rate this with jQuery.

The main index.html file come with this source code: <!doctype html> <html> <head> <meta charset=”utf-8″> <title>Emoticons – rate this …</title> <link href=”ratethis.css” rel=”stylesheet” type=”text/css” /> <script src=”jquery-2.2.0.js”></script> <script src=”ratethis.js”></script> </head> <body> <br/> <br/> <br/> <br/> <br/> <input type=”hidden” value=”amo” class=”rate_it”/> <script> $(‘.rate_it’).ratethis(); </script> </body> </html> The ratethis.css come with this source code: .ratethis  { display:… Read More »