Can HOOPS communicator customize the style of the cube

If I want to make the cube like the picture below, are there any methods I can use in HOOPS communicator?

1 Like

I have previously asked a corresponding question in a post,Can HOOPS communicator customize the style of the cube? but I don’t quite understand how to do it. Can you provide a more detailed answer?

Hello @619944680,

As mentioned in this previous post, a good starting reference point is reviewing the function _createGeometry which is part of CustomNavCube.js.

In terms of getting the geometry of the cube to your liking, you can look at _createCube which is also part of the aforementioned JavaScript file. Based on the screenshots you provided, your preferred cube shape is a truncated cube which has the corners of the cube bevelled such that the face of the cube is octogonal and the corners being triangular. So you will have to modify _createCube accordingly to create this geometric shape.

Hope this helps,

1 Like

Hello Tino,
I have already modified the texture of the cube according to my requirements.
But I don’t know how to change the shape of the cube to rounded corners.
Because most of the variables in the function _createGeometry and _createCube are replaced with letters, which makes the code difficult to read. Can you give me a code example?