Skip to main content

Class: GLTFWriter2

Asset-Management.GLTFWriter2

Hierarchy​

  • GLTFWriter

    ↳ GLTFWriter2

Constructors​

constructor​

• new GLTFWriter2()

Inherited from​

GLTFExporter.Utils.GLTFWriter.constructor

Methods​

serializeUserData​

▸ serializeUserData(object, objectDef): void

Parameters​

NameType
objectObject3D<Object3DEventMap> | Material<MaterialEventMap> | BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>
objectDefany

Returns​

void

Overrides​

GLTFExporter.Utils.GLTFWriter.serializeUserData


processObjects​

▸ processObjects(objects): void

Parameters​

NameType
objectsObject3D<Object3DEventMap>[]

Returns​

void

Overrides​

GLTFExporter.Utils.GLTFWriter.processObjects


processMaterial​

▸ processMaterial(material): null | number

Checks for shader material and does the same thing...

Parameters​

NameType
materialMaterial<MaterialEventMap>

Returns​

null | number

Overrides​

GLTFExporter.Utils.GLTFWriter.processMaterial


processImageBlob​

▸ processImageBlob(blob, texture): any

Same as processImage but for image blobs

Parameters​

NameType
blobBlob
textureTexture<TextureEventMap>

Returns​

any


processSampler​

▸ processSampler(map): number

Parameters​

NameType
mapTexture<TextureEventMap>

Returns​

number

Overrides​

GLTFExporter.Utils.GLTFWriter.processSampler


processTexture​

▸ processTexture(map): number

Parameters​

NameType
mapTexture<TextureEventMap>

Returns​

number

Overrides​

GLTFExporter.Utils.GLTFWriter.processTexture


processImage​

▸ processImage(image, format, flipY, mimeType?): number

Parameters​

NameTypeDefault value
imageanyundefined
formatnumberundefined
flipYbooleanundefined
mimeTypestring'image/png'

Returns​

number

Overrides​

GLTFExporter.Utils.GLTFWriter.processImage


processImageUri​

▸ processImageUri(image, uri, flipY, mimeType?): any

Used in GLTFWriter2.processTexture for rootPath. Note that this does not check for options.embedUrlImages, it must be done separately.

Parameters​

NameTypeDefault value
imageanyundefined
uristringundefined
flipYbooleanundefined
mimeTypestring'image/png'

Returns​

any

Properties​

_defaultMaterial​

• Protected _defaultMaterial: MeshStandardMaterial<MaterialEventMap>