OptionalnameRules?: IfcNameRule[]Name-pattern rules tested against dataObject.name, in order.
First match wins, picking the rule's painter-table key.
Defaults to DEFAULT_IFC_NAME_RULES (covers
vegetation-style proxy elements). Pass an explicit array to
replace the defaults; spread them ([...DEFAULT_IFC_NAME_RULES, ...mine]) to extend.
OptionalonProgress?: (p: LoaderProgress) => voidOptional progress callback fired between phases and at
intervals during the per-object loops. Same LoaderProgress
shape the SDK's loaders use, so a UI built for one is
directly reusable for the other.
Optionalpainters?: Record<string, IfcPainterEntry>Per-IFC-type painter overrides, merged into DEFAULT_IFC_PAINTERS. Pass an empty object to start from the defaults; pass a populated object to override or add types.
OptionalpropertyRules?: IfcPropertyRule[]Property-predicate rules inspecting dataObject.propertySets,
in order. First match wins. Use to discriminate same-IFC-type
objects by their PropertySet contents — e.g. routing
Pset_WallCommon.IsExternal === true walls to a different
painter than interior walls.
Defaults to an empty list. The getDataProperty helper makes predicates concise.
OptionalresolveIfcType?: (objectId: string, dataObject: DataObject) => stringOptional resolver returning the painter-table key for a given
SceneObject. Runs first — when it returns a defined string the
name-rule and property-rule resolvers below are skipped. Use this
for free-form routing decisions that don't fit a regex on name
or a property predicate.
Returning undefined defers to the IfcNameRule list,
then to the IfcPropertyRule list, then to
dataObject.type.
Optionalsignal?: AbortSignalOptional AbortSignal. When aborted, the function throws
AbortError from the next yieldToHost checkpoint. Mid-abort
state is not rolled back — meshes already destroyed are
gone, materials already created stay; the caller should
recover by re-running applyIFCMaterials or
removeAttachedMaterials.
OptionaltextureSize?: numberPainter texture size in pixels (square). Default 256.
OptionaluvScale?: numberApproximate metres of geometry per texture repeat. Forwarded to
each created SceneMaterial as triplanarScale, which the
renderer's triplanar texture-sampling fallback uses to scale
world-space UVs on UV-less geometry (typical for IFC). Smaller
values tile the texture more times across each surface.
Default 1.0.
Walks the
SceneObjects of an already-populatedSceneModel, looks up each one's IFC type in the matchingDataModel, and attaches a procedurally-paintedSceneMaterialto everySceneMeshof that object via the mesh'smaterialIdsetter. Materials are created lazily — one sharedSceneMaterialper IFC type — and added to the sameSceneModelalongside the threeSceneTextures (colour, normal, metallic-roughness) they reference.The painted materials all carry textures; the SceneGeometries coming out of an IFC loader carry no UVs. The renderer detects the mismatch and dispatches those meshes to its triplanar shader variant, which derives sample coordinates from world position scaled by the material's
triplanarScale. Per-vertex smooth normals are auto-filled insideSceneModel.createGeometry, so painted IFC meshes route through the smooth-shaded PBR path without any post-construction geometry mutation.Mutation-only — no mesh / object recreation. Whether the renderer picks the new material up at render time depends on whether it subscribes to the SceneModel's mesh-material-changed events.
Expectations:
DataObject.id === SceneObject.idfor matching pairs (the convention every loader the SDK ships produces).