Mikal's Recent Forum Activity

  • Think of bbox override as the area your Spine instance will render into. If scale is set to 1, it will be the same 'coordinates' as your Spine project.

    In general, your Spine animation should stay centered around a point in your Spine project. If you have a jump or leap animation, it should be done 'in place' and the actual vertical or horizontal movement should be done by moving the C3 Spine object during runtime in C3.

    The width and height are the size of the area that is rendered into, so it should be sized to encompass all the movements of your Spine object (e.g. large enough to capture a swinging sword.)

    The offset x and y are used to center the area around your character. For example, if your character is centered around 0,0 in the Spine project, the offset should generally be -1/2*width and -1/2*height.

    The main thing we usually do is experiment a little, using a scale of 1.0, then use height and width of the object itself to scale as needed.

  • Is it possible for a plug-in to fetch a file from the web in the editor?

    For my 3DObject plug-in, I'm adding an option to fetch the glb 3D model from the web during runtime, I have implemented this for runtime, but it seems like due to the specific cors setting for the editor, I cannot do this in the editor.

    I know I have alternate ways to do this for the editor to work (e.g. have a placeholder model included in project files), but I wanted to see if I was missing something about the editor cors settings.

  • If you are trying this in preview, it may be due to how C3 remaps project files into blob URLs. Here's what works for me in preview:

    const fileName = '1.png'
    
    const url = await runtime.assets.getProjectFileUrl(fileName)
    
    var image = new Image();
    
    image.onerror = function() {
    	console.log("No image");
    }
    
    image.onload = function() {
    	console.log('image:', image)
    }
    
    image.src = url;
  • Sorry, this is an old project and it no longer works in C3.

  • tuzke good job figuring it out! So, no raw data uris, that's much easier to handle!

    reimuxx do you have a simple test case I can look for the animation mix/finish issue?

  • For instant games, I think C3 changes the files into raw data URIs. In previous versions of the plug-in (1.x.x), raw data URI are not supported by spine-ts 3.8, so it will not work.

    However! In the beta version of the plug-in 2.x.x which uses spine-ts 4.0, there may be a chance for this to work, but I have not tested it yet, there may be work to do.

    You could try the 2.x.x C3 spine plug-in version, just to see. Otherwise, wait for me to test and figure out if some changes are needed to enable the raw data URI support (I have not developed FB instant games before.)

  • You are welcome reimuxx.

    It works for me in R278.2, did you try the sample project with the release?

    If it does not, can you check the dev console for errors?

  • Spine 4.0 beta test ongoing, you must export from Spine 4.0 (3.8 exports will not work.)

    Rilem reimuxx RoosterDota

    If you already have experience with Spine and the C3 plug-in, try it out. If you have not used the C3 plug-in before, I recommend staying with the current 3.8 version as the new 4.0 beta may have bugs.

    4.0 beta:

    github.com/gritsenko/c3_spine_plugin

  • I have not hit a limit yet, but nothing is unlimited on a computer, so I’m sure there’s some limit.

    As you say performance is definitely a consideration. c3 is not built to do high poly count 3D rendering or animation like other 3D first engines.

    Let us know how it works out for you.

  • Ashley, I know this is not a perfect solution, but I found this worked for 3DObject, when applied to each 3DQuad separately (e.g. not after a possible pre-draw, SetDepth() not enabled.)

    This is my Alpha Discard effect, pretty simple, if alpha is below the threshold, discard pixel (so it won't be written to the frame buffer or depth buffer.) It has potential perf implications, so I imagine it would be good to only use it when needed. Since I need to happen before predraw, I added in a separate color and opacity to use if needed.

    uniform lowp float threshold;
    uniform lowp vec3 colorValue;
    uniform lowp float opacity;
    
    /////////////////////////////////////////////////////////
    // AlphaDiscard
    
    //The current foreground texture co-ordinate
    varying mediump vec2 vTex;
    //The foreground texture sampler, to be sampled at vTex
    uniform lowp sampler2D samplerFront;
    
    
    void main(void)
    {
     lowp vec4 frontSample = texture2D(samplerFront, vTex);
     if (frontSample.a < threshold) {
    		discard;
    	} else {
    		gl_FragColor = vec4(colorValue*frontSample.rgb, frontSample.a)*opacity;
    	}
    }
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This work has been completed:

    construct.net/en/make-games/addons/627/scorm-c3-runtime

  • Added issue to review:

    github.com/Scirra/Construct-3-bugs/issues/5319

Mikal's avatar

Mikal

Early Adopter

Member since 22 Apr, 2016

Twitter
Mikal has 103 followers

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

19/44
How to earn trophies