Comparing version 0.0.28 to 0.0.29
{ | ||
"name": "ogl", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "WebGL Framework", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -239,2 +239,3 @@ <p align="center"> | ||
- [x] Polyline.js | ||
- [x] Shadow.js | ||
@@ -241,0 +242,0 @@ ## Examples wishlist |
@@ -17,1 +17,2 @@ // Extras | ||
export {Polyline} from './extras/Polyline.js'; | ||
export {Shadow} from './extras/Shadow.js'; |
import {Program} from '../core/Program.js'; | ||
const vertex = ` | ||
precision highp float; | ||
precision highp int; | ||
precision highp float; | ||
precision highp int; | ||
attribute vec3 position; | ||
attribute vec3 normal; | ||
attribute vec3 position; | ||
attribute vec3 normal; | ||
uniform mat3 normalMatrix; | ||
uniform mat4 modelViewMatrix; | ||
uniform mat4 projectionMatrix; | ||
uniform mat3 normalMatrix; | ||
uniform mat4 modelViewMatrix; | ||
uniform mat4 projectionMatrix; | ||
varying vec3 vNormal; | ||
varying vec3 vNormal; | ||
void main() { | ||
vNormal = normalize(normalMatrix * normal); | ||
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); | ||
} | ||
void main() { | ||
vNormal = normalize(normalMatrix * normal); | ||
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); | ||
} | ||
`; | ||
const fragment = ` | ||
precision highp float; | ||
precision highp int; | ||
precision highp float; | ||
precision highp int; | ||
varying vec3 vNormal; | ||
varying vec3 vNormal; | ||
void main() { | ||
gl_FragColor.rgb = normalize(vNormal); | ||
gl_FragColor.a = 1.0; | ||
} | ||
void main() { | ||
gl_FragColor.rgb = normalize(vNormal); | ||
gl_FragColor.a = 1.0; | ||
} | ||
`; | ||
@@ -33,0 +33,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
837941
49
24259
310