update while testing on the cloud
This commit is contained in:
parent
a7e63de299
commit
3282369151
5 changed files with 433 additions and 23 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -40,3 +40,5 @@ firebase.json
|
|||
##
|
||||
original_collider.svg
|
||||
original.svg
|
||||
|
||||
data
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
.DS_Store
|
||||
index.html
|
||||
404.html
|
||||
about.html
|
||||
participants.html
|
||||
fragment.html
|
||||
hello.txt
|
||||
home.html
|
||||
intorudction.json
|
||||
src
|
||||
index.html
|
||||
index.json
|
||||
Readme.md
|
||||
src
|
||||
participants.html
|
||||
|
|
|
|||
405
test_data/home.html
Normal file
405
test_data/home.html
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -62,7 +62,7 @@
|
|||
<div id="frags">
|
||||
<div id="-1" class="octet-stream"><a href='.DS_Store'>.DS_Store</a><span class="filename">.DS_Store</span></div>
|
||||
<div id="-1" class="json"><a href='introduction.json'>introduction.json</a><span class="filename">introduction.json</span></div>
|
||||
<div id="-1" class="svg+xml"><figure><img class="image" src="original.svg"><figcaption>original.svg</figcaption></figure></div>
|
||||
<div id="-1" class="svg"><figure><img class="image" src="original.svg"><figcaption>original.svg</figcaption></figure></div>
|
||||
<div id="-1" class="html"><section id="original_collider.svg">
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 734">
|
||||
<defs>
|
||||
|
|
|
|||
|
|
@ -103,21 +103,25 @@ frag_request.onload = function() {
|
|||
color = ['#556270'];
|
||||
|
||||
const addFrag = () => {
|
||||
let _frag = fragments.shift();
|
||||
let p = findElementByProperty(participants, 'path', `${_frag.artist}`)
|
||||
if (_frag.artist == "") return;
|
||||
let frag = document.querySelector(`._${p.fragId}`).cloneNode(true); // get fragments by artist
|
||||
frag.classList=[];
|
||||
frag.id= `_${_frag.index}`;
|
||||
frag.childNodes[0].setAttribute("href", `${window.location.origin}/${_frag.artist}/#${convertIndexToString(_frag.index)}`);
|
||||
try{
|
||||
let _frag = fragments.shift();
|
||||
let p = findElementByProperty(participants, 'path', `${_frag.artist}`)
|
||||
if (_frag.artist == "") return;
|
||||
let frag = document.querySelector(`._${p.fragId}`).cloneNode(true); // get fragments by artist
|
||||
frag.classList=[];
|
||||
frag.id= `_${_frag.index}`;
|
||||
frag.childNodes[0].setAttribute("href", `${window.location.origin}/${_frag.artist}/#${convertIndexToString(_frag.index)}`);
|
||||
|
||||
let text = frag.children[0].children[frag.children[0].children.length - 1];
|
||||
text.innerHTML = `#${convertIndexToString(_frag.index)}`
|
||||
let text = frag.children[0].children[frag.children[0].children.length - 1];
|
||||
text.innerHTML = `#${convertIndexToString(_frag.index)}`
|
||||
|
||||
let shape = frag.children[0].children[0];
|
||||
let shape = frag.children[0].children[0];
|
||||
|
||||
svg.appendChild(frag);
|
||||
frag_disp.push(addFragToWorld(shape));
|
||||
svg.appendChild(frag);
|
||||
frag_disp.push(addFragToWorld(shape));
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
}
|
||||
let initY= 0;
|
||||
const addFragToWorld = (path) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue