Skip to content

Commit e799808

Browse files
committed
save
1 parent b50fc51 commit e799808

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

src/three/plugins/images/PMTilesPlugin.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,8 @@ export class PMTilesPlugin extends EllipsoidProjectionTilesPlugin {
3232

3333
}
3434

35-
const data = res.data;
36-
37-
// Handle both ArrayBuffer and Uint8Array
38-
if ( data instanceof ArrayBuffer ) {
39-
40-
return data;
41-
42-
}
43-
44-
// Uint8Array - copy to new ArrayBuffer to avoid shared buffer issues
45-
return data.slice().buffer;
35+
// res.data is ArrayBuffer per PMTiles API
36+
return res.data;
4637

4738
} );
4839

src/three/plugins/images/sources/PMTilesImageSource.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,8 @@ export class PMTilesImageSource extends MVTImageSource {
4545

4646
}
4747

48-
// res.data is Uint8Array - convert to ArrayBuffer for processBufferToTexture
49-
const data = res.data;
50-
const buffer = data.buffer.slice(
51-
data.byteOffset,
52-
data.byteOffset + data.byteLength
53-
);
54-
55-
return this.processBufferToTexture( buffer );
48+
// res.data is ArrayBuffer per PMTiles API
49+
return this.processBufferToTexture( res.data );
5650

5751
} );
5852

0 commit comments

Comments
 (0)