Search results for 2014 09 15 angularjs one step time

Frame-by-frame animation with HTML and JavaScript

by Brian Rinaldi

…added: var startTime, time; function run() { requestAnimationFrame(run); time = new Date().getTime() – startTime; // Animation code goes here } startTime = new Date().getTime(); run(); And here is the updated…

BDD in JavaScript with CucumberJS

by Todd Anderson

…essentially means that all the steps have not been located or defined: UUUUUU 2 scenarios (2 undefined) 6 steps (6 undefined) You can implement step definitions for undefined steps with…

Building a Parallax Scrolling Game with Pixi.js – Part 3

by Brian Rinaldi

…borrow and return a step from the object pool. Add the following borrowStep() and returnStep() methods: WallSpritesPool.prototype.returnBackEdge = function(sprite) { this.backEdges.push(sprite); }; WallSpritesPool.prototype.borrowStep = function() { return this.steps.shift(); }; WallSpritesPool.prototype.returnStep

Testing Web Apps from the Ground Up

by Brian Rinaldi

…uses get() to make an Ajax request to “/time.json” and parses “day” or “night” from the response. exports.getTime = function(callback) { exports.get(“/time.json”, function(data) { callback(JSON.parse(; }); }; This is displayTime()….

AngularJS: One Step at a Time

by Michael Crump

safety of a framework that won’t disappear overnight. While there have been many frameworks that have come and gone, AngularJS is not one of those. AngularJS is backed by Google…

Building a Parallax Scrolling Game with Pixi.js – Part 4

by Brian Rinaldi

…= this.pool.borrowStep; this.borrowWallSpriteLookup[SliceType.DECORATION] = this.pool.borrowDecoration; this.borrowWallSpriteLookup[SliceType.WINDOW] = this.pool.borrowWindow; this.returnWallSpriteLookup = []; this.returnWallSpriteLookup[SliceType.FRONT] = this.pool.returnFrontEdge; this.returnWallSpriteLookup[SliceType.BACK] = this.pool.returnBackEdge; this.returnWallSpriteLookup[SliceType.STEP] = this.pool.returnStep; this.returnWallSpriteLookup[SliceType.DECORATION] = this.pool.returnDecoration; this.returnWallSpriteLookup[SliceType.WINDOW] = this.pool.returnWindow; }; In the method…

Soma.js – Your Way Out of Chaotic JavaScript

by Brian Rinaldi

tick). // register clock with timer model timer.add(currentClock.update); // update timer immediately currentClock.update(timer.time); Below is the complete code of the clock mediator. (function(clock) { var ClockMediator = function(target, dispatcher, mediators,…

AngularJS Directives That Override Standard HTML Tags

by Brian Rinaldi

By Joel Hooks Directives are the heart and soul of AngularJS. They are incredibly powerful. AngularJS extends the grammar of the browser, supplying semantics that facilitate the creation of web…

2014 – What Web Developers Will Need to Know

by Brian Rinaldi

…help shed some light on what web developers might need to know for 2014. Specifically, I asked, “Looking into 2014, what do you think will have the most impact on…

Creating Sound with the Web Audio API and Oscillators

by Brian Rinaldi

…gain. You can do more complex things like transition to a gain at a particular time using gain.linearRampToValueAtTime(value,endTime) or set a gain at a particular time during the audio playback…