Open jameszhong2008 opened 3 years ago
Hello, could you tell us what environment you would want to use Paper.js into for example ?
Hello @sasensi, Thanks for your reply. It is a Evironment called MiniProgram in WeChat, it based on browser kernel, but it did't expose window and document object. https://developers.weixin.qq.com/miniprogram/en/dev/framework/
So we can't import paperjs, because self is null here, and it is not a node exvironment. So it does not work.
self = self || require('./node/self.js'); var window = self.window, document = self.document;
But MiniProgram did expose the Canvas object. We can use it to access drawing context.
var context = canvas.getContext('2d'); var gl = canvas.getContext('webgl');
Any suggestion?
Hello @lehni and to whom have some ideas. I use paper in several projects and it works great, I use it in Browser or Nodejs environments before. But a new issue occured, i need to use Path, Segments features in environments, neither Browser or Nodejs. I don't need to draw it on Canvas or do any other operation. Only need to process the Path's data and do some mathmatic calculation. Is it possible and how can I acheive it? Thanks a lot.