xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
715 stars 286 forks source link

IFCObjectDefaults issue #276

Closed barnabasmolnar closed 4 years ago

barnabasmolnar commented 4 years ago

Hey there,

It seems like that the objectDefaults option isn't quite working as described here: https://github.com/xeokit/xeokit-sdk/wiki/Viewing-BIM-Models-Offline#setting-initial-states-for-ifc-types

const model = {
  id: 'example-model',
  src: './xkt/duplex.xkt',
  metaModelSrc: './xkt/duplex.json',
  edges: true,
  objectDefaults: {
    DEFAULT: {
      colorize: [1, 1, 1],
    },
  },
};

This is with the duplex models from the xeokit examples section. The expectation here would be that all elements are white but as you can see on the screenshot above it has these weird pink and grayish colours.

I believe you may have already had an email exchange with @eriadam about this issue but I just wanted to log it here as well with an example.

barnabasmolnar commented 4 years ago

I had a look at https://github.com/xeokit/xeokit-sdk/issues/233 but the issue still seems open as far as the DEFAULT colorize option is concerned.

Tried it with the holter tower model like so:

const holterTower = {
  id: 'holter-tower',
  src: './xkt/HolterTower.xkt',
  metaModelSrc: './xkt/HolterTower.json',
  edges: true,
  objectDefaults: {
    IfcSpace: {
      pickable: false,
      opacity: 0.2,
    },
    DEFAULT: {
      colorize: [1, 1, 1],
    },
  },
};

With the result being:

xeolabs commented 4 years ago

Fixed in b3e6ce3