Mikal's Forum Posts

  • piranha305

    One suggestion/request - update the c3IDE plugin code generation to include the new SDK boilerplate to handle the new C3 minimization (add the const C3 = self.C3; below in each JS file).

    "use strict";
    
    {
    	const C3 = self.C3;
    
    	const tempQuad = new C3.Quad();
    	
    	C3.Plugins.MyCompany_DrawingPlugin.Instance = class DrawingInstance extends C3.SDKWorldInstanceBase
    	{
    		constructor(inst, properties)
    

    Other newish example plugins here:

    construct.net/en/make-games/manuals/addon-sdk

    If you want me to enter this on the c3ide github instead as an issue, let me know. Thanks as always for this great tool.

  • I realized that if I go ahead and use module import/export, my addon will not be backward compatible to pre R226, so I'm going to continue to use the globalThis method for now, until the module mode goes into the stable branch.

  • Have you already tested using UserMedia and pasting to Drawing Canvas and then using the Drawing Canvas snapshot to check for the color/area?

    If you know Javascript, there is another method you could work with. Let me know if you know JS and if that would help.

  • Thanks for the tips Ashley, I am using some 3rd party external js in the Spine C3 addon (specifically the 'spine-ts' js library/distribution) and it does the 'sloppy' global declaration for the spine library. For now I changed the definition to globalThis.spine, instead of a top level 'spine' and it is now working again.

    I'll look to update this and the rest of the addon to 'modules' in the future.

  • On Animation Finished and On Any Animation Finished are working in my projects. Do you have a test project for me to review?

    If the test project is private, contact me on the Construct Community Discord and send it via DM.

  • For the bbox, you need the Spine Slot name and the Spine BBox name. Check in the spine editor or in the Spine JSON what the slot/bbox names are.

  • Some more work on Babylon 3D Model Sprite plugin, added default Animation Blending and isPlaying, onAnimimationFinished ACEs to handle transitions. Contact me on Construct Community Discord if you want to Alpha test (and have a 3D model to test with).

  • Nice work, nice to see these type of work w/o plugins (and just some effects). Keep up the good work, looking forward to the game when it releases, the demo looked good.

  • This looks similar to a 'smoothstep'

    en.wikipedia.org/wiki/Smoothstep

    Live example / formula:

    desmos.com/calculator/xykhidbkbg

    For your case you can do (1-(formula))*1000 to get your range and adjust a and b to match your limits.

  • I have seen converters/exporters sometimes fail to work perfectly between formats (and also have read about folks having troubles in general between many formats), in particular textures (there seem to be multiple different ways to handle 'materials' beyond just diffuse color between formats and tools.)

    If a glb works in the sandbox, it will very likely work using this plugin (since it's all based on Babylon and Babylon gtlf/glb loader.)

    In general performance could be relatively stable on desktop, but mobile tends to not handle dynamic texture updates from a canvas very well.

  • I see, my suggestion then would be to multiply everything by: PlatformInfo.DevicePixelRatio

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There _may_ be a bug in the plugin (at least when run in preview).

    In c3runtime/instance.js:

    				self=this;
    

    This line might be overloading C3's use of 'self' at the top level (at least in preview.)

    After commenting out that line and disabling worker mode, the plugin no longer does a black screen (also a suggestion, if you see a black screen open up the browser developer console and check for errors, this is how I debugged and found the worker mode issue and the 'self' issue.)

    Also note that my experience is Corodova based plugins are not functional in C3 preview (since the cordova plugin may not be loaded in a preview environment.) They are functional when built for the target mobile platform (e.g. iOS or Android.)

    I would contact the original plugin author to see if they can help based on this info.

  • Here's a JS library that can do full body pose:

    medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5

    With C3 JS integration, you should be able to load the JS files and use C3 JS scripting to control it and pass back data to C3 events.

  • Quick guess: try turning off worker mode in 'Advanced' Project Settings.

  • If you are talking about Drawing Canvs snapshot, the details are here:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

    More specifically look at:

    Expressions:

    PixelScale

    The size of a single canvas pixel in object co-ordinates. See the section Co-ordinate systems above for more information.

    SurfaceDeviceWidth

    SurfaceDeviceHeight

    Returns the current size of the canvas surface in device pixels. These are useful to use when defining a subset area to use in the Save image action.

    The one exception to this is using snapshots to read and write pixel data. In this case snapshot pixels are given in actual pixel co-ordinates rather than object co-ordinates. The PixelScale expression also gives the size of an actual pixel on the drawing surface in object co-ordinates, allowing you to convert between object and pixel co-ordinates.