mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-29 09:08:58 +00:00
Fix skybox for web
This commit is contained in:
@@ -28,6 +28,9 @@ const mimeTypes = {
|
|||||||
".png": "image/png",
|
".png": "image/png",
|
||||||
".jpg": "image/jpeg",
|
".jpg": "image/jpeg",
|
||||||
".gif": "image/gif",
|
".gif": "image/gif",
|
||||||
|
".hdr": "image/vnd.radiance",
|
||||||
|
".ktx": "image/ktx",
|
||||||
|
".ktx2": "image/ktx",
|
||||||
".svg": "image/svg+xml",
|
".svg": "image/svg+xml",
|
||||||
".json": "application/json",
|
".json": "application/json",
|
||||||
".woff": "font/woff",
|
".woff": "font/woff",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use std::f32::consts;
|
use std::f32::consts;
|
||||||
|
|
||||||
use bevy::{
|
use bevy::{
|
||||||
core_pipeline::prepass::{DepthPrepass, NormalPrepass},
|
|
||||||
input::mouse::{MouseButton, MouseMotion},
|
input::mouse::{MouseButton, MouseMotion},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
window::{CursorGrabMode, PrimaryWindow},
|
window::{CursorGrabMode, PrimaryWindow},
|
||||||
@@ -52,10 +51,12 @@ fn spawn_camera(mut cmd: Commands) {
|
|||||||
cmd.spawn((
|
cmd.spawn((
|
||||||
Camera3dBundle {
|
Camera3dBundle {
|
||||||
transform: camera_xform,
|
transform: camera_xform,
|
||||||
|
camera: Camera {
|
||||||
|
hdr: true,
|
||||||
|
..default()
|
||||||
|
},
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
DepthPrepass,
|
|
||||||
NormalPrepass,
|
|
||||||
OrbitCam {
|
OrbitCam {
|
||||||
radius: camera_xform.translation.length(),
|
radius: camera_xform.translation.length(),
|
||||||
..default()
|
..default()
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ pub struct TestScenePlugin;
|
|||||||
impl Plugin for TestScenePlugin {
|
impl Plugin for TestScenePlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.insert_resource(ClearColor(Color::hsl(0.0, 0.0, 0.25)))
|
app.insert_resource(ClearColor(Color::hsl(0.0, 0.0, 0.25)))
|
||||||
.add_plugins(MaterialPlugin::<ProceduralGridMaterial> {
|
.add_plugins(MaterialPlugin::<ProceduralGridMaterial>::default())
|
||||||
prepass_enabled: true,
|
|
||||||
..default()
|
|
||||||
})
|
|
||||||
.add_systems(Startup, spawn_scene)
|
.add_systems(Startup, spawn_scene)
|
||||||
.add_systems(
|
.add_systems(
|
||||||
PostUpdate,
|
PostUpdate,
|
||||||
|
|||||||
Reference in New Issue
Block a user