How would I use a Phaser loaded ANIMATING Texture Atlas in Three.js? I might add I want to use Phaser Texture as a canvas in Three.js
Anyone?
Sorry, you’re question is a little hard to understand. I’m not sure what a “Phaser loaded ANIMATION Texture Atlas” is, or how you would using something from Phaser in Three.js.
Maybe you can clarify a little more about what you want to do?
It’s a little weird in the first place to want to mix Phaser and Three, so there might be an issue with some fundamental concepts here as well.
snowbillr : Well, basically I’d like to use a Texture Atlas animated character from Phaser, grab the canvas & use said canvas as a Texture in Three.js.
anyone?
So you want Phaser to do the animating, then grab the canvas every animation frame and draw it in Three.js?
I have no idea what Three’s API looks like, and I think that Phaser is always going to render something to your web page. So this seems like a pretty tricky task.
I think you’d be better off rendering the animation on your own in Three.js, but I’m really not a great opinion on this lol.
Yes, I already tried that. Three.js has no Texture Atlas animation.
I need to know. Someone, please.
Is this possible? If so does anyone have a demo of how to do this?
Thank You.
I guess something like this should work:
material.map = new THREE.CanvasTexture(document.getElementById( 'canvasID' ));
with canvasID being a Phaser Canvas.