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

Fix: update getTexture API to be consistent with HTMLText #10431

Merged
merged 5 commits into from Apr 30, 2024

Conversation

GoodBoyDigital
Copy link
Member

Description of change

This adjuste the API so that creating a text texture is a little easier for devs.

const textOptions = {
    text:'hello'
    style
};

// make a text.. easy!
const text = new Text(textOptions);

// make a text texture.. just as easy!
const textTexture = renderer.canvasText.gettexture(textOptions);
Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Documentation is changed or added
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

@GoodBoyDigital GoodBoyDigital linked an issue Apr 9, 2024 that may be closed by this pull request
Copy link

codesandbox-ci bot commented Apr 9, 2024

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 6cb04ac:

Sandbox Source
pixi.js-sandbox Configuration

src/scene/text/canvas/CanvasTextSystem.ts Outdated Show resolved Hide resolved
@Zyie Zyie added the v8 label Apr 10, 2024
@Zyie Zyie changed the title Make the user facing getTexture a nicer API and consistent with HTMLText Feat: update getTexture API to be consistent with HTMLText Apr 10, 2024
@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Apr 11, 2024
@Zyie Zyie changed the title Feat: update getTexture API to be consistent with HTMLText Fix: getTexture API to be consistent with HTMLText Apr 30, 2024
@Zyie Zyie changed the title Fix: getTexture API to be consistent with HTMLText Fix: update getTexture API to be consistent with HTMLText Apr 30, 2024
@Zyie Zyie added this pull request to the merge queue Apr 30, 2024
Merged via the queue into dev with commit 175e048 Apr 30, 2024
4 checks passed
@Zyie Zyie deleted the chore/canvas-getText branch April 30, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t v8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Unable to add a mask to the text
2 participants