three-dart-materials
Installation
SKILL.md
three_dart Materials
Iron Law
Always set material.needsUpdate = true after changing maps or transparency at runtime — three_dart caches the compiled shader program and will not recompile without it.
Material Types
import 'package:three_dart/three_dart.dart' as THREE;
// PBR — use for realistic rendering (recommended default)
final standard = THREE.MeshStandardMaterial({
'color': 0xff6600,
'roughness': 0.5, // 0 = mirror, 1 = fully rough
'metalness': 0.0, // 0 = non-metal, 1 = metallic
});