KnisterPeter Posted February 16, 2015 Share Posted February 16, 2015 Hi there, I would like to create sprites from a dynamic source (canvas with some rendered text).I've seen that its possible to create textures from base64 data uris but the current SpriteManager does not allow this, since its creating the texture by itself.Is there a current way to achieve this, or should I create a pull request which enables this function? Kind regardsMarkus Quote Link to comment Share on other sites More sharing options...
KnisterPeter Posted February 16, 2015 Author Share Posted February 16, 2015 Oh, as well current sprites does not inherit from Node. Therefore Sprites could not be added to a parent node for relative positioning. Is there an easy way to do so? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 16, 2015 Share Posted February 16, 2015 Yes, you can Just create a dynamicTexture objectand set this dynamicTexture to your sprite texture like this : http://www.html5gamedevs.com/topic/11570-sprite-manager-texture/?p=66937 running ex here : http://logiciels.iut-rodez.fr/proto/weathermap/or here : http://www.babylonjs-playground.com/#1GWIGC#6 RaananW 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.