Skip to content

Commit

Permalink
Upgraded: scala 3.3.1, appVersion 0.12, slash 0.2 and typelevel 0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
c committed Oct 23, 2023
1 parent f5c31ff commit 9171983
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 41 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val appVersion:String = "0.1"
val globalScalaVersion = "3.3.0"
val appVersion:String = "0.12"
val globalScalaVersion = "3.3.1"

ThisBuild / organization := "ai.dragonfly"
ThisBuild / organizationName := "dragonfly.ai"
Expand All @@ -23,7 +23,7 @@ lazy val mesh = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(
name := "mesh",
libraryDependencies ++= Seq(
"ai.dragonfly" %%% "slash" % "0.1"
"ai.dragonfly" %%% "slash" % "0.2"
),
)
.jsSettings()
Expand Down
2 changes: 1 addition & 1 deletion demo/shared/src/main/scala/shape/Plane.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package shape

import ai.dragonfly.democrossy.Demonstration

import ai.dragonfly.math.vector.*
import slash.vector.*
object Plane extends Demonstration {

override def demo():Unit = {
Expand Down
2 changes: 1 addition & 1 deletion mesh/shared/src/main/scala/ai/dragonfly/mesh/Mesh.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package ai.dragonfly.mesh

import narr.*

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package ai.dragonfly.mesh

import narr.*

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}
Expand Down
4 changes: 2 additions & 2 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/io/OBJ.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ package ai.dragonfly.mesh.io

import narr.*

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*

import ai.dragonfly.mesh.*

import java.io.{BufferedReader, InputStream, InputStreamReader, OutputStream}
import java.io.OutputStream
import scala.collection.mutable
import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

Expand Down
13 changes: 8 additions & 5 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/io/PLY.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@

package ai.dragonfly.mesh.io

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*
import ai.dragonfly.mesh.sRGB.*
import ai.dragonfly.mesh.Mesh

import narr.*
import Extensions.given
import scala.language.implicitConversions

import java.io.PrintWriter
import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

@JSExportTopLevel("PLY") @JSExportAll
Expand Down Expand Up @@ -69,8 +67,10 @@ end_header
i += 1
}

for (triangle <- mesh.triangles) {
var t:Int = 0; while (t < mesh.triangles.length) {
val triangle = mesh.triangles(t)
sb.append(s"3 ${triangle.v1} ${triangle.v2} ${triangle.v3}\n")
t += 1
}

sb.toString()
Expand Down Expand Up @@ -100,8 +100,11 @@ end_header
i += 1
}

for (triangle <- mesh.triangles) {
var t: Int = 0;
while (t < mesh.triangles.length) {
val triangle = mesh.triangles(t)
sb.append(s"3 ${triangle.v1} ${triangle.v2} ${triangle.v3}\n")
t += 1
}

sb.toString()
Expand Down
2 changes: 0 additions & 2 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/sRGB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package ai.dragonfly.mesh

import scala.scalajs.js.annotation.{JSExportAll, JSExportTopLevel}

object sRGB {

opaque type ARGB32 = Int
Expand Down
7 changes: 3 additions & 4 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/shape/Bolt.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
package ai.dragonfly.mesh.shape

import narr.*
import Extensions.given
import scala.language.implicitConversions

import ai.dragonfly.math.Constant.π
import ai.dragonfly.math.vector.*
import slash.Constant.π
import slash.vector.*
import Vec.*
import ai.dragonfly.mesh.{Mesh, Triangle}

Expand Down Expand Up @@ -60,7 +59,7 @@ object Bolt {
val lastPointIndex:Int = points.length - 1

var p: Int = 0
var dTheta: Double = 2 * π / angularSegments
val dTheta: Double = 2 * π / angularSegments
var theta: Double = 0.0

// generate shank
Expand Down
6 changes: 2 additions & 4 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/shape/Cube.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
package ai.dragonfly.mesh.shape

import narr.*
import Extensions.given
import scala.language.implicitConversions

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*

import ai.dragonfly.math.Constant.π
import ai.dragonfly.math.{cubeInPlace, squareInPlace}
import slash.{cubeInPlace, squareInPlace}
import ai.dragonfly.mesh.*

import scala.scalajs.js.annotation.JSExportTopLevel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

package ai.dragonfly.mesh.shape

import narr.*
import ai.dragonfly.math.vector.*
import ai.dragonfly.math.Constant.π
import ai.dragonfly.math.{cubeInPlace, squareInPlace}
import ai.dragonfly.mesh.*

import scala.scalajs.js.annotation.JSExportTopLevel
Expand Down
6 changes: 2 additions & 4 deletions mesh/shared/src/main/scala/ai/dragonfly/mesh/shape/Drum.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
package ai.dragonfly.mesh.shape

import narr.*
import Extensions.given
import scala.language.implicitConversions

import ai.dragonfly.math.Constant.π
import ai.dragonfly.math.{cubeInPlace, squareInPlace}
import slash.Constant.π

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*

import ai.dragonfly.mesh.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
package ai.dragonfly.mesh.shape

import narr.*
import Extensions.given
import scala.language.implicitConversions

import ai.dragonfly.math.vector.*
import slash.vector.*
import Vec.*
import ai.dragonfly.mesh.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
package ai.dragonfly.mesh.shape

import narr.*
import Extensions.given

import scala.language.implicitConversions

import ai.dragonfly.math.Constant.π
import ai.dragonfly.math.vector.*
import slash.Constant.π
import slash.vector.*
import Vec.*
import ai.dragonfly.mesh.{Mesh, Triangle}

Expand Down Expand Up @@ -61,7 +61,7 @@ object Screw {
val lastPointIndex:Int = points.length - 1

var p:Int = 0
var dTheta:Double = 2 * π / angularSegments
val dTheta:Double = 2 * π / angularSegments
var theta:Double = 0.0

// generate shank
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package ai.dragonfly.mesh

import ai.dragonfly.math.vector.*
import Vec.*
import slash.vector.*
import narr.*

package object shape {
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer)

// continuous integration
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.19")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.3")

// Make me a website!
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.4.19")
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.3")

0 comments on commit 9171983

Please sign in to comment.