Skip to content

Commit

Permalink
Made the docs more Closure-y.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Feb 14, 2012
1 parent 73b6b97 commit 2952d5e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions docs/api.kapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
````javascript
/**
* @param {HTMLCanvas|HTMLElement|Object} canvas
* @param {Object} opt_config
* @param {Object=} opt_config
* @constructor
*/
Kapi (canvas, opt_config)
Expand Down Expand Up @@ -87,7 +87,7 @@ Remove `actor` from the animation. This does not destroy `actor`, it only remov

````javascript
/**
* @param {number} opt_howManyTimes
* @param {number=} opt_howManyTimes
* @returns {Kapi}
*/
Kapi.prototype.play (opt_howManyTimes)
Expand All @@ -101,7 +101,7 @@ Play the animation on a loop, either a set amount of times or infinitely. If `o
````javascript
/**
* @param {number} millisecond
* @param {number} opt_howManyTimes
* @param {number=} opt_howManyTimes
* @returns {Kapi}
*/
Kapi.prototype.playFrom (millisecond, opt_howManyTimes)
Expand All @@ -114,7 +114,7 @@ Move to a specific millisecond on the timeline and play from there. `opt_howMan

````javascript
/**
* @param {number} opt_howManyTimes
* @param {number=} opt_howManyTimes
* @returns {Kapi}
*/
Kapi.prototype.playFrom (opt_howManyTimes)
Expand Down Expand Up @@ -188,7 +188,7 @@ Return the number of `Actor`s in the animation.

````javascript
/**
* @param {number} opt_newFramerate
* @param {number=} opt_newFramerate
* @returns {number}
*/
Kapi.prototype.framerate (opt_newFramerate)
Expand Down Expand Up @@ -289,7 +289,7 @@ Move an `Actor` around in the layer list. Each layer has one `Actor`, and `Acto
````javascript
/**
* @param {string} eventName
* @param {Function} handler
* @param {function} handler
* @returns {Kapi}
*/
Kapi.prototype.bind (eventName, handler)
Expand All @@ -310,7 +310,7 @@ Bind an handler function to a Kapi event. Possible events include:
````javascript
/**
* @param {string} eventName
* @param {Function} opt_handler
* @param {function=} opt_handler
* @returns {Kapi}
*/
Kapi.prototype.unbind (eventName, opt_handler)
Expand Down Expand Up @@ -379,13 +379,13 @@ Return the 2d context of the `<canvas>`. This is needed for any and all drawing

````javascript
/**
* @param {number} opt_height
* @param {number=} opt_height
* @returns {number}
*/
Kapi.prototype.canvas_height (opt_height)

/**
* @param {number} opt_width
* @param {number=} opt_width
* @returns {number}
*/
Kapi.prototype.canvas_width (opt_width)
Expand All @@ -399,7 +399,7 @@ These methods get and optionally set their respective dimensions on the canvas.
````javascript
/**
* @param {string} styleName
* @param {number|string} opt_styleValue
* @param {number|string=} opt_styleValue
* @returns {number|string}
*/
Kapi.prototype.canvas_style (styleName, opt_styleValue)
Expand All @@ -417,4 +417,4 @@ Get and optionally set a CSS style on the canvas.
Kapi.prototype.canvas_clear ()
````

Erase the canvas. This only does something if Kapi is bound to an HTML 5 `<canvas>`.
Erase the canvas. This only does something if Kapi is bound to an HTML 5 `<canvas>`.
10 changes: 5 additions & 5 deletions docs/api.kapi_actor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

````javascript
/**
* @param {Object} opt_config
* @param {Object=} opt_config
* @param {function=} setup
* @param {function(CanvasRenderingContext2D, Object)=} draw
* @param {function=} teardown
Expand Down Expand Up @@ -56,7 +56,7 @@ var actor = new Kapi.Actor({
/**
* @param {number} when
* @param {Object} position
* @param {string|Object} opt_easing
* @param {string|Object=} opt_easing
* @returns {Kapi.Actor}
*/
Kapi.Actor.prototype.keyframe (when, position, opt_easing)
Expand Down Expand Up @@ -164,7 +164,7 @@ Remove all `KeyframeProperty`s set on the `Actor`.
/**
* @param {number} when
* @param {Object} stateModification
* @param {Object} opt_easingModification
* @param {Object=} opt_easingModification
* @returns {Kapi.Actor}
*/
Kapi.Actor.prototype.modifyKeyframe (when, stateModification, opt_easingModification)
Expand Down Expand Up @@ -343,7 +343,7 @@ Calculate and set the `Actor`'s position at `millisecond` in the animation.

````javascript
/**
* @param {Object} opt_newData
* @param {Object=} opt_newData
* @returns {Kapi.Actor}
*/
Kapi.Actor.prototype.data (opt_newData)
Expand All @@ -361,4 +361,4 @@ Retrieve and optionally bind arbitrary data to the `Actor`. If `opt_newData` is
Kapi.Actor.prototype.exportTimeline ()
````

Export a reference-less dump of this Actor's timeline property tracks and KeyframeProperties.
Export a reference-less dump of this Actor's timeline property tracks and KeyframeProperties.
4 changes: 2 additions & 2 deletions docs/api.kapi_keyprop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @param {number} millisecond Where in the animation this KeyframeProperty lives.
* @param {string} name The property's name, such as "x" or "opacity."
* @param {number} value The value of `name`. This is the value to animate to.
* @param {string} opt_easing The easing to arrive to `value` at. Defaults to linear.
* @param {string=} opt_easing The easing to arrive to `value` at. Defaults to linear.
* @constructor
*/
Kapi.KeyframeProperty (ownerActor, millisecond, name, value, opt_easing)
Expand Down Expand Up @@ -64,4 +64,4 @@ Calculate the midpoint between this `KeyframeProperty` and the next `KeyframePro
Kapi.KeyframeProperty.prototype.exportTimeline ()
````

Export a reference-less dump of this KeyframeProperty's state data.
Export a reference-less dump of this KeyframeProperty's state data.

0 comments on commit 2952d5e

Please sign in to comment.