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 text renderer display misalignment error #1914

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

singlecoder
Copy link
Member

@singlecoder singlecoder commented Dec 20, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

test code

const wrapTextEntity = rootEntity.createChild("wrap");
  wrapTextEntity.transform.setScale(60, 60, 60);
  wrapTextEntity.transform.setPosition(0, -35, 0);
  const wrapTextRenderer = wrapTextEntity.addComponent(TextRenderer);
  wrapTextRenderer.fontSize = 60;
  wrapTextRenderer.color = new Color(0, 1, 0, 1);
  wrapTextRenderer.text = "测试";
  wrapTextRenderer.width = 5;
  wrapTextRenderer.enableWrapping = true;
  setTimeout(() => {
    wrapTextRenderer.text = "测试。";
  }, 3000);

@GuoLei1990 GuoLei1990 added text 2D text system Bug Something isn't working labels Dec 21, 2023
@GuoLei1990 GuoLei1990 merged commit 41ee5bb into galacean:main Dec 21, 2023
@GuoLei1990 GuoLei1990 changed the title Fix text renderer wrap error Fix text renderer display misalignment error Dec 21, 2023
GuoLei1990 added a commit that referenced this pull request Dec 27, 2023
* main:
  Delete ignore file (#1917)
  Ignore git-lfs husky sh (#1916)
  "v1.1.0-beta.30"
  Fix component disable error when  do `enabled = false` in `onAwake` method (#1915)
  Add e2e test (#1656)
  "v1.1.0-beta.29"
  Fix text renderer wrap error (#1914)
  "v1.1.0-beta.28"
  feat(material): temporary resolution of submesh rendering order (#1910)
  fix: unit test (#1909)
  Animator events support be added in real time (#1906)
  editor: parse layer (#1907)

# Conflicts:
#	package.json
#	packages/core/package.json
#	packages/design/package.json
#	packages/draco/package.json
#	packages/galacean/package.json
#	packages/loader/package.json
#	packages/math/package.json
#	packages/physics-lite/package.json
#	packages/physics-physx/package.json
#	packages/rhi-webgl/package.json
#	packages/shader-lab/package.json
#	pnpm-lock.yaml
#	tests/src/core/Animator.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working text 2D text system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants