Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made the docs more Closure-y.

  • Loading branch information...
commit 2952d5e9d3d36b3047a7ee10c8b8d9e1de91b9ff 1 parent 73b6b97
@jeremyckahn authored
View
22 docs/api.kapi.md
@@ -5,7 +5,7 @@
````javascript
/**
* @param {HTMLCanvas|HTMLElement|Object} canvas
- * @param {Object} opt_config
+ * @param {Object=} opt_config
* @constructor
*/
Kapi (canvas, opt_config)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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>`.
View
10 docs/api.kapi_actor.md
@@ -2,7 +2,7 @@
````javascript
/**
- * @param {Object} opt_config
+ * @param {Object=} opt_config
* @param {function=} setup
* @param {function(CanvasRenderingContext2D, Object)=} draw
* @param {function=} teardown
@@ -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)
@@ -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)
@@ -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)
@@ -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.
View
4 docs/api.kapi_keyprop.md
@@ -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)
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.