Expand description
§AnvilKit Core
AnvilKit 游戏引擎的核心基础设施库。
本 crate 提供了 AnvilKit 生态系统中使用的基础构建块:
- 数学系统: 变换、几何图形、插值和数学常量
- 时间管理: 帧时间跟踪、计时器和时间工具
- 错误处理: 统一的错误类型和结果处理
§快速开始
use anvilkit_core::prelude::*;
// 创建一个 3D 变换
let transform = Transform::from_xyz(1.0, 2.0, 3.0)
.with_rotation(Quat::from_rotation_y(std::f32::consts::PI / 4.0))
.with_scale(Vec3::splat(2.0));
// 创建时间管理器
let mut time = Time::new();
time.update();
println!("Delta time: {:.3}s", time.delta_seconds());§特性标志
serde: 启用序列化支持debug: 启用调试功能和额外的验证
Re-exports§
Modules§
Structs§
- IVec2
- A 2-dimensional vector.
- IVec3
- A 3-dimensional vector.
- IVec4
- A 4-dimensional vector.
- Mat3
- A 3x3 column major matrix.
- Mat4
- A 4x4 column major matrix.
- Quat
- A quaternion representing an orientation.
- UVec2
- A 2-dimensional vector.
- UVec3
- A 3-dimensional vector.
- UVec4
- A 4-dimensional vector.
- Vec2
- A 2-dimensional vector.
- Vec3
- A 3-dimensional vector.
- Vec4
- A 4-dimensional vector.
Constants§
- BUILD_
INFO - AnvilKit Core 的构建信息
- VERSION
- AnvilKit Core 的版本信息