You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//! A simple 3D scene with light shining over a cube sitting on a plane.use bevy::prelude::*;fnmain(){App::new().add_plugins(DefaultPlugins).add_systems(Startup, setup)// .add_systems(u, setup).run();}/// set up a simple 3D scenefnsetup(mutcommands:Commands,mutmeshes:ResMut<Assets<Mesh>>,mutmaterials:ResMut<Assets<StandardMaterial>>,){// circular base
commands.spawn((Mesh3d(meshes.add(Circle::new(4.0))),MeshMaterial3d(materials.add(Color::WHITE)),Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),));// cube
commands.spawn((Mesh3d(meshes.add(Cuboid::new(1.0,1.0,1.0))),MeshMaterial3d(materials.add(Color::srgb_u8(124,144,255))),Transform::from_xyz(0.0,0.5,0.0),));// light
commands.spawn((PointLight{shadows_enabled:true,
..default()},Transform::from_xyz(4.0,8.0,4.0),));// camera
commands.spawn((Camera3d::default(),Transform::from_xyz(-2.5,4.5,9.0).looking_at(Vec3::ZERO,Vec3::Y),));}
Setted up Cargo.toml:
[package]
name = "bevy_example"version = "0.1.0"edition = "2021"
[dependencies]
bevy = { version = "0.15.1", features = ["dynamic_linking"] }
# Enable a small amount of optimization in the dev profile.
[profile.dev]
opt-level = 1# Enable a large amount of optimization in the dev profile for dependencies.
[profile.dev.package."*"]
opt-level = 3
Bevy version
v0.15.1
Relevant system information
Windows 11, thinkpad p16s, ryzen 7840u, 32gb ram
rustc 1.84.1 (e71f9a9a9 2025-01-27)
What you did
I copypasted simple example:
Setted up Cargo.toml:
What went wrong
Additional information
I use lld-link for rust on windows:
The text was updated successfully, but these errors were encountered: