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
distance = speed * time | |
speed = distance/time | |
time = distance/speed |
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 cameraZ = camera.position.z; | |
var planeZ = 5; | |
var distance = cameraZ - planeZ; | |
var aspect = viewWidth / viewHeight; | |
var vFov = camera.fov * Math.PI / 180; | |
var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance; | |
var planeWidthAtDistance = planeHeightAtDistance * aspect; | |
// or |
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
html, body { | |
height: 100%; | |
margin: 0; | |
} | |
#c { | |
width: 100%; | |
height: 100%; | |
display: block; | |
} |
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 rad = function(x) { | |
return x * Math.PI / 180; | |
}; | |
var getDistance = function(p1, p2) { | |
var R = 6378137; // Earth’s mean radius in meter | |
var dLat = rad(p2.lat() - p1.lat()); | |
var dLong = rad(p2.lng() - p1.lng()); | |
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + | |
Math.cos(rad(p1.lat())) * Math.cos(rad(p2.lat())) * |
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
<meta property="og:type" content="video.other"/> | |
<meta property="og:title" content="Title"/> | |
<meta property="og:url" content="name.gif"/> | |
<meta property="og:image" content="name.gif"/> | |
<meta property="og:image:type" content="image/gif"/> |
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 fragmentShader = ` | |
precision mediump float; | |
uniform vec2 resolution; | |
uniform float time; | |
uniform float alpha; | |
uniform vec2 speed; | |
uniform float shift; | |
float rand(vec2 n) { |