Expand description
A module that re-exports the entire bevy::prelude as well as TestApp.
Re-exports§
pub use crate::TestApp;
Macros§
- debug
- Constructs an event at the debug level.
- debug_
once - Call
debug!once per call site. - debug_
span - Constructs a span at the debug level.
- error
- Constructs an event at the error level.
- error_
once - Call
error!once per call site. - error_
span - Constructs a span at the error level.
- info
- Constructs an event at the info level.
- info_
once - Call
info!once per call site. - info_
span - Constructs a span at the info level.
- once
- Call some expression only once per call site.
- trace
- Constructs an event at the trace level.
- trace_
once - Call
trace!once per call site. - trace_
span - Constructs a span at the trace level.
- warn
- Constructs an event at the warn level.
- warn_
once - Call
warn!once per call site. - warn_
span - Constructs a span at the warn level.
Structs§
- Added
- A filter on a component that only retains results the first time after they have been added.
- Ancestor
Iter - An
IteratorofEntitys over the ancestors of anEntity. - Annulus
- A primitive shape formed by the region between two circles, also known as a ring.
- AnyOf
- The
AnyOfquery parameter fetches entities with any of the component types included in T. - App
Appis the primary API for writing user applications. It automates the setup of a standard lifecycle and provides interface glue for plugins.- AppType
Registry - A
ResourcestoringTypeRegistryfor type registrations relevant to a whole app. - Arc2d
- A primitive representing an arc between two points on a circle.
- Axis
- Stores the position data of the input devices of type
T. - BVec2
- A 2-dimensional
boolvector mask. - BVec3
- A 3-dimensional
boolvector mask. - BVec4
- A 4-dimensional
boolvector mask. - Boxed
Polygon - A polygon with a variable number of vertices, allocated on the heap
in a
Box<[Vec2]>. - Boxed
Polyline2d - A series of connected line segments in 2D space, allocated on the heap
in a
Box<[Vec2]>. - Boxed
Polyline3d - A series of connected line segments in 3D space, allocated on the heap
in a
Box<[Vec3]>. - Button
Input - A “press-able” input of type
T. - Capsule2d
- A 2D capsule primitive, also known as a stadium or pill shape.
- Capsule3d
- A 3D capsule primitive. A three-dimensional capsule is defined as a surface at a distance (radius) from a line
- Changed
- A filter on a component that only retains results the first time after they have been added or mutably dereferenced.
- Child
Builder - Struct for building children entities and adding them to a parent entity.
- Children
- Contains references to the child entities of this entity.
- Circle
- A circle primitive
- Circular
Sector - A primitive representing a circular sector: a pie slice of a circle.
- Circular
Segment - A primitive representing a circular segment: the area enclosed by the arc of a circle and its chord (the line between its endpoints).
- Clear
Children - Command that clears all children from an entity and removes
Parentcomponent from those children. - Commands
- A
Commandqueue to perform structural changes to theWorld. - Cone
- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.
- Conical
Frustum - A conical frustum primitive. A conical frustum can be created by slicing off a section of a cone.
- CubicB
Spline - A spline interpolated continuously across the nearest four control points. The curve does not pass through any of the control points.
- Cubic
Bezier - A spline composed of a single cubic Bezier curve.
- Cubic
Cardinal Spline - 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
CubicCurvehas one segment between each pair of adjacent control points. - Cubic
Curve - A collection of
CubicSegments chained into a single parametric curve. Has domain[0, N)whereNis the number of attached segments. - Cubic
Hermite - 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.
- Cubic
Nurbs - Non-uniform Rational B-Splines (NURBS) are a powerful generalization of the
CubicBSplinewhich can represent a much more diverse class of curves (like perfect circles and ellipses). - Cubic
Segment - A segment of a cubic curve, used to hold precomputed coefficients for fast interpolation.
Can be evaluated as a parametric curve over the domain
[0, 1). - Cuboid
- A cuboid primitive, more commonly known as a box.
- Cursor
Entered - An event that is sent whenever the user’s cursor enters a window.
- Cursor
Left - An event that is sent whenever the user’s cursor leaves a window.
- Cursor
Moved - An event reporting that the mouse cursor has moved inside a window.
- Cylinder
- A cylinder primitive
- Debug
Name - Convenient query for giving a human friendly name to an entity.
- Default
Plugins - This plugin group will add all the default plugins for a Bevy application:
- Deferred
- A
SystemParamthat stores a buffer which gets applied to theWorldduringapply_deferred. This is used internally byCommandsto deferWorldmutations. - Descendant
Iter - An
IteratorofEntitys over the descendants of anEntity. - Despawn
Children Recursive - Despawns the given entity’s children recursively
- Despawn
Recursive - Despawns the given entity and all its children recursively
- Dir2
- A normalized vector pointing in a direction in 2D space
- Dir3
- A normalized vector pointing in a direction in 3D space
- Dir3A
- A normalized SIMD vector pointing in a direction in 3D space.
- Ellipse
- An ellipse primitive
- Entity
- Lightweight identifier of an entity.
- Entity
Mut - Provides mutable access to a single entity and all of its components.
- Entity
Ref - A read-only reference to a particular
Entityand all of its components. - Entity
World Mut - A mutable reference to a particular
Entity, and the entire world. This is essentially a performance-optimized(Entity, &mut World)tuple, which caches theEntityLocationto reduce duplicate lookups. - Event
Reader - Reads events of type
Tin order and tracks which events have already been read. - Event
Writer - Sends events of type
T. - Events
- An event collection that represents the events that occurred within the last two
Events::updatecalls. Events can be written to using anEventWriterand are typically cheaply read using anEventReader. - Extrusion
- A 3D shape representing an extruded 2D
base_shape. - First
- Runs first in the schedule.
- Fixed
- The fixed timestep game clock following virtual time.
- Fixed
First - Runs first in the
FixedMainschedule. - Fixed
Last - The schedule that runs last in
FixedMain - Fixed
Post Update - The schedule that runs after the
FixedUpdateschedule, for reacting to changes made in the main update logic. - Fixed
PreUpdate - The schedule that contains logic that must run before
FixedUpdate. - Fixed
Update - The schedule that contains most gameplay logic.
- Frame
Count Plugin - Adds frame counting functionality to Apps.
- Gamepad
- A gamepad with an associated
ID. - Gamepad
Axis - An axis of a
Gamepad. - Gamepad
Button - A button of a
Gamepad. - Gamepads
- A collection of connected
Gamepads. - Global
Transform - Describe the position of an entity relative to the reference frame.
- Has
- Returns a bool that describes if an entity has the component
T. - Hierarchy
Plugin - Provides hierarchy functionality to a Bevy app.
- IRect
- A rectangle defined by two opposite corners.
- IVec2
- A 2-dimensional vector.
- IVec3
- A 3-dimensional vector.
- IVec4
- A 4-dimensional vector.
- In
- Wrapper type to mark a
SystemParamas an input. - Infinite
Plane3d - An unbounded plane in 3D space. It forms a separating surface through the origin, stretching infinitely far
- Insert
Children - Command that inserts a child at a given index of a parent’s children, shifting following children back.
- Last
- Runs last in the schedule.
- Line2d
- An infinite line along a direction in 2D space.
- Line3d
- An infinite line along a direction in 3D space.
- Local
- A system local
SystemParam. - Main
- The schedule that contains the app logic that is evaluated each tick of
App::update(). - Mat2
- A 2x2 column major matrix.
- Mat3
- A 3x3 column major matrix.
- Mat4
- A 4x4 column major matrix.
- Minimal
Plugins - This plugin group will add the minimal plugins for a Bevy application:
- Mut
- Unique mutable borrow of an entity’s component or of a resource.
- Name
- Component used to identify an entity. Stores a hash for faster comparisons.
- NonSend
- Shared borrow of a non-
Sendresource. - NonSend
Mut - Unique borrow of a non-
Sendresource. - Observer
- An
Observersystem. Add thisComponentto anEntityto turn it into an “observer”. - OnAdd
- Trigger emitted when a component is added to an entity.
- OnInsert
- Trigger emitted when a component is inserted on to to an entity.
- OnRemove
- Trigger emitted when a component is removed from an entity.
- Or
- A filter that tests if any of the given filters apply.
- Parallel
Commands - An alternative to
Commandsthat can be used in parallel contexts, such as those inQuery::par_iter - Param
Set - A collection of potentially conflicting
SystemParams allowed by disjoint access. - Parent
- Holds a reference to the parent entity of this entity. This component should only be present on entities that actually have a parent entity.
- Plane2d
- An unbounded plane in 2D space. It forms a separating surface through the origin, stretching infinitely far
- Plane3d
- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.
- Polygon
- A polygon with N vertices.
- Polyline2d
- A series of connected line segments in 2D space.
- Polyline3d
- A series of connected line segments in 3D space.
- Post
Startup - The schedule that runs once after
Startup. - Post
Update - The schedule that contains logic that must run after
Update. For example, synchronizing “local transforms” in a hierarchy to “global” absolute transforms. This enables thePostUpdatetransform-sync system to react to “local transform” changes inUpdatewithout theUpdatesystems needing to know about (or add scheduler dependencies for) the “global transform sync system”. - PreStartup
- The schedule that runs before
Startup. - PreUpdate
- The schedule that contains logic that must run before
Update. For example, a system that reads raw keyboard input OS events into anEventsresource. This enables systems inUpdateto consume the events from theEventsresource without actually knowing about (or taking a direct scheduler dependency on) the “os-level keyboard event system”. - Push
Child - Command that adds a child to an entity.
- Push
Children - Command that pushes children to the end of the entity’s
Children. - Quat
- A quaternion representing an orientation.
- Query
- System parameter that provides selective access to the
Componentdata stored in aWorld. - Query
Builder - Builder struct to create
QueryStateinstances at runtime. - Query
State - Provides scoped access to a
Worldstate according to a givenQueryDataandQueryFilter. - Rational
Curve - A collection of
RationalSegments chained into a single parametric curve. - Rational
Segment - A segment of a rational cubic curve, used to hold precomputed coefficients for fast interpolation.
Can be evaluated as a parametric curve over the domain
[0, knot_span). - Ray2d
- An infinite half-line starting at
originand going indirectionin 2D space. - Ray3d
- An infinite half-line starting at
originand going indirectionin 3D space. - Real
- Real time clock representing elapsed wall clock time.
- Received
Character Deprecated - An event that is sent whenever a window receives a character from the OS or underlying system.
- Rect
- A rectangle defined by two opposite corners.
- Rectangle
- A rectangle primitive
- Ref
- Shared borrow of an entity’s component with access to change detection.
Similar to
Mutbut is immutable and so doesn’t require unique access. - Reflect
Component - A struct used to operate on reflected
Componenttrait of a type. - Reflect
Default - A struct used to provide the default value of a type.
- Reflect
Deserialize - A struct used to deserialize reflected instances of a type.
- Reflect
From Reflect - Type data that represents the
FromReflecttrait and allows it to be used dynamically. - Reflect
From World - A struct used to operate on the reflected
FromWorldtrait of a type. - Reflect
Resource - A struct used to operate on reflected
Resourceof a type. - Reflect
Serialize - A struct used to serialize reflected instances of a type.
- Regular
Polygon - A polygon where all vertices lie on a circle, equally far apart.
- Remove
Children - Command that removes children from an entity, and removes these children’s parent.
- Remove
Parent - Command that removes the parent of an entity, and removes that entity from the parent’s
Children. - Removed
Components - A
SystemParamthat yields entities that had theirTComponentremoved or have been despawned with it. - Replace
Children - Command that clear all children from an entity, replacing them with the given children.
- Res
- Shared borrow of a
Resource. - ResMut
- Unique mutable borrow of a
Resource. - Rhombus
- A rhombus primitive, also known as a diamond shape.
- Rot2
- A counterclockwise 2D rotation.
- Schedule
- A collection of systems, and the metadata and executor needed to run them in a certain order under certain conditions.
- Schedules
- Resource that stores
Schedules mapped toScheduleLabels excluding the current runningSchedule. - Segment2d
- A segment of a line along a direction in 2D space.
- Segment3d
- A segment of a line along a direction in 3D space.
- Spawn
Scene - The schedule that contains scene spawning.
- Sphere
- A sphere primitive
- Startup
- The schedule that runs once when the app starts.
- SubApp
- A secondary application with its own
World. These can run independently of each other. - System
Builder - Builder struct used to construct state for
SystemParampassed to a system. - Task
Pool Options - Helper for configuring and creating the default task pools. For end-users who want full control,
set up
TaskPoolPlugin - Task
Pool Plugin - Setup of default task pools:
AsyncComputeTaskPool,ComputeTaskPool,IoTaskPool. - Tetrahedron
- A tetrahedron primitive.
- Time
- A generic clock resource that tracks how much it has advanced since its previous update and since its creation.
- Timer
- Tracks elapsed time. Enters the finished state once
durationis reached. - Torus
- A torus primitive, often representing a ring or donut shape
- Touch
Input - A touch input event.
- Touches
- A collection of
Touches. - Transform
- Describe the position of an entity. If the entity has a parent, the position is relative to its parent position.
- Transform
Bundle - A
Bundleof theTransformandGlobalTransform[Component]s, which describe the position of an entity. - Transform
Helper - System parameter for computing up-to-date
GlobalTransforms. - Transform
Plugin - The base plugin for handling
Transformcomponents - Triangle2d
- A triangle in 2D space
- Triangle3d
- A 3D triangle primitive.
- Trigger
- Type containing triggered
Eventinformation for a given run of anObserver. This contains theEventdata itself. If it was triggered for a specificEntity, it includes that as well. - Type
Registration Plugin - Registration of default types to the
TypeRegistryresource. - URect
- A rectangle defined by two opposite corners.
- UVec2
- A 2-dimensional vector.
- UVec3
- A 3-dimensional vector.
- UVec4
- A 4-dimensional vector.
- Update
- The schedule that contains app logic. Ideally containing anything that must run once per render frame, such as UI.
- Valid
Parent Check Plugin - Print a warning for each
Entitywith aTcomponent whose parent doesn’t have aTcomponent. - Vec2
- A 2-dimensional vector.
- Vec3
- A 3-dimensional vector.
- Vec4
- A 4-dimensional vector.
- Virtual
- The virtual game clock representing game time.
- Window
- The defining
Componentfor window entities, storing information about how it should appear and behave. - Window
Moved - An event that is sent when a window is repositioned in physical pixels.
- Window
Plugin - A
Pluginthat defines an interface for windowing support in Bevy. - Window
Resize Constraints - The size limits on a
Window. - With
- Filter that selects entities with a component
T. - Without
- Filter that selects entities without a component
T. - World
- Stores and exposes operations on entities, components, resources, and their associated metadata.
- World
Child Builder - Struct for adding children to an entity directly through the
Worldfor use in exclusive systems.
Enums§
- AppExit
- An event that indicates the
Appshould 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. - Cubic
Nurbs Error - Error during construction of
CubicNurbs - Cursor
Icon - The icon to display for a
Window’sCursor. - Euler
Rot - Euler rotation sequences.
- File
Drag AndDrop - Events related to files being dragged and dropped on a window.
- Gamepad
Axis Type - A type of a
GamepadAxis. - Gamepad
Button Type - A type of a
GamepadButton. - Ime
- A Input Method Editor event.
- KeyCode
- The key code of a
KeyboardInput. - Monitor
Selection - References a screen monitor.
- Mouse
Button - A button on a mouse device.
- Should
Update Events - Controls whether or not the events in an
EventRegistryshould be updated. - Timer
Mode - Specifies
Timerbehavior. - Torus
Kind - The type of torus determined by the minor and major radii
- Transform
System - Set enum for the systems relating to transform propagation
- Winding
Order - The winding order for a set of points
- Window
Position - Defines where a
Windowshould be placed on the screen.
Traits§
- Build
Children - Trait for removing, adding and replacing children and parents of an entity.
- Build
Children Transform Ext - Collection of methods similar to
BuildChildren, but preserving each entity’sGlobalTransform. - Build
World Children - Trait that defines adding, changing and children and parents of an entity directly through the
World. - Bundle
- The
Bundletrait enables insertion and removal ofComponents from an entity. - Component
- A data type that can be used to store data for an entity.
- Condition
- A system that determines if one or more scheduled systems should run.
- Cubic
Generator - Implement this on cubic splines that can generate a cubic curve from their spline parameters.
- Despawn
Recursive Ext - Trait that holds functions for despawning recursively down the transform hierarchy
- Detect
Changes - Types that can read change detection information.
This change detection is controlled by
DetectChangesMuttypes such asResMut. - Detect
Changes Mut - Types that implement reliable change detection.
- Entity
Mapper - An implementor of this trait knows how to map an
Entityinto anotherEntity. - Event
- Something that “happens” and might be read / observed by app logic.
- Float
Ext - A trait for extending
f32andf64with extra methods. - From
Reflect - A trait that enables types to be dynamically constructed from reflected data.
- FromRng
- Ergonomics trait for a type with a
Standarddistribution, allowing values to be generated uniformly from anRngby a method in its own namespace. - From
World - Creates an instance of the type this trait is implemented for
using data from the supplied
World. - GetField
- A convenience trait which combines fetching and downcasting of struct fields.
- GetPath
- A trait which allows nested
Reflectvalues to be retrieved with path strings. - GetTuple
Struct Field - A convenience trait which combines fetching and downcasting of tuple struct fields.
- Hierarchy
Query Ext - An extension trait for
Querythat adds hierarchy related methods. - Into
System - Conversion trait to turn something into a
System. - Into
System Configs - Types that can convert into a
SystemConfigs. - Into
System Set - Types that can be converted into a
SystemSet. - Into
System SetConfigs - Types that can convert into a
SystemSetConfigs. - Measured2d
- A trait for getting measurements of 2D shapes
- Measured3d
- A trait for getting measurements of 3D shapes
- Plugin
- A collection of Bevy app logic and configuration.
- Plugin
Group - Combines multiple
Plugins into a single unit. - Primitive2d
- A marker trait for 2D primitives
- Primitive3d
- A marker trait for 3D primitives
- Rational
Generator - Implement this on cubic splines that can generate a rational cubic curve from their spline parameters.
- Read
Only System Systemtypes that do not modify theWorldwhen run. This is implemented for any systems whose parameters all implementReadOnlySystemParam.- Reflect
- The core trait of
bevy_reflect, used for accessing and modifying data dynamically. - Reflect
Path - Something that can be interpreted as a reflection path in
GetPath. - Resource
- A type that can be inserted into a
Worldas a singleton. - Shape
Sample - Exposes methods to uniformly sample a variety of primitive shapes.
- Struct
- A trait used to power struct-like operations via reflection.
- System
- An ECS system that can be added to a
Schedule - System
Param Function - A trait implemented for all functions that can be used as
Systems. - System
Set - Types that identify logical groups of systems.
- Transform
Point - A trait for point transformation methods.
- Tuple
Struct - A trait used to power tuple struct-like operations via reflection.
- Type
Path - A static accessor to type paths and names.
- Vec2
Swizzles - Vec3
Swizzles - Vec4
Swizzles
Functions§
- any_
component_ removed - Generates a
Condition-satisfying closure that returnstrueif there are any entity with a component of the given type removed. - any_
with_ component - A
Condition-satisfying system that returnstrueif there are any entities with the given component type. - apply_
deferred - Instructs the executor to call
System::apply_deferredon the systems that have run but not applied theirDeferredsystem parameters (likeCommands) or other system buffers. - default
- An ergonomic abbreviation for
Default::default()to make initializing structs easier. This is especially helpful when combined with “struct update syntax”. - despawn_
with_ children_ recursive - Function for despawning an entity and all its children
- not
- Generates a
Conditionthat inverses the result of passed one. - on_
event - Generates a
Condition-satisfying closure that returnstrueif there are any new events of the given type since it was last called. - resource_
added - A
Condition-satisfying system that returnstrueif the resource of the given type has been added since the condition was last checked. - resource_
changed - A
Condition-satisfying system that returnstrueif the resource of the given type has had its value changed since the condition was last checked. - resource_
changed_ or_ removed - Generates a
Condition-satisfying closure that returnstrueif the resource of the given type has had its value changed since the condition was last checked. - resource_
equals - Generates a
Condition-satisfying closure that returnstrueif the resource is equal tovalue. - resource_
exists - A
Condition-satisfying system that returnstrueif the resource exists. - resource_
exists_ and_ changed - A
Condition-satisfying system that returnstrueif the resource of the given type has had its value changed since the condition was last checked. - resource_
exists_ and_ equals - Generates a
Condition-satisfying closure that returnstrueif the resource exists and is equal tovalue. - resource_
removed - Generates a
Condition-satisfying closure that returnstrueif the resource of the given type has been removed since the condition was last checked. - run_
once - Generates a
Condition-satisfying closure that returnstrueif the first time the condition is run and false every time after
Attribute Macros§
- bevy_
main - reflect_
trait - A macro that automatically generates type data for traits, which their implementors can then register.
Derive Macros§
- Bundle
- Component
- Deref
- Implements
Dereffor structs. This is especially useful when utilizing the newtype pattern. - Deref
Mut - Implements
DerefMutfor structs. This is especially useful when utilizing the newtype pattern. - Dynamic
Plugin - Generates a dynamic plugin entry point function for the given
Plugintype. - Event
- From
Reflect - Derives the
FromReflecttrait. - Reflect
- The main derive macro used by
bevy_reflectfor deriving itsReflecttrait. - Resource
- System
Set - Derive macro generating an impl of the trait
SystemSet. - Type
Path - Derives the
TypePathtrait, providing a stable alternative to [std::any::type_name].