gl-phong-material
v1.0.0
Published
Phong material for 3d scenes using stack.gl
Downloads
9
Maintainers
Readme
gl-phong-material
STYLE PARAMETERS
ambient
:vec3
ambient color component, default[0.2, 0.2, 0.2]
diffuse
:vec3
diffuse color component, default[0.8, 0.8, 0.8]
specular
:vec3
specular color component, default[0.8, 0.8, 0.8]
shininess
:float
surface roughness, 0 for smooth, 1 for matte, default0.7
install
npm install gl-phong-material
var phong = require('gl-phong-material')
var material = require('gl-material')(gl, phong, {LIGHTCOUNT: 1})
Or just get the fragment shader for use elsewhere
var fragment = require('gl-phong-material').fragment