logo
pub struct MeshStyle { /* private fields */ }
Expand description

MeshStyle component.

Usually accessed through Entity::mesh_style().

Implementations

Creates a MeshStyle entity.

  • name - Just a name, to keep track of the entity during development.

Sets the mesh style parameters to match this mesh style.

Returns a ValueAccessor for the world::MeshStyleFlags of the entity.

Used to set/get the flags.

Returns a ValueAccessor for the diffuse tint of the entity.

Used to set/get/animate the diffuse tint.

Returns a ValueAccessor for the morph target weights of the entity.

Used to set/get/animate weights. There’s a limit to the number of morph targets weights that can be non-zero at once and still affect the mesh. Currently that limit is 4, but it will soon be changed higher.

Returns a ValueAccessor for the material overrides of the entity.

Used to set/get per-instance materials that override the materials of a mesh.

Sets a view-space offset vector for billboarded meshes (if flags contains BILLBOARD).

Lets you compose multiple billboards together at the same worldspace location in “2D”. Useful for things like speech bubbles.

Sets the thickness of the outline displayed if flags contains OUTLINE.

The thickness is specified in in screen space in sort of virtual pixels, of which there are 1024 across the screen. This is so results don’t feel drastically different between an 1024x768 and a 4k screen. A 2px border is generally pretty appropriate as a thin border, and a 5px is a nice thick one.

Sets the color of the outline displayed if flags contains OUTLINE.

Returns a ValueAccessor for the world::MeshVisibilityFlags of the entity.

Used to set/get the flags.

Sets the visibility flags used for the player id set which overwrites Self::visibility_flags.

Used to set/get the visibility flag.

Returns a ValueAccessor for the set of player ids the visibility_player_id_set_flags value should affect.

Used to set/get the player id set.

Sets the mesh style flags used for the player id set which overwrites flags.

Used to set/get the mesh style flag.

The players which we will use Self::mesh_style_player_id_set_flags for instead of [Self::flags].

Default: the empty set (use [Self::flags] for everyone).

Used to set/get the player id set.

Trait Implementations

The type of the component, as a ComponentType enum.

Adopt an Entity, wrap in a component struct.

Get the entity that the component belongs to.

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.