marceloborghi's Recent Forum Activity

  • R0J0hound I followed your suggestion and created an else for the code line 1313 error when uv is not defined, as you suggested with the value of: uv.push(0, 0), but this did not inhibit the c2 error alert, but the 3d mesh did not load. but I saw on line 421, that you defined a mesh object and assigned the property mesh.uv = [ 0, 0, //tri 1 1, 0, 1, 1, 0, 0, //tri 2 1, 1, 0, 1]

    What are 2 triangles, shouldn't the same logic be used when a 3d mesh loaded from an obj file is not defined? any other ideas?

  • R0J0hound When the obj file containing the 2d mesh does not have a value for uv defined, the plugin gives an error saying that it cannot read the value as undefined (reading '0') pointing to code line 1313 column 22 where you get the uv value for be able to load the mesh. The error prevents you from loading the 3d mesh in your plugin.

    I think of 2 solutions, if the value is undefined, set it to zero so the property has a valid value, but I would need to change its code or create an action to set the object's UV before reading, but I didn't analyze the code to see if it would work. of the loaded object or would have to redirect to this value set in another action as a plugin property.

  • quackgyver The answer to your question is yes. Base64 is a decoding system.

    For base 64 encoding use: window.btoa(). The value goes inside the (), as a string or data.

    To remove the encoding use: window.atob() The value goes inside the (), like a string or data.

    Here's the API reference: developer.mozilla.org/en-US/docs/Glossary/Base64

    Example: window.btoa("text") // encoding "text" to base64.

    Question link: construct.net/en/forum/construct-3/scripting-51/convert-image-base64-163038

  • fingerskier Asynchronous functions they do not prevent others from executing. What you need and have a trigger to fire on the condition. I already implemented asynchronous functions in construct 2 and put triggers inside. So I could use the trigger as true in the comparison. As the use of script has a somewhat limited view in c3 and I really don't see much use in c3, because I make my plugins in js in c2, but I believe that you can create the trigger together with the asynchronous function and create a comparison in the script if the trigger equals true and you create the action you need.

  • dop2000I was thinking to change the tilemap plugin to allow disabling collisions. Scirra didn't create the collision mask, as it exists in sprites, to accomplish this. That's why your solution of placing the points allowed disabling the collision mask, because the collision property runs, without having been placed to be modified. To create the plugin I need to understand some points: one of them is the position of the points in your solution, I saw that they are x and y coordinates of each point, forming 4 points of the collision mask. My question is are these coordinates that you passed based on the x and y position of the title in relation to the tilemap? or is it a block numbering, as if it were an id. It seemed to me to be x and y of the tiled relative to the tilemap.

    Link topic: construct.net/en/forum/construct-3/how-do-i-8/disable-collision-tiles-160894

  • Hello community! Hi R0J0hound! Remember a while back when you were adding a tiff generator system to your plugin? So I didn't stop there. I added several actions, conditions and expressions to the plugin. I used the base of your plugin to no longer create a canvas plugin.

    Link do new plugin in my github: github.com/MarceloGh05t/canvas-plugin-construct2

    Examples capx link: github.com/MarceloGh05t/canvas-plugin-construct2/tree/main/exemplos

    Actions added to the plugin:

    - Request TIFF Data URL (RequestTIFFDataURL):

    What it does: it will request the entire drawing created on the canvas in dataUrl format and transform it into tiff format (allowing to save the canvas content in Tiff), as it is an asynchronous request, I used a trigger to validate through "true" when the tiff are ready. The CanvasToTIFF api was used. You need to use the OnAnyTIFFComplete condition.

    - Draw SVG path (drawSVGpath):

    What it does: Draws on canvas using path SVG (graphics). Example: "M150 50 L75 200 L225 200 Z"

    - Fill path image (fillPattern):

    What it does: Fills the path(ctx) created on the canvas with an image. The image will be pulled by the name of the file included in the construct project. The image will be printed inside the created path, without resizing the image, that is, if it is bigger, it will fill with the x and y position of the path in relation to the image.

    - Fill path image with effect (fillPatternEffect):

    What it does: It fills the path(ctx) created on the canvas with an image with the effect, which must be typed with the factor. Example of factor-to-type effects: contrast(1.4) sepia(1). The image will be pulled by the name of the file included in the construct project. The image will be printed inside the created path, without resizing the image, that is, if it is bigger, it will fill with the x and y position of the path in relation to the image.

    - Move Path With Translate (MovePathWithTranslate):

    What it does: Moves the path (path) to apply the design to the canvas, changing the x and y zero values of the canvas identification matrix, making the moved point as if it were the zero point of the path. You need to use the other action to reset the matrix (Reset Identity Matrix), I will describe it below.

    - Reset Identity Matrix (ResetIdentityMatrix):

    What it does: resets the canvas matrix when it is changed by translate (to move a path) or any other change in it, like rotating the path through changes in the canvas matrix. This action returns to the initial values of the canvas matrix.

    - Draw Image Natural Size (DrawImageNaturalSize):

    What it does: Draws an image from an external file on the canvas, but at the original image size. The image may be cropped if applied after the path created before drawing the image.

    - Draw Image Scale Size (DrawImageScaleSize):

    What it does: Draws an image from an external file on the canvas, but allows changing (decreasing or increasing) the original size of the image. The image may be cropped if applied after the path created before drawing the image.

    - ClipPath (ClipPath):

    What it does: Cuts the drawing on the canvas, using another path created to cut over the drawing.

    - Request Canvas To SVG Data (RequestCanvasToSVGData):

    What it does: transforms the canvas content or image into a string in svg file format, which can be saved or even downloaded as the string content and mine type (application/svg+xml), through the browser plugin with the action Invoke download of string or using another plugin that saves the content to file. As it is an asynchronous function, I created the comparison when the string is ready (OnCanvasToSvgDataComplete), but I will talk about them later.

    - Set Origin Point Path (SetOriginPointPath):

    What it does: Defines an origin point (x and y) to be used in the current path, this way you can use it in the position of the path or even using MovePathWithTranslate through the matrix using this point. * I intend to create an instance system for the paths.

    - Set Origin Point Path Only X (SetOriginPointPathOnlyX):

    What it does: Changes only the x of the created origin point to be used in the current path, this way you can use it in the position of the path or even using MovePathWithTranslate through the matrix using this point. * I intend to create an instance system for the paths.

    - Set Origin Point Path Only Y (SetOriginPointPathOnlyY):

    What it does: It only changes the y of the created origin point to be used in the current path, this way you can use it in the position of the path or even using MovePathWithTranslate through the matrix using this point. * I intend to create an instance system for the paths.

    Condition included in the plugin:

    - OnAnyTIFFComplete:

    What it does: Returns true when the transformation of the canvas content into a tiff is ready to save the file as a tiff.

    - On Canvas To Svg Data Complete (OnCanvasToSvgDataComplete):

    What it does: Returns true when the transformation of the canvas content into an SVG string (in xml format) is done, which can be saved or even downloaded as the string content and the mine type (application/svg+xml), via from the browser plugin with the Invoke download of string action or using another plugin that saves the content in a file.

    - Is Point In Stroke Last Path (isPointInStrokeLastPath):

    What it does: Checks if the point x and y are colliding on the last path line.

    Expression included in the Plugin:

    - Last TIFF Data URL (LastTIFFDataURL):

    What it does: Returns the url of the screen that has been transformed into a tiff file to be downloaded.

    - Canvas Svg String (CanvasSvgString):

    What it does: Returns the svg string in xml format, which can be saved or even downloaded as the string content and mine type (application/svg+xml), through the browser plugin with the action Invoke download of string or using another plugin that saves content to file.

    - Origin Point Path X (OriginPointPathX):

    What it does: Returns the x-position value of the origin point created for the last path.

    - Origin Point Path Y (OriginPointPathY):

    What it does: Returns the y-position value of the origin point created for the last path.

  • That's what I'm doing by splitting the return into parts, the canvas is returning right, the canvastiff variable apparently also before generating any results, but when I associate the function associating the datatourl parameter within the canvas url variable and targeting the canvas of the your plugin there is undefined ... I tried different ways and the same result. I think about making a comparison if the return is undefined to return and put the value below, I saw this work in another plugin developed by a third party (I thought about it today, but haven't tested it). Anyway, I appreciate it R0J0hound.

  • R0J0hound I have a code to create the content of the canvas in a tiff image, I tried to create both in action, as in the expression in eddittime and runtime of your plugin, but it is returning as an undefined object

    this is the original code

    I tried as much of the action, as this one now of expression or taking the url or going but always returns as an undefined object, even converting the variable c to this.canvas

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the plugin cordova file transfer 2 was taken from the air, which is a dependency of the project, I will check if a subtitle, once it was depreciated the original plugin of the cordova, for now it is so working for web projects, without a compatible cordoba plugin will run for while neither android or ios

  • Kyatric Thanks for post my plugin :)

  • rhg1968, dop2000, , Elliott, tarek2, DeviatorX19, BadMario, newt, NetOne, MassimoF, tunepunk and Jayjay Sorry for my absence these months. I was studying the stock market and working at the bank. but I returned, thanks

marceloborghi's avatar

marceloborghi

Member since 20 Jun, 2014

Twitter
marceloborghi has 2 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies