LittleJS 1.28.0

GLTF

GLTFPart

GLTFPart - One primitive of a model, placed where its node put it

Constructor

new GLTFPart(name)gltf.js:39

Make a part, as the loader does for each primitive

name string

@param {Mesh} mesh @param {Color} color @param {TextureInfo|undefined} textureInfo @param {boolean} transparent

Members

Members

The material's base color, to draw the mesh tinted with

emissiveMap : TextureInfo|undefinedgltf.js:73

The material's emissive map, or a white texture when it has an emissiveFactor and no texture, so it glows all over

emissiveMapColor : Colorgltf.js:75

The emissiveFactor, which multiplies the emissive map

The geometry in model space, the node transforms applied, with the vertex colors the file had; a node resting at scale 0 is applied at scale 1 there, so an animation can grow it from nothing

name : stringgltf.js:46

The node's name, or its mesh's

node : numbergltf.js:61

The node it came from, which an animation moves it with

normalMap : TextureInfo|undefinedgltf.js:67

The material's normal map, drawn with the base color texture's uvs

normalScale : numbergltf.js:69

The normal map's strength, its scale in the file

pixelated : booleangltf.js:59

Its texture's sampler asks for nearest filtering, hard edged pixels, as pixel art and voxel tools export; the object createObject makes draws it pixelated

roughness : numbergltf.js:78

The material's roughnessFactor, 0 a mirror to 1 matte, 1 when it has none as the format says; the object createObject makes takes it as its roughness, which sets its shininess

skin : GLTFSkin|undefinedgltf.js:82

For a skinned mesh, what bends it: mesh is its resting pose, and the object createObject makes bends a copy of its own to each pose

textureInfo : TextureInfo|undefinedgltf.js:54

The material's base color texture, undefined without one or without WebGL

transparent : booleangltf.js:56

The material blends or is glass, so the part belongs in the transparent stage

unlit : booleangltf.js:64

The material is unlit (KHR_materials_unlit), its own color with no shading; the object createObject makes draws it with emissive 1

vertexSource : Array<number>|undefinedgltf.js:85