Booklet

The Booklet shape has the following parameters:

  • Width - the width of the whole sheet
  • Height - the height of the whole sheet
  • Frames - the number of frames in the booklet. All frames have the same size.
  • Angle 1, Angle 2, etc - the angles between frames

The “Fit to images” button automatically adjusts Width and Height parameters, according to the images loaded to the Front and Back sides of the shape.

Scripting

Here is a sample script that creates a booklet object:

var m = scene.root.addMesh("booklet", "generator.Stationery.Booklet");
var g = m.generator;
g.width = 10;
g.height = 5;
g.frames = 3;
g.angle1 = -60;
g.angle2 = -60;

Angles are controlled by variables angle1 - angle8.

Here’s how to load image and resize the shape automatically:

var m = scene.root.addMesh("booklet", "generator.Stationery.Booklet");
var g = m.generator;
g.material("Front").diffuseTexture = "/path/to/image.jpg";
g.fitToImages();