levelEditor/model/mesh library

Classes

Mesh
Triangle
Vertex

Functions

buildMesh(List<Vector3> vertices, List<Vector3> normals, List<Offset> texcoords, List<Triangle> triangles, Map<String, Material>? materials, List<String> elementNames, List<String> elementMaterials, List<int> elementOffsets, String basePath, bool isAsset) Future<List<Mesh>>
Load the texture image file and rebuild vertices and texcoords to keep the same length.
getImagePixels(Image image) Future<Uint32List>
normalizeMesh(List<Mesh> meshes) List<Mesh>
Scale the model size to 1
normalVector(Vector3 a, Vector3 b, Vector3 c) → Vector3
Calcunormal vector
removeDuplicates(List<Vector3> fromVertices, List<Triangle> fromIndices) Vertex