b2dLoadMesh

Loads a .bb3d mesh file and returns an asset handle (0 on failure).

2D Overlay

Parameters & Returns

Parameters

filePath String

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.

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)