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

beginTextureFill not a function #5332

Closed
verybigelephants opened this issue Jan 6, 2019 · 4 comments
Closed

beginTextureFill not a function #5332

verybigelephants opened this issue Jan 6, 2019 · 4 comments

Comments

@verybigelephants
Copy link

verybigelephants commented Jan 6, 2019

i've been trying to draw texture on graphics element and use this function http://pixijs.download/dev/docs/PIXI.Graphics.html#beginTextureFill but it seems as if the library didn't even have it implemented

	...
	let gfx_container = app.stage.scene = app.stage.addChild(new PIXI.Graphics());
	
	gfx_container.beginTextureFill(texture);
	gfx_container.drawRect((x * tile_size), (y * tile_size), tile_size, tile_size);
	gfx_container.endFill();
	...

gfx_container.beginTextureFill is not a function

@bigtimebuddy
Copy link
Member

The version of PixiJS that you're using matters. We haven't released a version of v5 yet (currently the dev branch). That doc link you referenced is the latest dev. To see the latest v4 release (most stable) go here: http://pixijs.download/v4.8.4/docs/PIXI.Graphics.html

If you want to play around with beginTextureFill, you can use this build: http://pixijs.download/dev/pixi.min.js

Hope that helps clarify.

@verybigelephants
Copy link
Author

thank you!

or perhaps you could recommend some other way of drawing a lot of simple graphic elements into one container?

i want to build a part of my scene tile-by-tile and there will be a lot of them. they are static drawn tiles that make up a picture, that will be updated once in a while. if i use classic sprites - there's a lot of them and it really heats the whole machine up

@bigtimebuddy
Copy link
Member

From your description it's not clear to me what you're trying to achieve. In PixiJS there are multiple ways to draw the same thing, it depends largely of the details and what you're trying to achieve.

Also, I'd recommend http://www.html5gamedevs.com/forum/15-pixijs/ if you're looking for advice or help on a particular approach.

I'm going to close this issue, because your initial question was answered. Feel free to open another issue if you're looking for something specific related to Graphics drawing.

@lock
Copy link

lock bot commented Jan 7, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants