Jump to content

Search the Community

Showing results for tags 'height'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 22 results

  1. Hi! I am loading SVG images in my application. The SVGs don't have a width and height defined in the file, but the viewbox. Loading them basically works with Pixi.js. But my problem is, that those SVG images are rasterized to an image default of 150x150px - in Chrome. In Safari on MacOS they are rasterized MUCH bigger. Is there any option, to tell the Texture Loader to use a given size? This would prevent above behaviour AND give the user the option, to define the size before rasterizing the image. I wouldn't want to set width and height in the SVG files. I looked a lot in BaseText
  2. I am currently learning Phaser by doing some examples. I am currently here: https://phaser.io/examples/v2/animation/creature-dragon-multiple. I am wondering, how can I set the height and width of `Phaser.Creature` object? The default `height` and `width` are set to undefined. Hence I need to set both height and width in order to set the `Phaser.Creature` dimension. Here are some codes. dragon_character.play(true); // `true` is used for looping forever. dragon_character.scale.set(20); dragon_character.height = 100; dragon_character.width = 100; console.log(dragon_character.height); /
  3. Is it possible to set the bump height of a standard material like on the water material? Thanks, Pichou
  4. I've been checking this documentation, but didn't find anything I can use. Please, help.
  5. I am having some basic syntax confusion... i have declared a sprite... var taxi = this.add.sprite(100, 100, 'taxi').setOrigin(0, 0); and now would like to resize it I have tried various combos (including ideas from phaser2 i found), what am I doing wrong? taxi.width = 25; taxi.setWidth = 25; taxi.setSize = (25,25); Any help for noob here?
  6. I am using this code to create my text field on screen: screenTypingTextField = gameObject.add.text(200, 520, "", si.Utility.getTextStyleScreenTypingTextGreen()); screenTypingTextField.alpha = 0.5; screenTypingTextField.anchor.setTo(0.5, 0.5); //screenTypingTextField.width = 480; //screenTypingTextField.height = 240; thisObject.menuObjects.add(screenTypingTextField); textStyleScreenTypingTextGreen = { font :'70pt Arial', align : 'center', fill: 'Green' }, As you can see I have commented the width and height rows. Its because when i run
  7. Hi All, How should I go about obtaining the size of mesh in pixels? Is this even possible ? I assume there is away to obtain measurements for the bounding box or something..? Cheers
  8. You set up an application element: g_Pixi = new PIXI.Application(width, height, { backgroundColor: 0x000000 }); document.getElementById(strCanvasDiv).appendChild(g_Pixi.view); 'width' and 'height' are the dimensions of the canvas with id strCanvasDiv.. Question 1: in the object, should I send the canvas in the 'view' element? Ie, g_Pixi = new PIXI.Application(width, height, { view: document.getElementById(strCanvasDiv), backgroundColor: 0x000000 }); But then the user decides he wants to change the dimensions of the screen (which in my code will change the dimensions of the c
  9. Hi this is my heightmap where blue area is the lowest and orange color is the heightest. However, babylonJS interprets the orange/red color to the lowest zone like blue area. How can change this? Thanks
  10. Is there a maximum image width or height for images imported with game.load.image on mobile? I have a sprite sheet that is 3080 pixels wide, and I think it may be the culprit of an error that is happening.
  11. I saw on original, oimo js website, that it supports physics on irregular terrain. The question is: Does oimo js plugin for Babylon js, can do it too?
  12. Hello again. So as stated in the topic title i want to know if there is any alternative for getHeightAtCoordinates function. Here is the solution i thought of: I have a ground 3000x3000 loaded with createGroundFromHeightMap. The problem with getHeightAtCoordinates is that it is too slow. For instance if i have a set of 200 points and if i try to find out the y coordinate for each one using a for loop, the y is set to 0. One solution i thought of(knowing that the ground is not going to change) is to remember in an array all the y coordinates of all points (i know there are 9 000 000 y coordin
  13. It's just a nightmare Why DisplayObject has no width and height properties?
  14. In a flash the size of the workspace is stored in Stage. And how to find them pixi.js? Does this ideology framework?
  15. I'd like to get the visual x/y/width/height of a sprite after scaling/skewing/rotating/anchoring it. Can I do that with Phaser? The case: If you flip horizontally a sprite that has {x: 100, y: 100, width: 64, height: 64}, what will your eyes see on the screen? {x: 36, y: 100, width: 64, height: 64}. That's what I'm looking for. However, Phaser tells you:{x: 100, y: 100, width: -64, height: 64}. No big deal, you just do a little math to fix it, kinda like you showed there. That is, if you only scale it. It gets more mathematical when you also change the anchor, and turns into a geometric ni
  16. Hi, First of all, I'm just moving to Phaser game engine to develop even more quality games. I've been using my own game engine and I enjoyed it. But to keep up with the dev speed, developing more game engine features to follow up my need uses too much time than developing the game itself. So I am expecting some of the features may run as my expectation. As I am just jumping to this, I wish for lots of things to learn from you guys. -- I am currently developing a game that is expecting the game screen height not adjusting the size of the game world. Please see below picture on what happen
  17. Hey, I'm figuring out how to set a pause screen on my vertical platformer game. Everything is working fine, except I don't know how to position the pause screen in the current viewport and not at the complete top of the game. The game itself is 5000px high and the viewport is 600px. I've tried different things, but so far without success. My pause function, which is now positioned at 0, 0 managePause: function () {game.paused = true;var graphics = game.add.graphics(0, 0);graphics.beginFill(000000, 0.5);graphics.drawRect(0, 0, 1200, 600);var vowText = this.add.text(600, 300, vow1, fontSty
  18. Hi guys, Its posible to get the height of a heightmap given the X and Z coordinates? Here i show an image explaining what i want: Thanks in advance, Carlos R.
  19. Hello forum, I am trying to make a grid of DisplayObjectContainers, so I am sorting elements depending on the width and height of each one. I add a Sprite in a container and the problem is when I add a Graphics element of the same size inside the container, the width and height changes. I narrowed the problem here : var cont = new PIXI.DisplayObjectContainer();stage.addChild(cont);var convx = new PIXI.Sprite.fromImage('assets/img.png');//>>>>>>> image is 289x333cont.addChild(convx);var msk = new PIXI.Graphics();msk.beginFill(0x123456,0.5);msk.drawRect(0,0,convx.width,con
  20. Hi there, I'm trying to get the width and height from the returned body: var body = this.game.physics.p2.convertCollisionObjects(map, "floorMiddle")[0]; It would be great if this was possible: body.width body.height And, unfortunately the body.sprite=null otherwise I'd just access the sprite info. Thanks, Gar
  21. I currently want to build a game for iPhone (I have a 5s) using Phaser and CocoonJS. I'm just wondering what the best/most optimized initial game size would be for this! aka for this code: var game = new Phaser.Game(800, 600, Phaser.AUTO, 'icicle-man');What would be the best options to replace 800 & 600 with? -Thanks
  22. Hi there, I'm wondering, if it is valid/possible to set game width/height after game object initialization? What I'm trying to do is set actual game size in boot state when things such device is available. Unfortunately, it takes no effect on canvas, still the same dimension as once set at game object initialization phase. Any suggestion? Thanks!
  • Create New...