canvasrenderer
Advanced tools
Comparing version 0.1.3 to 0.1.4
/** | ||
* Banner. | ||
* Recursively adds a banner to the specified files. | ||
*/ | ||
var prependFile = require("prepend-file"), | ||
pkg = require("./package"), | ||
pkgName = pkg.name.replace(/^@.+\//, ""), | ||
date = (new Date()).toDateString(), | ||
banner; | ||
var prependFile = require("prepend-file"); | ||
var pkg = require("./package"); | ||
var pkgName = pkg.name.replace(/^@.+\//, ""); | ||
var date = (new Date()).toDateString(); | ||
var banner = "/**\n * " + pkgName + " v" + pkg.version + " build " + date.slice(4) + "\n" + | ||
" * " + pkg.homepage + "\n" + | ||
" * Copyright " + date.slice(-4) + " " + pkg.author.name + ", " + pkg.license + "\n */\n"; | ||
function prepend(files) { | ||
@@ -29,6 +33,2 @@ | ||
banner = "/**\n * " + pkgName + " v" + pkg.version + " build " + date.slice(4) + "\n" + | ||
" * " + pkg.homepage + "\n" + | ||
" * Copyright " + date.slice(-4) + " " + pkg.author.name + ", " + pkg.license + "\n */\n"; | ||
prepend([ | ||
@@ -35,0 +35,0 @@ "build/" + pkgName + ".js", |
/** | ||
* canvasrenderer v0.1.3 build Sep 20 2015 | ||
* canvasrenderer v0.1.4 build Oct 26 2015 | ||
* https://github.com/vanruesc/canvasrenderer | ||
@@ -4,0 +4,0 @@ * Copyright 2015 Raoul van Rueschen, Zlib |
/** | ||
* canvasrenderer v0.1.3 build Sep 20 2015 | ||
* canvasrenderer v0.1.4 build Oct 26 2015 | ||
* https://github.com/vanruesc/canvasrenderer | ||
@@ -4,0 +4,0 @@ * Copyright 2015 Raoul van Rueschen, Zlib |
@@ -5,3 +5,3 @@ { | ||
"description": "A base class that provides methods for canvas rendering.", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"url": "https://github.com/vanruesc/canvasrenderer" | ||
@@ -8,0 +8,0 @@ }, |
{ | ||
"name": "canvasrenderer", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A base class that provides methods for canvas rendering.", | ||
@@ -31,15 +31,19 @@ "homepage": "https://github.com/vanruesc/canvasrenderer", | ||
"scripts": { | ||
"jshint:banner": "jshint banner.js", | ||
"jshint:test": "jshint test", | ||
"jshint:lib": "jshint src", | ||
"jshint": "npm run jshint:banner && npm run jshint:test && npm run jshint:lib", | ||
"jshint": "npm run jshint:test && npm run jshint:lib", | ||
"rollup": "rollup -f iife -n CanvasRenderer -i src/canvasrenderer.js -o build/canvasrenderer.js", | ||
"uglify": "uglifyjs build/canvasrenderer.js -c -m -o build/canvasrenderer.min.js", | ||
"mocha": "mocha-phantomjs --setting webSecurityEnabled=false test/index.html", | ||
"yuidoc": "yuidoc src -q -c yuidoc.json", | ||
"prebuild": "npm run jshint", | ||
"build": "npm run rollup", | ||
"postbuild": "npm run uglify && node banner.js", | ||
"build": "npm run rollup && npm run uglify", | ||
"postbuild": "node banner.js", | ||
"pretest": "npm run build", | ||
"test": "npm run mocha" | ||
}, | ||
@@ -46,0 +50,0 @@ |
@@ -10,2 +10,3 @@ # CanvasRenderer | ||
## Installation | ||
@@ -19,2 +20,3 @@ | ||
## Usage | ||
@@ -53,11 +55,10 @@ | ||
## Documentation | ||
[API](http://vanruesc.github.io/canvasrenderer/docs) | ||
## Contributing | ||
Maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code. | ||
## Release History | ||
_Version: 0.0.0 (28.06.2015)_ | ||
> The canvas renderer serves as a scaffold for animation classes. | ||
@@ -64,0 +65,0 @@ ## License |
@@ -120,3 +120,3 @@ describe("CanvasRenderer", function() { | ||
it("should throw if enabled is set to true", function(done) { | ||
it("should throw because of unimplemented methods", function(done) { | ||
@@ -143,3 +143,3 @@ try { | ||
it("should only call update() after at least 16.6ms have passed", function(done) { | ||
it("should only call update() after at least dt ms have passed", function(done) { | ||
@@ -149,3 +149,3 @@ CustomRenderer.prototype.draw = function() {}; | ||
if(elapsed >= 16.6) { done(); } | ||
if(elapsed >= renderer.dt) { done(); } | ||
@@ -156,3 +156,3 @@ }; | ||
renderer.render(); | ||
setTimeout(renderer.render, 17); | ||
setTimeout(renderer.render, Math.ceil(renderer.dt)); | ||
@@ -159,0 +159,0 @@ }); |
{ | ||
"name": "CanvasRenderer API", | ||
"description": "A base class that provides methods for canvas rendering.", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"url": "https://github.com/vanruesc/canvasrenderer", | ||
@@ -6,0 +6,0 @@ "options": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65
162983
2010