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 Request: PIXI.Texture.fromBuffer #10541

Open
lin12058 opened this issue May 16, 2024 · 2 comments
Open

Feature Request: PIXI.Texture.fromBuffer #10541

lin12058 opened this issue May 16, 2024 · 2 comments
Assignees
Labels
📚 Doc Improvement Documentation around issue needs improvement

Comments

@lin12058
Copy link

Description

version : pixi.js@^8.1.3

PIXI.Texture.fromBuffer function disappearance
Or allow oneself to create Uint8Array as input in sharder

#9659
History has been added, but it has disappeared

@Zyie
Copy link
Member

Zyie commented May 17, 2024

Texture.from should support creating a texture from a buffer

const texturePixels = new Uint8Array([
    255, 0, 0, 255, 0, 255, 0, 153,
    0, 0, 255, 102, 255, 255, 0, 51
]);

const texture = Texture.from({
    resource: texturePixels,
    width: 2,
    height: 2,
});

@lin12058
Copy link
Author

Is there any document that can explain the input of this resource
I have tried many methods because this input is generic(And then it didn't succeed)
Causing confusion in my input. I was updated from v7 and now it has rolled back
@Zyie

@Zyie Zyie added the 📚 Doc Improvement Documentation around issue needs improvement label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 Doc Improvement Documentation around issue needs improvement
Projects
None yet
Development

No branches or pull requests

2 participants