Jump to content

Search the Community

Showing results for tags 'fill'.

  • 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 Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 8 results

  1. Hi, I am currently creating a polygon geometry with PIXI.Graphics. As one of the requirements of our application, we need to add fill color after we create a graphic. Is there any way to do it? Currently, we have something like below. const graphic = new PIXI.Graphics(); graphic.lineStyle(2, style.color, 1); for (..){ if (type === 1) graphic.lineTo(x, y); else graphic.moveTo(x, y); } As you can see, this will simply create a polyline but we need to find a way to fill this polyline with some color and convert it to polygon. *this needs to be a polyline when it was created It would be appreciating if you could give me any advise to achieve this.
  2. Hello everyone! I'm new here and my first question is how to make my Phaser game fill all the document? I mean, take for example Slither.io, if you resize the browser, the game view will adjust to fit the same resolution while it is ocupying all the document. I wanna do the same thing to my game. How can I achieve this? Thank you for answer me!
  3. Get It Filled 2 Get It Filled 2 is a relaxing puzzle game in which you have to fill all the tiles and finish on the green mark in each level. Along the way new puzzle elements are revealed as well. This is a new and mobile-friendly version of Get It Filled with 30 levels to solve! You can play the game here: https://www.kongregate.com/games/Diamonax/get-it-filled-2 Can you solve them all?
  4. I have this code to add a rectangle in phaser and works fine but it fills with a solid color and i want some transparency in my poly. Is that possible? poly = new Phaser.Polygon(p_1, p_2, p_3, p_4); graphics = game.add.graphics(0, 0); graphics.beginFill(0xFF33ff); graphics.drawPolygon(poly.points); graphics.endFill();
  5. Hi, I'm new to Phaser and I have some questions when using tween and fill color on which I wasn't able to find any information if it is possible. Basically, I have a straight short line (let's say 20px) which travels from the right side of the screen to the left, but when it reaches the middle part of the screen it creates a circular loop forming the letter "O" and then continues moving till it reaches the left side of the screen. What I wanted to do is when the short line loops in the middle part, the track should be filled with color and forming the letter O itself. Is this possible? I appreciate any information or anyone who can direct me to a reference on this.. Thanks
  6. Hi guys, Can anyone explain me a little bit of this code why its not working? var a = '141,243,160,1'; this.bmd1.fill(a); //it doesn't work // if this.bmd1.fill(141,243,160,1); it works
  7. Hello, I have created a line to immitate lightning as shown in the http://gamemechanicexplorer.com/ this is my code that creates the line var ctx = reg.lightningBitmap.context; var width = reg.lightningBitmap.width; var height = reg.lightningBitmap.height; // Our lightning will be made up of several line segments starting at // the center of the top edge of the bitmap and ending at the bottom edge // of the bitmap. // Clear the canvas ctx.clearRect(0, 0, width, height); ctx.lineCap = "round"; ctx.lineJoin = "mitter"; // Set the starting position and number of line segments var x = 0; var y = 0; var segments = game.rnd.integerInRange(20, 100); // Draw each of the segments for (var i = 0; i < segments; i++) { // Set the lightning color and bolt width ctx.strokeStyle = 'rgb(0, 174, 239)'; ctx.fillStyle = 'rgb(255,255,255)'; ctx.lineWidth = 3; ctx.beginPath(); ctx.moveTo(x, y); // Calculate an x offset from the end of the last line segment and // keep it within the bounds of the bitmap y += game.rnd.integerInRange(-50, 50); if (y <= 10) y = 10; if (y >= width - 10) y = width - 10; // Calculate a y offset from the end of the last line segment. // When we've reached the ground or there are no more segments left, // set the y position to the height of the bitmap. x += game.rnd.integerInRange(20, width / segments); if (i == segments - 1 || x > width) { x = width; } // Draw the line segment ctx.lineTo(x, y); ctx.stroke(); // Quit when we've reached the ground if (x >= width) break; } // This just tells the engine it should update the texture cache reg.lightningBitmap.dirty = true;Now what I want to achieve is to have a white fill for the line and blue stroke as it is. How could I achieve this? Thanks guys.
  8. function generate_hex(){ return '#'+((0.5 + 0.5*Math.random())*0xFFFFFF<<0).toString(16); } var style = { font: "24px Arial", align: "center" }; var texts = game.add.group();var text = 'hello';for(var i = 0; i < 5; i++){ (function(t){ // var t = game.add.text(10, i * 25, text, style); t.fill = generate_hex(); texts.add(t); })(game.add.text(10, i * 25, text, style) )} Idea that I want five lines of text with various color. Problem that all 5 text lines has one color - last that generate_hex function generate. I know this kind of problems happens in loop - that's why I using scope. But it is not helping now. Please help
×
×
  • Create New...