The canvas could be passed into Text
This feature could help users to  share canvas among two or more  Text  objects ( like Graphics._SPRITE_TEXTURE in Graphics).

In the game ,normally  we need rebuild stage/scene when stage/scene changed ,  If Text supports passing canvas , we could avoid create and destroy HTMLCanvasElement often when game running. 

e.g. create a canvas-pool  cache some canvas for Text.
1 parent c101938 commit 67e8019a3d7e8bd32fb85fdcdca7f6b98a044e15
@finscn finscn authored on 22 Dec 2016
GitHub committed on 22 Dec 2016
Showing 1 changed file
View
src/core/text/Text.js