MotionScript

@motion-script/core


@motion-script/core / PhongMaterial3D

Interface: PhongMaterial3D

Defined in: render3d/material.ts:157

Classic Blinn-Phong: a diffuse term plus a tight specular highlight.

Extends

Properties

alphaMap?

optional alphaMap?: Texture3D

Defined in: render3d/material.ts:62

Per-pixel opacity, read from the red channel.

Inherited from

CommonMaps3D.alphaMap


alphaTest?

optional alphaTest?: number

Defined in: render3d/material.ts:30

Structural. Discard fragments below this alpha. Cheap cutout transparency.

Inherited from

MaterialCommon3D.alphaTest


aoMap?

optional aoMap?: Texture3D

Defined in: render3d/material.ts:64

Ambient occlusion, read from the red channel. Needs a second UV set.

Inherited from

CommonMaps3D.aoMap


aoMapIntensity?

optional aoMapIntensity?: number

Defined in: render3d/material.ts:65

Inherited from

CommonMaps3D.aoMapIntensity


blending?

optional blending?: Blending3D

Defined in: render3d/material.ts:36

Structural. How the colour combines with the framebuffer.

Inherited from

MaterialCommon3D.blending


color?

optional color?: Color

Defined in: render3d/material.ts:159


depthTest?

optional depthTest?: boolean

Defined in: render3d/material.ts:45

Test against the depth buffer. Turn off to force draw-on-top.

Inherited from

MaterialCommon3D.depthTest


depthWrite?

optional depthWrite?: boolean

Defined in: render3d/material.ts:43

Write to the depth buffer. Turn off for additive glows and inside-out shells.

Inherited from

MaterialCommon3D.depthWrite


displacementBias?

optional displacementBias?: number

Defined in: render3d/material.ts:73

Inherited from

CommonMaps3D.displacementBias


displacementMap?

optional displacementMap?: Texture3D

Defined in: render3d/material.ts:71

Displaces vertices along their normals. Needs a subdivided geometry.

Inherited from

CommonMaps3D.displacementMap


displacementScale?

optional displacementScale?: number

Defined in: render3d/material.ts:72

Inherited from

CommonMaps3D.displacementScale


dithering?

optional dithering?: boolean

Defined in: render3d/material.ts:51

Smooth gradient banding.

Inherited from

MaterialCommon3D.dithering


emissive?

optional emissive?: Color

Defined in: render3d/material.ts:86

Self-illumination colour. Does not light other objects (see post bloom).

Inherited from

Emissive3D.emissive


emissiveIntensity?

optional emissiveIntensity?: number

Defined in: render3d/material.ts:87

Inherited from

Emissive3D.emissiveIntensity


emissiveMap?

optional emissiveMap?: Texture3D

Defined in: render3d/material.ts:88

Inherited from

Emissive3D.emissiveMap


envMap?

optional envMap?: Texture3D

Defined in: render3d/material.ts:75

Reflected environment. Usually inherited from the scene's environment.

Inherited from

CommonMaps3D.envMap


envMapIntensity?

optional envMapIntensity?: number

Defined in: render3d/material.ts:77

Multiplies light received from the environment.

Inherited from

CommonMaps3D.envMapIntensity


flatShading?

optional flatShading?: boolean

Defined in: render3d/material.ts:165

Structural.


key?

optional key?: string

Defined in: render3d/material.ts:54

Explicit reconciler identity — see Transform3D.key.

Inherited from

MaterialCommon3D.key


lightMap?

optional lightMap?: Texture3D

Defined in: render3d/material.ts:79

Baked light added on top, unaffected by scene lights.

Inherited from

CommonMaps3D.lightMap


lightMapIntensity?

optional lightMapIntensity?: number

Defined in: render3d/material.ts:80

Inherited from

CommonMaps3D.lightMapIntensity


map?

optional map?: Texture3D

Defined in: render3d/material.ts:60

Base colour (albedo). Sampled as sRGB.

Inherited from

CommonMaps3D.map


normalMap?

optional normalMap?: Texture3D

Defined in: render3d/material.ts:67

Tangent-space normals. Sampled as linear data, not colour.

Inherited from

CommonMaps3D.normalMap


normalScale?

optional normalScale?: number | Vector2

Defined in: render3d/material.ts:69

Normal strength, per axis. A number applies to both.

Inherited from

CommonMaps3D.normalScale


opacity?

optional opacity?: number

Defined in: render3d/material.ts:19

0–1. Needs transparent to actually show through. Free to animate.

Inherited from

MaterialCommon3D.opacity


params?

optional params?: Record<string, unknown>

Defined in: render3d/geometry.ts:14

Inherited from

MaterialCommon3D.params


polygonOffset?

optional polygonOffset?: boolean

Defined in: render3d/material.ts:47

Nudge depth to break z-fighting between coplanar surfaces.

Inherited from

MaterialCommon3D.polygonOffset


polygonOffsetFactor?

optional polygonOffsetFactor?: number

Defined in: render3d/material.ts:48

Inherited from

MaterialCommon3D.polygonOffsetFactor


polygonOffsetUnits?

optional polygonOffsetUnits?: number

Defined in: render3d/material.ts:49

Inherited from

MaterialCommon3D.polygonOffsetUnits


shininess?

optional shininess?: number

Defined in: render3d/material.ts:162

Highlight tightness. Higher is smaller and sharper.


side?

optional side?: Side3D

Defined in: render3d/material.ts:32

Structural. Which faces to rasterize. Default "front".

Inherited from

MaterialCommon3D.side


specular?

optional specular?: Color

Defined in: render3d/material.ts:160


specularMap?

optional specularMap?: Texture3D

Defined in: render3d/material.ts:163


toneMapped?

optional toneMapped?: boolean

Defined in: render3d/material.ts:40

Structural. Apply the scene's tone mapping. Default true.

Inherited from

MaterialCommon3D.toneMapped


transparent?

optional transparent?: boolean

Defined in: render3d/material.ts:28

Structural. Opt into alpha blending. Off by default because blended surfaces must be depth-sorted, which costs correctness at intersections — prefer alphaTest for cutouts like foliage.

Inherited from

MaterialCommon3D.transparent


type

type: "phong"

Defined in: render3d/material.ts:158


vertexColors?

optional vertexColors?: boolean

Defined in: render3d/material.ts:38

Structural. Read per-vertex colours from the geometry's color buffer.

Inherited from

MaterialCommon3D.vertexColors


visible?

optional visible?: boolean

Defined in: render3d/material.ts:21

Hide without removing. Free to animate.

Inherited from

MaterialCommon3D.visible


wireframe?

optional wireframe?: boolean

Defined in: render3d/material.ts:34

Structural. Draw edges only.

Inherited from

MaterialCommon3D.wireframe