Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Add Ergonomic API for interacting with component updates #67

@jamiebrynes7

Description

@jamiebrynes7

Constructing component updates is pretty verbose right now:

I.e. -

improbable::PositionUpdate {
                    coords: Some(improbable::Coordinates {
                        x: angle.sin() * 10.0,
                        y: 0.0,
                        z: angle.cos() * 10.0,
                    }),
                },

vs

improbable::PositionUpdate::new()
	.with_coords(improbable::Coordinates { 
		x: angle.sin() * 10.0, 
		y: 0.0, 
		z: angle.cos() * 10.0,
	})

This problem will get worse if you have a component with many fields.

As a sidenote - constructors for generated types would help as well :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨ featureNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions