JavaScript - The Final Frontier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
var webpack = require('webpack'); | |
var webpackDevMiddleware = require('webpack-dev-middleware'); | |
var config = require('./config/webpack.config'); | |
main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(); | |
function main() { | |
var canvas = document.getElementById("canvas"); | |
var ctx = canvas.getContext('2d'); | |
animate(function(i) { | |
var matrix = generateMatrix(20, 20, function(x, y, xlen, ylen) { | |
var fac = fromBoundToBound(0, 1, i / 2000); | |
var a = 200000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(); | |
function main() { | |
var canvas = document.getElementById("canvas"); | |
latticeGradient(canvas, [ | |
[[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1], [1, 0, 0, 1]], | |
[[0, 1, 0, 1], [0, 0, 1, 1], [1, 0, 0, 1], [0, 1, 0, 1]], | |
[[0, 0, 1, 1], [1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1]], | |
[[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1], [1, 0, 0, 1]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(); | |
function main() { | |
var canvas = document.getElementById('canvas'); | |
quadGradient(canvas, { | |
topLeft: [1, 0, 1, 1], | |
topRight: [0, 0, 0, 1], | |
bottomLeft: [0, 1, 0, 1], | |
bottomRight: [0, 1, 1, 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
var PORT = 9909; | |
var HOST = '172.18.12.2'; | |
var LIGHTS = 36; | |
var dgram = require('dgram'); |
- http://simplecartjs.org/ - standalone (no need for backend)
- http://minicartjs.com/ - PayPal
- http://www.nopdesign.com/freecart/
We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:
- Processes and tools over individuals and interactions
- Comprehensive documentation over working software
- Contract negotiation over customer collaboration
- Following a plan over responding to change
That is, while there is value in the items on the right, we value the items on the left more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Vec = decorate({ | |
add: function(a, b) {return a + b;}, | |
sub: function(a, b) {return a - b;}, | |
div: function(a, b) {return a / b;}, | |
mul: function(a, b) {return a * b;} | |
}, function(op) { | |
return function() { | |
var pos = arguments[0].slice(); | |
var i, len, arg; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(main); | |
function main() { | |
var $c = $('#demo'); | |
var ctx = $c[0].getContext('2d'); | |
ctx.translate(0, $c.height()); | |
ctx.scale(1, -1); | |
var points = [[0, 0], [55, 43], [94, 226], [255, 255]]; | |
drawCurve(ctx, hermite(points)); |