Search the Community

Showing results for tags 'alignment'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 5 results

  1. Good day folks! Im completely brand new to Babylon (3D site building in general) and have become an instant fan! Im having a few issues and would like to see if folks can help: 1. I want to have 4 boxes on my site and align 2 on the right and 2 on the left (Such as the "Fashion Show" demo on the main page), how to go about doing this? 2. I want to make my logo and place it between the boxes, any recommendations on how to make this happen? 3. Also I want to place images on the boxes and link them to another site when a person clicks them, how do an ahref in this type enviorment? 4. I would like to change the canvas to black, how to do this? Thank you for all your help💋 Meka
  2. mattbrand

    Align text to the center vertically

    How do you vertically align text in the center? I have a high score box that shows 5 scores listed vertically. I render the names using a dynamic font size - so depending on how wide the name is, the font size is bigger or smaller. You can see in the attachment that if the name is very long with a very small font, the name looks like it is vertically aligned to the top. I want the text to be vertically centered. I tried using boundsAlignV in the style of the font, but that didn't change anything: var style = {font: "64px Knewave", fill: "#ffffff", boundsAlignH: "center", boundsAlignV: "center"}; Any other ideas?
  3. Hi All I am new to BabylonJS and have been playing with the library for a few days now and am absolutely loving it! A big thumbs up to the team/community that have developed this amazing library. My 3D geometry is rusty, hence im having problems resolving what many will see as a simple 3D transformation. My scene has a simple tube created from a path that was created using a bezier curve. Along the path trajectory I want to render a series of torus shapes, each torus needs to be aligned with the tube axis. I have created a simple program that creates; the bezier curve path, the tube and adds the torus shapes along the trajectory. Without attempting to rotate the torus shapes I get the following result (which is expected): (see attachement 1) Playground Code: http://www.babylonjs-playground.com/#1PSZDF#23 To fix this problem (i.e. rotate the torus to align with the trajectory of the tube) I have an idea but do not know how to code this using the Babylon JS API - here is my idea for aligning the torus to the tube: a ) the bezier path trajectory has a series of vertices that can be used for defining a vector/axis and position for the Torus to be positioned. b ) the tube mesh (end region) has a series of vertices that can be used to define a plane for aligning the Torus with the Tube. (see attachement 2) Use the above vertices to define a plane / axis for orientaton - e.g. if adding the torus at start of the tube mesh then you could: 1 ) create vector for defining axis of trajectory (i.e. use bezier path points (1) and (2) for defining the vector) 2 ) create a plane for aligning the torus (i.e. use bezier path point (1) and end tube mesh points (a) and (b) for defining the plane) i.e. (see attachement 3) Using the above it should now be possible to orientate the Torus to the specified plane. The only problem is: a ) I dont know how to reference the end tube mesh points b ) I dont know which API calls I should use to orientate the torus to the specified plane/vector c ) Im guessing there is probably an easier method for solving my problem If anyone can help me out with this challenge I would appreciate it (possibly update the playground code to illustrate what needs to be done?). Thanks in advance Rolento
  4. Hello guys, I have a problem about scaling / centering my game that's driving me nuts by now, so it's time to ask for some help... I'm trying to center my game on screen using the scaleManagers properties pageAlignHorizontally and pageAlignVertically. But wherever I put the lines to set those parameters, the game jumps from the left of the screen to the center everytime at startup. * At first I was hoping I could put the centering properties inside the gameConfig. But I can't find a way to do that. Is this even possible? * Then I was guessing where exactly to put the centering settings; it wasn't possible inside the constructor, 'cause game.scale is null at that point * So I put the scaling settings inside the bootState init method. That works, but only after the original (left) position of the game was first drawn unto the screen. In other words: the game jumps from the left alignment to the center Then I tried to put a scale refresh directly after it, but that doesn't fix it. The game works with states. So this my guestions: - Would it be possible to set the alignment (horizontal/vertical) to center from inside the gameConfig? (that would be the best!) - Or else: where to put the alignment settings in my code so that the game doesn't jump at first drawing? - And: Why is game.scale null after creating a new game? I would expect it to be ready Hope one of you guys can help me with this! Here's a simplified version of my code:
  5. Hi, I've run into some trouble while trying to align some animations of a character. I made the character in Adobe flash CS6 and used its new tool to generate a spritesheet + atlas json file of several animations of the same character (walk, attack, idle, etc). Each animation is correctly animated and displayed individually, however, when I switch in-between them, I find they are not aligned, that is, there is no common reference point between the animations, so when I switch from, let's say, idle to attack, the character seems to "move" to another position. I managed to modify the plugin used by adobe flash to generate the spritesheet, so that it includes the registration Point of each individual animation (of each movie clip), so I currently have that information in my json file. I guess that is a good actual reference point between the animations (correct me if I'm wrong), I located it at the 'feet' of my character in each movie clip. So now, having that data, what is the most efficient way to use it with Phaser to solve this problem. Do I have to offset the position manually every time I switch the animation? is there no better way? is this a common problem, or am I doing something wrong from the beginning? Any help would be greatly appreciated