Joona Aalto

Results 25 comments of Joona Aalto

> I like this, but maybe it would be better to implement this as Add and AddAssign? Not sure, maybe? But it'd probably be `Mul` instead of `Add`. Transformations are...

I ended up adding `transformed_by` and implementing `Mul` for `Transform`. You can now do this: ```rust let transform = Transform::from_xyz(0.0, 2.0, 0.0); // These are equivalent let cuboid = Mesh::from(shape::Box::default()).transformed_by(transform);...

For consistency. You can't do `point * transform` or `point *= transform`, so I don't see why you'd be able to do `mesh * transform`. Whether or not you *should*...

I can use `normalize_or_zero` for it

This could also partially fix some items for #9400 because of the new supported shapes.

Re: #11072 So, the `FooDetails` API currently looks like this: ```rust gizmos.primitive_3d( Cuboid::new(2.0, 1.0, 4.0), Cuboid3dDetails { center: Vec3::Y, rotation: Quat::from_rotation_z(1.2), color: Color::CYAN, ..default() }, ); ``` To me, this...

Closing, as #11072 has been merged :)

I think the 3D arc should be in a separate PR since it's new functionality that isn't related to the primitives, which are the core focus of this PR. But...

Another reason why having `translation` and `rotation` as arguments could be useful: the primitive gizmo method is in a trait, so you could make a generic system or method that...

TLDR of what I'd personally change: - Remove position, rotation, and color from all builders - Change API to `gizmos.primitive_2d(primitive, translation, rotation, color)` - Every primitive is centered at the...