{"_id":"grained","_rev":"2-9877f5a6c926444176c9eccbc7f930d3","name":"grained","description":"Add animated grain texture effect to your content.","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"grained","version":"0.0.2","description":"Add animated grain texture effect to your content.","main":"grained.min.js","repository":{"type":"git","url":"git://github.com/matrunchyk/grained.git"},"author":{"name":"Sarath Saleem","url":"https://github.com/sarathsaleem"},"license":"MIT","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014, Sarath Saleem\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"grained@0.0.2","dist":{"shasum":"5ffc532030291a48996556ceba2acafa20b2aa7f","tarball":"https://registry.npmjs.org/grained/-/grained-0.0.2.tgz","integrity":"sha512-79UmGWpblSBvGaXwS+tkMtcZuHYGGwLPqS23xxTb5jEYMqzgY07OR3xr8O2r9GI7ThUc7p23AKHew2lop868IQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgZpq6ZSqjMAxR5HTGyVmiQMGWd3YaEpv84yFD9LipQAiEAgiFgW12ywCY7RGaYzeiXGY4gZ+n/qZ3XinukS7gIOq4="}]},"maintainers":[{"name":"matrunchyk","email":"sergiy.matrunchyk@gmail.com"}],"_npmUser":{"name":"matrunchyk","email":"sergiy.matrunchyk@gmail.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/grained-0.0.2.tgz_1492266874113_0.9571666531264782"}}},"readme":"\nAdd animated grain texture effect to your content.\n--------------------------------------------------\n\nWith **grained.js** you can add customized noise effect on your web page. It has easily customizable options to generate the animated noise effect.\nThe animation is added using CSS3 key-frame animation and instantly generated png noise image.\n\n[![\"Create your own\"](http://sarathsaleem.github.io/grained/img/textute-list.gif)](http://sarathsaleem.github.io/grained)\n\n**[Create your own](http://sarathsaleem.github.io/grained)**\n\nHow to use\n------------\n\nInclude the library file in your html page.\n\n    <script src=\"grained.js\"></script>\n\ninitialize the library by\n\n    grained('elementId',options)\n\n*`'elementId'`* is the id of the container element to add the grain effect.  It is important to note that grainedjs will not change the background of the container element. It appends a div element as the first child of the container. Grainedjs will add two style changes to the container element *`'position:relative;overflow:hidden'.`* If the container position is absolute it will remand as absolute only.\n\nSince a `'div'` element with class `'grained'` is added as first child element with position absolute it will have the the z index priority and appears on top of other contents in the container element. If you want the other elements in container element on top of grained effect you have to  add a css like\n\n*`#container > * { position:relative; }`*\n\nSo the ideal structure of implementaion is like follows\n\n    <div id=\"container\">\n       <div class=\"contents\">\n         your contents goes here .. like <a>, <p> etc\n       </div>\n    </div>\nafter initilizing  `grained('#container', {});` it will look like this\n\n\n    <div id=\"container\">\n        <div class='grained'></div>\n        <div class=\"contents\">\n            your contents goes here .. like <a>, <p> etc\n        </div>\n    </div>\n\nOptions\n-------\n\nWith these options you can crate customized grained effect , these are the option parameter you can change and the default values.\n\n     var options = {\n             animate: true,\n             patternWidth: 100,\n             patternHeight: 100,\n             grainOpacity: 0.05,\n             grainDensity: 1,\n             grainWidth: 1,\n             grainHeight: 1\n     };\nWith animation true/false you can create textures with grain movement and a static one. The other value you can see the live in **[online generator](http://sarathsaleem.github.io/grained)**\n","maintainers":[{"name":"matrunchyk","email":"sergiy.matrunchyk@gmail.com"}],"time":{"modified":"2022-06-18T13:48:05.828Z","created":"2017-04-15T14:34:35.969Z","0.0.2":"2017-04-15T14:34:35.969Z"},"repository":{"type":"git","url":"git://github.com/matrunchyk/grained.git"},"author":{"name":"Sarath Saleem","url":"https://github.com/sarathsaleem"},"license":"MIT","readmeFilename":"README.md"}