bevy

Module prelude

source
Expand description

use bevy::prelude::*; to import common components, bundles, and plugins.

Modules§

  • Adaptors used by the Curve API for transforming and combining curves together.
  • Core data structures to be used internally in Curve implementations, encapsulating storage and access patterns for reuse.
  • Module containing different easing functions to control the transition between two values and the EasingCurve struct to make use of them.
  • The Interval type for nonempty intervals used by the Curve trait.
  • Iterable curves, which sample in the form of an iterator in order to support Vec-like output whose length cannot be known statically.
  • This mod re-exports the correct versions of floating-point operations with unspecified precision in the standard library depending on whether the libm crate feature is enabled.
  • Sample-interpolated curves constructed using the Curve API.

Macros§

Structs§

  • Command that adds a child to an entity.
  • Command that pushes children to the end of the entity’s Children.
  • A filter on a component that only retains results the first time after they have been added.
  • An Iterator of Entitys over the ancestors of an Entity.
  • A primitive shape formed by the region between two circles, also known as a ring.
  • The AnyOf query parameter fetches entities with any of the component types included in T.
  • App is the primary API for writing user applications. It automates the setup of a standard lifecycle and provides interface glue for plugins.
  • A Resource storing TypeRegistry for type registrations relevant to a whole app.
  • A primitive representing an arc between two points on a circle.
  • Stores the position data of the input devices of type T.
  • A 2-dimensional bool vector mask.
  • A 3-dimensional bool vector mask.
  • A 4-dimensional bool vector mask.
  • A polygon with a variable number of vertices, allocated on the heap in a Box<[Vec2]>.
  • A series of connected line segments in 2D space, allocated on the heap in a Box<[Vec2]>.
  • A series of connected line segments in 3D space, allocated on the heap in a Box<[Vec3]>.
  • A “press-able” input of type T.
  • A 2D capsule primitive, also known as a stadium or pill shape.
  • A 3D capsule primitive centered on the origin A three-dimensional capsule is defined as a surface at a distance (radius) from a line
  • The curve that results from chaining one curve with another. The second curve is effectively reparametrized so that its start is at the end of the first.
  • A filter on a component that only retains results the first time after they have been added or mutably dereferenced.
  • Struct for building children entities and adding them to a parent entity.
  • Contains references to the child entities of this entity.
  • A circle primitive, representing the set of points some distance from the origin
  • A primitive representing a circular sector: a pie slice of a circle.
  • A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).
  • Command that clears all children from an entity and removes Parent component from those children.
  • A Command queue to perform structural changes to the World.
  • A cone primitive centered on the midpoint between the tip of the cone and the center of its base.
  • A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.
  • A curve with a constant value over its domain.
  • The curve that results from chaining two curves.
  • A convex polygon with N vertices.
  • A spline interpolated continuously across the nearest four control points. The curve does not necessarily pass through any of the control points.
  • A spline composed of a single cubic Bezier curve.
  • A spline interpolated continuously across the nearest four control points, with the position of the curve specified at every control point and the tangents computed automatically. The associated CubicCurve has one segment between each pair of adjacent control points.
  • A collection of CubicSegments chained into a single parametric curve. It is a Curve with domain [0, N], where N is its number of segments.
  • A spline interpolated continuously between the nearest two control points, with the position and velocity of the curve specified at both control points. This curve passes through all control points, with the specified velocity which includes direction and parametric speed.
  • Non-uniform Rational B-Splines (NURBS) are a powerful generalization of the CubicBSpline which can represent a much more diverse class of curves (like perfect circles and ellipses).
  • A segment of a cubic curve, used to hold precomputed coefficients for fast interpolation. It is a Curve with domain [0, 1].
  • A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not required to be the same.
  • A curve that has been reparametrized by another curve, using that curve to transform the sample times before sampling. Curves of this type are produced by Curve::reparametrize_by_curve.
  • A cylinder primitive centered on the origin
  • This plugin group will add all the default plugins for a Bevy application:
  • A SystemParam that stores a buffer which gets applied to the World during apply_deferred. This is used internally by Commands to defer World mutations.
  • An Iterator of Entitys over the descendants of an Entity.
  • An Iterator of Entitys over the descendants of an Entity.
  • Despawns the given entity’s children recursively
  • Despawns the given entity and all its children recursively
  • A normalized vector pointing in a direction in 2D space
  • A normalized vector pointing in a direction in 3D space
  • A normalized SIMD vector pointing in a direction in 3D space.
  • A Curve that is defined by
  • An ellipse primitive, which is like a circle, but the width and height can be different
  • Lightweight identifier of an entity.
  • A list of commands that will be run to modify an entity.
  • Provides mutable access to a single entity and all of its components.
  • A read-only reference to a particular Entity and all of its components.
  • A mutable reference to a particular Entity, and the entire world.
  • Mutably reads events of type T keeping track of which events have already been read by each system allowing multiple systems to read the same events. Ideal for chains of systems that all want to modify the same events.
  • Reads events of type T in order and tracks which events have already been read.
  • Sends events of type T.
  • An event collection that represents the events that occurred within the last two Events::update calls. Events can be written to using an EventWriter and are typically cheaply read using an EventReader.
  • A 3D shape representing an extruded 2D base_shape.
  • Provides read-only access to a set of Resources defined by the contained Access.
  • Provides mutable access to a set of Resources defined by the contained Access.
  • Runs first in the schedule.
  • The fixed timestep game clock following virtual time.
  • Runs first in the FixedMain schedule.
  • The schedule that runs last in FixedMain
  • The schedule that runs after the FixedUpdate schedule, for reacting to changes made in the main update logic.
  • The schedule that contains logic that must run before FixedUpdate.
  • The schedule that contains most gameplay logic, which runs at a fixed rate rather than every render frame. For logic that should run once per render frame, use the Update schedule instead.
  • The curve that results from repeating a curve forever.
  • Adds frame counting functionality to Apps.
  • A curve defined by a function together with a fixed domain.
  • Stores a connected gamepad’s metadata such as the name and its GamepadButton and GamepadAxis.
  • Gamepad settings component.
  • GlobalTransform is an affine transformation from entity-local coordinates to worldspace coordinates.
  • A curve that is the graph of another curve over its parameter space. Curves of this type are produced by Curve::graph.
  • Returns a bool that describes if an entity has the component T.
  • Provides hierarchy functionality to a Bevy app.
  • A rectangle defined by two opposite corners.
  • A 2-dimensional vector.
  • A 3-dimensional vector.
  • A 4-dimensional vector.
  • A SystemInput type which denotes that a System receives an input value of type T from its caller.
  • A SystemInput type which denotes that a System receives a mutable reference to a value of type T from its caller.
  • A SystemInput type which denotes that a System receives a read-only reference to a value of type T from its caller.
  • An unbounded plane in 3D space. It forms a separating surface through the origin, stretching infinitely far
  • Command that inserts a child at a given index of a parent’s children, shifting following children back.
  • A nonempty closed interval, possibly unbounded in either direction.
  • An isometry in two dimensions, representing a rotation followed by a translation. This can often be useful for expressing relative positions and transformations from one position to another.
  • An isometry in three dimensions, representing a rotation followed by a translation. This can often be useful for expressing relative positions and transformations from one position to another.
  • Runs last in the schedule.
  • An infinite line going through the origin along a direction in 2D space.
  • An infinite line going through the origin along a direction in 3D space.
  • A curve that has had its domain changed by a linear reparametrization (stretching and scaling). Curves of this type are produced by Curve::reparametrize_linear.
  • A system local SystemParam.
  • The schedule that contains the app logic that is evaluated each tick of App::update().
  • A curve whose samples are defined by mapping samples from another curve through a given function. Curves of this type are produced by Curve::map.
  • A 2x2 column major matrix.
  • A 3x3 column major matrix.
  • A 4x4 column major matrix.
  • This plugin group will add the minimal plugins for a Bevy application:
  • Unique mutable borrow of an entity’s component or of a resource.
  • Component used to identify an entity. Stores a hash for faster comparisons.
  • Convenient query for giving a human friendly name to an entity.
  • Shared borrow of a non-Send resource.
  • Unique borrow of a non-Send resource.
  • An Observer system. Add this Component to an Entity to turn it into an “observer”.
  • Trigger emitted when a component is added to an entity. See crate::component::ComponentHooks::on_add for more information.
  • Trigger emitted when a component is inserted onto an entity. See crate::component::ComponentHooks::on_insert for more information.
  • Trigger emitted when a component is removed from an entity. See crate::component::ComponentHooks::on_remove for more information.
  • Trigger emitted when a component is replaced on an entity. See crate::component::ComponentHooks::on_replace for more information.
  • A filter that tests if any of the given filters apply.
  • An alternative to Commands that can be used in parallel contexts, such as those in Query::par_iter.
  • A collection of potentially conflicting SystemParams allowed by disjoint access.
  • Holds a reference to the parent entity of this entity. This component should only be present on entities that actually have a parent entity.
  • The curve that results from chaining a curve with its reversed version. The transition point is guaranteed to make no jump.
  • An unbounded plane in 2D space. It forms a separating surface through the origin, stretching infinitely far
  • A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
  • A polygon with N vertices.
  • A series of connected line segments in 2D space.
  • A series of connected line segments in 3D space.
  • System parameter that works very much like Query except it always contains at least one matching entity.
  • The schedule that runs once after Startup.
  • The schedule that contains logic that must run after Update. For example, synchronizing “local transforms” in a hierarchy to “global” absolute transforms. This enables the PostUpdate transform-sync system to react to “local transform” changes in Update without the Update systems needing to know about (or add scheduler dependencies for) the “global transform sync system”.
  • The schedule that runs before Startup.
  • The schedule that contains logic that must run before Update. For example, a system that reads raw keyboard input OS events into an Events resource. This enables systems in Update to consume the events from the Events resource without actually knowing about (or taking a direct scheduler dependency on) the “os-level keyboard event system”.
  • A quaternion representing an orientation.
  • System parameter that provides selective access to the Component data stored in a World.
  • Builder struct to create QueryState instances at runtime.
  • Provides scoped access to a World state according to a given QueryData and QueryFilter.
  • A collection of RationalSegments chained into a single parametric curve. It is a Curve with domain [0, N], where N is the number of segments.
  • A segment of a rational cubic curve, used to hold precomputed coefficients for fast interpolation. It is a Curve with domain [0, 1].
  • An infinite half-line starting at origin and going in direction in 2D space.
  • An infinite half-line starting at origin and going in direction in 3D space.
  • Real time clock representing elapsed wall clock time.
  • A rectangle defined by two opposite corners.
  • A rectangle primitive, which is like a square, except that the width and height can be different
  • Shared borrow of an entity’s component with access to change detection. Similar to Mut but is immutable and so doesn’t require unique access.
  • A struct used to operate on reflected Component trait of a type.
  • A struct used to provide the default value of a type.
  • A struct used to deserialize reflected instances of a type.
  • Type data that represents the FromReflect trait and allows it to be used dynamically.
  • A struct used to operate on the reflected FromWorld trait of a type.
  • A struct used to operate on reflected Resource of a type.
  • A struct used to serialize reflected instances of a type.
  • A polygon centered on the origin where all vertices lie on a circle, equally far apart.
  • Command that removes children from an entity, and removes these children’s parent.
  • Command that removes the parent of an entity, and removes that entity from the parent’s Children.
  • A SystemParam that yields entities that had their T Component removed or have been despawned with it.
  • A curve whose sample space is mapped onto that of some base curve’s before sampling. Curves of this type are produced by Curve::reparametrize.
  • The curve that results from repeating a curve N times.
  • Command that clear all children from an entity, replacing them with the given children.
  • Shared borrow of a Resource.
  • Unique mutable borrow of a Resource.
  • The curve that results from reversing another.
  • A rhombus primitive, also known as a diamond shape. A four sided polygon, centered on the origin, where opposite sides are parallel but without requiring right angles.
  • A counterclockwise 2D rotation.
  • Runs the FixedMain schedule in a loop according until all relevant elapsed time has been “consumed”.
  • A curve that is defined by neighbor interpolation over a set of evenly-spaced samples, interpolated automatically using a particularly well-behaved interpolation.
  • A curve that is defined by explicit neighbor interpolation over a set of evenly-spaced samples.
  • A collection of systems, and the metadata and executor needed to run them in a certain order under certain conditions.
  • Resource that stores Schedules mapped to ScheduleLabels excluding the current running Schedule.
  • A segment of a line going through the origin along a direction in 2D space.
  • A segment of a line going through the origin along a direction in 3D space.
  • System parameter that provides access to single entity’s components, much like Query::single/Query::single_mut.
  • The schedule that contains scene spawning.
  • A sphere primitive, representing the set of all points some distance from the origin
  • The schedule that runs once when the app starts.
  • A secondary application with its own World. These can run independently of each other.
  • Helper for configuring and creating the default task pools. For end-users who want full control, set up TaskPoolPlugin
  • Setup of default task pools: AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool.
  • A tetrahedron primitive.
  • A generic clock resource that tracks how much it has advanced since its previous update and since its creation.
  • Tracks elapsed time. Enters the finished state once duration is reached.
  • A torus primitive, often representing a ring or donut shape The set of points some distance from a circle centered at the origin
  • A touch input event.
  • A collection of Touches.
  • Describe the position of an entity. If the entity has a parent, the position is relative to its parent position.
  • TransformBundleDeprecated
    A Bundle of the Transform and GlobalTransform Components, which describe the position of an entity.
  • System parameter for computing up-to-date GlobalTransforms.
  • The base plugin for handling Transform components
  • A triangle in 2D space
  • A 3D triangle primitive.
  • Type containing triggered Event information for a given run of an Observer. This contains the Event data itself. If it was triggered for a specific Entity, it includes that as well. It also contains event propagation information. See Trigger::propagate for more information.
  • Registration of default types to the TypeRegistry resource.
  • A rectangle defined by two opposite corners.
  • A 2-dimensional vector.
  • A 3-dimensional vector.
  • A 4-dimensional vector.
  • A curve that is defined by interpolation over unevenly spaced samples, interpolated automatically using a particularly well-behaved interpolation.
  • A curve that is defined by interpolation over unevenly spaced samples with explicit interpolation.
  • The schedule that contains any app logic that must run once per render frame. For most gameplay logic, consider using FixedUpdate instead.
  • Print a warning for each Entity with a T component whose parent doesn’t have a T component.
  • A 2-dimensional vector.
  • A 3-dimensional vector.
  • A 4-dimensional vector.
  • The virtual game clock representing game time.
  • Filter that selects entities with a component T.
  • Filter that selects entities without a component T.
  • Stores and exposes operations on entities, components, resources, and their associated metadata.
  • Struct for adding children to an entity directly through the World for use in exclusive systems.
  • A curve that combines the output data from two constituent curves into a tuple output. Curves of this type are produced by Curve::zip.

Enums§

  • An event that indicates the App should exit. If one or more of these are present at the end of an update, the runner will end and (maybe) return control to the caller.
  • An error indicating that an end-to-end composition couldn’t be performed because of malformed inputs.
  • An error that happens when creating a ConvexPolygon.
  • Error during construction of CubicNurbs
  • Curve functions over the unit interval, commonly used for easing transitions.
  • Euler rotation sequences.
  • Represents gamepad input types that are mapped in the range [-1.0, 1.0]
  • Represents gamepad input types that are mapped in the range [0.0, 1.0].
  • The key code of a KeyboardInput.
  • An error indicating that a linear reparametrization couldn’t be performed because of malformed inputs.
  • A button on a mouse device.
  • An error indicating that a ping ponging of a curve couldn’t be performed because of malformed inputs.
  • An error indicating that a repetition of a curve couldn’t be performed because of malformed inputs.
  • An error indicating that a resampling operation could not be performed because of malformed inputs.
  • An error indicating that a reversion of a curve couldn’t be performed because of malformed inputs.
  • Set enum for the systems that want to run inside RunFixedMainLoop, but before or after the fixed update logic. Systems in this set will run exactly once per frame, regardless of the number of fixed updates. They will also run under a variable timestep.
  • Specifies Timer behavior.
  • The type of torus determined by the minor and major radii
  • Set enum for the systems relating to transform propagation
  • The winding order for a set of points

Traits§

Functions§

Type Aliases§

Attribute Macros§

  • A macro that automatically generates type data for traits, which their implementors can then register.

Derive Macros§