Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by SamYan

  1. Hi, Can anyone tell me please what the best way to hide a "BETTING CONFIGURATION" container by clicking anywhere on the screen other than that container? Actually i'm detecting the mouse coordinates and comparing with the window / container coordinates, but it's good practice? public static isColliding(mouse: any, object: any): boolean { return !(mouse.x < object.x || mouse.x > (object.x + object.width) || mouse.y < object.y || mouse.y > (object.y + object.height)); } this.baseContainer.interactive = true; this.baseContainer.addListener('pointerdown', () => {
  2. Finally i got it! Thank you friend!
  3. Thank you friend! It's working!!
  4. Ivan, Do you know any way to manage the diferentes screen in pixijs ?
  5. https://codesandbox.io/s/n5pkq5vjpj?moduleview=1
  6. Thank you very much!
  7. i dont understand, why resizing canvas, its not resizing the stage and children containers correcty.
  8. It's background: desktop screen: mobile screen:
  9. Thanks for response but not working. I have tried to give the max size of the background to my view and now it's working, but when i try in mobile screen, fails again. http://jsfiddle.net/om0hskfy/
  10. Thanks for response but still not working. I'm looing and it's the stage scale problem (app.stage.scale). I can't calculate the aspect ratio for stage. IVAN I NEED YOUR HELP. 😅
  11. Nobody can help please?
  12. Thanks for response but i get the same result. Not working.
  13. Hi, i'm looking to get any solution form resizing the 'game' correctly in desktop and mobile screens but no way. I get the background image (sprite) non centralized and zoomed stage. Anyone can tell me please what's the wrong? CSS body { background-color: rgb(0, 0, 0); width: 100%; height: 100%; overflow: hidden; } #pixi-canvas { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; } JS const logicalWidth = 1280 // window.innerWidth; const logicalHeight = 720 // window.innerHeight; // Init Application let app:
  14. The solution was moving the constant array of textures into generateSymbols() method. But why ??? import * as PIXI from 'pixi.js' export default class Symbol { /** * Generate random symbol tables * * @static * @param {number} reelsCount * @param {number} symbolsCount * @param {(symbolTables: Array<any>) => void} resolve * @memberof Symbol */ public static generateSymbols(reelsCount: number, symbolsCount: number, resolve: (symbolTables: Array<any>) => void): void { const symbols = [ { id: 0, img:
  15. Hi, I'm trying to load 4 images, and then generate array of random sprites, but i get In chrome console: Debug: GET http://localhost:8081/dist/symbol_2 404 (Not Found) BaseTexture.js:795 BaseTexture added to the cache with an id [symbol_1] that already had an entry addToCache @ BaseTexture.js:795 fromLoader @ Texture.js:478 textureParser @ textureParser.js:9 (anonymous) @ Loader.js:614 (anonymous) @ async.js:35 Texture.js:508 Texture added to the cache with an id [symbol_1] that already had an entry addToCache @ Texture.js:508 fromLoader @ Texture.js:479 textureParser @ texturePa
  16. SamYan

    Doubt Container

    Thanks, exactly what i'm doing now.
  17. SamYan

    Doubt Container

    What would be every view / scene ? It would be child container of stage container or what ? I just to understang how moving between scenes. Basically the logic. Spasibo Ivan!
  18. SamYan

    Doubt Container

    Thank you for response Ivan, but i've already looked, still don't understand. Can you tell me please if for example Game Menu <=> Game will be 2 different containers ? Thanks again!
  19. SamYan

    Doubt Container

    Hi. I just started in Pixi js. Can someone explain to me if a container is used to create different levels of game? Thanks in advance
  • Create New...