You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however when trying to do the same using the latest version, the property BaseColor is not available on the object XCAFDoc_VisMaterialPBR as described in the example. Typescript gives an error and bypassing typescript (by setting (visMatPbr as any).BaseColor) does generate an error at runtime.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi 👋🏻,
In this basic example https://ocjs.org/docs/examples/ocjs-logo, color is assigned to the geometry in the last step.
however when trying to do the same using the latest version, the property
BaseColor
is not available on the objectXCAFDoc_VisMaterialPBR
as described in the example. Typescript gives an error and bypassing typescript (by setting(visMatPbr as any).BaseColor
) does generate an error at runtime.Also, other examples in the
starter-template
directory does not use material https://github.com/donalffons/opencascade.js/blob/master/starter-templates/ocjs-create-react-app-typescript/src/App.tsx.How can I apply color to my model? What is the workaround?
Thanks!
Sam.
Beta Was this translation helpful? Give feedback.
All reactions