aframe实现增强现实AR示例代码

代码语言:html

所属分类:其他

代码描述:aframe实现增强现实AR示例代码,在手机上打开,然后扫这个图片就能看到ar效果了,marker图片地址:https://repo.bfw.wiki/bfwrepo/image/6475b8cb26408.png

代码标签: aframe 增强 现实 AR 示例 代码

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <!-- include A-Frame obviously -->
    <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
    <!-- include ar.js for A-Frame -->
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/aframe-ar.2.2.2.js"></script>
</head>


<body style='margin : 0px; overflow: hidden;'>
    <a-scene embedded arjs>


        <!-- create your content here. just a box for now -->
        <a-box position='0 0.5 0' material='opacity: 1;'></a-box>
        <!-- define a camera which will move according to the marker position -->

        <!-- define your gl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0