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 canvas = document.getElementById("canvas"), | |
| context = canvas.getContext("2d"), | |
| width = canvas.width = window.innerWidth, | |
| height = canvas.height = window.innerHeight; | |
| var count = 20000; | |
| for(var i = 0; i < count; i++) { | |
| var x = Math.random() * width, | |
| y = Math.random() * height; |
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 canvas = document.getElementById("canvas"), | |
| context = canvas.getContext("2d"), | |
| width = canvas.width = window.innerWidth, | |
| height = canvas.height = window.innerHeight; | |
| var res = 10; | |
| for(var x = 0; x < width; x += res) { | |
| for(var y = 0; y < height; y += res) { | |
| var value = getValue(x, y); |
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 canvas = document.getElementById("canvas"), | |
| context = canvas.getContext("2d"), | |
| width = canvas.width = window.innerWidth, | |
| height = canvas.height = window.innerHeight; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>tuturial template</title> | |
| <style type="text/css"> | |
| html, body { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| canvas { |
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 canvas = document.getElementById("canvas"), | |
| context = canvas.getContext("2d"), | |
| width = canvas.width = window.innerWidth, | |
| height = canvas.height = window.innerHeight; | |
| var res = 10; | |
| for(var x = 0; x < width; x += res) { | |
| for(var y = 0; y < height; y += res) { | |
| var value = (x + y) * 0.01 * Math.PI * 2; |
NewerOlder