Search the Community

Showing results for tags 'label'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 4 results

  1. Center text in container

    Hi, My query is this: I use the Cocos creator tool to position a text. When you export the position of this element and then integrate it into my phaser game, it happens that the selected position is slightly different from what is previewed in the Cocos tool. I suspect it is due to how both tools draw the font in their respective container. As you can see in the attached images, in the tool the text is centered in its container, however, in Phaser, when debugging the edges of the text, you can see that the font is positioned upwards. In short, both containers are in the same position but the texts are drawn in different positions. Is there any way to modify how Phaser draws the text in his container? As additional information, both texts are centered and added to a sprite as a child. The way the text is positioned varies according to the font used. Cocos tool Phaser:
  2. Hello everyone, I'm trying to get a label system which could work like I'm using the 3ds max exporter to export the meshes and I wanted to use the pivot point as a base to place the label. Maybe there is a better way to do it. When I create my Group2D (containing a line, rectangle and text) and set the trackNode property to use the mesh, I can see that the pivot point is not used. It looks like it might not event been exported (I attached the file) since the pivotMatrix is null. Maybe I'm missing something ? Infos.babylon
  3. I started looking at this thread ( but could not find what I wanted. I have followed this example also ( But the problem is that the text is on a plane that is a square. In most places the labels are going to be long for me, like several words & I may also have the requirement of clicking the label to take some action. I can have a big plane & make it tranparent, as in this example, but the click (through actionManager.registerAction) would be on the plane which is now much bigger than the text. I tried using Ground instead of plane & making it a rectangular but the text gets squished if it is a rectangle An ideal situation for me would be to have a piece of text independent of plane, where by the text itself is an object or otherwise have a rectangular plane or ground or mesh (of the size of the label) where the text does not get squished. Is any of these possible? Or is there any object labeling facility available directly in babylon that I am missing. Also let me take the opportunity to ask one more related question. Will it be possible to put line breaks/newline in the texts. Thanks
  4. Add text as child to group

    Hi Guys, I was looking for an answer but could not find one so Im sorry if I missed and double post. Im currently working on an small sidescroller game. The enemies are created as group and come from the right into the scene. what I would like to do is add a random name for the enemy displayed as text on top of the enemy, and having the same physical propperties like it (eg gets killed/destroyd if the enemy dies, moves at same speed etc) I suppose I can do this as child from the enemy but I have no idea how to add text this way especially for an "dynamic" text I appreciate any help cheers