Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. GPUTexture
  4. depthOrArrayLayers

GPUTexture: depthOrArrayLayers 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 insecure contexts (HTTPS), in some or allsupporting browsers.

Note: This feature is available inWeb Workers.

ThedepthOrArrayLayers read-only property of theGPUTexture interface represents the depth or layer count of theGPUTexture.

This is set based on thesize property in the descriptor object passed into the originatingGPUDevice.createTexture() call.

Value

A number. This represents:

In cases where theGPUTexture does not have a depth or layers, the value is 1.

Examples

js
// …const test = device.createTexture({  size: [128],  format: "r8uint",  dimension: "1d",  usage: GPUTextureUsage.COPY_SRC,});console.log(test.depthOrArrayLayers); // 1

Specifications

Specification
WebGPU
# dom-gputexture-depthorarraylayers

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp