three_dart
Dart 3D 库。一个易于使用、轻量级、跨平台、通用 3D 库。
three.js 的 Dart 重写。Flutter 的 3D。基于 flutter_gl
支持 Web、iOS、Android、macOS、Windows
Linux TODO,需要 flutter_gl 支持
three.js r138
Flutter web 上的示例演示 https://wasabia.github.io/three_dart_example/
入门
首先,遵循 flutter_gl 的用法 flutter_gl
待办事项
用法
查看示例项目
camera = new THREE.PerspectiveCamera( 40, 1, 0.1, 10 );
camera.position.z = 3;
scene = new THREE.Scene();
camera.lookAt(scene.position);
scene.background = THREE.Color(1.0, 1.0, 1.0);
scene.add( new THREE.AmbientLight( 0x222244, null ) );
var geometryCylinder = new THREE.CylinderGeometry( 0.5, 0.5, 1, 32 );
var materialCylinder = new THREE.MeshPhongMaterial( { "color": 0xff0000 } );
mesh = new THREE.Mesh( geometryCylinder, materialCylinder );
scene.add( mesh );
示例
cd example && flutter run
待办事项
- 单元测试
- 更多示例
- README && 文档
- 等等…
问题
提交任何问题、错误或功能请求。
贡献
请提交 Pull request!
库和插件
https://github.com/wasabia/three_dart_jsm
https://github.com/wasabia/opentype
https://github.com/wasabia/typr_dart
