Skip to content

Conversation

@Hiwen
Copy link
Contributor

@Hiwen Hiwen commented Jun 28, 2025

Description

Add wrapR property to Sampler and Texture3D, to support the newly added third dimension wrap.

Issue number and link

#12550

Testing plan

I have improved SamplerSpec.js.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@github-actions
Copy link

Thank you for the pull request, @Hiwen!

✅ We can confirm we have a CLA on file for you.

@Hiwen Hiwen marked this pull request as ready for review June 28, 2025 06:07
@syzdev
Copy link
Contributor

syzdev commented Jun 30, 2025

typo:

image

@Hiwen
Copy link
Contributor Author

Hiwen commented Jun 30, 2025

typo:

image

nice catch

@jjhembd jjhembd self-assigned this Jul 29, 2025
Copy link
Contributor

@jjhembd jjhembd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hiwen, sorry for the delayed review. This looks good overall. I re-merged main and tweaked a few JSDoc comments. Please take a look and let me know if the changes make sense.

I have one question about some additional source data types. Would it be easy enough to add those here, or do you think that should be a separate PR?

* @property {number} width The width (in pixels) of the 3D texture source data.
* @property {number} height The height (in pixels) of the 3D texture source data.
* @property {number} depth The depth (in pixels) of the 3D texture source data.
* @property {TypedArray|DataView} arrayBufferView The source data for a 3D texture. The type of each element needs to match the pixelDatatype.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs for texImage3D and texSubImage3D allow for these additional sources: ImageBitmap, ImageData, HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement. Can we support those here? If so, we could generalize this type definition to Texture.Source and use it in Texture.js too!

Copy link
Contributor Author

@Hiwen Hiwen Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using ImageBitmap, ImageData, HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement as the source is a really good idea. However, I haven't actually used this yet, and I'm not sure about the specific effects. I think it would be better to open a new issue to support this.

@javagl
Copy link
Contributor

javagl commented Jul 31, 2025

This PR is somehow related to #12781 . Linking just for awareness. Further changes may not be in the scope of this PR.

Copy link
Contributor

@jjhembd jjhembd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @Hiwen! I'll open a separate issue to track support for the remaining input types.

@jjhembd jjhembd added this pull request to the merge queue Jul 31, 2025
Merged via the queue into CesiumGS:main with commit cb7fe95 Jul 31, 2025
7 of 8 checks passed
@jjhembd jjhembd mentioned this pull request Jul 31, 2025
@Hiwen Hiwen deleted the Textrue3D-wrapR branch August 2, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants