paperjs / paper.js

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey
http://paperjs.org
Other
14.27k stars 1.21k forks source link

Photon-wasm build error #2075

Closed deepushajia closed 3 weeks ago

deepushajia commented 3 weeks ago

malloc is not a function. (In 'malloc(arg.length * 1, 1)', 'malloc' is undefined)

Description/Steps to reproduce

malloc is not a function. (In 'malloc(arg.length * 1, 1)', 'malloc' is undefined) passArray8ToWasm0@http://localhost:3001/static/js/photon_photon_rs_js.chunk.js:3388:21 PhotonImage@http://localhost:3001/static/js/photon_photon_rs_js.chunk.js:4263:35 @http://localhost:3001/static/js/bundle.js:1841:27 function@http://localhost:3001/static/js/bundle.js:572:35 callCallback@http://localhost:3001/static/js/bundle.js:36927:23 dispatchEvent@[native code]

Link to reproduction test-case

built using wasm-pack as descried here: https://silvia-odwyer.github.io/photon/guide/using-photon-web/

Failed at the line: new photon.PhotonImage(imageData, width, height)

Expected result

No Error and Loading of PhotonImage on JS

Additional information

Ubuntu 22.04