@geastack/native-webgl-angle 0.1.10 → 0.1.11

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.
@@ -147,11 +147,13 @@ export function transformAutomaticInstancing(text, fileName, replaceOne, renderI
147
147
  }
148
148
 
149
149
  export function transformCanonicalInstanceHooks(text, fileName) {
150
- if (fileName.endsWith('/three/src/core/Object3D.js')) {
150
+ // Windows paths arrive with backslashes.
151
+ const normalized = fileName.replaceAll('\\', '/');
152
+ if (normalized.endsWith('/three/src/core/Object3D.js')) {
151
153
  return text + `\nexport const nativeInstanceBeforeRender = Object3D.prototype.onBeforeRender;
152
154
  export const nativeInstanceAfterRender = Object3D.prototype.onAfterRender;\n`;
153
155
  }
154
- if (fileName.endsWith('/three/src/materials/Material.js')) {
156
+ if (normalized.endsWith('/three/src/materials/Material.js')) {
155
157
  return text + `\nexport const nativeInstanceMaterialBeforeRender = Material.prototype.onBeforeRender;
156
158
  export const nativeInstanceBeforeCompile = Material.prototype.onBeforeCompile;
157
159
  export const nativeInstanceProgramCacheKey = Material.prototype.customProgramCacheKey;\n`;
package/geatsc-plugin.mjs CHANGED
@@ -2010,7 +2010,8 @@ const transformSource = ({ fileName, text }) => {
2010
2010
  }
2011
2011
  if (normalized.endsWith("/three/src/renderers/WebGLRenderer.js")) {
2012
2012
  transformed =
2013
- `import { nativeProfilePhase } from '${fileURLToPath(new URL("./src/nativeWebGLHost.ts", import.meta.url))}';\n` +
2013
+ // Forward slashes: a Windows path's backslashes would be escapes in this literal.
2014
+ `import { nativeProfilePhase } from '${fileURLToPath(new URL("./src/nativeWebGLHost.ts", import.meta.url)).replaceAll("\\", "/")}';\n` +
2014
2015
  transformed;
2015
2016
  transformed = replaceOne(
2016
2017
  transformed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/native-webgl-angle",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Typed native WebGL compatibility layer backed by ANGLE/Metal",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {