From fd0ac7c3ac8ebf13a5448f5829518239a8b12508 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 22 Feb 2018 21:52:37 -0500 Subject: [PATCH] Version bump, new changelog, miscelaneous fixes --- .travis.yml | 3 +-- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ Cargo.toml | 6 +++--- examples/aviator/main.rs | 2 +- examples/gltf-morph-targets.rs | 2 +- examples/sprite.rs | 3 ++- src/animation.rs | 3 +-- src/render/mod.rs | 5 +++++ 8 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.travis.yml b/.travis.yml index dca0a07..4a4ea67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,7 @@ notifications: on_start: never script: - - cargo check - - cargo doc - cargo test - cargo test --all-features + - cargo doc # - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then (cargo bench); fi diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..41f9718 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,29 @@ +## Change Log + +### v0.3 (24 Feb 2018) + - parent objects now hold children alive, not the other way around + - PBR materials, custom pipelines + - glTF scene loader, including animation curves + - animation framework with vertex skinning and morphing + - instanced rendering + - text objects + - skybox and background texture support + - richer input API + - gltf examples: PBR shader, node animations, morpth targets, vertex skinning + +### v0.2 (06 Jul 2017) + - basic documentation + - [Mint](https://github.com/kvark/mint)-flavored math API + - revamped input API, orbital camera controller + - blend shape animations + - optimized scene graph and renderer + - examples: anim, group (cube-ception) + +### v0.1 (08 Jun 2017) + - scene graph built with [Froggy](https://github.com/kvark/froggy) + - renderer with [gfx-rs](https://github.com/gfx-rs/gfx/tree/pre-ll) + - cameras: perspective, ortho + - window and input handling + - Wavefront OBJ loader + - texture loader + - examples: lights, materials, obj, shapes, sprite, basic aviator diff --git a/Cargo.toml b/Cargo.toml index 9b8ee61..27c617d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "three" -version = "0.2.0" -authors = ["Dzmitry Malyshau "] +version = "0.3.0" +authors = ["Three-rs Developers"] license = "MIT/Apache-2.0" description = "Three.js inspired 3D engine in Rust" categories = ["graphics", "game-engines"] @@ -52,7 +52,7 @@ gfx_window_glutin = { version = "0.20", optional = true } glutin = { version = "0.12", optional = true } [dev-dependencies] -env_logger = "0.4" +env_logger = "0.5" notify = "4" rand = "0.3" diff --git a/examples/aviator/main.rs b/examples/aviator/main.rs index 5bc8570..7dba106 100644 --- a/examples/aviator/main.rs +++ b/examples/aviator/main.rs @@ -19,7 +19,7 @@ const COLOR_BROWN_DARK: three::Color = 0x23190f; const COLOR_BLUE: three::Color = 0x68c3c0; fn main() { - env_logger::init().unwrap(); + env_logger::init(); let mut rng = rand::thread_rng(); let mut win = three::Window::new("Three-rs Aviator demo"); diff --git a/examples/gltf-morph-targets.rs b/examples/gltf-morph-targets.rs index 4b618e6..734a3fd 100644 --- a/examples/gltf-morph-targets.rs +++ b/examples/gltf-morph-targets.rs @@ -19,7 +19,7 @@ fn main() { mixer.action(clip); } - let camera = window.factory.perspective_camera(60.0, 0.1 .. 10.0); + let camera = window.factory.perspective_camera(60.0, 0.1 .. 20.0); camera.set_position([0.0, 1.0, 5.0]); let mut controls = three::controls::Orbit::builder(&camera) diff --git a/examples/sprite.rs b/examples/sprite.rs index e828e62..4bf2005 100644 --- a/examples/sprite.rs +++ b/examples/sprite.rs @@ -25,11 +25,12 @@ impl Animator { &mut self, switch_row: Option, ) { - self.timer.reset(); if let Some(row) = switch_row { + self.timer.reset(); self.current = [0, row]; self.update_uv(); } else if self.timer.elapsed() >= self.duration && (self.repeat || self.current[0] < self.cell_counts[0]) { + self.timer.reset(); self.current[0] += 1; if self.current[0] < self.cell_counts[0] { self.update_uv(); diff --git a/src/animation.rs b/src/animation.rs index 525ff23..e2d07dc 100644 --- a/src/animation.rs +++ b/src/animation.rs @@ -1,4 +1,5 @@ // TODO: Rewrite examples such that they don't rely on the gltf-loader feature. + //! Animation system. //! //! ## Introduction @@ -489,14 +490,12 @@ impl ActionData { )) }; let update = frame_start_value.slerp(frame_end_value, s); - use Object; target.set_orientation(update); } (Binding::Orientation, &Values::Quaternion(ref values)) => { let frame_start_value: cgmath::Quaternion = values[frame_index].into(); let frame_end_value: cgmath::Quaternion = values[frame_index + 1].into(); let update = frame_start_value.slerp(frame_end_value, s); - use Object; target.set_orientation(update); } (Binding::Position, &Values::Vector3(ref values)) => { diff --git a/src/render/mod.rs b/src/render/mod.rs index 42cd4b1..c269b2b 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -687,6 +687,11 @@ impl Renderer { scene: &Scene, camera: &Camera, ) { + { + use gfx::Device; + self.device.cleanup(); + } + let mut hub = scene.hub.lock().unwrap(); hub.process_messages(); // update joint transforms of skeletons