A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/item.php

Line Number: 25

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/item.php

Line Number: 1114

EffectHub.com: your best source for gaming
Recommendation
More Effects...
JS
1
// Utilities
2
var Vector3 = {};
3
var Matrix44 = {};
4
Vector3.create = function(x, y, z) {
5
    return {'x':x, 'y':y, 'z':z};
6
};
7
Vector3.dot = function (v0, v1) {
8
    return v0.x * v1.x + v0.y * v1.y + v0.z * v1.z;
9
};
10
Vector3.cross = function (v, v0, v1) {
11
    v.x = v0.y * v1.z - v0.z * v1.y;
12
    v.y = v0.z * v1.x - v0.x * v1.z;
13
    v.z = v0.x * v1.y - v0.y * v1.x;
14
};
15
Vector3.normalize = function (v) {
16
    var l = v.x * v.x + v.y * v.y + v.z * v.z;
17
    if(l > 0.00001) {
18
        l = 1.0 / Math.sqrt(l);
19
        v.x *= l;
20
        v.y *= l;
21
        v.z *= l;
22
    }
23
};
24
Vector3.arrayForm = function(v) {
25
    if(v.array) {
26
        v.array[0] = v.x;
27
        v.array[1] = v.y;
28
        v.array[2] = v.z;
29
    }
30
    else {
31
        v.array = new Float32Array([v.x, v.y, v.z]);
32
    }
33
    return v.array;
34
};
35
Matrix44.createIdentity = function () {
36
    return new Float32Array([1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]);
37
};
38
Matrix44.loadProjection = function (m, aspect, vdeg, near, far) {
39
    var h = near * Math.tan(vdeg * Math.PI / 180.0 * 0.5) * 2.0;
40
    var w = h * aspect;
41
    
42
    m[0] = 2.0 * near / w;
43
    m[1] = 0.0;
44
    m[2] = 0.0;
45
    m[3] = 0.0;
46
    
 
CSS
1
body {
2
    padding:0;
3
    margin:0;
4
    overflow:hidden;
5
    height: 600px;
6
}
7
canvas {
8
    padding:0;
9
    margin:0;
10
}
11
div.btnbg {
12
    position:fixed;
13
    left:0;
14
    top:0;
15
}
 
HTML
1
<!-- fork from http://codepen.io/anandylaanbaatar/pen/tqdmv -->
2
<canvas id="sakura"></canvas>
3
<div class="btnbg">
4
</div>
5
 
6
<!-- sakura shader -->
7
<script id="sakura_point_vsh" type="x-shader/x_vertex">
8
uniform mat4 uProjection;
9
uniform mat4 uModelview;
10
uniform vec3 uResolution;
11
uniform vec3 uOffset;
12
uniform vec3 uDOF;  //x:focus distance, y:focus radius, z:max radius
13
uniform vec3 uFade; //x:start distance, y:half distance, z:near fade start
14
 
15
attribute vec3 aPosition;
16
attribute vec3 aEuler;
17
attribute vec2 aMisc; //x:size, y:fade
18
 
19
varying vec3 pposition;
20
varying float psize;
21
varying float palpha;
22
varying float pdist;
23
 
24
//varying mat3 rotMat;
25
varying vec3 normX;
26
varying vec3 normY;
27
varying vec3 normZ;
28
varying vec3 normal;
29
 
30
varying float diffuse;
31
varying float specular;
32
varying float rstop;
33
varying float distancefade;
34
 
35
void main(void) {
36
    // Projection is based on vertical angle
37
    vec4 pos = uModelview * vec4(aPosition + uOffset, 1.0);
38
    gl_Position = uProjection * pos;
39
    gl_PointSize = aMisc.x * uProjection[1][1] / -pos.z * uResolution.y * 0.5;
40
    
41
    pposition = pos.xyz;
42
    psize = aMisc.x;
43
    pdist = length(pos.xyz);
44
    palpha = smoothstep(0.0, 1.0, (pdist - 0.1) / uFade.z);
45
    
46
    vec3 elrsn = sin(aEuler);
 

Join Effecthub.com

Working with Global Gaming Artists and Developers!


Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character