webgl - Three.js, custom light geometry -



webgl - Three.js, custom light geometry -

is possible create in three.js lite source has custom geometry, e.g. symbol. there arealight in three.js works rectangular source of lite , has wigth , height parameters. finally, aim surface illuminated such source, visually custom figure.

thank westlangley, great example, tried way, unfortunately, didn't work me. tried this:

var texttexture = new three.texture( "textures/text.jpg" ); //var texttexture = three.imageutils.loadtexture("textures/text.jpg"); texttexture.format = three.rgbformat; texttexture.wraps = texttexture.wrapt = three.mirroredrepeatwrapping; texttexture.anisotropy = 4; var textlight = new three.arealight( 0xffffff, 3 ); textlight.position.set( 10, 5, -5 ); textlight.rotation.x = math.pi / 2; textlight.width = 30; textlight.height = 10; textlight.texture = texttexture; scene.add(textlight)

arealight works webgldeferredrenderer, quite new, part of examples (not library), , there not lot of examples of it's use.

if @ this example, can see film texture used lite source.

in example, can substitute texture video texture so:

// texture = new three.texture( video ); texture = three.imageutils.loadtexture( "texture.jpg" );

unfortunately, illustration using modified version of library.

three.js r.56

three.js webgl light

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -