sadNES's Forum Posts

  • Hey R0J0hound

    Is there any way I can paste an object on the canvas specifying the alpha and maybe size and position?

    My situation is this: I have two shapes, let's say two circles; one circle is in the middle of the canvas and the other one is bound to mouse XY, every tick the mouse-bound circle is being pasted with destination-out and the other circle is being pasted on another canvas in a way similar to this:

    for (var i = 0; i < 20; i ++) {
    	
    	var size = 128 + i * 10;
    	var halfthatsize = size * 0.5;
    	var x = 256 - halfthatsize;
    	var y = 256 - halfthatsize;
    
    	context.globalAlpha = (256 / ((i + 4) * (i + 4) * 20));
    	context.drawImage(shape, x, y, size, size);
    	
    }
    

    I can achieve the above code with sprite events but when I erase with destination out I obviously can't paste the updated shape.

    EDIT: I used another Canvas object that I then paste in the main canvas. It works but it's a hacky way of doing it and it looks like the quality gets lost in the pastings.

  • Bump.

  • ?

    It worked from the start but I have to manually add some frames for it to work; I need to add a frame for each result, I can't just add a random number. I think that adding a frame on runtime for each request would be better. That was my question.

  • But is it possible? newt

    I manually added 50 blank frames.

  • The title says it all.

  • Demo: http://yaserahmady.com/razor/

    Thanks R0J0hound but that was the exact same thing I've done, at least I think it was as I don't quite understand the textual representation of the events' flow.

    The problem was apparently because

    pixelCount/canvas.width*canvas.height[/code:u6nw2nwf] gave me an incredibly off result. So I threw in some brackets [code:u6nw2nwf]pixelCount/(canvas.width*canvas.height)[/code:u6nw2nwf] and it magically worked. That's not what I learnt in elementary school. I'm sorry if I didn't explain thoroughly my problem.
    
    [img="http://i.imgur.com/LhKQcBT.png"]
    
    Could I ask you why this lags every time I do the check and why there are two Canvas.AsJSON?
    
    [img="http://i.imgur.com/X0C5HBw.png"]
    
    My event sheet.
    [img="http://i.imgur.com/5QNmCiJ.png"]
  • I'm struggling with the Canvas plugin to check in percentage how much of a Canvas is transparent loading the Canvas.AsJson expression in an Array every 1 second.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • QuaziGNRLnose

    Could you please maintain a devlog on your site, please? I really need some updates.

    I bought Q3D since the very start but it's really obscure to use for the moment being. I'm starting to think that it was released way too early.

  • He's right, I have this problem too.

  • Up.

  • Up.

  • Up.

  • Up.

  • QuaziGNRLnose May i suggest to release beta or dev updates for buyers? It's been a long time since the most of us bought this.

  • Ashley I thought a shader would fit nice in this occasion as I don't seem to come up with some usage of the Paster plugin, but it doesn't seem I can find C2's GLSL documentation, reference or template. I tried porting it in GLSL but it only works outside Construct apparently.