What I’m hoping to do it make it so that when a person taps in any area on the grid that one of the blue icons appears.Is that even possible? or should I have an asset bank of the boxes and make then draggable to areas? I would prefer a tap to create the dot as I’m not 100% sure how many plots would be on the graph.
With multiple circles, that’s complicated, as you’d have to keep track of when to move each circle.
This is just a proof of concept. It probably would need working on to fit you full needs.
But it is to show a way of adding plots at the mouse click point.
When we clone within Hype. Hype is not aware of the cloned elements. Which means there can be some adverse results. I have hopefully countered two of these in this example.
1, You must always remove any Hype class names inherited from a cloned Hype element. If you do not the Hype js will at some point have it’s brains exit sideways which is not pretty. One example will be if you try and go to a new scene , you will crash and burn with errors. Because hype is trying to account for the extra named class element and cannot.
2, Clicking on a cloned element with a click event added works fine. But although what ever click function you use should work. Hype will register the event as a click on the layer below the clone also. But will not get the position correct.
if you click on an existing plot it is removed correctly but because Hype does not know about the plots, it will think we have clicked some where on the plotter and add a new plot on the plotter in the region of the top left. To avoid this we do not create any plots that are going to be in the region that hype wants to then create these errant plots. see the JS for creating the plots
The main background is just a layer which people can change to match their needs.
But if I introduce a pallet would be nice to have something that looks nice and maybe even offer different background templates to choose from.
My real questions is, are these sort of changes needed in this template, the other aim is to keep changes that others need to do as simple as possible, which would hopefully be just changing out images/svg. Rather than touch the code.
Just had another thought. If someone was using this on an iPad they would not be able to hold shift or alt. to delete or add lines. I assume this functionality could be transferred to on screen buttons though? or could we use touch events like doubletap using a library like hammer.js or touchy.js?
1; nice idea
2; with custom behavior
3; Yes it could be useful
the current background is ok [quote=“MarkHunte, post:9, topic:6309”]
Also is this useful ?.
Yes, as a tecnical example and interactive educational pages.
Alternative use :
a classic Game for Kids, a less noble use but fun
in this case all marker are fixed and you can add only lines with a final goal ( complete the path). In this case we can make multiple scenes with an image per page. the user can move/add/remove all points (X,Y) to customize the game.