feat(editor): integrate 3D viewport into editor_demo

Render actual 3D geometry (cubes + ground plane) in the Viewport panel
using the existing mesh_shader.wgsl Blinn-Phong pipeline with orbit
camera controls (left-drag to orbit, middle-drag to pan, scroll to zoom).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 10:40:41 +09:00
parent 9f42300109
commit 14fe532432
5 changed files with 366 additions and 68 deletions

View File

@@ -6,4 +6,5 @@ edition = "2021"
[dependencies]
bytemuck = { workspace = true }
voltex_math = { workspace = true }
voltex_renderer = { workspace = true }
wgpu = { workspace = true }

View File

@@ -36,6 +36,7 @@ pub mod tonemap;
pub use gpu::{GpuContext, DEPTH_FORMAT};
pub use light::{CameraUniform, LightUniform, LightData, LightsUniform, MAX_LIGHTS, LIGHT_DIRECTIONAL, LIGHT_POINT, LIGHT_SPOT};
pub use mesh::Mesh;
pub use vertex::{Vertex, MeshVertex};
pub use camera::{Camera, FpsController};
pub use texture::{GpuTexture, pbr_texture_bind_group_layout, create_pbr_texture_bind_group, pbr_full_texture_bind_group_layout, create_pbr_full_texture_bind_group};
pub use material::MaterialUniform;