The tea mug shape allows you to define its diameter and height, and also define wether it is empty or not. It also adjusts itself for the image you loaded to the “Body” side. The image needs to be designed to wrap the whole mug to fit properly.
Here’s the list of settings:
- Diameter - the diameter of the mug itself, excluding the hand.
- Height - the height of the mug.
- Empty - tick to hide the tea in the mug.
- Fit to images - click it to automatically resize the mug according to your graphics.
Here’s how you can create a tea mug object using script:
var m = scene.root.addMesh("my mug", "generator.mugs.TeaMug"); var g = m.generator; g.diameter = 10; g.height = 20; g.empty = true;
Here’s how to automatically fit to image:
var m = scene.root.addMesh("my mug", "generator.mugs.TeaMug"); var g = m.generator; g.material("Body").diffuseTexture = "/path/to/image.jpg"; g.fitToImages();