@gridspace/raster-path 1.0.4 → 1.0.5

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.
package/build/index.html CHANGED
@@ -125,6 +125,6 @@
125
125
  }
126
126
  </script>
127
127
  <script type="module" src="app.js"></script>
128
- <!-- <script type="module" src="webgpu-worker.js"></script> -->
128
+ <!-- <script type="module" src="raster-worker.js"></script> -->
129
129
  </body>
130
130
  </html>
@@ -48,13 +48,9 @@
48
48
  * @property {'planar'|'radial'} mode - Rasterization mode (default: 'planar')
49
49
  * @property {boolean} autoTiling - Automatically tile large datasets (default: true)
50
50
  * @property {number} gpuMemorySafetyMargin - Safety margin as percentage (default: 0.8 = 80%)
51
- * @property {number} maxConcurrentTiles - Max concurrent tiles for radial rasterization (default: 50)
52
51
  * @property {number} maxGPUMemoryMB - Maximum GPU memory per tile (default: 256MB)
53
- * @property {number} minTileSize - Minimum tile dimension (default: 50mm)
54
- * @property {number} radialRotationOffset - Radial mode: rotation offset in degrees (default: 0, use 90 to start at Z-axis)
55
52
  * @property {number} resolution - Grid step size in mm (required)
56
53
  * @property {number} rotationStep - Radial mode only: degrees between rays (e.g., 1.0 = 360 rays)
57
- * @property {number} trianglesPerTile - Target triangles per tile for radial rasterization (default: calculated)
58
54
  * @property {number} batchDivisor - Testing parameter to artificially divide batch size (default: 1)
59
55
  * @property {boolean} debug - Enable debug logging (default: false)
60
56
  * @property {boolean} quiet - Suppress log output (default: false)
@@ -110,14 +106,10 @@ export class RasterPath {
110
106
 
111
107
  // Configuration with defaults
112
108
  this.config = {
113
- workerName: config.workerName ?? "webgpu-worker.js",
109
+ workerName: config.workerName ?? "raster-worker.js",
114
110
  maxGPUMemoryMB: config.maxGPUMemoryMB ?? 256,
115
111
  gpuMemorySafetyMargin: config.gpuMemorySafetyMargin ?? 0.8,
116
112
  autoTiling: config.autoTiling ?? true,
117
- minTileSize: config.minTileSize ?? 50,
118
- maxConcurrentTiles: config.maxConcurrentTiles ?? 10,
119
- trianglesPerTile: config.trianglesPerTile, // undefined = auto-calculate
120
- radialRotationOffset: config.radialRotationOffset ?? 0, // degrees
121
113
  batchDivisor: config.batchDivisor ?? 1, // For testing batching overhead
122
114
  debug: config.debug,
123
115
  quiet: config.quiet
@@ -138,14 +130,14 @@ export class RasterPath {
138
130
 
139
131
  return new Promise((resolve, reject) => {
140
132
  try {
141
- // Create worker from the webgpu-worker.js file
133
+ // Create worker from the raster-worker.js file
142
134
  const workerName = this.config.workerName;
143
135
  const isBuildVersion = import.meta.url.includes('/build/') || import.meta.url.includes('raster-path.js');
144
136
  const workerPath = workerName
145
137
  ? new URL(workerName, import.meta.url)
146
138
  : isBuildVersion
147
- ? new URL(`./webgpu-worker.js`, import.meta.url)
148
- : new URL(`./web/webgpu-worker.js`, import.meta.url);
139
+ ? new URL(`./raster-worker.js`, import.meta.url)
140
+ : new URL(`../core/raster-worker.js`, import.meta.url);
149
141
  this.worker = new Worker(workerPath, { type: 'module' });
150
142
 
151
143
  // Set up message handler