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