You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Download pixijs pack by promise and GZIP packerer
Some people want manual download
you just need to sync the selected link in the build and found a way to add in the array pixiJSbuild
varPromise=window.Promise;functionmultiImport(modules){returnPromise.all(modules.map(function(m){returnimport('https://unsafe-production.jspm.io/'+(m.name?m.name:m)).then(({default: module})=>([(m.varName ? m.varName : m),module]))})).then((modules)=>{letmods={};modules.forEach((mod)=>mods[mod[0]]=mod[1]);returnmods});}multiImport([{name: "file-saver",varName: "fileSaver"},{name: "jszip",varName: "JSZip"},{name: "jszip-utils",varName: "JSZipUtils"}]).then((modules)=>{constJSZip=modules.JSZip;constJSZipUtils=modules.JSZipUtils;constsaveAs=modules.fileSaver.saveAs;constzip=newJSZip();// store here the selected js filesconstpixiJSbuild=["https://pixijs.download/dev/packages/prepare.min.js","https://pixijs.download/dev/packages/settings.min.js","https://pixijs.download/dev/packages/mesh.min.js",];pixiJSbuild.forEach(url=>{zip.file(url.replace(/.*\//,""),newPromise((resolve,reject)=>JSZipUtils.getBinaryContent(url,(err,data)=>(err) ? reject(err) : resolve(String.fromCharCode.apply(null,newUint8Array(data))))))});zip.generateAsync({type:"blob"}).then((pixiZip)=>saveAs(pixiZip,"pixiJS.zip"),(e)=>console.log(e));});
The text was updated successfully, but these errors were encountered:
Download pixijs pack by promise and GZIP packerer
Some people want manual download
you just need to sync the selected link in the build and found a way to add in the array
pixiJSbuild
The text was updated successfully, but these errors were encountered: