impress / impress.js

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.
http://impress.js.org
MIT License
37.64k stars 6.66k forks source link

Feature request: Polar and spherical coordinates for positioning of steps #669

Open complanar opened 6 years ago

complanar commented 6 years ago

It would be great if it was possible to position the steps by polar coordinates. Makes positioning much easier if you use rotation or slides arranged with relative rotations to each other (e.g. positioning them along a circle). I would propose new data-angle and data-distance (polar coordinates - 2D) and data-angle-primary, data-angle-secondary, data-distance (spherical coordinates - 3D) attributes along with the corresponding relative ones. One could also think of a astronomical positioning system (azimuth, elevation, distance).

The rest should be a relative simple math formula with math.pi, math.sin and so on.

When I have the time I would be glad to help with the implementation, but at the moment I have no spare time for this.

henrikingo commented 6 years ago

I've thought the same :-) Would make for a cool (new) plugin.

lwhshugyosha commented 6 years ago

OK, when the time is ready for something... ;-)

Planar polar coordinates (absolute and relative) work already fine with my own plugin. It even supports relativity to any previous step (#670). Where do You want it uploaded?

henrikingo commented 6 years ago

@lwhshugyosha Please just submit a pull request. (I assume you're familiar with github? If not, I'm happy to help...) You could reference this issue from the pull request.

complanar commented 6 years ago

I just realized, that we have not talked about relative angles, yet. The orientation of slides, maybe does matter as well. There is a difference between arranging the slides at a circle, for example and make their bottoms point towards the circle as well. If you do not want to calculate the angles by hand this would require some data-rel-rotate attributes.