Jump to content

Search the Community

Showing results for tags 'tint'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 22 results

  1. // Flash player red let tintTween = this.tweens.add({ targets: this.player, duration: 200, tint: 0xff0000, callbackScope: this, onComplete: function(tween, sprites) { // Return to original color this.player.clearTint(); } }); This code is making my player sprite flash black and go back to normal, why is it not flashing red?
  2. Ananth

    sprite color

    Hi, How can i use color code to change sprite color without using tint. Thanks,
  3. Hello, I'm seeing this behaviour that I can't understand, when applying a tint color to a sprite while using canvas as renderer. Right now for CORS reasons we're forced to use canvas in our app. I say this because in webgl the issue doesn't happen. The thing is the we're cutting images into stripes and applying a tint to each stripe, but this creates a line between the stripes: https://codepen.io/rhernando/pen/8fb06d28861d63ca5a6868f88c71f150?editors=0010 Just click the button to apply/remove the tint and you'll see the issue. Why this happens?, is there a way around t
  4. Hi Guys, I was wondering if it's possible to render a texture with a solid color? I would need this in order to build a masking sprite. Im planning on using a solid black white mask and for this reason would like to be able to draw a sprite with just black or just white to a canvas. I looked at the tint class, but this doesnt force all pixels in a texture to be a color. Thanks in advance! Erik
  5. is there any way to do a gradient tint in sprites/images in phaser? i'm using canvas mode , not auto or webGL Thanks. Sorry, for bad english :|
  6. Hi Quick question - is it possible to tint a spritesheet, I know you can use eg sprite.tint = 0xff00ff; but tint doesn't seem to work on an animation, is it possible or am I just better just photoshopping a new spritesheet? Thanks in advance Eric
  7. I'd like to tint a model to black with a certain amount of transparency, let's say 60%, in a way that you'll be able to see the model's texture beneath the black tint, at 40% clarity. I created a material with black diffuse color, and applied it to the model's meshes. It is pitch black though, is there a way to make it only 60% tinted? http://www.babylonjs-playground.com/#1SVN3I#57
  8. Hi! I am new to phaser. I have a sprite called Ground in the group called Platforms var platforms = game.add.group();platforms.enableBody = true;var ground = platforms.create(0, game.world.height - 30, 'ledge');The ground sprite has to be white,I use this line of code for that ground.tint = 0xffffff;I don't know why but it does not work with the color white,it works with any other color but not with white. Thanks for help
  9. Hello, I'm trying to apply a tint to the whole of a group, to designate a team. Instead of creating a spritesheet that includes every sprite corresponding to each team, I'm using a grayscale sprites, putting them in a group, and applying tint to that group. For some reason, this works perfectly with the "group.alpha" setting, but doesnt with the group.tint setting. The sprites just stay grayscale Here's my code: var game = new Phaser.Game(800, 600, Phaser.AUTO, 'row', { preload: preload, create: create, update: update }); // Spritemap Key, spritemap url and JSON file URL var spr
  10. I am creating a Bejeweled game using Emanuele Feronato's awesome prototype; Match 3 Bejeweled HTML5 prototype made with Phaser – detecting combos. I created my own grayscale graphics in Photoshop, made them a little bigger, increased the grid size of the game, and used some code from his HTML5 Dungeon Raid tile engine made with Phaser – Part 4 tutorial to make the game scalable. I used Phaser's sprite tint property to color my jewels. They look awesome all randomly colored like that, but it is difficult to make matches on just shape alone. How would you tint specific frames a certain colo
  11. Hi, My prototype below works but i want to have an option to choose if yes or no i put a tint color. So if tint = "none" my sprite have no tint if i put an another color like 0xFFFFFF then my sprite have this tint color. How do you that ? Thanks e = function (game,nameA,posx,posy,width,height,anchor,tint,alpha) { Phaser.Sprite.call(this,game,posx,posy,nameA) this.x=posx; this.y=posy; this.width=width; this.height=height; this.anchor.set(anchor); this.tint=function(tint) { if ( tint == "none" ) { tint=null; } else { tint=tint; } return tint;
  12. Hi! This issue is closed.: https://github.com/photonstorm/phaser/issues/1096 Now when a sprite is tinted animation plays constantly and does not change until it stops be tinted. For example if my sprite has an animation when it is ducking and is tinted sprite when is standing, the animation does not change. Greeting.
  13. Hey, maybe someone solved this problem before. Lets say I have a variable from 0 to 100. How can I map it to the tint color for the sprite? I.e.: when variable is at 0 -> sprite.tint = white; [everything in between] when variable is at maximum (100) -> sprite.tint = red; Thanks!
  14. Hello! the tldr; How do I do color replacement of sprites in pixi? (not tinting, e.g. change #ff0000 to #cccccc) How do I best render 50+ characters made out of 6-10 sprites (~100 frames total), each of which has been recolored by whatever the answer is to #1 (with performance in mind)The long version, with images and examples: I am porting a canvas-centric project of mine to pixi, and am unsure how to re-implement my former character generator. I have these small pixel art characters that, in my former game, would all be recolored at runtime. Their skin, hair, gear, etc could be any col
  15. Hello, All is in the title, if you want a running exemple, as I'm unable to doing a jsfiddle, you can go here and: http://pixijs.github.io/examples/index.html?s=basics&f=spritesheet.js&title=SpriteSheet%20Animation replace the first line by this: var renderer =new PIXI.CanvasRenderer(800, 600);and tint the movie. movie.tint=0xcd12d0Then push the green button: the plane becomes crazy. It's in V3
  16. Hello developers! I use version 2.1.2 and I have a Phaser problem pixi incidence of for some time. When a sprite plays an animation and tinting is applied, the frame of the sprite is locked. Is there any way to fix the problem?
  17. Hi! In my game when the player is hit the sprite is tinted red. The problem is that the animations stop working. In version 2.0.5 there is no problem. In version 2.0.6 and 2.0.7 is where this problem occurs. A greeting.
  18. When I apply this.player.tint = 0xcd0937; to tint my sprite red, the sprite behaves as expected on desktop. The sprite changes color and when the sprite moves left or right all of the sprite state changes are recognized and the tint is active. On mobile, the sprite changes to the desired tint color but stays stuck in the sprite state that was active when the tint was applied. Anyone know how to achieve the expected behavior on mobile?
  19. Edit: Nevermind, was being stupid... because it already multiplies the color I should just use more transparent color codes.
  20. Hello ! I know it is possible for a sprite (with sprite.tint) but how can it be done with a particle ? I saw this: http://examples.phaser.io/_site/view_full.html?d=particles&f=particle+class.js&t=particle%20class But I don't understand :-( Thank you in advance.
  21. there will be 2 sprites (they're just squares) and some text that constantly need to change colours. so would it be better to change the tint or use a spritesheet with the different coloured sprites?
  22. Hello html5game dev forum people! Big news over in the pixi camp! We have just released the latest and greatest version of pixi.js for you to play with and make more cool stuff! Lots more detail can be found on our goodboy blog. But heres the list of new stuff / tweaks included in the latest version: New features: WebGL FiltersAdded Sprite Tinting (canvas and webGL)Added Sprite blend modes (canvas and webGL)Added webGL context loss handlingNew webGL rendererRestructured the canvas rendererAdded ability to have multiple renderers on one web pageAdded support for trimmed sprite sheet
  • Create New...