From c632afc074fa085057cb753b7ee611f3abc8eac4 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Mon, 25 Sep 2023 20:14:52 +0100 Subject: [PATCH] Upgrade examples to Indigo 0.15.0 --- build.sbt | 14 +- .../SimpleVoronoi.scala | 9 +- .../indigo-shader-scala-cli/app/index.html | 1 - .../app/package-lock.json | 1237 +++++++++++++++++ .../indigo-shader-scala-cli/app/package.json | 3 + .../app/scripts/indigo-support.js | 52 - .../indigo-shader-scala-cli/app/yarn.lock | 376 ++++- examples/indigo-uv-circle/build.sbt | 30 +- .../indigo-uv-circle/project/build.properties | 2 +- examples/indigo-uv-circle/project/plugins.sbt | 4 +- examples/indigo-uv-shader/build.sbt | 32 +- .../indigo-uv-shader/project/build.properties | 2 +- examples/indigo-uv-shader/project/plugins.sbt | 4 +- examples/shadertoy/Default.scala | 4 +- examples/shadertoy/Plasma.scala | 4 +- examples/shadertoy/Seascape.scala | 4 +- project/Dependencies.scala | 2 +- project/plugins.sbt | 2 +- .../com/example/sandbox/SandboxView.scala | 2 +- 19 files changed, 1601 insertions(+), 183 deletions(-) create mode 100644 examples/indigo-shader-scala-cli/app/package-lock.json delete mode 100644 examples/indigo-shader-scala-cli/app/scripts/indigo-support.js diff --git a/build.sbt b/build.sbt index 5164d39..65ad15b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,6 +2,7 @@ import scala.language.postfixOps import Misc._ import Dependencies._ import org.typelevel.scalacoptions.ScalacOptions +import indigoplugin.IndigoOptions Global / onChangedBuildSource := ReloadOnSourceChanges @@ -77,15 +78,14 @@ lazy val sandbox = .settings( neverPublish, commonSettings, - name := "sandbox", - showCursor := true, - title := "Sandbox", - gameAssetsDirectory := "assets", - disableFrameRateLimit := false, - electronInstall := indigoplugin.ElectronInstall.Latest, + name := "sandbox", libraryDependencies ++= Shared.indigo.value, libraryDependencies ++= Shared.indigoExtras.value, - libraryDependencies ++= Shared.indigoJson.value + libraryDependencies ++= Shared.indigoJson.value, + indigoOptions := + IndigoOptions.defaults + .withTitle("Sandbox") + .withAssetDirectory(os.RelPath.rel / "sandbox" / "assets") ) // Shader diff --git a/examples/indigo-shader-scala-cli/SimpleVoronoi.scala b/examples/indigo-shader-scala-cli/SimpleVoronoi.scala index a7608c9..594237a 100644 --- a/examples/indigo-shader-scala-cli/SimpleVoronoi.scala +++ b/examples/indigo-shader-scala-cli/SimpleVoronoi.scala @@ -1,9 +1,9 @@ -//> using scala "3.3.0" +//> using scala "3.3.1" //> using platform "js" -//> using jsVersion "1.13.1" +//> using jsVersion "1.13.2" -//> using lib "io.indigoengine::ultraviolet::0.1.2" -//> using lib "io.indigoengine::indigo::0.15.0-RC1" +//> using lib "io.indigoengine::ultraviolet::0.1.3" +//> using lib "io.indigoengine::indigo::0.15.0" import indigo.* @@ -16,6 +16,7 @@ object SimpleVoronoi extends IndigoShader: GameConfig.default .withFrameRateLimit(FPS.`60`) .withViewport(400, 400) + .noResize val assets: Set[AssetType] = Set() val channel0: Option[AssetPath] = None diff --git a/examples/indigo-shader-scala-cli/app/index.html b/examples/indigo-shader-scala-cli/app/index.html index bbe9de3..836c9d4 100644 --- a/examples/indigo-shader-scala-cli/app/index.html +++ b/examples/indigo-shader-scala-cli/app/index.html @@ -23,7 +23,6 @@
-