Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

foxzool/bevy_nokhwa

Repository files navigation

crates.io MIT/Apache 2.0 crates.io CI Documentation

bevy_nokhwa


preview

A bevy plugin using nokhawa.

This plugin allows you to render Camera Capture at background.

Showcase

use bevy::prelude::*;
use bevy_nokhwa::BevyNokhwaPlugin;
fn main() {
 App::new()
 .add_plugins(DefaultPlugins)
 .add_plugins(BevyNokhwaPlugin)
 .add_systems(Startup, setup_camera)
 .run();
}
fn setup_camera(
 mut commands: Commands,
 mut meshes: ResMut<Assets<Mesh>>,
 mut materials: ResMut<Assets<StandardMaterial>>,
) {
 commands
 .spawn((
 Camera3d::default(),
 Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
 ))
 // auto find camera and use highest resolution
 // .insert(BackgroundCamera::auto())
 .insert(
 BackgroundCamera::new(
 ApiBackend::Auto,
 Some(CameraIndex::Index(0)),
 Some(RequestedFormatType::Closest(CameraFormat::new(
 Resolution::new(640, 480),
 FrameFormat::MJPEG,
 30,
 ))),
 )
 .unwrap(),
 );
}

Support

Bevy tracking

bevy bevy_nokhwa
0.19 0.8
0.15 0.7
0.14 0.6
0.13 0.5
0.12 0.4
0.11 0.3
0.10 0.2
0.9 0.1

Licensing

The project is under dual license MIT and Apache 2.0, so join to your hearts content, just remember the license agreements.

Contributing

Yes this project is still very much WIP, so PRs are very welcome

About

A bevy plugin for render camera capture at background

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.md
MIT
LICENSE-MIT.md

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /