Skip to content

Commit

Permalink
serving examples from root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre-Kul committed Mar 18, 2019
1 parent 5f5a36c commit 069487f
Show file tree
Hide file tree
Showing 15 changed files with 409 additions and 2,054 deletions.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion examples/public/demo/index.html → examples/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
vec3 v_normal = (uNormal * vec4(aNormal, 1.0)).xyz;
vec3 surfaceWorldPosition = (uModel * vec4(aPosition, 1.0)).xyz;
vec3 surfaceToLight = uLightPosition - surfaceWorldPosition;
float light = dot(normalize(v_normal), normalize(surfaceToLight));
float light = clamp(dot(normalize(v_normal), normalize(surfaceToLight)), 0.0, 1.0);
vLighting = vec4(light, light, light, 1.0);
vLighting *= uLightColor;
}
Expand Down Expand Up @@ -65,6 +65,7 @@
gl_FragColor = vColor;
}
gl_FragColor *= vLighting;

}
</script>

Expand Down
4 changes: 2 additions & 2 deletions examples/public/demo/main.js → examples/demo/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* GLOBALS */

const CUBE_COUNT = 1000;
const WORLD_SIZE = 100;
const CUBE_COUNT = 100;
const WORLD_SIZE = 5;
const G = {
KEY : {},
};
Expand Down
13 changes: 13 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>EXAMPLES</title>
</head>
<body>
<a href="demo/index.html">DEMO-1</a>
</body>
</html>
12 changes: 0 additions & 12 deletions examples/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/package.json

This file was deleted.

Loading

0 comments on commit 069487f

Please sign in to comment.