Modernise website by migrating to vite
This commit is contained in:
parent
5f0f500725
commit
f350b1ff37
34 changed files with 3185 additions and 21045 deletions
|
|
@ -1,14 +1,17 @@
|
|||
import { CopyPipeline } from '../../pipelines/copy/copy-pipeline';
|
||||
|
||||
import { vec2 } from 'gl-matrix';
|
||||
|
||||
import { CopyPipeline } from '../../pipelines/copy/copy-pipeline';
|
||||
|
||||
export class ResizableTexture {
|
||||
private texture: GPUTexture;
|
||||
private textureView: GPUTextureView;
|
||||
private readonly copyPipeline: CopyPipeline;
|
||||
private size: vec2 | null = null;
|
||||
|
||||
public constructor(private readonly device: GPUDevice, size: vec2) {
|
||||
public constructor(
|
||||
private readonly device: GPUDevice,
|
||||
size: vec2
|
||||
) {
|
||||
this.copyPipeline = new CopyPipeline(this.device);
|
||||
this.resize(size);
|
||||
}
|
||||
|
|
@ -21,8 +24,8 @@ export class ResizableTexture {
|
|||
const newTexture = this.device.createTexture({
|
||||
format: 'rgba16float',
|
||||
size: {
|
||||
width: size.x,
|
||||
height: size.y,
|
||||
width: size[0],
|
||||
height: size[1],
|
||||
},
|
||||
usage:
|
||||
GPUTextureUsage.STORAGE_BINDING |
|
||||
|
|
|
|||
Loading…
Reference in a new issue