float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
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
#demo | |
span.color-1 H | |
span.color-2 e | |
span.color-3 l | |
span.color-4 l | |
span.color-1 o | |
span.color-2   | |
span.color-2 Y | |
span.color-3 o |
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
//Bend Three JS plane geometry with bezier curve | |
//Curved plane generation, bezier curve plane, | |
function bendPlaneGeometry(planeGeometry, centerBendZ) | |
{ | |
var curve = new THREE.CubicBezierCurve3( | |
planeGeometry.vertices[0], | |
new THREE.Vector3(planeGeometry.parameters.width/2, 0, centerBendZ ), | |
new THREE.Vector3(planeGeometry.parameters.width/2, 0, centerBendZ ), | |
planeGeometry.vertices[(planeGeometry.vertices.length/2) - 1] | |
); |
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 Globe = function (radius, segments) { | |
THREE.Object3D.call(this); | |
this.name = "Globe"; | |
var that = this; | |
// instantiate a loader | |
var loader = new THREE.TextureLoader(); |
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
//Code is converted to use in Unity(ShaderLab) from | |
//Auroras by nimitz 2017 (twitter: @stormoid) | |
//on Shadertoy(https://www.shadertoy.com/view/XtGGRt) | |
Shader "Aurora/aurora" | |
{ | |
Properties | |
{ |