Docs for Version: 1.0a
Show:
Module: Shadow

Constructor

Shadow

(
  • scene
  • lightPosition
  • [near]
  • [far]
  • [resolution]
)

Parameters:

  • scene Scene
  • lightPosition Vector

    of pointLight

  • [near] Float optional

    near shadow plane

  • [far] Float optional

    far shadow plane

  • [resolution] Int optional

    shadow map resolution

Item Index

Methods

Methods

basicShader

(
  • options
)

Provided by the ShaderLibrary module.

Constructs shader - This is done this way to minify the shader structure

Parameters:

  • options Object

    Options of shader construction

Example:

//Simple shader considering light and diffuse texture
                                            var shader = basicShader({
                                                 useBump: false,
                                                 useDiffuse: false,
                                                 useAtlas: false,
                                                 useSpecular: false,
                                                 useLights: false,
                                                 useTiling: false,
                                                 useReflection:false,
                                                 useSky:false
                                            });

draw

()

draws shadow