Skip to content

Commit

Permalink
Merge pull request #14 from Mufaddal5253110/4-list-images
Browse files Browse the repository at this point in the history
images link added
  • Loading branch information
himanshu2406 authored Jun 1, 2023
2 parents e446869 + 49ef2a3 commit 1ec00e8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@
<a-entity id="mouseCursor" cursor="rayOrigin: mouse"></a-entity>

<a-box id="metamask_btn" class="clickable" metamask-link='' scale="0.05 0.1 1" depth="0.05" width="4.4" height="3.2" position="-15.57 6.84 -10" rotation="62 -90 0" src="assets/MetaMask_Fox.svg"></a-box>
<a-box id="nft-link" class="clickable" scale="0.05 0.1 1" depth="0.05" width="15.4" height="20.2" position="2 1 0" rotation="0 0 0" src="https://i.seadn.io/gcs/files/2cf5f8e41bf0fe223e95184e98feff2d.png?auto=format&dpr=1&w=1000" nft-link='link:https://opensea.io/assets/ethereum/0xe987e9b07ca431fe0c7e8f431fa4f94ab9ca2423/1497'></a-box>
<a-box id="nft-link" class="clickable" scale="0.05 0.1 1" depth="0.05" width="15.4" height="20.2" position="3 1 0" rotation="0 0 0" src="https://i.seadn.io/gae/-0YEWuGk89n6TLwtDwfuR9B2Vi0HuHMhzzaCHFL1ic6vELnuZQI723go3uFRhTYdhoaKAKHYg5SLJoCEGB4cJzj0OsfQZTUqxVcAzsQ?auto=format&dpr=1&w=1000" nft-link='link:https://opensea.io/assets/ethereum/0xe987e9b07ca431fe0c7e8f431fa4f94ab9ca2423/1497'></a-box>
<a-box id="nft-link" class="clickable" scale="0.05 0.1 1" depth="0.05" width="15.4" height="20.2" position="4 1 0" rotation="0 0 0" src="" nft-link='link:'></a-box>



</a-entity>

Expand Down
14 changes: 14 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ AFRAME.registerComponent('metamask-link', {
}
});

AFRAME.registerComponent('nft-link', {
// Could use a schem to preserve the color! then simply change it on update
// if clicked?
init: function () {
this.el.addEventListener('click', async () => {
console.log(this.data.link);
window.open(
this.data.link,
'_blank' // <- This is what makes it open in a new window.
);
});
}
});

AFRAME.registerComponent("hide-on-hit-test-start", {
init: function() {
var self = this;
Expand Down

0 comments on commit 1ec00e8

Please sign in to comment.