The coffee cup shape allows you to define its diameter and height. It also adjusts itself for the image you loaded to the “Body” side. The image needs to be designed to wrap the whole cup 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 - controls if the cup is empty or filled with coffee;
- Show lid - controls the visibility of the lid;
- 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("tall", "generator.mugs.CoffeeCup"); var g = m.generator; g.diameter = 9; g.empty = true; g.showLid = false; g.height = 13;
Here’s how to automatically fit to image:
var m = scene.root.addMesh("custom coffee", "generator.mugs.CoffeeCup"); var g = m.generator; g.material("Body").diffuseTexture = "/path/to/image.jpg"; g.fitToImages();