List of Bevy Builtins
This page is a quick condensed listing of all the important things provided by Bevy.
- SystemParams
- Assets
- File Formats
wgpu
Backends- Bundles
- Resources (Configuration)
- Resources (Engine User)
- Resources (Input)
- Events (Input)
- Events (System/Control)
- Components
- GLTF Asset Labels
- Stages
SystemParams
These are all the special types that can be used as system parameters.
Commands
: Manipulate the ECS using commandsRes<T>
: Shared access to a resourceResMut<T>
: Exclusive (mutable) access to a resourceOption<Res<T>>
: Shared access to a resource that may not existOption<ResMut<T>>
: Exclusive (mutable) access to a resource that may not existQuery<T, F = ()>
(can contain tuples of up to 15 types): Access to entities and componentsParamSet
(with up to 8 params): Resolve [conflicts between incompatible system parameters][cb::paramset]Local<T>
: Data local to the systemEventReader<T>
: Receive eventsEventWriter<T>
: Send eventsRemovedComponents<T>
: Removal detectionNonSend<T>
: Shared access to Non-Send
(main thread only) dataNonSendMut<T>
: Mut access to Non-Send
(main thread only) data&World
: Read-only direct access to the ECS WorldEntities
: Low-level ECS metadata: All entitiesComponents
: Low-level ECS metadata: All componentsBundles
: Low-level ECS metadata: All bundlesArchetypes
: Low-level ECS metadata: All archetypesSystemChangeTick
: Low-level ECS metadata: Tick used for change detection- tuples containing any of these types, with up to 16 members
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.
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 theSamplerDescriptor
for texture filtering settingsTextureAtlas
: 2D "Sprite Sheet" defining sub-images within a single larger imageMesh
: 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 imageStandardMaterial
: "3D material" with support for Physically-Based RenderingAnimationClip
: Data for a single animation sequence, can be used withAnimationPlayer
Font
: Font data used for text renderingScene
: Scene composed of literal ECS entities to instantiateDynamicScene
: Scene composed with dynamic typing and reflectionGltf
: GLTF Master Asset: index of the entire contents of a GLTF fileGltfNode
: Logical GLTF object in a sceneGltfMesh
: Logical GLTF 3D model, consisting of multipleGltfPrimitive
sGltfPrimitive
: Single unit to be rendered, contains the Mesh and Material to useAudioSource
: Raw audio data forbevy_audio
AudioSink
: Audio that is currently active, can be used to control playbackFontAtlasSet
: (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):
Format | Cargo feature | Default? | 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):
Format | Cargo feature | Default? | 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:
Format | Cargo feature | Default? | Filename extensions |
---|---|---|---|
GLTF | "bevy_gltf" | Yes | .gltf , .glb |
Shader formats (loaded as Shader
assets):
Format | Cargo feature | Default? | Filename extensions |
---|---|---|---|
SPIR-V | n/a | Yes | .spv |
WGSL | n/a | Yes | .wgsl |
GLSL | n/a | Yes | .vert , .frag |
Font formats (loaded as Font
assets):
Format | Cargo feature | Default? | Filename extensions |
---|---|---|---|
TrueType | n/a | Yes | .ttf |
OpenType | n/a | Yes | .otf |
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.
Any tuples of up to 15 Component
types are valid bundles.
General:
TransformBundle
: Contains the transform typesTransform
andGlobalTransform
to enable using the entity in a parent-child hierarchy
Bevy 3D:
PerspectiveCameraBundle
: 3D camera with a perspective projectionOrthographicCameraBundle
: Camera with an orthographic projection, 2D or 3DMaterialMeshBundle
: 3D Object/Primitive: a Mesh and the Material to draw it withPbrBundle
: 3D object with the standard Physically-Based Material (MaterialMeshBundle<StandardMaterial>
)DirectionalLightBundle
: 3D directional light (like the sun)PointLightBundle
: 3D point light (like a lamp or candle)
Bevy 2D:
OrthographicCameraBundle
: Camera with an orthographic projection, 2D or 3DSpriteBundle
: 2D sprite, using a whole image (Image
asset)SpriteSheetBundle
: 2D sprite, using a sub-rectangle in a larger image (TextureAtlas
asset)MaterialMesh2dBundle
: 2D shape, with custom Mesh and Material (similar to 3D objects)Text2dBundle
: Text to be drawn in the 2D world (not the UI)
Bevy UI:
UiCameraBundle
: The UI CameraNodeBundle
: Empty node element (like HTML<div>
)ButtonBundle
: Button elementImageBundle
: Image elementTextBundle
: Text element
Resources
Configuration Resources
These resources allow you to change the settings for how various parts of Bevy work.
Some of them affect the low-level initialization of the engine, so must be present from the start to take effect. You need to insert these at the start of your app builder:
LogSettings
: Configure what messages get logged to the consoleWindowDescriptor
: Settings for the primary application windowWgpuSettings
: Low-level settings for the GPU API and backendsAssetServerSettings
: Configuration of theAssetServer
DefaultTaskPoolOptions
: Settings for the CPU task pools (multithreading)WinitSettings
: Settings for the OS Windowing backend, including update loop / power-management settings
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 frameAmbientLight
: Global renderer "fake lighting", so that shadows don't look too dark / blackMsaa
: 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 lightsWireframeConfig
: Global toggle to make everything be rendered as wireframeGamepadSettings
: Gamepad input device settings, like joystick deadzones and button sensitivities
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.
FixedTimesteps
: The state of all registeredFixedTimestep
driversTime
: Global time-related information (current frame delta time, time since startup, etc.)AssetServer
: Control the asset system: Load assets, check load status, etc.Gamepads
: List of IDs for all currently-detected (connected) gamepad devicesWindows
: All the open windows (the primary window + any additional windows in a multi-window gui app)WinitWindows
([non-send][cb::non-send]): Raw state of thewinit
backend for each windowAudio
: Use this to play sounds viabevy_audio
AsyncComputeTaskPool
: Task pool for running background CPU tasksComputeTaskPool
: Task pool where the main app schedule (all the systems) runsIoTaskPool
: Task pool where background i/o tasks run (like asset loading)Diagnostics
: Diagnostic data collected by the engine (like frame times)SceneSpawner
: Direct control over spawning Scenes into the main app WorldTypeRegistryArc
: Access to the Reflection Type RegistryAdapterInfo
: 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][cb::input].
Input<KeyCode>
: Keyboard key state, as a binary Input valueInput<MouseButton>
: Mouse button state, as a binary Input valueInput<GamepadButton>
: Gamepad buttons, as a binary Input valueAxis<GamepadAxis>
: Analog Axis gamepad inputs (joysticks and triggers)Axis<GamepadButton>
: Gamepad buttons, represented as an analog Axis valueTouches
: The state of all fingers currently touching the touchscreen
Events
Input Events
These events fire on activity with input devices. Read them to [handle user input][cb::input].
MouseButtonInput
: Changes in the state of mouse buttonsMouseWheel
: Scrolling by a number of pixels or lines (MouseScrollUnit
)MouseMotion
: Relative movement of the mouse (pixels from previous frame), regardless of the OS pointer/cursorCursorMoved
: New position of the OS mouse pointer/cursorKeyboardInput
: Changes in the state of keyboard keys (keypresses, not text)ReceivedCharacter
: Unicode text input from the OS (correct handling of the user's language and layout)TouchInput
: Change in the state of a finger touching the touchscreenGamepadEvent
: Changes in the state of a gamepad or any of its buttons or axesGamepadEventRaw
: Gamepad events unaffected byGamepadSettings
System and Control Events
Events from the OS / windowing system, or to control Bevy.
RequestRedraw
: In an app that does not refresh continuously, request one more update before going to sleepAppExit
: Tell Bevy to shut downCloseWindow
: Tell Bevy to close a windowCreateWindow
: Tell Bevy to open a new windowFileDragAndDrop
: The user drag-and-dropped a file into our appCursorEntered
: OS mouse pointer/cursor entered one of our windowsCursorLeft
: OS mouse pointer/cursor exited one of our windowsWindowCloseRequested
: OS wants to close one of our windowsWindowCreated
: New application window openedWindowFocused
: One of our windows is now focusedWindowMoved
: OS/user moved one of our windowsWindowResized
: OS/user resized one of our windowsWindowScaleFactorChanged
: One of our windows has changed its DPI scaling factorWindowBackendScaleFactorChanged
: OS reports change in DPI scaling factor for a window
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 hierarchyChildren
: Entity's children, if in a hierarchyHandle<T>
: Reference to an asset of specific typeVisibility
: Manually control visibility, whether to display the entity (hide/show)RenderLayers
: Group entities into "layers" and control which "layers" a camera should displayAnimationPlayer
: Make the entity capable of playing animations; used to control animationsCamera
: Camera used for renderingCameraUi
: Marker to identify the camera used for the UI render passCamera2d
: Marker to identify the camera used for the main 2D render passCamera3d
: Marker to identify the camera used for the main 3D render passOrthographicProjection
: Orthographic projection for a cameraPerspectiveProjection
: Perspective projection for a cameraSprite
: (2D) Properties of a sprite, using a whole imageTextureAtlasSprite
: (2D) Properties of a sprite, using a sprite sheetPointLight
: (3D) Properties of a point lightDirectionalLight
: (3D) Properties of a directional lightNoFrustumCulling
: (3D) Cause this mesh to always be drawn, even when not visible by any cameraNotShadowCaster
: (3D) Disable entity from producing dynamic shadowsNotShadowReceiver
: (3D) Disable entity from having dynamic shadows of other entitiesWireframe
: (3D) Draw object in wireframe modeNode
: (UI) Mark entity as being controlled by the UI layout systemStyle
: (UI) Layout properties of the nodeInteraction
: (UI) Track interaction/selection state: if the node is clicked or hovered overUiImage
: (UI) Image to be displayed as part of a UI nodeUiColor
: (UI) Color to use for a UI nodeButton
: (UI) Marker for a pressable buttonText
: 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):
Scene{}
: GLTF Scene as BevyScene
Node{}
: GLTF Node asGltfNode
Mesh{}
: GLTF Mesh asGltfMesh
Mesh{}/Primitive{}
: GLTF Primitive as BevyMesh
Texture{}
: GLTF Texture as BevyImage
Material{}
: GLTF Material as BevyStandardMaterial
DefaultMaterial
: as above, if the GLTF file contains a default material with no indexAnimation{}
: GLTF Animation as BevyAnimationClip
Skin{}
: GLTF mesh skin as BevySkinnedMeshInverseBindposes
Stages
Internally, Bevy has at least these built-in stages:
- In the main app (
CoreStage
):First
,PreUpdate
,Update
,PostUpdate
,Last
- In the render sub-app (
RenderStage
):Extract
,Prepare
,Queue
,PhaseSort
,Render
,Cleanup