lmfielding

Members
  • Content Count

    10
  • Joined

  • Last visited

Everything posted by lmfielding

  1. This is the relevant code: const bounds = MapData.mapApp.renderer; const crossHairTexture = MapData.pixiLoader.resources['/static/assets/map/map_crosshair.png'].texture; let sprite = new PIXI.Sprite(crossHairTexture); sprite.anchor.set(0.5); sprite.width = sprite.height = MapData.tileHeight / 2; sprite.x = bounds.width / 2; sprite.y = bounds.height / 2;
  2. I'm working on a map too, feel free to message me if you want any help. I'm a very good JS programmer but I hate canvas/visuals.
  3. Your translation project looks incredibly cool too. I know a bit about i18n
  4. Should be fine, give it a try. If you need someone to test it then take my contact details, I could use a PIXI contact.
  5. It is only a new graphics instance, how many are you planning on making? When they aren't being rendered any longer garbage collection (optimisation) is easy, even if you know nothing about it... a lot of it is automatic.
  6. Clone is the best you are going to get unless you copy the properties you want programmatically. May I ask why you don't want to create a new instance? https://pixijs.download/dev/docs/PIXI.Graphics.html#clone
  7. Is this forum dead?
  8. Is there a library or helper currently available to show map style labels coming off one area without overlapping each other? Thank you
  9. I have spent quite a few weeks on a few problems without asking for assistance but I feel that it is going to take me much longer to work out on my own so I request your help. Thank you! I want to place a sprite in the middle of the screen (square rotated 45 degrees) I want to place sprites next to this sprite in the middle of the screen so that they are aligned with no gaps I want to check where there are missing tiles (in relation to the centre (initial) sprite Most of my problems seem to be caused by the dimensions of the sprites changing based on outside circumstances (flexbox etc or initial dimensions not set on a SSR, irrelevant really). I have achieved a lot of this in varying ways but it seems hacky. Once I set the initial sprite, I have to change the pivot and position before or after rotation (can't remember) which causes a lot of problems because a square's width is no longer the same once you rotate it 45deg... ------ I feel that I need to cleanly set the rotated sprite (square) to the center of the screen, then add the rest of the sprites RELATIVE to this one, rather than from trying to calculate screenWidth, worldWidth, etc. Please help before I make a horrible mistake by switching to phaser!