diff --git a/examples/scene/data/scene.ron b/examples/scene/data/scene.ron index b5afd906..cbc25ac1 100644 --- a/examples/scene/data/scene.ron +++ b/examples/scene/data/scene.ron @@ -1,15 +1,15 @@ ( camera: ( - position: (2.7, 1.6, 2.1), - orientation: (-0.04, 0.92, -0.05, -0.37), + position: (7.85955, -2.43252, 4.10049), + orientation: (0.438921, 0.290618, 0.458832, 0.715795), fov_y: 1.0, max_depth: 100.0, - speed: 1000.0, + speed: 3000.0, ), average_luminocity: 0.3, models: [ ( - path: "monkey.gltf", + path: "uvtest.gltf", ), ], ) diff --git a/examples/scene/data/uvtest.bin b/examples/scene/data/uvtest.bin new file mode 100644 index 00000000..db88b8f4 Binary files /dev/null and b/examples/scene/data/uvtest.bin differ diff --git a/examples/scene/data/uvtest.gltf b/examples/scene/data/uvtest.gltf new file mode 100644 index 00000000..6e854e89 --- /dev/null +++ b/examples/scene/data/uvtest.gltf @@ -0,0 +1,621 @@ +{ + "asset" : { + "generator" : "Khronos glTF Blender I/O v3.4.50", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 0, + 1, + 2, + 3, + 4, + 5 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "Cube", + "scale" : [ + 0.2854886054992676, + 1.371619462966919, + 0.12605951726436615 + ], + "translation" : [ + 0, + 1.4312142133712769, + 0 + ] + }, + { + "mesh" : 1, + "name" : "Cube.001", + "rotation" : [ + 0, + 0, + 0.7071068286895752, + 0.7071068286895752 + ], + "scale" : [ + 0.2854886054992676, + 1.371619462966919, + 0.12605951726436615 + ], + "translation" : [ + 1.485835313796997, + 0.017700791358947754, + 0.08306169509887695 + ] + }, + { + "mesh" : 2, + "name" : "Cube.002", + "rotation" : [ + 0.7071068286895752, + 0, + 0, + 0.7071068286895752 + ], + "scale" : [ + 0.2854886054992676, + 1.371619462966919, + 0.12605951726436615 + ], + "translation" : [ + 0, + 0.023911356925964355, + 1.4055168628692627 + ] + }, + { + "mesh" : 3, + "name" : "Text", + "translation" : [ + 3.063220739364624, + -0.14190387725830078, + 0 + ] + }, + { + "mesh" : 4, + "name" : "Text.001", + "rotation" : [ + 0, + 0, + 0.7071068286895752, + 0.7071068286895752 + ], + "translation" : [ + 0.19894814491271973, + 2.939166784286499, + 0 + ] + }, + { + "mesh" : 5, + "name" : "Text.002", + "rotation" : [ + 0, + -0.7071068286895752, + 0, + 0.7071068286895752 + ], + "translation" : [ + -0.07290276885032654, + -0.1419200897216797, + 3.2835850715637207 + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "Material.006", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0, + 0.8000000715255737, + 0.0019847836811095476, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "Material.007", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.8000000715255737, + 0.004434478469192982, + 0, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "Material.005", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.002952756593003869, + 0, + 0.8000000715255737, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "Material.009", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "Material.004", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + }, + { + "doubleSided" : true, + "name" : "Material.008", + "pbrMetallicRoughness" : { + "baseColorFactor" : [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1 + ], + "metallicFactor" : 0, + "roughnessFactor" : 0.5 + } + } + ], + "meshes" : [ + { + "name" : "Cube.002", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "TEXCOORD_0" : 1, + "NORMAL" : 2 + }, + "indices" : 3, + "material" : 0 + } + ] + }, + { + "name" : "Cube.004", + "primitives" : [ + { + "attributes" : { + "POSITION" : 4, + "TEXCOORD_0" : 5, + "NORMAL" : 6 + }, + "indices" : 3, + "material" : 1 + } + ] + }, + { + "name" : "Cube.005", + "primitives" : [ + { + "attributes" : { + "POSITION" : 7, + "TEXCOORD_0" : 8, + "NORMAL" : 9 + }, + "indices" : 3, + "material" : 2 + } + ] + }, + { + "name" : "Text", + "primitives" : [ + { + "attributes" : { + "POSITION" : 10, + "TEXCOORD_0" : 11, + "NORMAL" : 12 + }, + "indices" : 13, + "material" : 3 + } + ] + }, + { + "name" : "Text.001", + "primitives" : [ + { + "attributes" : { + "POSITION" : 14, + "TEXCOORD_0" : 15, + "NORMAL" : 16 + }, + "indices" : 17, + "material" : 4 + } + ] + }, + { + "name" : "Text.002", + "primitives" : [ + { + "attributes" : { + "POSITION" : 18, + "TEXCOORD_0" : 19, + "NORMAL" : 20 + }, + "indices" : 21, + "material" : 5 + } + ] + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 36, + "type" : "SCALAR" + }, + { + "bufferView" : 4, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 5, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 6, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 7, + "componentType" : 5126, + "count" : 24, + "max" : [ + 1, + 1, + 1 + ], + "min" : [ + -1, + -1, + -1 + ], + "type" : "VEC3" + }, + { + "bufferView" : 8, + "componentType" : 5126, + "count" : 24, + "type" : "VEC2" + }, + { + "bufferView" : 9, + "componentType" : 5126, + "count" : 24, + "type" : "VEC3" + }, + { + "bufferView" : 10, + "componentType" : 5126, + "count" : 2925, + "max" : [ + 2.4770002365112305, + 0.6820000410079956, + 0.28832435607910156 + ], + "min" : [ + 0.0020000000949949026, + -0.009000000543892384, + 0 + ], + "type" : "VEC3" + }, + { + "bufferView" : 11, + "componentType" : 5126, + "count" : 2925, + "type" : "VEC2" + }, + { + "bufferView" : 12, + "componentType" : 5126, + "count" : 2925, + "type" : "VEC3" + }, + { + "bufferView" : 13, + "componentType" : 5123, + "count" : 4548, + "type" : "SCALAR" + }, + { + "bufferView" : 14, + "componentType" : 5126, + "count" : 2861, + "max" : [ + 2.373000144958496, + 0.6820000410079956, + 0.21679319441318512 + ], + "min" : [ + 0, + -0.009000000543892384, + 0 + ], + "type" : "VEC3" + }, + { + "bufferView" : 15, + "componentType" : 5126, + "count" : 2861, + "type" : "VEC2" + }, + { + "bufferView" : 16, + "componentType" : 5126, + "count" : 2861, + "type" : "VEC3" + }, + { + "bufferView" : 17, + "componentType" : 5123, + "count" : 4512, + "type" : "SCALAR" + }, + { + "bufferView" : 18, + "componentType" : 5126, + "count" : 2899, + "max" : [ + 2.4150002002716064, + 0.6820000410079956, + 0 + ], + "min" : [ + 0.01600000075995922, + -0.009000000543892384, + -0.3432256281375885 + ], + "type" : "VEC3" + }, + { + "bufferView" : 19, + "componentType" : 5126, + "count" : 2899, + "type" : "VEC2" + }, + { + "bufferView" : 20, + "componentType" : 5126, + "count" : 2899, + "type" : "VEC3" + }, + { + "bufferView" : 21, + "componentType" : 5123, + "count" : 4500, + "type" : "SCALAR" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 0, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 288, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 480, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 72, + "byteOffset" : 768, + "target" : 34963 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 840, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 1128, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 1320, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 1608, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 192, + "byteOffset" : 1896, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 288, + "byteOffset" : 2088, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 35100, + "byteOffset" : 2376, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 23400, + "byteOffset" : 37476, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 35100, + "byteOffset" : 60876, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 9096, + "byteOffset" : 95976, + "target" : 34963 + }, + { + "buffer" : 0, + "byteLength" : 34332, + "byteOffset" : 105072, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 22888, + "byteOffset" : 139404, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 34332, + "byteOffset" : 162292, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 9024, + "byteOffset" : 196624, + "target" : 34963 + }, + { + "buffer" : 0, + "byteLength" : 34788, + "byteOffset" : 205648, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 23192, + "byteOffset" : 240436, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 34788, + "byteOffset" : 263628, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 9000, + "byteOffset" : 298416, + "target" : 34963 + } + ], + "buffers" : [ + { + "byteLength" : 307416, + "uri" : "uvtest.bin" + } + ] +} diff --git a/examples/scene/main.rs b/examples/scene/main.rs index daa2632d..152a5180 100644 --- a/examples/scene/main.rs +++ b/examples/scene/main.rs @@ -778,12 +778,15 @@ fn main() { let mut quit = false; let raw_input = egui_winit.take_egui_input(&window); let egui_output = egui_ctx.run(raw_input, |egui_ctx| { - egui::SidePanel::right("control_panel").show(egui_ctx, |ui| { - example.add_gui(ui); - if ui.button("Quit").clicked() { - quit = true; - } - }); + let frame = egui::Frame::default().fill(egui::Color32::from_white_alpha(0x80)); + egui::SidePanel::right("control_panel") + .frame(frame) + .show(egui_ctx, |ui| { + example.add_gui(ui); + if ui.button("Quit").clicked() { + quit = true; + } + }); }); egui_winit.handle_platform_output(&window, &egui_ctx, egui_output.platform_output);