Search packages, repositories and app categories

Package detailsv12.0.7

util_simple_3d

Utility for Sp3dObj. Includes 3D geometry generation utility and more.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
175
Likes
28
Pub points
160

Install package

flutter pub add util_simple_3d

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A utility package for Sp3dObj that provides tools for generating 3D geometry and supporting 3D operations. Designed to simplify the creation and manipulation of 3D models within Flutter applications. Offers foundational utilities for developers working on cross-platform 3D experiences across Android, iOS, Web, macOS, Windows, and Linux. The package enhances integration with 3D rendering workflows by delivering reusable geometry functions and helper methods.

Use cases

  • Creating 3D models programmatically
  • Integrating 3D assets in Flutter apps
  • Building interactive 3D interfaces
  • Supporting cross-platform 3D rendering
  • Simplifying geometry generation
  • Enhancing 3D visualization workflows

Key features

  • 3D geometry generation utilities
  • Cross-platform 3D support
  • Integration with Sp3dObj
  • Reusable geometric building blocks
  • Lightweight and focused design
  • Open-source codebase

Suitable for

  • Flutter developers working on 3D projects
  • Apps requiring dynamic 3D content
  • Prototyping 3D visualizations
  • Educational or experimental 3D applications
  • Developers using Sp3dObj
  • Teams targeting multiple platforms

Considerations

  • Requires familiarity with 3D concepts
  • Limited to geometry generation tasks
  • Dependent on Sp3dObj for full functionality
  • Not intended for complex 3D scene management
  • Best suited for simple to moderate 3D needs
  • No built-in animation or physics support

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

util_simple_3d

(en)Japanese ver is here.
(ja)日本語版はここにあります。

Overview

This package is a set of utilities for Sp3dObj (simple_3d package). It currently includes utilities that make it easy to generate geometry and a simple set of materials.

simple_3d package

Usage

Create Geometry
import 'package:simple_3d/simple_3d.dart';
import 'package:util_simple_3d/util_simple_3d.dart';

Sp3dObj obj = UtilSp3dGeometry.capsule(50, 250);
Use Default Material
import 'package:simple_3d/simple_3d.dart';
import 'package:util_simple_3d/util_simple_3d.dart';

Sp3dObj obj = UtilSp3dGeometry.cube(200,200,200,4,4,4);
obj.materials.add(FSp3dMaterial.green.deepCopy());
obj.fragments[0].faces[0].materialIndex=1;

Geometry type

Tile
Sp3dObj obj = UtilSp3dGeometry.tile(200, 200, 4, 4);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);

Tile

Cube
Sp3dObj obj = UtilSp3dGeometry.cube(200,200,200,4,4,4);
obj.materials.add(FSp3dMaterial.green.deepCopy());
obj.fragments[0].faces[0].materialIndex=1;
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 0, 255);
obj.rotate(Sp3dV3D(1,1,0).nor(), 30*3.14/180);

Cube

Circle
Sp3dObj obj = UtilSp3dGeometry.circle(100, fragments: 20);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);

Circle

Cone
Sp3dObj obj = UtilSp3dGeometry.cone(100, 200);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);
obj.rotate(Sp3dV3D(1, 0, 0), -100*3.14/180);
obj.move(Sp3dV3D(0, -100, 0));

Cone

Pillar
Sp3dObj obj = UtilSp3dGeometry.pillar(50, 50, 200);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);
obj.rotate(Sp3dV3D(1, 0, 0), -120*3.14/180);
obj.move(Sp3dV3D(0, -100, 0));

Pillar

Sphere
Sp3dObj obj = UtilSp3dGeometry.sphere(100);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);

Sphere

Capsule
Sp3dObj obj = UtilSp3dGeometry.capsule(50,200);
obj.materials[0] = FSp3dMaterial.grey.deepCopy()..strokeColor=Color.fromARGB(255, 0, 255, 0);
obj.move(Sp3dV3D(0, 100, 0));

Capsule

Wire frame
Sp3dObj obj = UtilSp3dGeometry.cube(200,200,200,4,4,4);
obj.materials.add(FSp3dMaterial.greenWire.deepCopy());
obj.fragments[0].faces[0].materialIndex = 1;
obj.materials[0] = FSp3dMaterial.blueWire.deepCopy();
obj.rotate(Sp3dV3D(-0.2,0.5,0).nor(), 15*3.14/180);

Wire frame

Common parts

Coordinate arrows and mesh creation
List<Sp3dObj> objs = UtilSp3dCommonParts.coordinateArrows(255);
objs.addAll(UtilSp3dCommonParts.worldMeshes(255));

Coordinate arrows and world meshes

Support

If you need paid support for any reason, please contact my company.
This package is developed by me personally, but may be supported via the company.
SimpleAppli Inc.

About future development

Some geometry may be added in the future.

About Naming rule in this package

Utilities are prefixed with "Util".
Static field definition files are prefixed with "F".
These are set up for easy calling from the IDE.

About version control

The C part will be changed at the time of version upgrade.

  • Changes such as adding variables, structure change that cause problems when reading previous files.
    • C.X.X
  • Adding methods, etc.
    • X.C.X
  • Minor changes and bug fixes.
    • X.X.C

License

This software is released under the MIT License, see LICENSE file.

Trademarks

  • “Dart” and “Flutter” are trademarks of Google LLC.
    This package is not developed or endorsed by Google LLC.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package