Access to canvas from within external libraries

Greetings, I'm curious as to how get access to the canvas DOM object used by p5.js from within my library. In ProcessingJS, for example, I can call registerLibrary() as follows:

Processing.registerLibrary("MyLibrary", {       
    attach : function(p5)  {    
        myLib.canvas = p5.externals.canvas;
    }     
 });

Thanks.

Tagged:

Answers

  • hey, working on cleaning up the external hooks right now. I should have a better answer early next week! thanks for your patience.

Sign In or Register to comment.