@number10/phaserjsx 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12134,13 +12134,14 @@ function Particles(props) {
12134
12134
  return /* @__PURE__ */ jsxRuntime.jsx("particles", { ...props });
12135
12135
  }
12136
12136
  function preprocessSvgForTinting(svg) {
12137
- return svg.replace(/fill="currentColor"/gi, 'fill="#FFFFFF"').replace(/fill='currentColor'/gi, "fill='#FFFFFF'").replace(/fill:\s*currentColor/gi, "fill: #FFFFFF").replace(/fill="#000000"/gi, 'fill="#FFFFFF"').replace(/fill="#000"/gi, 'fill="#FFFFFF"').replace(/fill='#000000'/gi, "fill='#FFFFFF'").replace(/fill='#000'/gi, "fill='#FFFFFF'");
12137
+ return svg.replace(/fill="currentColor"/gi, 'fill="#FFFFFF"').replace(/fill='currentColor'/gi, "fill='#FFFFFF'").replace(/fill:\s*currentColor/gi, "fill: #FFFFFF").replace(/stroke="currentColor"/gi, 'stroke="#FFFFFF"').replace(/stroke='currentColor'/gi, "stroke='#FFFFFF'").replace(/stroke:\s*currentColor/gi, "stroke: #FFFFFF").replace(/fill="#000000"/gi, 'fill="#FFFFFF"').replace(/fill="#000"/gi, 'fill="#FFFFFF"').replace(/fill='#000000'/gi, "fill='#FFFFFF'").replace(/fill='#000'/gi, "fill='#FFFFFF'").replace(/stroke="#000000"/gi, 'stroke="#FFFFFF"').replace(/stroke="#000"/gi, 'stroke="#FFFFFF"').replace(/stroke='#000000'/gi, "stroke='#FFFFFF'").replace(/stroke='#000'/gi, "stroke='#FFFFFF'");
12138
12138
  }
12139
12139
  async function svgToTexture(scene, key, svgOrUrl, width = 32, height = 32) {
12140
12140
  const trimmed = svgOrUrl.trim();
12141
12141
  let finalUrl;
12142
12142
  let shouldRevokeUrl = false;
12143
- if (trimmed.startsWith("<svg")) {
12143
+ const isSvgString = trimmed.startsWith("<svg") || trimmed.startsWith("<!--");
12144
+ if (isSvgString && trimmed.includes("<svg")) {
12144
12145
  const processedSvg = preprocessSvgForTinting(trimmed);
12145
12146
  const blob = new Blob([processedSvg], { type: "image/svg+xml" });
12146
12147
  finalUrl = URL.createObjectURL(blob);
@@ -17112,4 +17113,4 @@ exports.useViewportSize = useViewportSize;
17112
17113
  exports.useWorldLayoutRect = useWorldLayoutRect;
17113
17114
  exports.viewportRegistry = viewportRegistry;
17114
17115
  exports.withHooks = withHooks;
17115
- //# sourceMappingURL=TransformOriginView-DsD_qZno.cjs.map
17116
+ //# sourceMappingURL=TransformOriginView-Dw_HKnFH.cjs.map