11 Commits

Author SHA1 Message Date
Falco Nogatz
64d66bf77f Replace backslashes by slashes in href to CSS (#828) 2022-12-11 17:03:49 -08:00
thawk
629f7686f3 Add relative move and rotate to rel plugin (#794)
The relative position in rel plugin is currently based on the world coordinate. So for the same effect, like fly in from the right-hand side, we must use different `data-rel-x/y/z` value. Why not let the plugin do the hard part?

So I introduce a `data-rel-position`, when set to `relative`, all relative attribute is based on the position and rotation of previous slide. So no matter the rotation of previous slide, data-rel-x="1000" always looks like fly in from the right-hand side. We can change the position and rotation of one slide, and the position of all following slides will be changed too.

When `data-rel-position` is set to `relative`, relative rotation has a clear meaning. It describes the relative rotations between slides. We don't need to set rotations for all slide, setting the key slides is enough. If `data-rel-position` is not relative, the effect of `data-rel-rotate-x/y/z` is not clear, so they're only used when `data-rel-position="relative"`.

After the introduction of relative rotation, there're 6 attribute that will inherit from previous slide. If we want to set a relative X move, we have to set all other 5 attributes to 0. It's boring. So a `data-rel-clear` is used to set all 6 attributes to 0, and then the value specified in current slide is applied. 

The `examples/3D-positions/index.html` shows some usage. As you can see, the html code of two slide ring is the same, and slides except for the first two in a ring has no position attributes. It work by inheriting the previous one.

This PR invokes a lot math calculations. Basically, the rotation of a slide is translated into the coordinate describing the directions of X/Y/Z axes. And `data-rel-x/y/z` can be easily calculated by that. The rotations is the hard part, I mainly use the algorithm in the Quaternions and spatial rotation - Wikipedia to compose two and more rotations.  I'm not a math guy, hope I don't make much mistakes.
2022-04-24 21:37:50 +03:00
IngridRegina
a5e5b96291 created impress-common.css (#760)
Co-authored-by: Ingrid-Regina Vähi <ingrid.vahi@adm.ee>
2020-04-05 17:14:18 +03:00
Henrik Ingo
d3c467b0fd Use darker text for classic-slides
Based on audience feedback from conference talk.
2020-03-23 14:43:12 +02:00
Henrik Ingo
64dd0f4064 Add documentation and examples for scaling to larger screens.
Document all attributes to root element (#impress) in DOCUMENTATION.md.

For the main demo (/index.html) add width, height, max-scale, min-scale
attributes to the main demo. These just use the defaults, except
data-max-scale="3" which allows to scale to larger screens (HD, 4K).

For examples/classic-slides, add attributes to root element and set it
to target Full HD 1920 x 1080 resolution. Adjust CSS to match.

Add notification everywhere that defaults will change in 2021.
2020-03-23 14:25:15 +02:00
Henrik Ingo
d5bbbc40ae Remove dead link from demo slides 2019-10-29 21:04:49 +02:00
Henrik Ingo
4b326d4164 Remove edits to example presentation, used to test previous commit 2018-05-08 20:09:58 +03:00
Henrik Ingo
194ae3bb62 Fixes to data-rel-to
Fixes 80ffff0e8f
2018-05-08 20:01:11 +03:00
Henrik Ingo
e92e02ccb4 Make impress-console-button actually clickable (#651)
Changed the onclick handler to trigger the impress:console:open event
and not use the impressConsole() global function any more. The latter
is considered deprecated now that impressConsole is integrated into
impress.js itself.

Also catch some errors that appear in event handlers when the target
for the click event was immediately removed from DOM.

Fixes #651
2018-01-01 15:05:55 +02:00
Henrik Ingo
1946c5be55 Change hyperlinks to github.com/henrikingo/impress.js back to upstream repo 2017-11-05 18:42:27 +02:00
Henrik Ingo
e847fb4fb4 Add another demo presentation: examples/classic-slides
Add one presentation that provides a very simple demo, using
impress.js to create a very traditional "slide show". Possibly
it's an easier way to learn impress.js (it's commented, just like
the official demo.) It uses the relative positioning plugin and
uses "speaker notes", which aren't shown in the presentation,
but are picked up and shown in the speaker console (press 'P').
Also uses autoplay, forms... and includes short demo of all the extra
addons from extras/. (Highlight.js, Markdown.js, Mathjax.js, Mermaid.js)
2017-11-05 18:42:27 +02:00