Search the Community

Showing results for tags 'drawpolygon'.



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
    • Web Gaming Platform
    • 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 4 results

  1. I am using PIXIJS Canvas Renderer and trying to apply a graphics polygon as mask in a sprite. When add graphics polygon as sprite.mask, i am getting blank canvas. Am i missing something or its just stupid idea? JSFiddle code: https://jsfiddle.net/Lk2fjmn3/8/
  2. I am building a stock chart on PIXI.js. To display different chart styles on chart, I am using PIXI.graphics' drawRect, drawPolygon, lineTo functions. Graphics, Edges, grid lines, text are not sharp in this chart. I would like to say that I've tried several workarounds from the web to make this chart sharp. But those didn't help me. Examples how the chart looks on in candle and area chart styles and renderer parameters are shown in below. const renderer = PIXI.autoDetectRenderer(canvas.width, canvas.height, {view: canvas, antialias: true, transparent: false, resolution: 1}); renderer.view.style.position = 'relative'; renderer.view.style.display = 'block'; renderer.autoResize = true; renderer.backgroundColor = 0xFFFFFF; Area Chart Style Candle Chart Style Would like to hear any advice on the subject. Thanks in advance!
  3. Hello, everybody! As usually, I'm a newbie in Phaser and JS (and English, as well) :-) Now I'm trying to achieve this approach in Phaser-CE 2.7.8. Slow spinning wheel (actually N-gon, with 12 sides for now) shuffling bunch of balls (30-50) inside of it. When the hole on the wheel's edge reaches some bottom point one ball must fall out (random bal, with random number on it, got from the server. I don't know yet how much sides the wheel will be, and to apply same polygon to p2.body.polygon I put all the points into array (lines).Next I rearrange lines and it's directions to form "seamless polygon": end point of one line is start point of next line. And here I faced first problem: last line not drawn (top left green line). This poly drawn at line 85. But in the console log i can see that line coords! Second problem: adding sprite converted from graphics (via generateTexture()) and putting at specified coords work well, but if I uncomment sprite.body.addPoligon at line 93, sprite moved across X and Y axis, looks little thicker, and body(.addPolygon) not collinear with a sprite! May be I'm completely wrong and that wheel can be made much easier? Here is my code: http://phaser.io/sandbox/tkSaOlQd
  4. Hi, I just started testing Phaser and i am trying to render a simple polygon on screen: var g = new Phaser.Graphics(game);var p = new Phaser.Polygon(10,10,70,70,70,10,10,10);g.drawPolygon( p );Using v2.0.6. Am i missing something?