├── .travis.yml ├── .gitignore ├── screenshot.png ├── .jshintrc ├── gulpfile.js ├── LICENSE ├── package.json ├── index.html ├── dist ├── canvas-nest.min.js └── canvas-nest.js ├── README-zh.md ├── README.md └── src └── canvas-nest.js /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4.4.4" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | .settings 3 | 4 | node_modules/* 5 | 6 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosein2398/canvas-nest.js/master/screenshot.png -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "quotmark": true, 3 | "boss": true, 4 | "eqnull": true, 5 | "expr": true, 6 | "funcscope": true, 7 | "loopfunc": true, 8 | "smarttabs": true, 9 | "node": true, 10 | "browser": true, 11 | "undef": true, 12 | "unused": true 13 | } 14 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const gulp = require('gulp'); 3 | const uglify = require('gulp-uglify'); 4 | const rename = require("gulp-rename"); 5 | const injectVersion = require('gulp-inject-version'); 6 | 7 | gulp.task('mini', () => ( 8 | gulp.src('src/canvas-nest.js') 9 | .pipe(injectVersion()) 10 | .pipe(gulp.dest('dist/')) 11 | .pipe(uglify({ 12 | preserveComments: 'license' 13 | })) //uglify 14 | .pipe(rename("canvas-nest.min.js")) 15 | .pipe(gulp.dest('dist/')) 16 | )); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Hust.cc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "canvas-nest.js", 3 | "officialName": "canvas-nest.js", 4 | "version": "1.0.1", 5 | "summary": "A nest backgroud of website draw on canvas use javascript, do not depends on jQuery.", 6 | "description": "A nest backgroud of website draw on canvas use javascript, do not depends on jQuery.", 7 | "author": { 8 | "name": "hustcc", 9 | "url": "https://github.com/hustcc" 10 | }, 11 | "homepage": "http://www.atool.org", 12 | "license": "MIT", 13 | "keywords": [ 14 | "canvas", 15 | "html5", 16 | "nest" 17 | ], 18 | "main": "dist/canvas-nest.min.js", 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/hustcc/canvas-nest.js" 22 | }, 23 | "bugs": { 24 | "url": "https://github.com/hustcc/canvas-nest.js/issues" 25 | }, 26 | "devDependencies": { 27 | "gulp": "^3.9.0", 28 | "gulp-uglify": "^1.5.3", 29 | "jshint": "^2.9.2", 30 | "gulp-rename": "^1.2.2", 31 | "gulp-inject-version": "^1.0.1" 32 | }, 33 | "scripts": { 34 | "lint": "jshint src/canvas-nest.js", 35 | "test": "npm run lint", 36 | "build": "gulp mini && npm run test" 37 | }, 38 | "dependencies": { 39 | } 40 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |`标签上方. 例如下面的代码结构: 26 | 27 | ```html 28 | 29 |
30 | ... 31 | 32 |
38 |