Type Alias OBJLoadingOptions
computeNormals: boolean;
encoding?: string;
importVertexColors: boolean;
invertTextureY: boolean;
invertY: boolean;
materialLoadingFailsSilently: boolean;
optimizeNormals: boolean;
optimizeWithUV: boolean;
skipMaterials: boolean;
useLegacyBehavior: boolean;
UVScaling: WebXRSpatialLayerType;
waitForTextures?: boolean;
}
Properties
compute Normals
Compute the normals for the model, even if normals are present in the file.
Optionalencoding
Defines the character encoding used to decode OBJ and MTL files. Use "auto" to detect UTF-8/UTF-16 and fall back to GB18030, or provide an encoding label supported by TextDecoder. Defaults to "auto".
import Vertex Colors
Include in meshes the vertex colors available in some OBJ files. This is not part of OBJ standard.
invert Texture Y
Invert Y-Axis of referenced textures on load
invert Y
Invert model on y-axis (does a model scaling inversion)
material Loading Fails Silently
When a material fails to load OBJ loader will silently fail and onSuccess() callback will be triggered.
optimize Normals
Optimize the normals for the model. Lighting can be uneven if you use OptimizeWithUV = true because new vertices can be created for the same location if they pertain to different faces. Using OptimizehNormals = true will help smoothing the lighting by averaging the normals of those vertices.
optimize With UV
Defines if UVs are optimized by default during load.
skip Materials
Skip loading the materials even if defined in the OBJ file (materials are ignored).
use Legacy Behavior
Loads assets without handedness conversions. This flag is for compatibility. Use it only if absolutely required. Defaults to false.
UV Scaling
Defines custom scaling of UV coordinates of loaded meshes.
Optionalwait For Textures
Wait for referenced textures to finish loading before completing the OBJ load. When enabled, texture loading failures follow materialLoadingFailsSilently. Defaults to false for backwards compatibility.
Options for loading OBJ/MTL files