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

Feat: Add Texture.sourceFrom #10318

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

GoodBoyDigital
Copy link
Member

@GoodBoyDigital GoodBoyDigital commented Mar 13, 2024

Hey! so we no longer have a function that directly functions as BaseTexture.from

I see three possible solutions as to where this one liner could go:

1: TextureSource.from - most closely resembles v7. But technically it would most likely return something that extends TextureSource, is this ok? We would be swapping convenance for purity!

2: getTextureSourceFrom - create a floating function that can be imported that does the trick. might be a bit tricky to use for devs as they would need to know about its existence. But would be pure!

3: Textue.sourceFrom - same as option one, but on the texture class. (currently implemented)

I could probably be sold on either option one or three! But would be good to get other peoples opinions!

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2adc4b7:

Sandbox Source
pixi.js-sandbox Configuration

@Zyie Zyie changed the title Added texture.sourceFrom Feat: Add texture.sourceFrom Mar 13, 2024
@Zyie Zyie changed the title Feat: Add texture.sourceFrom Feat: Add Texture.sourceFrom Mar 13, 2024
@Zyie Zyie added the v8 label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants