Thursday 5 June 2008
[Fun] searching google in a shell like
Par Vincent DEMAY, Thursday 5 June 2008 :: Javascript
Thursday 5 June 2008
Par Vincent DEMAY, Thursday 5 June 2008 :: Javascript
Thursday 14 February 2008
Par Vincent DEMAY, Thursday 14 February 2008 :: Javascript
/**
* Shape is an abstract base class. It is defined simply
* to have something to inherit from for geometric
* subclasses
* @constructor
*/
function Shape(color){
this.color = color;
}
// Bind the Shape_getColor method to the Shape class
Shape.prototype.getColor = Shape_getColor;
/**
* Get the name of the color for this shape
* @returns A color string for this shape
*/
function Shape_getColor(){
return this.color;
}
/**
* Circle is a subclass of Shape
*/
function Circle(radius){
this.radius = radius;
}
/**
* A very rough value for pi
*/
Circle.PI = 3.14;
/**
* Get the radius of this circle
* @returns The radius of this circle
*/
function Circle_getRadius(){
return this.radius;
}
// Circle is a subclass of Shape
Circle.prototype = new Shape(null);
dojo.provide("net.demay.geometry.Shape");
/**
* Shape is an abstract base class. It is defined simply
* to have something to inherit from for geometric
* subclassesl
* @class net.demay.geometry.Shape
* @author Vincent Demay
*/
dojo.declare("net.demay.geometry.Shape", null, {
/**
* Color of the shape
* @variable {net.demay.color.Color} color
color : null,
/**
* @constructor Shape
* @param {net.demay.color.Color} color
*/
constructor: function(color){
this.color = color;
},
/**
* Get the name of the color for this shape
* @function {net.demay.color.Color} return a color string for this shape
*/
getColor: function(){
return this.color;
}
}
dojo.provide("net.demay.geometry.Circle");
/**
* A circle is a specific {@link net.demay.geometry.Shape
* @class net.demay.geometry.Circle
* @author Vincent Demay
* @extends net.demay.geometry.Shape
*/
dojo.declare("net.demay.geometry.Circle", [net.demay.geometry.Shape], {
/**
* Circle radius
* @variable {Float} radius
*/
radius : null,
//private no doc
PI : 3.14,
/**
* @constructor Circle
* @param {Float} radius
*/
constructor: function(radius){
this.radius = radius;
},
/**
* Get the radius of this circle
* @function {Float} getRadius
*/
getRadius : function(){
return this.radius;
}
} Wednesday 30 May 2007
Par Vincent DEMAY, Wednesday 30 May 2007 :: Javascript
Monday 16 April 2007
Par Vincent DEMAY, Monday 16 April 2007 :: Javascript
Friday 13 April 2007
Par Vincent DEMAY, Friday 13 April 2007 :: Javascript
|
Effects in webpages are more and more used, but often packaged in a big librairy such as Dojo, Scriptaculous, etc... Animator.js is a single little js allowing to make advanced effect very easly : |
ex15 = new Animator().addSubject(new CSSStyleSubject(
$('ex15Button'),
"width: 10em; background-color: rgb(256, 256, 256); font-style: normal",
"width: 40em; background-color: #F39; font-style: italic"));
// note how you can use any unit, not just 'px'.
This simple code will make a fade between first styles attributes and second one.
Congratulation to the author for this very good library!
Tuesday 6 February 2007
Par Vincent DEMAY, Tuesday 6 February 2007 :: Javascript
![]() | Ajax and Javascripts allow developpers to make more and more awasone things in a web browser. The last I found "exciting" is playing sound with very goog javascript APIs?. Take a look at Sound Manager 2 (Using backgrounded flash player to play sound) - Project Home page - , it is crazy what we now can do with Javascript You can see also:
|