Missing annotation for MeshBuilder.CreateBox options,`wrap`, `topBaseAt` and `bottomBaseAt`?

According to this useful article Apply Material to Individual Faces - Babylon.js Documentation

there’re 3 more options added since v4.0

  • wrap?: boolean
  • topBaseAt?: 0|1|2|3
  • bottomBaseAt?: 0|1|2|3

but they are missing annotation (e.g. Babylon.js Playground)


and so… my next question is what 0|1|2|3 is actually referring to?

Thanks.

https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors#face-numbers

Try out this PG given in the docs https://www.babylonjs-playground.com/#ICLXQ8#4

and try the values 0|1|2|3 for toBaseAt and bottomBaseAt on line 41. I think you should see the effect.

2 Likes

I’ve read the doc link you mentioned, and i just reproduced it in TS

Babylon.js Playground
(at line 19)

to show that the latest declaration file (.d.ts) is lack of those typing annotation


I understand the effect of topBaseAt and bottomBaseAt, what I’m curious about is that

Are those numbers 0|1|2|3 referring to Mesh.FRONTSIDE, Mesh.BACKSIDE, Mesh.RIGHT and Mesh.LEFT correspondingly?

Thanks for ur help :beers:

No they relate to tiling patterns on planes and boxes https://doc.babylonjs.com/how_to/tiled

Scroll down that page to alignVertical

Hope that clears it up

1 Like

Thanks @JohnK, i finally solved below puzzle by using wrap plus reflect uv coordinate.


PG

1 Like