setUserObjectColors conflicts and ViewerAPI2

@alex hello,long time no see.Everything is fine?
Can I use the ‘Categorize’ function in api2.0 now?
Moreover, I discovered some new problems. When I use the ‘setUserObjectColors’ method to change the color of the model in ‘api2.0’, there will be some problems. It seems to conflict with the ‘select’ event of the model. What is the problem?

Hi @zm1072223921

Can you please describe the issues you’re seeing with setUserObjectColors ? Something I can reproduce would be very helpful

Cheers

The problem with ‘setUserObjectColors’ is that when I try to call this method in api2.0, it conflicts with the ‘select’ event. I tried to solve this problem myself, and everything seems to be working fine now.
But back to another question, the ‘Categorize’( Categorize.ts — nodebox — CodeSandbox) method you provided me before, I still can’t use it in api-2.0 version, because api-2.0 does not export ‘SpeckleTextMaterial’, ‘SpeckleText’, ‘NodeRenderView’, I tried manually exporting it in the viewer and then repackaging it, but I still couldn’t achieve this effect.

Hi,

Pushed a commit to alex/API2.0 that exports those now.

However do keep in mind that the viewer’s API 2.0 is in it’s alpha stage, so you can expect changes in the near future, especially when it comes to what/how the viewer exposes types