GPUTexture: height property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Thuộc tính chỉ đọc height của giao diện GPUTexture đại diện cho chiều cao của GPUTexture.
Giá trị này được đặt dựa trên giá trị của thuộc tính size trong đối tượng descriptor truyền vào lời gọi GPUDevice.createTexture() ban đầu.
Giá trị
Một số.
Ví dụ
js
// …
const depthTexture = device.createTexture({
size: [640, 480],
format: "depth24plus",
usage: GPUTextureUsage.RENDER_ATTACHMENT,
});
console.log(depthTexture.height); // 480
Thông số kỹ thuật
| Specification |
|---|
| WebGPU> # dom-gputexture-height> |