mirror of
https://github.com/RustyRaptor/CanvasLoader.git
synced 2026-12-03 17:55:15 -07:00
- Update Grunt build task - Remove obsolete variables - Update jQuery plugin
598 lines
20 KiB
JSON
598 lines
20 KiB
JSON
{
|
|
"project": {
|
|
"name": "canvasloader",
|
|
"description": "Smart UI and UX with <canvas> spinners",
|
|
"version": "0.9.1",
|
|
"url": ""
|
|
},
|
|
"files": {
|
|
"src/canvasloader.js": {
|
|
"name": "src/canvasloader.js",
|
|
"modules": {
|
|
"CanvasLoader": 1
|
|
},
|
|
"classes": {
|
|
"CanvasLoader": 1
|
|
},
|
|
"fors": {},
|
|
"namespaces": {}
|
|
}
|
|
},
|
|
"modules": {
|
|
"CanvasLoader": {
|
|
"name": "CanvasLoader",
|
|
"submodules": {},
|
|
"classes": {
|
|
"CanvasLoader": 1
|
|
},
|
|
"fors": {},
|
|
"namespaces": {},
|
|
"tag": "module",
|
|
"file": "src/canvasloader.js",
|
|
"line": 37,
|
|
"description": "CanvasLoader uses the HTML5 canvas element in modern browsers to create and animate the most popular preloader shapes (oval, spiral, rectangle, square and rounded rectangle).<br/><br/>\nTo start rendering and display the loader use the <code>show()</code> method."
|
|
}
|
|
},
|
|
"classes": {
|
|
"CanvasLoader": {
|
|
"name": "CanvasLoader",
|
|
"shortname": "CanvasLoader",
|
|
"classitems": [],
|
|
"plugins": [],
|
|
"extensions": [],
|
|
"plugin_for": [],
|
|
"extension_for": [],
|
|
"module": "CanvasLoader",
|
|
"namespace": "",
|
|
"file": "src/canvasloader.js",
|
|
"line": 37,
|
|
"description": "CanvasLoader is a JavaScript UI library that draws and animates circular preloaders using the Canvas HTML object.<br/><br/>\nA CanvasLoader instance creates two canvas elements which are placed into a placeholder div (the id of the div has to be passed in the constructor). The second canvas is invisible and used for caching purposes only.<br/><br/>\nIf no id is passed in the constructor, the canvas objects are paced in the document directly.",
|
|
"is_constructor": 1,
|
|
"params": [
|
|
{
|
|
"name": "target",
|
|
"description": "The target DOM element to place the spinner into",
|
|
"type": "Object"
|
|
},
|
|
{
|
|
"name": "settings",
|
|
"description": "Settings to customise the spinner instance",
|
|
"type": "Object",
|
|
"optional": true,
|
|
"props": [
|
|
{
|
|
"name": "diameter",
|
|
"description": "The expected diameter",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "density",
|
|
"description": "The number of the shapes",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "color",
|
|
"description": "The color of the shapes",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "range",
|
|
"description": "The weight of the trail",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"description": "The duration of 1 spin animation to completely go around",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "shape",
|
|
"description": "The shape type (oval, rect, square, roundRect)",
|
|
"type": "Number",
|
|
"optional": true
|
|
},
|
|
{
|
|
"name": "id",
|
|
"description": "The id of the CanvasLoader instance",
|
|
"type": "String",
|
|
"optional": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"classitems": [
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 73,
|
|
"description": "The type of supported spinner shapes",
|
|
"itemtype": "property",
|
|
"name": "_shapes",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 81,
|
|
"description": "Regular expression for matching Hexadecimal colour values",
|
|
"itemtype": "property",
|
|
"name": "_colorRegEx",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 89,
|
|
"description": "Check for canvas support",
|
|
"itemtype": "property",
|
|
"name": "_supportsCanvas",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Boolean}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 97,
|
|
"description": "Holds settings (this is updated with user settings)",
|
|
"itemtype": "property",
|
|
"name": "_settings",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 113,
|
|
"description": "Holds default settings",
|
|
"itemtype": "property",
|
|
"name": "_defaultSettings",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 121,
|
|
"description": "The div we place the canvas object into",
|
|
"itemtype": "property",
|
|
"name": "_container",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 128,
|
|
"description": "The div we draw the shapes into",
|
|
"itemtype": "property",
|
|
"name": "_canvas",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 135,
|
|
"description": "The canvas context",
|
|
"itemtype": "property",
|
|
"name": "_context",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 142,
|
|
"description": "The canvas we use for caching",
|
|
"itemtype": "property",
|
|
"name": "_cacheCanvas",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 149,
|
|
"description": "The context of the cache canvas",
|
|
"itemtype": "property",
|
|
"name": "_cacheContext",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 156,
|
|
"description": "Adds a timer for the rendering",
|
|
"itemtype": "property",
|
|
"name": "_timer",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Boolean}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 163,
|
|
"description": "The current rotation degree of the spinner",
|
|
"itemtype": "property",
|
|
"name": "_currentDegree",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Number}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 170,
|
|
"description": "The diameter of the loader",
|
|
"itemtype": "property",
|
|
"name": "_diameter",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Number}",
|
|
"default": "40",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 178,
|
|
"description": "The color of the loader shapes in RGB",
|
|
"itemtype": "property",
|
|
"name": "_cRGB",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Object}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 185,
|
|
"description": "The color of the loader shapes in HEX",
|
|
"itemtype": "property",
|
|
"name": "_color",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{String}",
|
|
"default": "'#000000'",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 193,
|
|
"description": "The type of the loader shapes",
|
|
"itemtype": "property",
|
|
"name": "_shape",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "String",
|
|
"default": "'oval'",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 201,
|
|
"description": "The number of shapes drawn on the loader canvas",
|
|
"itemtype": "property",
|
|
"name": "_density",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "Number",
|
|
"default": "40",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 209,
|
|
"description": "The amount of the modified shapes in percent.",
|
|
"itemtype": "property",
|
|
"name": "_range",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Number}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 216,
|
|
"description": "The duration of a 360 degree rotation in seconds",
|
|
"itemtype": "property",
|
|
"name": "_duration",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"type": "{Number}",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 236,
|
|
"description": "Creates a new element with the tag and applies the passed properties on it",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "proto._addElement",
|
|
"params": [
|
|
{
|
|
"name": "tag",
|
|
"description": "The tag to be created",
|
|
"type": "String"
|
|
},
|
|
{
|
|
"name": "par",
|
|
"description": "The DOM element the new element will be appended to",
|
|
"type": "String"
|
|
},
|
|
{
|
|
"name": "opt",
|
|
"description": "Additional properties passed to the new DOM element",
|
|
"type": "Object"
|
|
}
|
|
],
|
|
"return": {
|
|
"description": "The DOM element",
|
|
"type": "Object"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 257,
|
|
"description": "Sets the css properties on the element",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "proto._setCSS",
|
|
"params": [
|
|
{
|
|
"name": "el",
|
|
"description": "The DOM element to be styled",
|
|
"type": "Object"
|
|
},
|
|
{
|
|
"name": "opt",
|
|
"description": "The style properties",
|
|
"type": "Object"
|
|
}
|
|
],
|
|
"return": {
|
|
"description": "The DOM element",
|
|
"type": "Object"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 270,
|
|
"description": "Sets the attributes on the element",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "proto._setAttribute",
|
|
"params": [
|
|
{
|
|
"name": "el",
|
|
"description": "The DOM element to add the attributes to",
|
|
"type": "Object"
|
|
},
|
|
{
|
|
"name": "opt",
|
|
"description": "The attributes",
|
|
"type": "Object"
|
|
}
|
|
],
|
|
"return": {
|
|
"description": "The DOM element",
|
|
"type": "Object"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 283,
|
|
"description": "Returns if the browser supports CSS animations",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "proto._supportsKeyframes",
|
|
"return": {
|
|
"description": "",
|
|
"type": "Boolean"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 306,
|
|
"description": "Transforms the cache canvas before drawing",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "proto._transformCachedCanvasContext",
|
|
"params": [
|
|
{
|
|
"name": "canvasContext",
|
|
"description": "The canvas context to be transformed",
|
|
"type": "Object"
|
|
},
|
|
{
|
|
"name": "x",
|
|
"description": "x translation",
|
|
"type": "Number"
|
|
},
|
|
{
|
|
"name": "y",
|
|
"description": "y translation",
|
|
"type": "Number"
|
|
},
|
|
{
|
|
"name": "rads",
|
|
"description": "Rotation in radians",
|
|
"type": "Number"
|
|
}
|
|
],
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 323,
|
|
"description": "Initialization method",
|
|
"itemtype": "method",
|
|
"name": "_init",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"params": [
|
|
{
|
|
"name": "target",
|
|
"description": "The target DOM element to place the spinner into",
|
|
"type": "Object"
|
|
},
|
|
{
|
|
"name": "settings",
|
|
"description": "Settings to customise the spinner instance",
|
|
"type": "Object"
|
|
}
|
|
],
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 416,
|
|
"description": "Return the RGB values of the passed color",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "_getRGB",
|
|
"params": [
|
|
{
|
|
"name": "color",
|
|
"description": "The HEX color value to be converted to RGB",
|
|
"type": "String"
|
|
}
|
|
],
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 427,
|
|
"description": "Return the default settings",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "_getDefaults",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 436,
|
|
"description": "Draw the shapes on the canvas",
|
|
"access": "private",
|
|
"tagname": "",
|
|
"itemtype": "method",
|
|
"name": "_draw",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 548,
|
|
"description": "Return argument value by key if defined",
|
|
"params": [
|
|
{
|
|
"name": "key",
|
|
"description": "The key to look up",
|
|
"type": "String"
|
|
}
|
|
],
|
|
"return": {
|
|
"description": "The value of the key"
|
|
},
|
|
"itemtype": "method",
|
|
"name": "get",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 564,
|
|
"description": "Shows the rendering of the loader animation",
|
|
"itemtype": "method",
|
|
"name": "show",
|
|
"chainable": 1,
|
|
"return": {
|
|
"description": "The CanvasLoader instance",
|
|
"type": "CanvasLoader"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 576,
|
|
"description": "Stops the rendering of the loader animation and hides the loader",
|
|
"itemtype": "method",
|
|
"name": "hide",
|
|
"chainable": 1,
|
|
"return": {
|
|
"description": "The CanvasLoader instance",
|
|
"type": "CanvasLoader"
|
|
},
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
},
|
|
{
|
|
"file": "src/canvasloader.js",
|
|
"line": 594,
|
|
"description": "Clears the DOM and resets all params",
|
|
"itemtype": "method",
|
|
"name": "destruct",
|
|
"class": "CanvasLoader",
|
|
"module": "CanvasLoader"
|
|
}
|
|
],
|
|
"warnings": []
|
|
} |