Warning: this page has not been updated for Bevy 0.10 yet!

List of Bevy Builtins

This page is a quick condensed listing of all the important things provided by Bevy.

SystemParams

These are all the special types that can be used as system parameters.

(List in API Docs)

In regular systems:

In exclusive systems:

Your function can have a maximum of 16 total parameters. If you need more, group them into tuples to work around the limit. Tuples can contain up to 16 members, but can be nested indefinitely.

Systems running during the Extract stage can also use Extract<T>, to access data from the Main World instead of the Render World. T can be any other system parameter type.

Assets

(more info about working with assets)

These are the Asset types registered by Bevy by default.

  • Image: Pixel data, used as a texture for 2D and 3D rendering; also contains the SamplerDescriptor for texture filtering settings
  • TextureAtlas: 2D "Sprite Sheet" defining sub-images within a single larger image
  • Mesh: 3D Mesh (geometry data), contains vertex attributes (like position, UVs, normals)
  • Shader: GPU shader code, in one of the supported languages (WGSL/SPIR-V/GLSL)
  • ColorMaterial: Basic "2D material": contains color, optionally an image
  • StandardMaterial: "3D material" with support for Physically-Based Rendering
  • AnimationClip: Data for a single animation sequence, can be used with AnimationPlayer
  • Font: Font data used for text rendering
  • Scene: Scene composed of literal ECS entities to instantiate
  • DynamicScene: Scene composed with dynamic typing and reflection
  • Gltf: GLTF Master Asset: index of the entire contents of a GLTF file
  • GltfNode: Logical GLTF object in a scene
  • GltfMesh: Logical GLTF 3D model, consisting of multiple GltfPrimitives
  • GltfPrimitive: Single unit to be rendered, contains the Mesh and Material to use
  • AudioSource: Raw audio data for bevy_audio
  • AudioSink: Audio that is currently active, can be used to control playback
  • FontAtlasSet: (internal use for text rendering)
  • SkinnedMeshInverseBindposes: (internal use for skeletal animation)

File Formats

These are the asset file formats (asset loaders) supported by Bevy. Support for each one can be enabled/disabled using cargo features. Some are enabled by default, many are not.

Image formats (loaded as Image assets):

FormatCargo featureDefault?Filename extensions
PNG"png"Yes.png
HDR"hdr"Yes.hdr
JPEG"jpeg"No.jpg, .jpeg
TGA"tga"No.tga
BMP"bmp"No.bmp
DDS"dds"No.dds
KTX2"ktx2"No.ktx2
Basis"basis-universal"No.basis

Audio formats (loaded as AudioSource assets):

FormatCargo featureDefault?Filename extensions
OGG Vorbis"vorbis"Yes.ogg
FLAC"flac"No.flac
WAV"wav"No.wav
MP3"mp3"No.mp3

3D asset (model or scene) formats:

FormatCargo featureDefault?Filename extensions
GLTF"bevy_gltf"Yes.gltf, .glb

Shader formats (loaded as Shader assets):

FormatCargo featureDefault?Filename extensions
SPIR-Vn/aYes.spv
WGSLn/aYes.wgsl
GLSLn/aYes.vert, .frag, .comp

Font formats (loaded as Font assets):

FormatCargo featureDefault?Filename extensions
TrueTypen/aYes.ttf
OpenTypen/aYes.otf

Bevy Scenes:

FormatFilename extensions
RON-serialized scene.scn,.scn.ron

There are unofficial plugins available for adding support for even more file formats.

wgpu Backends

wgpu (and hence Bevy) supports the following backends for each platform:

  • Vulkan (Linux/Windows/Android)
  • DirectX 12 (Windows)
  • Metal (Apple)
  • WebGL2 (Web)
  • WebGPU (Web; experimental)
  • GLES3 (Linux/Android; legacy)
  • DirectX 11 (Windows; legacy; WIP (not yet ready for use))

Bundles

Bevy's built-in bundle types, for spawning different common kinds of entities.

(List in API Docs)

Any tuples of up to 15 Component types are valid bundles.

General:

Scenes:

Bevy 3D:

Bevy 2D:

Bevy UI:

Resources

(more info about working with resources)

Configuration Resources

These resources allow you to change the settings for how various parts of Bevy work.

These may be inserted at the start, but should also be fine to change at runtime (from a system):

  • ClearColor: Global renderer background color to clear the window at the start of each frame
  • AmbientLight: Global renderer "fake lighting", so that shadows don't look too dark / black
  • Msaa: Global renderer setting for Multi-Sample Anti-Aliasing (some platforms might only support the values 1 and 4)
  • ClusterConfig: Configuration of the light clustering algorithm, affects the performance of 3D scenes with many lights
  • WireframeConfig: Global toggle to make everything be rendered as wireframe
  • GamepadSettings: Gamepad input device settings, like joystick deadzones and button sensitivities
  • WinitSettings: Settings for the OS Windowing backend, including update loop / power-management settings

Settings that are not modifiable at runtime are not represented using resources. Instead, they are configured via the respective plugins.

In Bevy 0.9, there is an exception to this rule:

  • WgpuSettings: Low-level settings for the GPU API and backends

These settings must be inserted as a resource to the app, at the top, before adding DefaultPlugins.

This API inconsistency will be addressed in future versions of Bevy. These settings will be configurable using the plugin, instead of a resource, just like other settings that are only used during engine startup.

Engine Resources

These resources provide access to different features of the game engine at runtime.

Access them from your systems, if you need their state, or to control the respective parts of Bevy. These resources are in the Main World. See here for the resources in the Render World.

  • Time: Global time-related information (current frame delta time, time since startup, etc.)
  • AssetServer: Control the asset system: Load assets, check load status, etc.
  • Assets<T>: Contains the actual data of the loaded assets of a given type
  • State<T>: Control over app states
  • Gamepads: List of IDs for all currently-detected (connected) gamepad devices
  • Windows: All the open windows (the primary window + any additional windows in a multi-window gui app)
  • WinitWindows (non-send): Raw state of the winit backend for each window
  • Audio: Use this to play sounds via bevy_audio
  • SceneSpawner: Direct control over spawning Scenes into the main app World
  • AppTypeRegistry: Access to the Reflection Type Registry
  • FixedTimesteps: The state of all registered FixedTimestep drivers
  • AsyncComputeTaskPool: Task pool for running background CPU tasks
  • ComputeTaskPool: Task pool where the main app schedule (all the systems) runs
  • IoTaskPool: Task pool where background i/o tasks run (like asset loading)
  • FrameCount: Global time-related information (current frame delta time, time since startup, etc.)
  • Diagnostics: Diagnostic data collected by the engine (like frame times)
  • NonSendMarker: Dummy resource to ensure a system always runs on the main thread

Render World Resources

These resources are present in the Render World. They can be accessed from rendering systems (that run during render stages).

  • RenderGraph: The Bevy Render Graph
  • PipelineCache: Bevy's manager of render pipelines. Used to store render pipelines used by the app, to avoid recreating them more than once.
  • TextureCache: Bevy's manager of temporary textures. Useful when you need textures to use internally during rendering.
  • RenderAssets<T>: Contains handles to the GPU representations of currently loaded asset data
  • DefaultImageSampler: The default sampler for Image asset textures
  • FallbackImage: Dummy 1x1 pixel white texture. Useful for shaders that normally need a texture, when you don't have one available.

There are many other resources in the Render World, which are not mentioned here, either because they are internal to Bevy's rendering algorithms, or because they are just extracted copies of the equivalent resources in the Main World.

Low-Level wgpu Resources

Using these resources, you can have direct access to the wgpu APIs for controlling the GPU. These are available in both the Main World and the Render World.

  • RenderDevice: The GPU device, used for creating hardware resources for rendering/compute
  • RenderQueue: The GPU queue for submitting work to the hardware
  • RenderAdapter: Handle to the physical GPU hardware
  • RenderAdapterInfo: Information about the GPU hardware that Bevy is running on

Input Handling Resources

These resources represent the current state of different input devices. Read them from your systems to handle user input.

Events

(more info about working with events)

Input Events

These events fire on activity with input devices. Read them to [handle user input][cb::input].

Engine Events

Events related to various internal things happening during the normal runtime of a Bevy app.

System and Control Events

Events from the OS / windowing system, or to control Bevy.

Components

The complete list of individual component types is too specific to be useful to list here.

See: (List in API Docs)

Curated/opinionated list of the most important built-in component types:

  • Transform: Local transform (relative to parent, if any)
  • GlobalTransform: Global transform (in the world)
  • Parent: Entity's parent, if in a hierarchy
  • Children: Entity's children, if in a hierarchy
  • Handle<T>: Reference to an asset of specific type
  • Visibility: Manually control visibility, whether to display the entity (hide/show)
  • ComputedVisibility: Check if an entity should be rendered (is it hidden? is it culled?)
  • RenderLayers: Group entities into "layers" and control which "layers" a camera should display
  • AnimationPlayer: Make the entity capable of playing animations; used to control animations
  • Camera: Camera used for rendering
  • UiCameraConfig: Can be used to disable or configure UI rendering for a specific camera
  • Camera2d: Configuration parameters for 2D cameras
  • Camera3d: Configuration parameters for 3D cameras
  • OrthographicProjection: Orthographic projection for a 2D camera
  • Projection: Projection for a 3D camera (perspective or orthographic)
  • Sprite: (2D) Properties of a sprite, using a whole image
  • TextureAtlasSprite: (2D) Properties of a sprite, using a sprite sheet
  • PointLight: (3D) Properties of a point light
  • SpotLight: (3D) Properties of a spot light
  • DirectionalLight: (3D) Properties of a directional light
  • NoFrustumCulling: (3D) Cause this mesh to always be drawn, even when not visible by any camera
  • NotShadowCaster: (3D) Disable entity from producing dynamic shadows
  • NotShadowReceiver: (3D) Disable entity from having dynamic shadows of other entities
  • Wireframe: (3D) Draw object in wireframe mode
  • Node: (UI) Mark entity as being controlled by the UI layout system
  • Style: (UI) Layout properties of the node
  • Interaction: (UI) Track interaction/selection state: if the node is clicked or hovered over
  • UiImage: (UI) Image to be displayed as part of a UI node
  • BackgroundColor: (UI) Color to use for a UI node
  • Button: (UI) Marker for a pressable button
  • Text: Text to be displayed

GLTF Asset Labels

Asset path labels to refer to GLTF sub-assets.

The following asset labels are supported ({} is the numerical index):

Stages

Internally, Bevy has at least these built-in stages:

  • In the main_app (StartupStage, run once at app startup): PreStartup, Startup, PostStartup
  • In the main app (CoreStage, run every frame update): First, PreUpdate, Update, PostUpdate, Last
  • In the render sub-app (RenderStage): Extract, Prepare, Queue, PhaseSort, Render, Cleanup

The Render Stages are each intended for a specific purpose:

  • Extract: quickly copy the minimal data you need from the main World to the render World
  • Prepare: send data to the GPU (buffers, textures, bind groups)
  • Queue: generate the render jobs to be run (usually phase items)
  • PhaseSort: sort and batch phase items for efficient rendering
  • Render: execute the render graph to produce actual GPU commands and do the work
  • Cleanup: clear any data from the render World that should not persist to the next frame