Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion web-ifc-three/src/IFC/components/IFCParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ export class IFCParser implements ParserAPI {
return;
}

const col = new Color(color.x, color.y, color.z);
// Assume RGB components are in sRGB-Rec709-D65 colorspace, and specify
// this so three.js can convert if THREE.ColorManagement APIs are enabled.
// TODO: https://github.com/three-types/three-ts-types/issues/342
const col = new Color().setRGB(color.x, color.y, color.z, 'srgb');
const material = new MeshLambertMaterial({ color: col, side: DoubleSide });
material.transparent = color.w !== 1;
if (material.transparent) material.opacity = color.w;
Expand Down