AryanpurTech / BlueEngine

Blue Engine is a general-purpose and easy-to-use graphics engine written in rust.
Apache License 2.0
341 stars 16 forks source link

Chained setters #66

Closed ElhamAryanpur closed 3 months ago

ElhamAryanpur commented 3 months ago

Object methods should return a &mut reference so that chained setters could work.

example of potential synctax:

engine.objects.get_mut("object name").set_scale(1f32,1f32,1f32).set_position(100f32,100f32,100f32);

This helps lessen the boilerplate and will come at no cost to the current API syntax.

This was originally proposed by @bourbakas on Discord server