Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

createObj path square example

Could someone please provide an example of creating a simple square 'path' object created via createObj. This is the last thing I need to know how to do to complete my TSV loaders basic functionality so an example would be of great use!
1488093045
Lithl
Pro
Sheet Author
API Scripter
createObj('path', { stroke: '#ff0000', layer: 'objects', top: 70, left: 70, width: 140, height: 140, _path: JSON.stringify([ ['M', 0, 0], ['L', 140, 0], ['L', 140, 140], ['L', 0, 140], ['L', 0, 0] ]) });
thanks much!