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
728 stars 287 forks source link

Implement PerformanceModel setPickable()and setColorize() #14

Closed xeolabs closed 5 years ago

xeolabs commented 5 years ago

These are not implemented yet, so currently PerformanceModel#setPickable() and PerformanceModel#setColorize() are just empty methods.

PerformanceModel is used as the default scene representation within BIMServerLoaderPlugin and GLTFLoaderPlugin. If you need these two functions for Entity's loaded by these plugins, then a workaround (for non-huge models) is to load models with performance: false, which will internally use the xeokit's scene graph representation, which has Node and Mesh Entity types which support pickable and colorize.

 const bimServerLoader = new BIMServerLoaderPlugin(viewer, {
       bimServerClient: bimServerClient
});

const model = bimServerLoader.load({
     id: "myModel",                  
      poid: ...,
      roid: ....,
      schema:....,
     performance: false    // <<--------------------- Add this   
});
xeolabs commented 5 years ago

Fixed in https://github.com/xeokit/xeokit-sdk/issues/12