mirror of
https://github.com/RustyRaptor/CanvasLoader.git
synced 2026-12-03 17:55:15 -07:00
- Canvas mode shape glitches fixed - Documentation updated - Minified js file updated - Second test html file removed
1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"majorversion": 2, "classmap": {"CanvasLoader": {"name": "CanvasLoader", "constructors": [{"params": [{"type": "String", "name": "id", "description": " The id of the placeholder div"}], "description": "CanvasLoader is a JavaScript UI library that draws and animates circular preloaders using the Canvas HTML object.<br/>\r\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/>\r\nIf no id is passed in the constructor, the canvas objects are paced in the document directly."}], "namespace": "", "module": "CanvasLoader", "guessedname": "CanvasLoader", "methods": {"getRange": {"public": "", "return": {"type": "Number", "description": ""}, "description": "Returns the modified shape range in percent", "guessedname": "getRange", "guessedtype": "function"}, "show": {"description": "Shows the rendering of the loader animation", "public": "", "guessedname": "show", "guessedtype": "function"}, "setDensity": {"public": "", "params": [{"type": "Number", "name": "density", "description": " The default value is 40"}], "description": "Sets the number of shapes drawn on the loader canvas", "guessedname": "setDensity", "guessedtype": "function"}, "getDiameter": {"public": "", "return": {"type": "Number", "description": ""}, "description": "Returns the diameter of the loader.", "guessedname": "getDiameter", "guessedtype": "function"}, "kill": {"description": "Removes the CanvasLoader instance and all its references", "public": "", "guessedname": "kill", "guessedtype": "function"}, "tick": {"protected": "", "description": "Renders the loader animation", "guessedname": "tick", "guessedtype": "function"}, "hide": {"description": "Stops the rendering of the loader animation and hides the loader", "public": "", "guessedname": "hide", "guessedtype": "function"}, "addEl": {"return": {"type": "Object", "description": "The DOM element"}, "description": "Creates a new element with the tag and applies the passed properties on it", "protected": "", "params": [{"type": "String", "name": "tag", "description": " The tag to be created"}, {"type": "String", "name": "par", "description": " The DOM element the new element will be appended to"}, {"type": "Object", "name": "props", "description": " Additional properties passed to the new DOM element"}], "guessedname": "addEl", "guessedtype": "function"}, "transformContext": {"protected": "", "params": [{"type": "Object", "name": "x", "description": " The canvas context to be transformed"}, {"type": "Number", "name": "x", "description": " x translation"}, {"type": "Number", "name": "y", "description": " y translation"}, {"type": "Number", "name": "r", "description": " Rotation radians"}], "description": "Prepares the cache canvas for drawing", "guessedname": "transformContext", "guessedtype": "function"}, "setRange": {"public": "", "params": [{"type": "Number", "name": "range", "description": " The default value is 1.3"}], "description": "Sets the amount of the modified shapes in percent.<br/>\r\nWith this value the user can set what range of the shapes should be scaled and/or faded. The shapes that are out of this range will be scaled and/or faded with a minimum amount only.<br/>\r\nThis minimum amount is 0.1 which means every shape which is out of the range is scaled and/or faded to 10% of the original values.<br/>\r\nThe visually acceptable range value should be between 0.4 and 1.5.", "guessedname": "setRange", "guessedtype": "function"}, "getFPS": {"public": "", "return": {"type": "Number", "description": ""}, "description": "Returns the fps of the loader", "guessedname": "getFPS", "guessedtype": "function"}, "draw": {"protected": "", "description": "Draw the shapes on the canvas", "guessedname": "draw", "guessedtype": "function"}, "setAttr": {"return": {"type": "Object", "description": "The DOM element"}, "description": "Sets the attributes on the element", "protected": "", "params": [{"type": "Object", "name": "el", "description": " The DOM element to add the attributes to"}, {"type": "Object", "name": "props", "description": " The attributes"}], "guessedname": "setAttr", "guessedtype": "function"}, "getColor": {"public": "", "return": {"type": "String", "description": ""}, "description": "Returns the loader color in a hexadecimal form", "guessedname": "getColor", "guessedtype": "function"}, "setFPS": {"public": "", "params": [{"type": "Number", "name": "fps", "description": " The default value is 24"}], "description": "Sets the rendering frequency.<br/>\r\nThis value tells the loader how many times to refresh and modify the canvas in 1 second.<br/>\r\nUsing the right combination of the <code>setSpeed</code> and the <code>setFPS</code> methods allows the users to optimize the CPU usage of the loader whilst keeping the animation on a visually pleasing level.", "guessedname": "setFPS", "guessedtype": "function"}, "getDensity": {"public": "", "return": {"type": "Number", "description": ""}, "description": "Returns the number of shapes drawn on the loader canvas", "guessedname": "getDensity", "guessedtype": "function"}, "initialize": {"protected": "", "params": [{"type": "", "name": "parentId", "description": " (String) The id of the placeholder div, where the loader will be nested into"}, {"type": "", "name": "loaderId", "description": " (String) The id of loader"}], "description": "Initialization method", "guessedname": "initialize", "guessedtype": "function"}, "setCSS": {"return": {"type": "Object", "description": "The DOM element"}, "description": "Sets the css properties on the element", "protected": "", "params": [{"type": "Object", "name": "el", "description": " The DOM element to be styled"}, {"type": "Object", "name": "props", "description": " The style properties"}], "guessedname": "setCSS", "guessedtype": "function"}, "getSpeed": {"public": "", "return": {"type": "Number", "description": ""}, "description": "Returns the speed of the loader animation", "guessedname": "getSpeed", "guessedtype": "function"}, "reset": {"protected": "", "description": "Resets the timer", "guessedname": "reset", "guessedtype": "function"}, "setDiameter": {"public": "", "params": [{"type": "Number", "name": "diameter", "description": " The default value is 40"}], "description": "Sets the diameter of the loader", "guessedname": "setDiameter", "guessedtype": "function"}, "setColor": {"public": "", "params": [{"type": "String", "name": "color", "description": " The default value is '#000000'"}], "description": "Sets hexadecimal color of the loader", "guessedname": "setColor", "guessedtype": "function"}, "getRGB": {"protected": "", "params": [{"type": "String", "name": "color", "description": " The HEX color value to be converted to RGB"}], "description": "Return the RGB values of the passed color", "guessedname": "getRGB", "guessedtype": "function"}, "setSpeed": {"public": "", "params": [{"type": "Number", "name": "speed", "description": " The default value is 2"}], "description": "Sets the speed of the loader animation.<br/>\r\nThis value tells the loader how many shapes to skip by each tick.<br/>\r\nUsing the right combination of the <code>setFPS</code> and the <code>setSpeed</code> methods allows the users to optimize the CPU usage of the loader whilst keeping the animation on a visually pleasing level.", "guessedname": "setSpeed", "guessedtype": "function"}, "getShape": {"public": "", "return": {"type": "String", "description": ""}, "description": "Returns the type of the loader shapes", "guessedname": "getShape", "guessedtype": "function"}, "clean": {"protected": "", "description": "Cleans the canvas", "guessedname": "clean", "guessedtype": "function"}, "redraw": {"protected": "", "description": "Redraws the canvas", "guessedname": "redraw", "guessedtype": "function"}, "setShape": {"public": "", "params": [{"type": "String", "name": "shape", "description": " The default value is 'oval'"}], "description": "Sets the type of the loader shapes.<br/>\r\n<br/><b>The acceptable values are:</b>\r\n<ul>\r\n<li>'oval'</li>\r\n<li>'spiral'</li>\r\n<li>'square'</li>\r\n<li>'rect'</li>\r\n<li>'roundRect'</li>\r\n</ul>", "guessedname": "setShape", "guessedtype": "function"}}, "file": "heartcode-canvasloader.js", "guessedtype": "function", "shortname": "CanvasLoader", "properties": {"diameter": {"description": "The diameter of the loader", "default": "40", "protected": "", "guessedname": "diameter", "guessedtype": "property", "type": "Number"}, "canvas": {"protected": "", "type": "Object", "description": "The div we draw the shapes into", "guessedname": "canvas", "guessedtype": "property"}, "container": {"protected": "", "type": "Object", "description": "The div we place the canvas object into", "guessedname": "container", "guessedtype": "property"}, "fps": {"protected": "", "type": "Number", "description": "The FPS value of the loader animation rendering", "guessedname": "fps", "guessedtype": "property"}, "density": {"description": "The number of shapes drawn on the loader canvas", "default": "40", "protected": "", "guessedname": "density", "guessedtype": "property", "type": "Number"}, "color": {"description": "The color of the loader shapes in HEX", "default": "\"#000000\"", "protected": "", "guessedname": "color", "guessedtype": "property", "type": "String"}, "cacheContext": {"protected": "", "type": "Object", "description": "The context of the cache canvas", "guessedname": "cacheContext", "guessedtype": "property"}, "colorRGB": {"protected": "", "type": "Object", "description": "The color of the loader shapes in RGB", "guessedname": "colorRGB", "guessedtype": "property"}, "timer": {"protected": "", "type": "Boolean", "description": "Adds a timer for the rendering", "guessedname": "timer", "guessedtype": "property"}, "cacheCanvas": {"protected": "", "type": "Object", "description": "The canvas we use for caching", "guessedname": "cacheCanvas", "guessedtype": "property"}, "shape": {"description": "The type of the loader shapes", "default": "\"oval\"", "protected": "", "guessedname": "shape", "guessedtype": "property", "type": "String"}, "activeId": {"protected": "", "type": "Number", "description": "The active shape id for rendering", "guessedname": "activeId", "guessedtype": "property"}, "context": {"protected": "", "type": "Object", "description": "The canvas context", "guessedname": "context", "guessedtype": "property"}, "ready": {"protected": "", "type": "Boolean", "description": "Tells if the canvas and its context is ready", "guessedname": "ready", "guessedtype": "property"}, "range": {"protected": "", "type": "Number", "description": "The amount of the modified shapes in percent.", "guessedname": "range", "guessedtype": "property"}, "speed": {"protected": "", "type": "Number", "description": "The speed of the loader animation", "guessedname": "speed", "guessedtype": "property"}}, "description": "CanvasLoader is a JavaScript UI library that draws and animates circular preloaders using the Canvas HTML object.<br/>\r\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/>\r\nIf no id is passed in the constructor, the canvas objects are paced in the document directly."}}, "version": "0.8.0", "modules": {"CanvasLoader": {"description": "This lightweight library uses the HTML5 canvas element to draw and animate the most popular preloader shapes (circle, rectangle, square and rounded rectangle).<br/>\r\nThe implementation is (hopefully) very simple and doesn't require any external libraries.<br/>", "submodules": [], "classlist": ["CanvasLoader"], "filelist": ["heartcode-canvasloader.js"], "subdata": {}, "name": "CanvasLoader"}}, "filemap": {"heartcode-canvasloader.js": {"classlist": ["CanvasLoader"], "name": "heartcode-canvasloader.js", "module": "CanvasLoader"}}} |