Skip to content

Improve Texture JSDocs (and some others) #7595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/framework/anim/binder/default-anim-binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Entity } from '../../entity.js';
/**
* Implementation of {@link AnimBinder} for animating a skeleton in the graph-node hierarchy.
*
* @implements {AnimBinder}
* @ignore
*/
class DefaultAnimBinder {
Expand Down
26 changes: 16 additions & 10 deletions src/platform/graphics/texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ import { TextureUtils } from './texture-utils.js';
let id = 0;

/**
* A texture is a container for texel data that can be utilized in a fragment shader. Typically,
* the texel data represents an image that is mapped over geometry.
* Represents a texture, which is typically an image composed of pixels (texels). Textures are
* fundamental resources for rendering graphical objects. They are commonly used by
* {@link Material}s and sampled in {@link Shader}s (usually fragment shaders) to define the visual
* appearance of a 3D model's surface. Beyond storing color images, textures can hold various data
* types like normal maps, environment maps (cubemaps), or custom data for shader computations. Key
* properties control how the texture data is sampled, including filtering modes and coordinate
* wrapping.
*
* Note on **HDR texture format** support:
* 1. **As textures**:
Expand Down Expand Up @@ -597,7 +602,7 @@ class Texture {
}

/**
* Sets the comparison function when compareOnRead is enabled. Possible values:
* Sets the comparison function when {@link compareOnRead} is enabled. Possible values:
*
* - {@link FUNC_LESS}
* - {@link FUNC_LESSEQUAL}
Expand All @@ -616,7 +621,7 @@ class Texture {
}

/**
* Sets the comparison function when compareOnRead is enabled.
* Gets the comparison function when {@link compareOnRead} is enabled.
*
* @type {number}
*/
Expand All @@ -626,7 +631,8 @@ class Texture {

/**
* Sets the integer value specifying the level of anisotropy to apply to the texture ranging
* from 1 (no anisotropic filtering) to the {@link GraphicsDevice} property maxAnisotropy.
* from 1 (no anisotropic filtering) to the maximum anisotropy supported by the graphics device
* (see {@link GraphicsDevice#maxAnisotropy}).
*
* @type {number}
*/
Expand Down Expand Up @@ -743,7 +749,7 @@ class Texture {
* - {@link PIXELFORMAT_PVRTC_4BPP_RGB_1}
* - {@link PIXELFORMAT_PVRTC_4BPP_RGBA_1}
* - {@link PIXELFORMAT_111110F}
* - {@link PIXELFORMAT_ASTC_4x4}>/li>
* - {@link PIXELFORMAT_ASTC_4x4}
* - {@link PIXELFORMAT_ATC_RGB}
* - {@link PIXELFORMAT_ATC_RGBA}
*
Expand Down Expand Up @@ -1127,10 +1133,10 @@ class Texture {

/**
* Forces a reupload of the textures pixel data to graphics memory. Ordinarily, this function
* is called by internally by {@link Texture#setSource} and {@link Texture#unlock}. However, it
* still needs to be called explicitly in the case where an HTMLVideoElement is set as the
* source of the texture. Normally, this is done once every frame before video textured
* geometry is rendered.
* is called by internally by {@link setSource} and {@link unlock}. However, it still needs to
* be called explicitly in the case where an HTMLVideoElement is set as the source of the
* texture. Normally, this is done once every frame before video textured geometry is
* rendered.
*/
upload() {
this._needsUpload = true;
Expand Down