fix legacy png lib to work with esm build
This commit is contained in:
parent
295dcd12ec
commit
07bbe547e3
3 changed files with 3 additions and 2 deletions
1
notes.md
1
notes.md
|
|
@ -15,6 +15,7 @@
|
|||
* `P` move all persisted / workspace settings/data to IndexedDB (LS limitations)
|
||||
* `P` faster ray intersect https://github.com/gkjohnson/three-mesh-bvh/
|
||||
* `P` try material clipping planes for slice range selection
|
||||
* `P` switch png lib to https://github.com/photopea/UPNG.js
|
||||
|
||||
* `F` edit in Mesh:Tool
|
||||
* `F` custom device vars for profiles / ranges / gcode
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
import './pngjs.js';
|
||||
|
||||
// Re-export the PNG object
|
||||
export const PNG = self.png ? self.png.PNG : null;
|
||||
export const PNG = globalThis.png ? globalThis.png.PNG : null;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.png = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
(function(f){globalThis.png = f();if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.png = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||
(function (Buffer){
|
||||
"use strict";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue