levelEditor/level_editor library

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.
changeColor(BuildContext context, Color selectedColor) Future<Color?>
createObject({required SelectedType type, Vector3? position, Vector3? rotation, Vector3? scale, required Size size, required String name, required int layer, required int imageLocation, Color? color, List<Offset>? textcoords, Rect? textureRect}) Object
fromColor(Color color) → Vector3
Convert Color to Vector3
getImagePixels(Image image) Future<Uint32List>
loadImageFromAsset(String fileName, {bool isAsset = true, bool makeGray = false}) Future<Image>
load an image from asset
loadTexture(Material? material, String basePath, {bool isAsset = true}) Future<MapEntry<String, Image>?>
load texture from asset
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
toColor(Vector3 v, [double opacity = 1.0]) Color
Convert Vector3 to Color
toVector2(Offset? value) → Vector2
Convert Offset to Vector2