aframe实现nft增强现实ar图片跟踪显示三维模型效果代码

代码语言:html

所属分类:其他

代码描述:aframe实现nft增强现实ar图片跟踪显示三维模型效果代码,在手机运行然后扫描这张图片看效果 https://web.debug.only.bfw.wiki/asset/pinball.jpg,nft的fset在线制作地址:https://carnaux.github.io/NFT-Marker-Creator/#/ 上传任意图片后生成这张图片的fset,然后在a-nft标签中设置就好了。

代码标签: aframe nft 增强 现实 ar 图片 跟踪 显示 三维 模型

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!-- import aframe and then ar.js with image tracking / location based features -->
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/aframe.1.04.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/aframe-ar-nft.js"></script>

<!-- style for the loader -->
<style>
  .arjs-loader {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .arjs-loader div {
    text-align: center;
    font-size: 1.25em;
    color: white;
  }
</style>

<body style="margin : 0px; overflow: hidden;">
  <!-- minimal loader shown until image descriptors are loaded. Loading may take a while according to the device computational power -->
  <div class="arjs-loader">
    <div>Loading, please wait...</div>
  </div>

  <!-- a-frame scene -->
  <a-scene
    vr-mode-ui="enabled: false;"
    renderer="logarithmicDepthBuffer: true;"
    embedded
    arjs=&.........完整代码请登录后点击上方下载按钮下载查看

网友评论0