Loads a .bb3d mesh file and returns an asset handle (0 on failure).
2D Overlay
Parameters & Returns
Parameters
filePathString
Returns
Int
Quick Summary
Loads a .bb3d mesh file and returns an asset handle (0 on failure).
Technical Exegesis...
Loads a .bb3d mesh - the compact format produced by the IDE's "GLB to .bb3d Mesh Converter" - and returns a handle. A mesh handle is an ASSET, like an image: the runtime just STORES the geometry (vertices, faces, per-corner UVs, and any morph-animation frames/clips); YOUR code does all the drawing. The mesh's texture is auto-loaded and its image handle is available via b2dMeshTexture.
Loads a .bb3d mesh - the compact format produced by the IDE's "GLB to .bb3d Mesh Converter" - and returns a handle. A mesh handle is an ASSET, like an image: the runtime just STORES the geometry (vertices, faces, per-corner UVs, and any morph-animation frames/clips); YOUR code does all the drawing. The mesh's texture is auto-loaded and its image handle is available via b2dMeshTexture. Typical use: query the counts (b2dMeshVertCount / b2dMeshFaceCount), cache the faces once (b2dMeshFaceCorners / b2dMeshFaceVert / b2dMeshFaceU / b2dMeshFaceV), then each frame pull the vertex positions (b2dMeshCopyVertsX/Y/Z), project them yourself and draw each face with b2dDrawImageQuadDepthUV. For animation, call b2dMeshAnimate before pulling the positions. Returns 0 if the file is missing or invalid.
Example
Example.bam
Global mesh:Int = b2dLoadMesh("Media/dino.bb3d")
Global tex:Int = b2dMeshTexture(mesh)
Global nv:Int = b2dMeshVertCount(mesh)
Global nf:Int = b2dMeshFaceCount(mesh)