Releases: hecrj/coffee
Releases · hecrj/coffee
0.4.1
0.4.0
Added
Task::succeed, which replaces the oldTask::new. #66Defaultimplementation forui::widget::slider::State.Default,Clone,Copy,PartialEq, andEqimplementations forui::widget::button::State.- Additional color constants:
Color::RED,Color::GREEN, andColor::BLUE. #77 Color::from_rgb_u32, which allows to constructs aColorusing an hexadecimal literal (0xRRGGBB). #77From<nalgebra::Matrix3>andInto<nalgebra::Matrix3>implementations forTransformation. #78Game::is_finished, which allows to gracefully quit the game on demand. #79Canvas::read_pixels, a method to read the contents of aCanvasas aDynamicImagefrom theimagecrate.ui::Panel, a dark box that can be used to wrap a widget.ui::ProgressBar, a progress bar to give visual feedback to your users when performing a slow task.ui::Image, a simple widget to display agraphics::Imagein your user interface.Mesh::new_with_tolerance, which allows to control the tolerance of line segment approximations. #100Game::cursor_icon, which allows customization of the mouse cursor icon.
Changed
Mesh::strokenow takes anf32asline_widthinstead of au16.Task::newnow supports a lazy operation that can fail. #66- Face culling has been disabled for Vulkan, Metal, D3D11, and D3D12 backends. In OpenGL, face culling was already disabled.
Transformation::nonuniform_scalenow takes aVector. #78- The logic of
KeyboardAndMousehas been split into the newKeyboardandMouseinput trackers. The newmouseandkeyboardmethods can be used to obtain them, respectively. #69 - The
Mousetype can now track additional input: - The
meshexample now has a slider to control the tolerance. #100
Fixed
- Hang when
Game::TICKS_PER_SECONDis set as0. #99
0.3.2
Fixed
- Incorrect buffer sizes in the
Meshpipeline. This caused vertices to entirely disappear when rendering big meshes, leading to a potential crash. 79651405673ecd16da21b887a622f6650b29f38f - Validation error when rendering meshes using Vulkan, Metal, D3D11, or D3D12. #81
0.3.1
0.3.0
Added
- Responsive GUI support! The new
uimodule can be used to extend aGameand build a user interface. #35- GUI runtime based on Elm and The Elm Architecture.
- Layouting based on Flexbox and powered by
stretch. - Built-in GUI widgets. Specifically: buttons, sliders, checkboxes, radio buttons, rows, and columns.
- Built-in GUI renderer. It is capable of rendering all the built-in GUI widgets.
- Customization. The
ui::coremodule can be used to implement custom widgets and renderers.
- Gamepad support. The
input::Eventenum now has aGamepadvariant. #29 - Mesh support. The types
ShapeandMeshhave been introduced. Rectangles, circles, ellipses, and polylines can now be drawn with ease using fill or stroke modes. #50 - The
Game::LoadingScreenassociated type. Given that all theGameassociated types implement a trait with aloadmethod, wiring a loading screen now is as simple as writing its name. Because of this, theGame::newmethod is no longer necessary and it is dropped. #35 Inputtrait. It allows to implement reusable input handlers. #35KeyboardAndMouseinput handler. Useful to quickstart development and have easy access to the keyboard and the mouse from the get-go. #35CursorTakenandCursorReturnedmouse input events. They are fired when the cursor is used/freed by the user interface. #35- Off-screen text rendering support.
Font::drawnow supports anyTargetinstead of a windowFrame. #25 Game::debugperformance tracking. Time spent on this method is now shown in the built-in debug view. #26- Implementation of
Defaulttrait forText. #25 Transformation::rotate. Creates a transformation representing a rotation. #28Batch::clear. Clears the batch contents, useful to reuse batches in different frames.- Implementation of
ExtendforBatch. #37 - Implementation of
ParallelExtendforBatch. ABatchcan now be populated using multiple threads, useful to improve performance when dealing with many thousands of quads. #37 Textalignment. It can be defined using the newHorizontalAlignmentandVerticalAlignmenttypes in thegraphicsmodule. #35Font::measure. It allows to measure the dimensions of anyText. #35Rectangle::contains. It returns whether or not aRectanglecontains a givenPoint. #35Sprite::scale. It can be used to change theSpritesize when drawed.Defaultimplementation forSprite. #35Debug::ui_duration. It returns the average time spent running the UI runtime.- A counter example as an introduction to the new UI architecture. #35
- A user interface example that introduces the different built-in widgets. #35
- A gamepad example that displays the last gamepad event. #29
- A mesh example that showcases the different ways to use the new
MeshandShapetypes. #50 - Multiple gravity centers based on mouse clicks in the particles example. #30
Changed
- The
Game::Inputassociated type now has to implement the newInputtrait. This splits code quite nicely, as theon_inputmethod moves away fromGame. It also makesInputimplementors reusable. For instance, aKeyboardAndMousetype has been implemented that can be used out of the box! #35 Game::drawnow takes aFramedirectly instead of aWindow. #35LoadingScreen::on_progresshas been renamed toLoadingScreen::drawand it now receives aFrameinstead of aWindow. #35input::Eventis now split into four different variants representing input sources:Keyboard,Mouse,Gamepad, andWindow. Each one of these sources has its own module insideinputwith anEventtype where the old variants can be found. #29input::KeyCodehas been moved toinput::keyboard::KeyCode. #29input::MouseButtonhas been moved toinput::mouse::Button. #29Batch::drawandtexture_array::Batch::drawdo not take apositionargument anymore. UsingTarget::transformbefore drawing is preferred. #53Font::loadhas been renamed toFont::load_from_bytesfor consistency. #55- The performance of the particles example has been improved considerably on all platforms. #37
- The
inputexample uses the newuimodule now.
Removed
- The
Game::Viewassociated type. Implementors of theGametrait are also meant to hold the game assets now. This simplifies the API considerably, and it helps model your game state-view relationship with precision, avoiding inconsistencies. #35 Game::new.Game::loadshould be used instead. #35Game::on_input. Input handlers now must be implemented using the newInputtrait. #35
0.2.0
Added
Game::on_close_requestto control whether the game should be closed when the window receives a close request by the OS. #14input::Event::TextInputevent, which triggers on text entry. Contains the character typed as achar. #15input::Event::CursorEnteredandinput::Event::CursorLeftevents, which trigger when the mouse cursor enters or leaves the game window, respectively. #15input::Event::MouseWheel, which triggers when the mouse wheel is scrolled. Contains the number of horizontal and vertical lines scrolled asf32. #15input::Event::WindowFocusedandinput::Event::WindowUnfocused, which trigger when the game window gains or loses focus, respectively. #15input::Event::WindowMoved, which triggers when the game window is moved. Contains the new X and Y coordinates of the window asf32. #15- Text rendering for the
wgpugraphics backend. Vulkan, Metal, D3D11 and D3D12 now support text rendering. OpenGL already supported text rendering. #18 - A changelog. #20
- Example to showcase input handling. #15
- Example to showcase proper colors and gamma correction. #19
Changed
- The debug view is now shown by default when the
debugfeature is enabled.