DX – JS – Grid Positions – example

Create an list of X Y position coordinates that create a grid using Javascript.

In this example patch I use some Javascript to split the Isadora stage into a centered grid. I have used this in a number of my own projects, so I thought I would share this now.

The project requires the JSON parser plugin: https://troikatronix.com/add-ons/json-parser-json-bundler/

It isn’t used heavily, and you could remove it from the project pretty easily. For now I have it included.

 

I have created 3 sample scenes all using the same grid factors 1x2x3 = 6, so we have these possible layouts: 2×3 , 3×2 , 1×6 and 6×1.

You could adjust these samples scenes to use: 1x2x2x3 = 12 producing six layouts or what ever other combination you like. More factors and possibilities mean more X,Y connections.

The sample scenes are:

  • Hexagons are drawn to the stage in alternating pattern grids each with some random settings and animation.
  • Text Blocks (listing the XY values for each) much like the Hexagons but using an optimized reader approach for text animation
  • Line Grid creating a colored grid of animated vertical and horizontal lines which draw the grid divisions

The included images show a few layouts of each sample scene.

For Isadora
3.1+
Actor version(s)
1.0
Uploaded
December 15 2021
Size
502.03 KB
Downloads
30
Ratings
* * * * * 
Download
Comments
Log in to Reply