buryo

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    1

buryo last won the day on June 2

buryo had the most liked content!

About buryo

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. How I fixed this: I've put the input and canvas in the same div (this is the parent div) and set the parent div to Relative Set the input field to Absolute, and now you can put it where you want with Top and Left
  2. Has someone worked with this before? I've made my own Input plugin the only problem is the screen size, I can't figure out how to calculate that https://i.imgur.com/sO3FzMI.png https://i.imgur.com/nwdXm9v.png Mwni is doing some calculations on screen resize: https://manuelotto.com/opensource/PIXI.TextInput/demos/demo_default.html
  3. Hey Ivan , I've looked into this plugin but it's not possible yet to use it with React. see issue: https://github.com/Mwni/PIXI.TextInput/issues/5
  4. Hi, I've found some old examples where people use document.createElement("input"); and add it to the stage. I'm getting the following error: export default class UI { constructor(app, CANVAS_WIDTH, CANVAS_HEIGHT) { this.app = app; this.CANVAS_WIDTH = CANVAS_WIDTH; this.CANVAS_HEIGHT = CANVAS_HEIGHT; this.graphics = new PIXI.Graphics(); this.textField(); } textField() { this.domField = document.createElement("input"); this.domField.type = "text"; this.domField.style.position = "absolute"; this.app.stage.addChild(this.domField); } }
  5. Hey Ivan thank you! making the right side in react is a very very good idea. However I'm also going to need some little UI items inside my view (e.g the option to attack someone's town) how should I do that? I was thinking about this https://pixijs.io/examples/#/interaction/interactivity.js
  6. Hi guys, I need some advice, I'm quite new to Pixi (also game making) What I'm using is: NodeJS, React, Pixi What I need is a GUI, I don't want to use old libraries which were made in 2015-2016. Do you have tips/example repo's for me? This picture is from my game, right side UI is just a picture (texture) I want to make it real
  7. Hello, I'm trying to generate a world map of tiles. But now I'm stuck, I'm getting an error which is impossible to understand. Maybe you will see what's going wrong: const MAP_WIDTH = 6400; // when I make this value 3200 or 832 it works else not const MAP_HEIGHT = 6400; // when I make this value 3200 or 832 it works else not const MAP_WIDTH = 6400; // when I make this value 3200 or 832 it works else not const MAP_HEIGHT = 6400; // when I make this value 3200 or 832 it works else not const TILE_WIDTH = 64; const TILE_HEIGHT = 64; map = [ Array.from({ length: MAP_WIDTH }, (_, i) => { if (i <= (MAP_WIDTH / 64) || i % (MAP_WIDTH / 64) === 0 || i % (MAP_WIDTH / 64) === (MAP_WIDTH / 64) - 1 || i >= (Math.pow(MAP_WIDTH / 64, 2)) - (MAP_WIDTH / 64)) { return 1 } return 0 }) ] createMap = () => { const cols = MAP_WIDTH / TILE_WIDTH; const rows = MAP_HEIGHT / TILE_HEIGHT; for (let i = 0; i < this.map.length; i++) { const layer = this.map[i]; for (let j = 0; j < rows; j++) { for (let k = 0; k < cols; k++) { const imageType = layer[j * cols + k]; let tile = PIXI.Sprite.from(this.images[imageType]); tile.x = k * TILE_WIDTH; tile.y = j * TILE_HEIGHT; tile.width = TILE_WIDTH; tile.height = TILE_HEIGHT; this.container.addChild(tile); } } } }