Skip to content
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

feature (Texture): Add Source class #180

Merged
merged 6 commits into from
Mar 1, 2022
Merged

Conversation

0b5vr
Copy link
Contributor

@0b5vr 0b5vr commented Feb 22, 2022

Why

To catch up with r138 changes

What

Added Source class that is going to be introduced in r138.

I also added a test code textures-source.ts .

See: mrdoob/three.js#22846
See: mrdoob/three.js#23419

Points need review

  • I have very low confidence about the signature of Source.data and Texture.image
    • @Mugen87 would you mind reviewing this?
      I don't fully understand how Source works with video textures, compressed textures, ...
    • I decided to make it any for now.
  • Is it reasonable to define a type SourceData ?

Checklist

  • Checked the target branch (current goes master, next goes dev)
    • It's a r138 change
  • Added myself to contributors table
  • Ready to be merged

@0b5vr
Copy link
Contributor Author

0b5vr commented Feb 22, 2022

considering having <TSource = any> generics on Texture and Source......
I should do this in a separated PR.

Let me make a PR using any for this one.

@0b5vr 0b5vr mentioned this pull request Feb 22, 2022
16 tasks
Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

Great work adding a test!

@joshuaellis joshuaellis merged commit 3b7cc9b into three-types:dev Mar 1, 2022
@0b5vr 0b5vr deleted the source branch March 1, 2022 10:12
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.

2 participants