Skip to content

suggested dommapper.reset() function and other feedback #1

@ffd8

Description

@ffd8

Veeery cool library! Impressively simple api/usage, great to have built-in localstorage, and simply amazing to let any DOM item be mapped! Oooh so much potential for weird website projections.... Here's some random testing waters feedback:

reset()

Testing the waters using within P5LIVE, with the idea that maybe it's nice to have some projection map control for the main p5 canvas, OR for hacky experiments (careful, only test with incognito), to talk to the parent of the sketch iframe for mapping the menu/code/etc... – when I realized, that it could be very helpful to have something like reset() to trash its localstorage. Not sure what the best approach would be.. a global reset, like dommapper.reset() or allow specific keys/elms dommapper.reset(3) / dommapper.reset(elm). Ooor could be nifty if one could just chain dommapper().reset() onto it, since it doesn't seem intended to return each object as a variable.

tab

Using the keyboard is great for fine-tuning and the idea of TAB to cycle through the points is a great idea, however the TAB key is often taken by the browser or website (even on the p5 editor demo, pressing TAB jumps to the URL bar. Not sure if there's something else that's available, or if an dommapper.settings({}) would be helpful to set a custom shortcut key? Was also a bit surprised it cycles (along with storage of points) from TL, TR, BL, BR, rather than walking around a circle like TL, TR, BR, BL.. just a detail and probably a good reason to have it that way.

___Handles()

For avoiding typos/live-coding, could be helpful to make aliases of the showHandles() etc as just show() / hide() / toggle().

initialPoints()

Ran into an issue that it only worked if there wasn't already a localstorage for that given key.. ie, if no key is provided, then manually assigning the initialPoints() doesn't work.. if one specifically says key:1 as an option, then it works (if that one is available). Seems like when setting initialPoints() it should always override the localstorage? Perhaps that would mean, it has to be disabled when wanting to store those coordinates. The benefit is potentially copying coordinates from one sketch/project/website to another. But that would require a technique for logging/exporting those coordinates without digging through the dev tools...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions