(size: GPUExtent3D)
| 21 | } |
| 22 | |
| 23 | function normalizeExtent3D(size: GPUExtent3D): GPUExtent3DDict { |
| 24 | if (Array.isArray(size)) { |
| 25 | if (size[0] === undefined) { |
| 26 | throw new TypeError( |
| 27 | "Cannot normalize Extent3d: width is not defined", |
| 28 | ); |
| 29 | } |
| 30 | const dict: GPUExtent3DDict = { |
| 31 | width: size[0], |
| 32 | }; |
| 33 | if (size[1] !== undefined) { |
| 34 | dict.height = size[1]; |
| 35 | } |
| 36 | if (size[2] !== undefined) { |
| 37 | dict.depthOrArrayLayers = size[2]; |
| 38 | } |
| 39 | return dict; |
| 40 | } else { |
| 41 | return size; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | function extent3DPhysicalSize( |
| 46 | size: GPUExtent3D, |
no outgoing calls
no test coverage detected