1 decade ago 
				by Rungo73
				
																
			
			
				Hi
Can anyone explain how to use composite blend modes
on entities ? 
In particular I'm interested in replicating the additive glow
effect @Dominic used on his bullets I'm z-type.
Cheers,
Tom			
		 
			
			
			
				1 decade ago 
				by Rungo73
				
																
			
			
				Cheers for the response.
I was on the right path with the globalCompositeOperation but just not sure
how to apply that to a single entity ie an explosion, or glowing bullet.
Will dig around the links you've provided - much appreciated.			
		 
			
			
				1 decade ago 
				by Joncom
				
																
			
			
				Quote from Rungo73
....not sure how to apply that to a single entity
I believe it'd look something like this:
/* some-entity.js */
draw: function() {
    // Save state of context because we'll need to restore it later.
    ig.system.context.save();
    // Specify effect.
    ig.system.context.globalCompositeOperation = 'lighter';
    // Draw
    this.parent();
    // Restore context so effect doesn't carry into other draws.
    ig.system.context.restore();
}
			 
		 
			
			
				1 decade ago 
				by Rungo73
				
																
			
			
				Yes!!
Thank you that's exactly what I was looking for!			
		 
	
	
	Page 1 of 1	
					« first
				
					« previous
				
					next ›
				
					last »