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

Bug: 8.1.4 break text #10556

Closed
Makio64 opened this issue May 20, 2024 · 4 comments
Closed

Bug: 8.1.4 break text #10556

Makio64 opened this issue May 20, 2024 · 4 comments
Labels
👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify.

Comments

@Makio64
Copy link

Makio64 commented May 20, 2024

Current Behavior

version 8.1.3 / version 8.1.4 :

Screenshot 2024-05-20 at 22 06 05 Screenshot 2024-05-20 at 22 03 01

the bug vary across the different texts in the game but its like the texture atlas / the texture containing the characters is totally lost.. :)

My script for text writing :

import stage from "@/makio/core/stage"
import { Text, Container} from "pixi.js"

export default class WritingText extends Container{
	constructor(styleOptions = {}){
		super()
		let style = {fontFamily: 'Quantico',fill: 0x1C005C, fontSize: 30, wordWrap: true, wordWrapWidth: (stage.width-40)*2, align: 'left', lineHeight :50, ...styleOptions}
		this.text = new Text({text:``, style})
		this.text.position.x = 20
		this.text.position.y = 40
		this.text.scale.set(.5,.5)
		this.letters = []
		this.msg = ''
		this.addChild(this.text)

		stage.onUpdate.add(this.update)
	}

	update = (dt) => {
		if (!this.letters.length) return;

		this.time += dt;
		let delay = 8;
		while (this.time >= delay) {
			if (this.letters.length > 0) {
				this.msg += this.letters.shift();
				this.text.text = this.msg;
			}
			this.time -= delay;
		}
	}

	write(text){
		this.time = 0
		this.msg = ''
		this.letters = text.split('')
	}
}

Expected Behavior

The text still work in 8.1.x :)

Steps to Reproduce

change a text over time.

Environment

pixi.js version**: 8.1.4

Possible Solution

No response

Additional Information

No response

@GoodBoyDigital
Copy link
Member

heya, thanks for flagging - to confirm this is 8.1.3 -> 8.1.4?

@Makio64
Copy link
Author

Makio64 commented May 20, 2024

Yes I confirm the bug was introduce in 8.1.4

@GoodBoyDigital
Copy link
Member

heya, i am struggling to recreate this one!
Would you mind testing the game out with this branch please?

Thanks!

@Zyie Zyie added the 👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify. label May 23, 2024
@Makio64
Copy link
Author

Makio64 commented May 29, 2024

Sorry guys, I was busy and just went back on testing it : I try on 8.1.5 and it works well, only 8.1.4 is actually broken

@Makio64 Makio64 closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify.
Projects
None yet
Development

No branches or pull requests

3 participants