This file contains 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
package candymaps.map | |
{ | |
import com.modestmaps.geo.Location; | |
import flash.events.Event; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
public class MapUtil | |
{ |
This file contains 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
void Arc::draw(ofxShader& shader) | |
{ | |
GLuint pr_loc = glGetAttribLocationARB(shader.shader, "a_vtx_pr"); | |
GLuint nx_loc = glGetAttribLocationARB(shader.shader, "a_vtx_nx"); | |
glColor4f(color.x, color.y, color.z, 1); | |
glBegin(GL_TRIANGLE_STRIP); | |
ofxVec3f vtx_pr, vtx, vtx_nx; | |
vtx_nx.set(p1); | |
for(int i = 1; i < n_steps; i++){ |
This file contains 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
TouchMgr::TouchMgr(AppCocoaTouch *app) | |
{ | |
app->registerTouchesBegan(this, &TouchMgr::onTouchesBegan); | |
} | |
bool TouchMgr::onTouchesBegan(TouchEvent e) | |
{ | |
const std::vector<TouchEvent::Touch> touches = e.getTouches(); | |
for(std::vector<TouchEvent::Touch>::const_iterator tit = touches.begin(); tit != touches.end(); ++tit){ | |
active_pnts.insert(std::make_pair(tit->getId(), TouchPoint(tit->getPos()))); |
This file contains 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
import commands | |
import os | |
baseUrl = "http://hypersphere.telascience.org/elevation/cgiar_srtm_v4/tiff/zip/" | |
for x in range(1,73): | |
for y in range(1,25): | |
zipname = "srtm_%02d_%02d.ZIP" % (x, y) | |
tifname = "srtm_%02d_%02d.TIF" % (x, y) | |
This file contains 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
Show hidden characters
{ | |
"cmd": [ "Plask", "${file}" ], | |
"selector": "source.js", | |
"path": "< path to >/Plask.app/Contents/MacOS/", | |
"working_dir": "${file_path}" | |
} |
This file contains 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 plask = require('plask'); | |
plask.SkPath.prototype.splineTo = function(vertices){ | |
var nv = vertices.length; | |
if(nv >= 3){ | |
var p0, p1, p2; | |
for(var i = 1, n = nv - 1; i <= n; i++){ | |
p0 = vertices[i - 1]; | |
p1 = vertices[i]; | |
if(i == n){ // finish him |
This file contains 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 x = 0; | |
var y = 0; | |
var symbols = [215, 178, 177, 221]; | |
var punct = [232, 233, 234, 235]; | |
var si = 0, pi = 0; | |
function printSym(s){ | |
pSymbolA(s); | |
pPixel(x, y); | |
x += 1; |
This file contains 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
// Based on Dean McNamee's OBJ loader | |
// Modified to output triangles with texture coords | |
function loadOBJ(filename){ | |
var filedata = fs.readFileSync(filename, 'utf8'); | |
var lines = filedata.split('\n'); | |
var tris = [ ]; | |
var v = [ null, ]; // Verts, indexed from 1, so put in a filler. |
This file contains 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 plask = require("plask"); | |
plask.simpleWindow({ | |
settings: { | |
type: "3d", | |
width: 500, | |
height: 500, | |
multisample: true | |
}, | |
rotateBuffer: function(axis, theta){ |
This file contains 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
#include "cinder/app/AppBasic.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Rand.h" | |
#include "cinder/Camera.h" | |
#include "cinder/Perlin.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; |
OlderNewer