playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
16 lines (13 loc) • 538 B
JavaScript
import { StringIds } from '../../core/string-ids.js';
const stringIds = new StringIds();
class TextureView {
constructor(texture, baseMipLevel = 0, mipLevelCount = 1, baseArrayLayer = 0, arrayLayerCount = 1){
this.texture = texture;
this.baseMipLevel = baseMipLevel;
this.mipLevelCount = mipLevelCount;
this.baseArrayLayer = baseArrayLayer;
this.arrayLayerCount = arrayLayerCount;
this.key = stringIds.get(`${baseMipLevel}:${mipLevelCount}:${baseArrayLayer}:${arrayLayerCount}`);
}
}
export { TextureView };