Sorry for the late reply.
This example is probably not the best approach to do what you want. It renders to to a separate canvas which is then copied to a texture on c2’s canvas, and that is used instead of an objects texture. Multiple different objects would just mean doing that multiple times for each model.
The pro is it lets you draw it in order with other construct objects.
The con is copying textures can be slow when you do it a lot.
The construct version specific stuff would be getting the object by uid and changing its texture. That and the calling of event functions from js. For the c2 runtime in c3 it should be enough to just change all occurances of c2 to c3. That, and you need to make sure jquery is included as you’ve already figured out.
For the new runtime you’ll need to consult the ask manual to see the new ways to do things.
A plugin would basically do the same thing. You could then hide a lot of the behind the scenes stuff if done right.
In all reality I’d say the best way to be able to make a simple 3D plugin would be:
1. Make some simpler plugins to get familiar with what’s involved.
2. Do some simple webgl programs outside of construct. It’s a pain but it’s much simpler there. Making it work inside construct just adds complexity.
3. Next flesh out how you’d do what you want to do. You can’t really remove stuff from plugins without breaking projects. I’ve found it’s easier and faster to flesh out ideas and try stuff with a hybrid approach of running js with the browser plugin. A drawback of this is js errors are a bit more obscure.
4. At this point you have a good idea of how you want to do things so you can start doing the plugin. There are some design issues though. You are more limited with the things you can do as opposed to js, so you may need to get creative.
3-4ish. I guess at some point you’ll have to test compatibility with different browsers and such. Idk if there are many things to handle.
Anyways there are probably other ways, this is just some of my observations.
I’m probably toward the tail end of 3 with a better example. It is doing what I want, and it’s much simpler to use multiple meshes or textures.
It won’t ever become a plugin, I find them too limiting and hard to maintain. I also need to test with webgl1, and see what breaks.
It’s only going to be a c2 capx, with no plans to ever be c3. I don’t have internet on my computer most of the time and c3 doesn’t add anything for me. I can try to shove all the construct2 specific stuff in one spot to make updating for c3 easier but it may not be feasible.
I’m going to try to do a game or demo with it first before posting it to iron out any activating design issues.