main.js 531 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. module.exports = {
  3. load () {
  4. // execute when package loaded
  5. },
  6. unload () {
  7. // execute when package unloaded
  8. },
  9. // register your ipc messages here
  10. messages: {
  11. 'open' () {
  12. // open entry panel registered in package.json
  13. Editor.Panel.open('bezier');
  14. },
  15. 'say-hello' () {
  16. Editor.log('Hello World!');
  17. // send ipc message to panel
  18. Editor.Ipc.sendToPanel('bezier', 'bezier:hello');
  19. },
  20. 'pointClick' () {
  21. Editor.log('Button clicked!');
  22. }
  23. },
  24. };