Pode's Forum Posts

  • Bob Thulfram : I have designed the SVGCanvas plugin to make it possible for you to use SVG string directly for things that I haven't added yet for the moment. So, if you want something that isn't available in the menu now, you can simply "paste" the string. And if you have JS embedded properly in that string (declared properly with [CDATA[ and all), I don't see why you can't use it . There's one catch, though : your script can only manipulate the index.html page, and the SVG DOM. Everything else (apart from some other plugins) in C2 is rasterized on the , so you won't be able to script that.

  • Ashley: that was exaclty what I was planning to use <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • harrio : I can code a plugin for that (in a week or two), but I need to clearly understand what you want to do.

    Rephrase me if I'm wrong : you want to load a PDF inside C2, display it, do something like a 'Ctrl+F' inside (automatically), and find the text inside it ?

  • Ugotsta : it's great that you find a use for the plugin !

    I need to add some basic filters by default to that plugin, so thanks for nudging me <img src="smileys/smiley2.gif" border="0" align="middle" />.

    I'm also going to add the possibility to dump the whole SVG canvas at once inside the 'regular' canvas (the one from C2). That means that after the first rendering, no more penalty hit !

  • mrthehun : does github works for you, or is it also blocked?

  • And, remember people, it's a behavior, not a plugin, so straight to the /behavior folder ! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Here's a behavior which allows you to flip a Sprite on his side (it was sitting on my harddrive, nearly finished, I just needed to test it on Chrome...) !

    To make it work, you need to have a Sprite with two frames, when the first frame is flipped, the second one appears behind it.

    4 consecutives screenshots to show the effet (it's more pronounced in Firefox than Chrome, I need to check the perspective).

    <img src="http://dl.dropbox.com/u/1412774/C2FlipTest/demo.png" border="0">

    It's also working on iOS (I just tested it on an iPad 1st gen with iOS 5.1).

    In the next release, you'll have the possibility to se the perspective, axis (left/right,up/down), and back color.

    I also need to make it work in Opera...

    The demo : http://dl.dropbox.com/u/1412774/C2FlipTest/index.html

    The .capx : http://dl.dropbox.com/u/1412774/C2FlipTest/C2FlipTest.capx

    The plugin : http://dl.dropbox.com/u/1412774/C2FlipTest/pode_flippy.0.1.zip

    One cool thing is that I can leverage the method to add other CSS2/CSS3 effects to objects in C2. So in the next few weeks, you are going to see some new effects ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AJTilley: even if you can manage your Kickstarter campaign from anywhere around the world, you need to have a US citizen, with a US bank account registered (contract with Amazon, among other things, to check there's no fraudulent activity related to the money transfer).

  • NRABrazil:

    I didn't test all the way to include an external SVG in my plugin (instead of directly dumping the content of the svg, you want to just paste the URL).

    One way to do that and that I have tested, is to paste the following string :

    "<img src='http://dl.dropbox.com/u/18104402/Contorno_do_mapa_do_Brasil.svg'>"

    instead of just

    "http://dl.dropbox.com/u/18104402/Contorno_do_mapa_do_Brasil.svg"

    I have tested it on FF and Chrome, and it works.

    Edit: by the way, the 'proper' way to embed it in SVG is to use the following string

    "<image x='10' y='20' width='100%' height='100%' xlink:href='http://dl.dropbox.com/u/18104402/Contorno_do_mapa_do_Brasil.svg'/>"

    But since browser's parsers are pretty flexible, the previous strings should work also <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • NRABrazil: when I try to open the file, it says that I'm missing the Touch2 plugin. Which one is it ?

  • Here's a small addition I have done to Canvas. The code is cleaner than what I send R0j0hound before, so I put here the archive.

    If R0j0hound want to integrate it in the main branch, here's what I have done.

    The code for the floodfilling is used from there http://www.williammalone.com/articles/html5-canvas-javascript-paint-bucket-tool/.

    I also used the color.js helper from there http://www.phpied.com/rgb-color-parser-in-javascript/, because the algo uses the RGB value of a color, not a textual name (and there's no easy way to translate between the two in the HTML/JS world).

    The code is pasted at the top of the runtime.js file. I added a "flood fill" action to the edittime.js, with the ID(22). It takes (x,y) and a color name as parameter. The floodfill is nearly instantaneous, but you must use images with clean edges !

    You can see in the demo here how to do a "coloring book" app for kids.

    (And you can see why you need a clean edges image !)

    <img src="http://dl.dropbox.com/u/1412774/CanvasFloodFillDemo/demo.png" border="0">

    The .capx :

    http://dl.dropbox.com/u/1412774/CanvasFloodFillDemo/CanvasFloodFillDemo.capx

    The demo : http://dl.dropbox.com/u/1412774/CanvasFloodFillDemo/index.html

    The plugin : http://dl.dropbox.com/u/1412774/CanvasFloodFillDemo/canvas.modPode.0.1.zip

    As always, when I add some code to someone's plugin, I don't claim anything on his realisation, you need to thanks the original author here, R0j0hound !

  • 0plus1 : I posted a new build in the first post.

  • Ashley, 0plus1 : I used rc = '';because I read somewhere that for V8 (WebKit JS engine), it help the GC to catch faster the image to delete (the one referenced there before), but I can't find the reference anymore.

    I have updated the plugin, and I'm going to post it in a few minutes.

    One a problem that I have is that when you inject an image, you are 'loading' it (regarding the way the browser deal with it). And before loading it, you don't know its width/height.

    I added some code to specify the width/height of the Sprite container (not the underlying IMGElement width/height), because I can't manage to force the browser to update the image when I set those.

    With the new build, 0plus1, can you test and say if you still have the problem (I have tested it on FF 11, Chrome 16+, Opera 11+ and iOS5.1). I don't have any device with iOS < to 5 now, so I can't test it on that, neither on Andro?d.

    See you in the other thread <img src="smileys/smiley2.gif" border="0" align="middle" />.

  • 0plus1: I suppose that when the ratio aspect changes, it invalidates the width/height values. I'm going to add a check before, to rewrite those values based on the new aspect ratio.

  • Mulkaccino : it's easy ! For example, in the demo I posted in the original post, you can, in one of the two textboxes, paste the URL of an image, and click on "Inject", and voil� !. <img src="smileys/smiley1.gif" border="0" align="middle" />

    0plus1: it's strange. I didn't heard of any particular quirk or bug from the iOS Webkit build with the onload() event. I'm going to check that tomorrow. If it's a bug, I'm going to try a false 'click' event to resolve that.