SymbolDefinition
Constructors
var path = new Path.Star(new Point(0, 0), 6, 5, 13); path.style = { fillColor: 'white', strokeColor: 'black' }; // Create a symbol definition from the path: var definition = new SymbolDefinition(path); // Place 100 instances of the symbol definition: for (var i = 0; i < 100; i++) { // Place an instance of the symbol definition in the project: var instance = definition.place(); // Move the instance to a random position within the view: instance.position = Point.random() * view.size; // Rotate the instance by a random amount between // 0 and 360 degrees: instance.rotate(Math.random() * 360); // Scale the instance between 0.25 and 1: instance.scale(0.25 + Math.random() * 0.75); }
Properties
Methods
Was this helpful?