praharsh's Recent Forum Activity

  • Do you have plans to release this for C3? Anytime soon?

  • X3M, I will be waiting. BabylonJS looks pretty amazing.

    The fix did not work out of the box, but was promising. Before I could tweak around and make it work, I ended up changing the library to Raphael, as it has path binary operations and I needed those.

    But the issue is still there.

    I am using the code, in instanceProto.onCreate = function()

    this.divSVG = document.createElement('svg');

    this.divSVG.setAttribute("id","divSVG");

    this.divSVG.style.width = 100 + "%";

    this.divSVG.style.height = 100 + "%";

    this.divSVG.style.left = 0 + "px";

    this.divSVG.style.top = 0 + "px";

    this.divSVG.background = "red";

    this.divSVG.setAttribute("position","relative");

    var viewBox = "0 0 "+ this.width+ " " + this.height;

    this.divSVG.setAttribute("viewBox",viewBox);

    var maindiv = this.runtime.canvas.parentNode;

    jQuery("body").append(this.divSVG);

    ..

    The plugin is a 'world' plugin.

    It starts at 10,10 and is 100, 120 in size.

    But when I look at the created element in chrome debugger, it is not created ON the plugin object. It is at the bottom of the layout again. If I play with the coordinates the drawing are coming on top of the layout, so this is not because C2 canvas overdrawing the new one. So, few questions here, someone kindly help.

    1) Can I add svg element (new one I am creating) on top of canvas (c2Canvas) element? I looked around in net and cold not see if this is ok. I checked other svg plugins (By pode) and it's adding a new element similar to c2Canvas, outside it. Any reason?

    2) How do I create a div and fill colour exactly on top of the physical bounds of a plugin? I tried using the bbox and the quad properties and it seems that they all gives 0s for all the values in onCreate. When I console.log(this) for the plugin, I see bbox has left, top etc. values, but when I try to log (this.bbox) it gives all zeros. Also, when I use these values to set the values for the new div, it is setting all zeroes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks you very much X3M, that was superfast!!. Let me try this out.

    By the way, I checked our the BabylonJS. Pretty cool! Will you be publishing it in the store? When?

  • Hi,

    I am trying to add the snap framework (http://snapsvg.io/docs/) in a plugin (like the canvas plugin, but with more options). I tried creating two circles in the onCreate function like so.

    instanceProto.onCreate = function()

    {

    this.svg = document.createElement('svg');

    this.svg.width=this.width;

    this.svg.height=this.height;

    var viewBox = "0 0 "+ this.width+ " " + this.height;

    this.svg.setAttribute("viewBox",viewBox);

    this.SNAP = Snap(this.svg);

    // Create big blue circle in the middle:

    var bigCircle = this.SNAP.circle(40, 40, 80);

    bigCircle.attr({

    fill: "#0000FF",

    stroke: "#000",

    strokeWidth: 5

    });

    // Create another small black circle:

    var smallCircle = this.SNAP.circle(40, 40, 35);

    };

    I just added the dependancy and set it as a 'world' plugin. Then I added it on the top portion of the layout and tested the layout. The circles were not seen on the screen at all. When I tried to see the console (Chrome dev tools), I noticed that the circles are actually drawn below the layout (seen only when the layout is shrunk). Can anyone tell me how to get this to dray on the actual plugin area?

  • Hi Milkonop,

    Can you please explain what you are trying to do? As I understand it, it 's easy to achieve it using simple events. Trying to see if there is a use case that many users can use, in your requirement. Would appreciate your update.

    Regards,

    Praharsh

  • Hi Shay,

    Glad that it worked for you! And thanks much for the feedback, I have added a FAQ with your first question.

    From your latest question,

    1) Sweet Alert's Prompt is designed with a serial input mode, one data at a time. Having multiple input field will get very confusing as the requirement will vary from user to user. If you want to differentiate between the prompts themselves, you can associate a 'Tag' with them and then check for the tag in your trigger.

    2) You do not need to monitor the field value at all. Once the user hit's the confirm button, the 'input read' condition will trigger. This is designed to happen once the user is done with entering the data.

    Kindly let me know if you have any further questions.

  • Have you tried the expression 'Input from Prompt'? It should have the input field value saved. You can check for it in 'prompt input data read' condition. Kindly do and let me know if that works for you. I am on my mac and will need a couple of days to swing back to this. If you have any issues, I will get that done by the end of this week.

  • I will work on this and see how this can be fixed easily for your.

    For now, please use this workaround. Whenever you are creating an alert, first create a full screen sprite with no functions and when alert is clicked, remove that also.

    Such a background object is built-in in the alert. Let me see why is this not working. Can you please give me more info like are you facing this in both browsers as well as devices? A sample capx will help too!

  • Anyone?

  • Hi, pls help me on the below.

    I am creating a plugin. It uses one external JS file. That, in turn, has a load function. The load function depends on another external JS file which adds an external source in HEAD[0] which has the source of load. So, I have both the files listed as dependancies in edit time.

    Now, an API key needs to be passed from edit time for the external service. This, user can enter in the property list. the external file #2 needs to have the key, to connect to the service.

    How can I access the edit time property in an external file? Will I have to add the whole code in runtime?

  • Hi!

    I have tested it with XDK and it works just fine on my iPhone 5S. I have not tested it with cocoonjs though.

    There are only two colors as of now - driven by a 'Log type'. A 'success' message logs in green and a 'fail' message comes in red. I can work on getting a color input if you want it.

  • Yes. I have tested it in iOS.

praharsh's avatar

praharsh

Member since 13 Apr, 2014

None one is following praharsh yet!

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies