diff --git a/docs/_docs/advanced-usage.md b/docs/_docs/advanced-usage.md index dc06e178..e0534edd 100644 --- a/docs/_docs/advanced-usage.md +++ b/docs/_docs/advanced-usage.md @@ -14,7 +14,7 @@ The Minart project is divided in multiple small packages: - `minart-core`: This package is always required. - `minart-backend`: Contains the default implementations for each backend (AWT, HTML and SDL). While usually required, you can skip it if you plan to implement your own backend. -- `minart-image`: Contains logic to load and store images in PPM, BMP or QOI format. +- `minart-image`: Contains logic to load and store images in PBM/PPM, PDI, BMP or QOI format. You can skip it if you don't plan to read or write any images. - `minart-sound`: Contains logic to load and store sound files in WAV, AIFF, RTTTL or QOA format. You can skip it if you don't plan to read or write any sound files. diff --git a/docs/_docs/index.html b/docs/_docs/index.html index cfde947a..f82dd310 100644 --- a/docs/_docs/index.html +++ b/docs/_docs/index.html @@ -30,7 +30,8 @@

Development status

Minart is still in a 0.x version. Quoting the semver specification:

- Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable. + Major version zero (0.y.z) is for initial development. Anything MAY change at any time. + The public API SHOULD NOT be considered stable.
As such, while it's OK to use Minart for small demos, it's not recommended to use it for commercial projects. @@ -46,7 +47,8 @@

Limitations

as Indigo.

- Also, Minart is only suitable for bitmap graphics. + Also, Minart is only suitable for bitmap graphics. There are a few geometric + primitives, but those are quite limited. For vector graphics it is recommended to use an appropriate library, such as Doodle.

diff --git a/docs/_docs/overview.md b/docs/_docs/overview.md index f3b4fb91..51b71014 100644 --- a/docs/_docs/overview.md +++ b/docs/_docs/overview.md @@ -24,6 +24,7 @@ Minart comes out of the box with some basic graphic features, such as: - Double buffered canvas - Integer scaling - Surface blitting (with multiple blending modes) + - Simple shape and line rendering It also includes **Surface views** and **Planes** which makes it possible to manipulate (possibly unbounded) images with familiar operations such as `map` and `flatMap`. diff --git a/docs/_docs/structure.md b/docs/_docs/structure.md index de810cb8..23b1fb3e 100644 --- a/docs/_docs/structure.md +++ b/docs/_docs/structure.md @@ -29,6 +29,13 @@ A `Canvas` is a special type of `MutableSurface`, which represents a window. `SurfaceView`s and `Planes` are abstractions to quickly and efficiently manipulate `Surface`s. +## `eu.joaocosta.minart.geometry` + +This package contains abstractions related to geometric primitives, such as +`Point`, `Matrix`, `Shape` and `Stroke`. + +Most of the APIs in this package are still experimental, and may change in future versions. + ## `eu.joaocosta.minart.audio` This package contains all abstractions related to audio playback. diff --git a/docs/sidebar.yml b/docs/sidebar.yml index f2c9dbb6..d39adc60 100644 --- a/docs/sidebar.yml +++ b/docs/sidebar.yml @@ -30,7 +30,9 @@ subsection: page: ../../examples/release/08-loading-images.md - title: "9. Surface Views" page: ../../examples/release/09-surface-views.md - - title: "10. Audio Playback" - page: ../../examples/release/10-audio-playback.md - - title: "11. Loading Sounds" - page: ../../examples/release/11-loading-sounds.md + - title: "10. Vector Shapes" + page: ../../examples/release/10-vector-shapes.md + - title: "11. Audio Playback" + page: ../../examples/release/11-audio-playback.md + - title: "12. Loading Sounds" + page: ../../examples/release/12-loading-sounds.md diff --git a/examples/release/01-introduction.md b/examples/release/01-introduction.md index ead63105..f613297b 100644 --- a/examples/release/01-introduction.md +++ b/examples/release/01-introduction.md @@ -23,8 +23,8 @@ scala-cli 01-introduction.md The simplest way to use Minart is to simply include the `minart` library, which packages all modules. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" ``` As for the imports, the `eu.joaocosta.minart.backend.defaults` package contains the givens with the backend-specific (JVM/JS/Native) logic. diff --git a/examples/release/02-portable-applications.md b/examples/release/02-portable-applications.md index cca5656f..d3badf5b 100644 --- a/examples/release/02-portable-applications.md +++ b/examples/release/02-portable-applications.md @@ -37,8 +37,8 @@ We start with the similar imports to the previous example. Note, however, that we now also import `eu.joaocosta.minart.runtime.*`, which provides a platform agnostic runtime that we can use. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/release/03-animation.md b/examples/release/03-animation.md index aadea389..6b5301f7 100644 --- a/examples/release/03-animation.md +++ b/examples/release/03-animation.md @@ -11,8 +11,8 @@ This time, we'll write an animated fire, updating at 60 frames per second! As before, let's import the backend, graphics and runtime. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/release/04-pointer-input.md b/examples/release/04-pointer-input.md index 626126bd..a3c98ad6 100644 --- a/examples/release/04-pointer-input.md +++ b/examples/release/04-pointer-input.md @@ -13,8 +13,8 @@ As before, let's import the backend, graphics and runtime. We also need to import the input package. We need this to read data from input devices, such as keyboard and mouse. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/release/05-stateful-applications.md b/examples/release/05-stateful-applications.md index c781e59f..5276f7d8 100644 --- a/examples/release/05-stateful-applications.md +++ b/examples/release/05-stateful-applications.md @@ -13,8 +13,8 @@ In this example, we will show how to write applications that manipulate a state The dependencies will be the same as before. We also include Scala's `Random` here just to make the game more interesting. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import scala.util.Random diff --git a/examples/release/06-surfaces.md b/examples/release/06-surfaces.md index 35dc5421..983e16bb 100644 --- a/examples/release/06-surfaces.md +++ b/examples/release/06-surfaces.md @@ -16,8 +16,8 @@ A `Surface` is something with a `getPixel` operation (`MutableSurface`s also pro For this example, we just need to use the graphics and runtime ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given diff --git a/examples/release/07-canvas-settings.md b/examples/release/07-canvas-settings.md index 57244847..1f050255 100644 --- a/examples/release/07-canvas-settings.md +++ b/examples/release/07-canvas-settings.md @@ -11,8 +11,8 @@ Here's a quick example on how to do that. In this example application, we will c ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/release/08-loading-images.md b/examples/release/08-loading-images.md index 6366c937..15555ffc 100644 --- a/examples/release/08-loading-images.md +++ b/examples/release/08-loading-images.md @@ -2,7 +2,7 @@ So far we always created our surfaces manually. This is fine for small demos and procedural graphics, but often it can be useful to load an image from an external file. -Minart has support for some image file formats (PPM, BMP and QOI). Here we will see how to load them. +Minart has support for some image file formats (PBM/PPM, PDI, BMP and QOI). Here we will see how to load them. ## A simple image viewer @@ -14,8 +14,8 @@ This package also has an `Image` object with helpers to call the loaders. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/release/09-surface-views.md b/examples/release/09-surface-views.md index 67b12962..d97a7480 100644 --- a/examples/release/09-surface-views.md +++ b/examples/release/09-surface-views.md @@ -12,8 +12,8 @@ This tutorial will show how to use those ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* @@ -59,13 +59,12 @@ Let's see an example with multiple effects, such as: - Wobble - Checkerboard invert -Before we start, let's precompute the convolution window that we will use for the blur +Before we start, let's precompute the convolution kernel that we will use for the blur. +We could use a simple function, but Minart already provides some optimized kernels +out of the box. ```scala -val convolutionWindow = for { - x <- (-1 to 1) - y <- (-1 to 1) -} yield (x, y) +val blurKernel = Kernel.averageBlur(3, 3) ``` @@ -79,14 +78,8 @@ def application(t: Double, canvas: Canvas): Unit = { val image = updatedBitmap.view.repeating // Create an infinite Plane from our surface .scale(zoom, zoom) // Scale - .coflatMap { img => // Average blur - convolutionWindow.iterator - .map { case (x, y) => img(x, y) } - .foldLeft(Color(0, 0, 0)) { case (Color(r, g, b), Color(rr, gg, bb)) => - Color(r + rr / 9, g + gg / 9, b + bb / 9) - } - } - .rotate(t) // Rotate + .coflatMap(blurKernel) // Average blur + .rotate(t) // Rotate .contramap((x, y) => (x + (5 * Math.sin(t + y / 10.0)).toInt, y)) // Wobbly effect .flatMap(color => (x, y) => // Checkerboard effect diff --git a/examples/release/10-vector-shapes.md b/examples/release/10-vector-shapes.md new file mode 100644 index 00000000..961f4518 --- /dev/null +++ b/examples/release/10-vector-shapes.md @@ -0,0 +1,102 @@ +# 10. Vector shapes + +Besides surfaces, Minart also allows you to render some basic vector shapes. + +## Drawing shapes + +### Dependencies and imports + +The relevant methods are in the `eu.joaocosta.minart.geometry` package + +```scala +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" + +import eu.joaocosta.minart.backend.defaults.given +import eu.joaocosta.minart.graphics.* +import eu.joaocosta.minart.geometry.* +import eu.joaocosta.minart.runtime.* +``` + +### Shapes + +Vectorial shapes are represented by the `Shape` abstraction. + +Minart already comes with some basic shapes, such as circle and convex polygons, with helper methods in the `Shape` companion object. + +First, let's create a few shapes with those methods. + +```scala +import eu.joaocosta.minart.geometry.Point + +val triangle = Shape.triangle(Point(-16, 16), Point(0, -16), Point(16, 16)) +val square = Shape.rectangle(Point(-16, -16), Point(16, 16)) +val octagon = Shape.convexPolygon( + Point(-8, -16), + Point(8, -16), + Point(16, -8), + Point(16, 8), + Point(8, 16), + Point(-8, 16), + Point(-16, 8), + Point(-16, -8) +) +val circle = Shape.circle(Point(0, 0), 16) +``` + +### Faces + +Notice that all shapes are defined with points in clockwise fashion. + +All shapes have two faces: A front face and a back face. + +Depending on the way they are defined (or transformed), different faces might be shown. + +Minart allows you to set different colors for each face, and even no color at all! +This is helpful if, for some reason, you know you don't want to draw back faces. + +### Rasterizing + +Now we just need to use the `rasterizeShape` operation, just like we did with `blit`. + +In this example we will also scale our images with time, to show how the color changes when the face flips. + +There's also a `rasterizeStroke` operation to draw lines and a `rasterizeContour` operation to draw only the shape +contours (note that not all shapes support this, some transformations can make the contour computation impossible). + +```scala +val frontfaceColor = Color(255, 0, 0) +val backfaceColor = Color(0, 255, 0) +val contourColor = Color(255, 255, 255) + +def application(t: Double, canvas: Canvas): Unit = { + val scale = math.sin(t) + canvas.rasterizeShape(triangle.scale(scale, 1.0), Some(frontfaceColor), Some(backfaceColor))(32, 32) + canvas.rasterizeShape(square.scale(scale, 1.0), Some(frontfaceColor), Some(backfaceColor))(64, 32) + canvas.rasterizeShape(octagon.scale(scale, 1.0), Some(frontfaceColor), Some(backfaceColor))(32, 64) + canvas.rasterizeShape(circle.scale(scale, 1.0), Some(frontfaceColor), Some(backfaceColor))(64, 64) + + canvas.rasterizeContour(triangle.scale(scale, 1.0), contourColor)(32, 32) + canvas.rasterizeContour(square.scale(scale, 1.0), contourColor)(64, 32) + canvas.rasterizeContour(octagon.scale(scale, 1.0), contourColor)(32, 64) + // Can't compute the contour of a circle scaled on only one dimension + //canvas.rasterizeContour(circle.scale(scale, 1.0), contourColor)(64, 64) +} +``` + +### Putting it all together + +```scala +val canvasSettings = Canvas.Settings(width = 128, height = 128, scale = Some(4), clearColor = Color(0, 0, 0)) + +AppLoop + .statefulRenderLoop((t: Double) => (canvas: Canvas) => { + canvas.clear() + application(t, canvas) + canvas.redraw() + t + 0.01 + } + ) + .configure(canvasSettings, LoopFrequency.hz60, 0) + .run() +``` diff --git a/examples/release/10-audio-playback.md b/examples/release/11-audio-playback.md similarity index 97% rename from examples/release/10-audio-playback.md rename to examples/release/11-audio-playback.md index a7a9bebe..6aa82ce4 100644 --- a/examples/release/10-audio-playback.md +++ b/examples/release/11-audio-playback.md @@ -1,4 +1,4 @@ -# 10. Audio playback +# 11. Audio playback Besides graphics and input, Minart also supports loading and playing back audio. @@ -9,8 +9,8 @@ Here we will see how to generate audio waves and play a simple audio clip. ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.audio.* import eu.joaocosta.minart.backend.defaults.given diff --git a/examples/release/11-loading-sounds.md b/examples/release/12-loading-sounds.md similarity index 90% rename from examples/release/11-loading-sounds.md rename to examples/release/12-loading-sounds.md index d70440ad..a9417a5a 100644 --- a/examples/release/11-loading-sounds.md +++ b/examples/release/12-loading-sounds.md @@ -1,8 +1,8 @@ -# 11. Loading sounds +# 12. Loading sounds Just like we did with images, we can also load audio clips from files. -Minart supports multiple audio formats (RTTL AIFF, WAV and QOA). +Minart supports multiple audio formats (RTTL, AIFF, WAV and QOA). Here's a small example to play a clip from a file @@ -16,8 +16,8 @@ This package also has an `Sound` object with helpers to call the loaders. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.1" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.2" import eu.joaocosta.minart.audio.* import eu.joaocosta.minart.audio.sound.* diff --git a/examples/snapshot/01-introduction.md b/examples/snapshot/01-introduction.md index d52ebaa0..3069277e 100644 --- a/examples/snapshot/01-introduction.md +++ b/examples/snapshot/01-introduction.md @@ -23,8 +23,8 @@ scala-cli 01-introduction.md The simplest way to use Minart is to simply include the `minart` library, which packages all modules. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" ``` As for the imports, the `eu.joaocosta.minart.backend.defaults` package contains the givens with the backend-specific (JVM/JS/Native) logic. diff --git a/examples/snapshot/02-portable-applications.md b/examples/snapshot/02-portable-applications.md index 19cfa1a3..65e6d35f 100644 --- a/examples/snapshot/02-portable-applications.md +++ b/examples/snapshot/02-portable-applications.md @@ -37,8 +37,8 @@ We start with the similar imports to the previous example. Note, however, that we now also import `eu.joaocosta.minart.runtime.*`, which provides a platform agnostic runtime that we can use. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/03-animation.md b/examples/snapshot/03-animation.md index a722ce8e..cab67c5d 100644 --- a/examples/snapshot/03-animation.md +++ b/examples/snapshot/03-animation.md @@ -11,8 +11,8 @@ This time, we'll write an animated fire, updating at 60 frames per second! As before, let's import the backend, graphics and runtime. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/04-pointer-input.md b/examples/snapshot/04-pointer-input.md index bc042901..1484f590 100644 --- a/examples/snapshot/04-pointer-input.md +++ b/examples/snapshot/04-pointer-input.md @@ -13,8 +13,8 @@ As before, let's import the backend, graphics and runtime. We also need to import the input package. We need this to read data from input devices, such as keyboard and mouse. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/05-stateful-applications.md b/examples/snapshot/05-stateful-applications.md index 6ab40d73..9afb2a2c 100644 --- a/examples/snapshot/05-stateful-applications.md +++ b/examples/snapshot/05-stateful-applications.md @@ -13,8 +13,8 @@ In this example, we will show how to write applications that manipulate a state The dependencies will be the same as before. We also include Scala's `Random` here just to make the game more interesting. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import scala.util.Random diff --git a/examples/snapshot/06-surfaces.md b/examples/snapshot/06-surfaces.md index 1bd7d9e3..7503b29a 100644 --- a/examples/snapshot/06-surfaces.md +++ b/examples/snapshot/06-surfaces.md @@ -16,8 +16,8 @@ A `Surface` is something with a `getPixel` operation (`MutableSurface`s also pro For this example, we just need to use the graphics and runtime ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given diff --git a/examples/snapshot/07-canvas-settings.md b/examples/snapshot/07-canvas-settings.md index 5eb14142..9fbc1f34 100644 --- a/examples/snapshot/07-canvas-settings.md +++ b/examples/snapshot/07-canvas-settings.md @@ -11,8 +11,8 @@ Here's a quick example on how to do that. In this example application, we will c ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/08-loading-images.md b/examples/snapshot/08-loading-images.md index eabbf3a5..beb79898 100644 --- a/examples/snapshot/08-loading-images.md +++ b/examples/snapshot/08-loading-images.md @@ -2,7 +2,7 @@ So far we always created our surfaces manually. This is fine for small demos and procedural graphics, but often it can be useful to load an image from an external file. -Minart has support for some image file formats (PPM, BMP and QOI). Here we will see how to load them. +Minart has support for some image file formats (PBM/PPM, PDI, BMP and QOI). Here we will see how to load them. ## A simple image viewer @@ -14,8 +14,8 @@ This package also has an `Image` object with helpers to call the loaders. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/09-surface-views.md b/examples/snapshot/09-surface-views.md index 18782272..4b1cef43 100644 --- a/examples/snapshot/09-surface-views.md +++ b/examples/snapshot/09-surface-views.md @@ -12,8 +12,8 @@ This tutorial will show how to use those ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/10-vector-shapes.md b/examples/snapshot/10-vector-shapes.md index 3dbeb29a..c2cfa682 100644 --- a/examples/snapshot/10-vector-shapes.md +++ b/examples/snapshot/10-vector-shapes.md @@ -9,8 +9,8 @@ Besides surfaces, Minart also allows you to render some basic vector shapes. The relevant methods are in the `eu.joaocosta.minart.geometry` package ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.backend.defaults.given import eu.joaocosta.minart.graphics.* diff --git a/examples/snapshot/11-audio-playback.md b/examples/snapshot/11-audio-playback.md index b5ca2d65..d1d951bf 100644 --- a/examples/snapshot/11-audio-playback.md +++ b/examples/snapshot/11-audio-playback.md @@ -9,8 +9,8 @@ Here we will see how to generate audio waves and play a simple audio clip. ### Dependencies and imports ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.audio.* import eu.joaocosta.minart.backend.defaults.given diff --git a/examples/snapshot/12-loading-sounds.md b/examples/snapshot/12-loading-sounds.md index 8cd1a49f..10f71087 100644 --- a/examples/snapshot/12-loading-sounds.md +++ b/examples/snapshot/12-loading-sounds.md @@ -2,7 +2,7 @@ Just like we did with images, we can also load audio clips from files. -Minart supports multiple audio formats (RTTL AIFF, WAV and QOA). +Minart supports multiple audio formats (RTTL, AIFF, WAV and QOA). Here's a small example to play a clip from a file @@ -16,8 +16,8 @@ This package also has an `Sound` object with helpers to call the loaders. ```scala -//> using scala "3.3.3" -//> using dep "eu.joaocosta::minart::0.6.2-SNAPSHOT" +//> using scala "3.3.4" +//> using dep "eu.joaocosta::minart::0.6.3-SNAPSHOT" import eu.joaocosta.minart.audio.* import eu.joaocosta.minart.audio.sound.* diff --git a/src/main/g8/$if(!sbt_project.truthy)$project.scala$endif$ b/src/main/g8/$if(!sbt_project.truthy)$project.scala$endif$ index 64ae0d5a..85c88cf3 100644 --- a/src/main/g8/$if(!sbt_project.truthy)$project.scala$endif$ +++ b/src/main/g8/$if(!sbt_project.truthy)$project.scala$endif$ @@ -1,3 +1,3 @@ //> using scala $scala_version$ -//> using dep eu.joaocosta::minart::0.6.1 +//> using dep eu.joaocosta::minart::0.6.2 diff --git a/src/main/g8/$if(sbt_project.truthy)$build.sbt$endif$ b/src/main/g8/$if(sbt_project.truthy)$build.sbt$endif$ index 99d30003..61fd9c12 100644 --- a/src/main/g8/$if(sbt_project.truthy)$build.sbt$endif$ +++ b/src/main/g8/$if(sbt_project.truthy)$build.sbt$endif$ @@ -13,7 +13,7 @@ lazy val root = .settings( Seq( libraryDependencies ++= List( - "eu.joaocosta" %%% "minart" % "0.6.1" + "eu.joaocosta" %%% "minart" % "0.6.2" ) ) ) diff --git a/src/main/g8/default.properties b/src/main/g8/default.properties index 5a1408ec..a717cc1f 100644 --- a/src/main/g8/default.properties +++ b/src/main/g8/default.properties @@ -2,5 +2,5 @@ name = Minart Project organization = com.github.myself package = $organization$.project version = 1.0 -scala_version = 3.3.3 +scala_version = 3.3.4 sbt_project = no diff --git a/version.sbt b/version.sbt index 1dbf4ae0..b4017733 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.6.2-SNAPSHOT" +ThisBuild / version := "0.6.3-SNAPSHOT"