Header image

ND2D – Now with 50% more D (and some more features)

November 6th, 2011 | Posted by lars in Molehill / Stage3D | ND2D | Source | Talk

I found some time to add a little bit more “D” to ND2D. Besides the regular “rotation” property which rotated around the z-axis, all nodes now have  rotationX, rotationY, rotationZ properties and are displayed via a perspective projection. It works similar to the Flash 10 2.5D API (Planes in space), could be useful for some fancy transition effects.

Second, I added a few properties to change the appearance of textures. You can strech textures now and define how they should be sampled. The API let’s you choose how the texture is filtered, if mipmapping should be used and how the mipmap filtering should be. I created four predefined quality settings: LOW, MED, HIGH and ULTRA. Have fun:

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

8 Responses

  • Choochoo says:

    amazing addition, thank you! Keeps getting better and better, batches only taking in texture now? = golden!

  • Niklas says:

    Hi there!
    Really like what I see regarding ND2D.
    I haven’t had the chance just yet to play with it but it seems like lots of fun! :)
    One question regarding this “2.5D” kind of thing.
    If you have a movie clip containing only vector graphics are then the vectors kept vector or are they transformed into a bitmap?
    Keep up the great work!!


  • lars says:

    Thanks ;)

    The engine works with bitmaps only. If you have vector graphics, you have to draw them to a bitmap first.

  • tonypa says:

    What would be most basic object in ND2D to show graphics? Sort of bitmap2d, no mouse events needed and no need to add/remove childs either. Would it perform faster then Node2D?

  • lars says:

    @Tonypa: The Sprite2D is the basic object to show bitmaps. A node doesn’t contain anything that is displayed.

  • paha says:

    This is a must addition! I did something similar to add basic 3D features, but it is better to have this stuff built in.

    Btw. is there any way to control camera projection yet?

  • Niklas says:

    Hi Lars!
    Thanks for your reply.
    Oh – I didn’t know that but I also realised that this probably applies to Stage3D & as well.


  • lars says:

    @Nilkas: Yes. This applies to all GPU related stuff. The GPU can’t render vectors.
    @paha: You could subclass the Camera2D to modify the projection.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">