Tuesday, October 20, 2009

First app using simplex3d.math!



I've been dying to try out the noise function for a while. So here is the result of that experiment:

run kaleidoscope applet

The fun part of this applet is written in Scala. Then there is a panel coded in Java to act as a view. And finally, the JavaFX applet to wrap it nicely for the web. So far these three seem to be getting along very well.

2 comments:

  1. I only discovered Scala a month ago; and when I did, the first thing I wondered about was it's applicability for 3D applications. I did quick Google search for Scala 3D and your blog here is the first hit.

    I've been using your library now for about a week now; it's been pretty useful to me for the Wavefront OBJ loader I started working on.

    Anyway, I thought you would like to know, that I found it useful to add unapply methods to the VecXf and ConstVecXf Objects. For instance:

    object Vec3f {
    ...
    def unapply(u: Vec3f) = Some((u.x, u.y, u.z))
    )

    ReplyDelete
  2. Thank you for the feedback. I will definitely add the unapply method. A more intuitive approach is probably to add one unapply method to handle both Const and Mutable objects:

    object Vec3f {
    ...
    def unapply(u: AnyVec3f) = Some((u.x, u.y, u.z))
    }

    I do not see any immediate problems with this approach, though it may be undesirable in some situations. Let me know what you think.

    ReplyDelete