perfectum_3d 1.0.0
perfectum_3d: ^1.0.0 copied to clipboard
A lightweight, pure Dart software rendering 3D engine for Flutter. Build voxel-based, low-poly casual games without OpenGL or hardware acceleration.
Perfectum 3D Engine #
A pure Dart, software-rendered 3D engine built for Flutter. Perfectum 3D allows you to create voxel-based, retro, and low-poly 3D casual games directly on the CPU, without needing external model files (.obj, .gltf) or complex hardware acceleration bridging.
Features #
- Pure Dart: No native dependencies, C++ bridges, or OpenGL setup required.
- Software Rendering: Uses Sutherland-Hodgman polygon clipping, depth sorting, and flat shading via Flutter's
CustomPainter. - Procedural Friendly: Built-in infinite treadmill logic for dynamic terrain and object pooling.
Performance Warning #
This engine processes matrix math and rasterization entirely on the CPU. Attempting to render high-poly realistic models will cause frame drops. Stick to Voxel/Retro aesthetics.
Quick Start #
import 'package:flutter/material.dart';
import 'package:vector_math/vector_math_64.dart' as math;
import 'package:perfectum_3d/perfectum_3d.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
var cube = BoxGeometry(width: 2.0, height: 2.0, depth: 2.0, color: Colors.green);
return MaterialApp(
home: Scaffold(
body: Scene3D(
camera: Camera3D(position: math.Vector3(0.0, 2.0, 10.0)),
meshes: [cube],
backgroundColor: Colors.lightBlue,
),
),
);
}
}