Is it possible to duplicate the object when it was clicked?

Thank you for your kind support.

Now, the question this time is duplication of objects.

There is one triangle.
Click this triangle to duplicate the congruent triangle.
And I would like to lay a duplicated triangle.
I want the duplicates to be the same color as well as size.

Is this possible?
I'm going to use this for learning math.

not with Hypes current API. Everything has to exist in an initial load.
there are hackish workarounds though ... search the forum for cloning.

for easyness you could work with existing Hypeshapes and only turn them on when needed

1 Like

And if it is only triangles you can draw them to a canvas. A Hype API that allows attaching symbols on the fly is an ancient and open request on this forum as many known it from Flash (attach and duplicate movieclip etc.).

1 Like

As said above, Hypes API does not deal with cloning elements.

There is however the Hype Extension.

Which as @h_classen says .

which does clone hype elements.

But be aware Hype still will not be aware of the clone and therefore be outside of it's control/timelines / actions etc..

Any behaviours will need to be added by you using JS.

You will also probably need to use your math to workout placement of the clones... :grin:

I think since my original posting of the clone extension others may have added somewhere on the forum other methods of doing this.. Could have sworn @h_classen did something with a flower and petals?

1 Like