Skip to content

Commit

Permalink
Notre-Dame interactif
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultGuillaumont committed May 17, 2024
1 parent 35f3672 commit 4e8ffec
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
8 changes: 6 additions & 2 deletions _includes/ecorpus.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<button onclick="setTourStep(step++)">Go</button>
<div class="ecorpus_container">
<div class="text-center">
{% for button in section.button %}
<button class="{{button.style}}" onclick="setTourStep('{{section.scene}}',{{button.step}})">{{button.text}}</button>
{% endfor %}
</div>
<div class="ecorpus_container">
<voyager-explorer id="{{section.scene}}" root='{{section.server}}/scenes/{{section.scene}}/' document='scene.svx.json'></voyager-explorer>
<script src="{{section.server}}/dist/js/voyager-explorer.js"></script>
</div>
6 changes: 2 additions & 4 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@


<script>
var step =0;
function setTourStep(stepIdx) {
function setTourStep(id, stepIdx) {
// Get reference to the Explorer element by id
var voyagerElement = document.getElementById("PIT38_Chap");
var voyagerElement = document.getElementById(id);

// Call the setTourStep function with the value of the
// option input element as the parameter.
// **Note the hard-coded tour index and interpolate flag.
voyagerElement.setTourStep(0, stepIdx, true);
setTimeout(function() {setTourStep(stepIdx+1); }, 3000);
}
</script>
</body>
Expand Down
53 changes: 41 additions & 12 deletions _projects/notredame.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,60 @@ sections:
- type: ecorpus.html
server: https://notredamedeparis.ecorpus.holusion.com
scene: PIT38_Chap
button:
- text: Points Communs
style: btn-success
step: 0

- text: Différences
style: btn-danger
step: 1

- type: paragraph.html
section_id: more-to-come
# background_style: bg-info
text_style: text-justify
text: >
Cloture du choeur
Clés de voûtes
- type: ecorpus.html
server: https://notredamedeparis.ecorpus.holusion.com
scene: Clef_NF_37-40
button:
- text: Points Communs
style: btn-success
step: 3

- text: Différences
style: btn-danger
step: 4



- type: paragraph.html
section_id: more-to-come
# background_style: bg-info
text_style: text-justify
text: >
Cloture du choeur
- type: ecorpus.html
server: https://notredamedeparis.ecorpus.holusion.com
scene: Cloture%20du%20Choeur
button:
- text: Arrivée à Jerusalem
style: btn-info
step: 1

- text: Miracle de la résurection
style: btn-info
step: 2

- text: Musicien
style: btn-info
step: 7
---

<script>
function setTourStep(stepIdx) {
// Get reference to the Explorer element by id
var voyagerElement = document.getElementById("PIT38_Chap");

// Call the setTourStep function with the value of the
// option input element as the parameter.
// **Note the hard-coded tour index and interpolate flag.
voyagerElement.setTourStep(0, 1, true);
}
</script>

0 comments on commit 4e8ffec

Please sign in to comment.