Skip to content

Documentation / @sw-file-lib/geometry / AddFaceOptions

Interface: AddFaceOptions ​

ts
interface AddFaceOptions {
  readonly color?: ReadonlyColor;
  readonly flip?: boolean;
  readonly materialIndex?: number;
}

Defined in: builder.ts:91

Options shared by face generation methods.

Extended by ​

Properties ​

PropertyModifierTypeDescription

color?

readonly

ReadonlyColor

Vertex color applied to the generated face. (Range: 0-255)

Defaults to white.

flip?

readonly

boolean

Whether to reverse the winding order of the generated triangles.

Default

ts
false

materialIndex?

readonly

number

Material index assigned to the generated triangles.

0 = opaque, 1 = glass, 2 = additive. Other values are not supported by Stormworks.

Default

ts
0