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 { forEachObjIndexed } from "ramda"; | |
import * as React from "react"; | |
import { | |
Animated, | |
ScrollView, | |
View, | |
ViewStyle, | |
LayoutChangeEvent, | |
NativeScrollEvent, | |
} from "react-native"; |
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
cube = new THREE.CubeGeometry( block_size, block_size, block_size, 1, 1, 1, materials, false, { px: px, nx: nx, py: py, ny: ny, pz: pz, nz: nz }); |
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
cp ~/Downloads/railscasts.vim ~/.vim/colors |
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 ( window.Blob === undefined ) { | |
// attach library custom implementation | |
} else { | |
// use native implementation | |
} |
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> | |
<head> | |
<title>Three.js - Game</title> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; |
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
noise: function (x, y, z) { | |
// Find unit cube that contains point | |
var xFloor = ~~x; | |
var yFloor = ~~y; | |
var zFloor = ~~z; | |
var iX = xFloor & 255; | |
var iY = yFloor & 255; | |
var iZ = zFloor & 255; |
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
# HAProxy config | |
mkdir /etc/haproxy | |
cat > /etc/haproxy/haproxy.cfg << EOF | |
global | |
maxconn 4096 | |
defaults | |
mode http | |
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
// Bind context | |
_.bindAll( this, "animate", "render", "update" ); | |
// Initialize camera | |
this.camera = new THREE.Camera( 45, window.innerWidth / window.innerHeight, -2000, 10000 ); | |
this.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, -2000, 10000 ); | |
this.camera.position.y = 70.711; | |
this.camera.position.x = 100; | |
this.camera.position.z = 100; | |
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 = new THREE.Projector(), | |
p3D = new THREE.Vector3(25, 15, 9), | |
p2D; | |
p2D = projector.projectVector(p3D, camera); | |
p3D = projector.unprojectVector(p2D, camera); |
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 | |
camera, | |
scene, | |
renderer; | |
function initialize() { | |
var | |
grass, | |
meshCanvas, | |
plane, |
NewerOlder