Added a simple cube while taking advantage of Cubic's built-in three.js bootstrapping
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
require('zappa') -> | |
@get '/': -> @render 'index', layout: no | |
@view index: -> | |
doctype 5 | |
html -> | |
head -> | |
title 'Zappa + CoffeeKup + Processing' | |
style '''body { background-image:url('http://icanhasnoise.com/1d0b07-4a2219/40x1500/4'); text-align: center; } header { font-family: 'Lobster Two', cursive; font-size: 28px; color: white; text-shadow: 3px 3px 3px brown; }''' | |
link rel: 'stylesheet', href: 'http://fonts.googleapis.com/css?family=Lobster+Two&v2' | |
script src: 'http://processingjs.org/content/download/processing-js-1.3.6/processing-1.3.6-api.min.js' |
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 haxe.ds.Option; | |
using Test.OptionTools; | |
class OptionTools { | |
static public function fmap<T>(m :Option<T>, f :T->T) :Option<T> { | |
switch m { | |
case Some(x): return Some(f(x)); | |
case None: return None; | |
} |
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
#if macro | |
import haxe.macro.Context; | |
#end | |
class Main { | |
macro static function load_json(file :String) { | |
var data = sys.io.File.getContent(file); | |
var json = haxe.Json.parse(data); | |
return Context.makeExpr(json, Context.currentPos()); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js webgl - draggable cubes</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
font-family: Monospace; | |
background-color: #f0f0f0; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>cube</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
font-family: Monospace; | |
background-color: #f0f0f0; |
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 projector; | |
var objects = [], plane; | |
var mouse = new THREE.Vector2(), | |
offset = new THREE.Vector3(), | |
INTERSECTED, SELECTED; | |
initBoxes(); | |
function initBoxes() { |
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
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width,height=device-height,target-densitydpi=device-dpi,user-scalable=yes" | |
/> | |
<script src="https://raw.github.com/CreateJS/EaselJS/master/lib/easeljs-0.6.0.min.js"></script> | |
</head> | |
<body> | |
<canvas id="testCanvas" width="640" height="480" style="background: black;"></canvas> |
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 com.blazingmammothgames.util; | |
#if neko | |
import neko.vm.Thread; | |
import neko.vm.Mutex; | |
#elseif cpp | |
import cpp.vm.Thread; | |
import cpp.vm.Mutex; | |
#end |
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
// "Fractal Cartoon" - former "DE edge detection" by Kali | |
// Cartoon-like effect using eiffies's edge detection found here: | |
// https://www.shadertoy.com/view/4ss3WB | |
// I used my own method previously but was too complicated and not compiling everywhere. | |
// Thanks to the suggestion by WouterVanNifterick. | |
// There are no lights and no AO, only color by normals and dark edges. | |