pyxro's Recent Forum Activity

  • The sdk manual says nothing about getting a texture’s image.

    Take all my suggestions with a grain of salt. I can only go by what I find in the manual. When actually making a plugin you have the other tool of using console.log with whatever object you’re curious about and then you can then browse that object from the browsers debug console. That would let you confirm the things the manual lists as well as show anything not mentioned.

    Thanks a lot! One more thing: What is the difference between a Texture and an Image?

  • At edit time and at runtime there are sdk functions where you specify how the object is drawn in your plugin.

    Great! Is there a way that I can get the texture as image? Like a png or a blob or something?

  • If you got the texture then it’s just a matter of using it in the render function I suppose.

    During edittime? What would be the render function here?

  • The object property gives an id, and you can use one of the runtime methods to get the object class from the id. Object class is just the base of object type so you should be able to use the methods of either. From the object type you can use get image to get an animation interface where you can get the texture.

    This is based on looking through the sdk docs.

    Yeah I already got to the part to get the texture in edittime but I don't how I can then set the image of my plugin to the texture I just got

  • No one?

  • Anyone know the answer to this?

  • Hey forum!

    I was in the process of creating a sort of SpriteCloner plugin that basically clones a sprite object without having to add many other sprite objects to the project (sounds confusing, but I need it for my project). Anyway, I've now added a plugin property where you can select a sprite (just like 3DShape's front face object property). Now I would like to set the image of this instance of my sprite cloner plugin to that of the selected sprite in the edit time. Now where do I get the image of the selected sprite?

    It should basically work just like in the 3DShape plugin in which the face of the Shape gets updated during edittime:

  • It's not currently supported. What do you need it for? You could post a feature request.

    What would really help me as well (and maybe save you some time instead of implementing a whole new feature in the SDK) would be if you could tell me how I can get those blob URLs from each object? As you can see I can simply grab them using F12 inspector while an animation editor is open - however I'm not sure on how I could automate that as you would then need to manually open the editor image editor of each sprite at once.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not currently supported. What do you need it for? You could post a feature request.

    I'm currently building some sort of layout sync which basically gets all the objects in a layout and then sends all this data to a server. Everything works fine with X,Y Position, Width and Height - the only thing I'm missing here is getting the image of e.g. a Tiled Background. It would really level up edittime if we can somehow get the images of objects - I mean for what is the WebGL texture else?

  • Hi devs, does anyone know how I can get the image of the tilebackground as blob or image64?

    OnCreate()

    {

    var self = this;

    const object = self.GetProject().GetObjectClassByName("TiledBackground");

    try {

    console.log(object.GetImage().GetCachedWebGLTexture())

    } catch (err) {

    console.log(err)

    }

    }

pyxro's avatar

pyxro

Member since 29 Aug, 2024

None one is following pyxro yet!

Trophy Case

  • Email Verified

Progress

1/44
How to earn trophies