mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-29 09:08:58 +00:00
Add asset plugins to headless app
This commit is contained in:
@@ -4,6 +4,7 @@ use bevy::{
|
|||||||
app::{AppExit, ScheduleRunnerPlugin},
|
app::{AppExit, ScheduleRunnerPlugin},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
use bevy_web_asset::WebAssetPlugin;
|
||||||
use space_editor::prelude::{EditorEvent, EditorPrefabPath};
|
use space_editor::prelude::{EditorEvent, EditorPrefabPath};
|
||||||
use wgpu::Extent3d;
|
use wgpu::Extent3d;
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ use crate::{
|
|||||||
scene::SceneState,
|
scene::SceneState,
|
||||||
screenshot::{ScreenCapture, ScreenShotPlugin},
|
screenshot::{ScreenCapture, ScreenShotPlugin},
|
||||||
BvhPlugin, CommonPlugins, LoadLibraryObjectEvent, LoadSceneEvent, MainCamera,
|
BvhPlugin, CommonPlugins, LoadLibraryObjectEvent, LoadSceneEvent, MainCamera,
|
||||||
MixamoImportEvent, MixamoPlugin, SkyboxId, StudioMode, WorldGridPlugin,
|
MixamoImportEvent, MixamoPlugin, RemoteAssetPlugin, SkyboxId, StudioMode, WorldGridPlugin,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Resource, Clone)]
|
#[derive(Debug, Resource, Clone)]
|
||||||
@@ -42,6 +43,8 @@ pub fn start_headless(
|
|||||||
|
|
||||||
app.add_plugins((
|
app.add_plugins((
|
||||||
ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0 / fps as f64)),
|
ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(1.0 / fps as f64)),
|
||||||
|
WebAssetPlugin,
|
||||||
|
RemoteAssetPlugin,
|
||||||
DefaultPlugins.set(WindowPlugin {
|
DefaultPlugins.set(WindowPlugin {
|
||||||
primary_window: None,
|
primary_window: None,
|
||||||
exit_condition: bevy::window::ExitCondition::DontExit,
|
exit_condition: bevy::window::ExitCondition::DontExit,
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ const mimeTypes = {
|
|||||||
".otf": "font/otf",
|
".otf": "font/otf",
|
||||||
".png": "image/png",
|
".png": "image/png",
|
||||||
".rar": "application/x-rar-compressed",
|
".rar": "application/x-rar-compressed",
|
||||||
|
".ron": "text/ron",
|
||||||
".svg": "image/svg+xml",
|
".svg": "image/svg+xml",
|
||||||
".tiff": "image/tiff",
|
".tiff": "image/tiff",
|
||||||
".ttf": "font/ttf",
|
".ttf": "font/ttf",
|
||||||
|
|||||||
Reference in New Issue
Block a user