Skip to main content

Class: MaterialPreviewGenerator

Extra-Helpers.MaterialPreviewGenerator

Implements

  • IDisposable

Constructors

constructor

new MaterialPreviewGenerator(viewer)

Parameters

NameType
viewerViewerApp

Defined in

webgi/src/helpers/threejs/MaterialPreviewGenerator.ts:12

Properties

viewer

viewer: ViewerApp


shapes

shapes: Record<string, Mesh<BufferGeometry<NormalBufferAttributes, Event, string>, Material<Event, string> | Material<Event, string>[]>>

Defined in

webgi/src/helpers/threejs/MaterialPreviewGenerator.ts:34

Methods

dispose

dispose(): void

Returns

void

Implementation of

IDisposable.dispose

Defined in

webgi/src/helpers/threejs/MaterialPreviewGenerator.ts:27


generate

generate(material, shape?): string

Parameters

NameTypeDefault value
materialIMaterial<any>undefined
shapestring'sphere'

Returns

string

Defined in

webgi/src/helpers/threejs/MaterialPreviewGenerator.ts:41