You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
388 B

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. importScripts('../../dist/paper-full.js');
  2. paper.install(this);
  3. paper.setup([640, 480]);
  4. onmessage = function(event) {
  5. var data = event.data;
  6. if (data) {
  7. var path1 = project.importJSON(data[0]);
  8. var path2 = project.importJSON(data[1]);
  9. console.log(path1, path2);
  10. var result = path1.unite(path2);
  11. postMessage(result.exportJSON());
  12. }
  13. };