API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classNormalMap

@codexo/exojs-lighting / lighting / stable

An authored tangent-space normal map. ```ts hero.material = new LitMaterial({ lighting, normals: new NormalMap(heroNormals) }); hero.material = new LitMaterial({ lighting, normals: new NormalMap(heroNormals, { convention: 'directx' }) }); ``` The default input convention is OpenGL: green above the midpoint means the normal leans towards the top of the image, and a flat texel is `(128, 128, 255)`. A map authored the other way up lights its vertical detail from the wrong side while its horizontal detail stays correct; declare it as `directx` rather than editing the texture.

2
props
0
methods
0
events
Import
import { NormalMap } from '@codexo/exojs-lighting'

An authored tangent-space normal map.

```ts hero.material = new LitMaterial({ lighting, normals: new NormalMap(heroNormals) }); hero.material = new LitMaterial({ lighting, normals: new NormalMap(heroNormals, { convention: 'directx' }) }); ```

The default input convention is OpenGL: green above the midpoint means the normal leans towards the top of the image, and a flat texel is `(128, 128, 255)`. A map authored the other way up lights its vertical detail from the wrong side while its horizontal detail stays correct; declare it as `directx` rather than editing the texture.

Constructors1
Properties2
Which way up the map's green channel is authored. Defaults to opengl where a source leaves it out, which is what every generator in this package writes.
Source