Marmoset Viewer

Marmoset Viewer 是一款基于物理的 WebGL 3D 模型查看器,支持动画场景,为您的观众提供完整的观看体验。折射材料、阴影雾和阴影捕捉对象等功能可进一步增强您的演示效果。

在 Marmoset Toolbag 中构建场景,只需单击按钮即可导出高质量的 3D 演示文稿 .mview 文件。Toolbag 会自动将各种内容工作流转换为优化的可 Web 渲染包文件,以便于托管和嵌入。

接口演示

接口说明

http://mt3d.blans.top/f.php?autoStart=是否自动加载(true/false)&f1= 模型URL(http协议)

1、f1参数为mview格式模型文件链接(链接文件名需省略.mview后缀),注意文件链接需为http协议

2、autoStart参数控制是否自动播放和加载模型,值为truefalse

例:http://mt3d.blans.top/f.php?autoStart=true&f1=http://76-bl.blans.top/mt3d/mview/sm1

接口解释

前端网页代码:

<!DOCTYPE html>
<meta name="viewport" content="user-scalable=0"/>
<meta charset="utf-8">
<html>
<head>
    <title>Marmoset Viewer by ONE_Blog 一个博客</title>
    //js库
    <script src="marmoset.js"></script>
</head>
<body>

<?php
// 读取GET数据并赋值给变量
// 例 http://mt3d.blans.top/f.php?autoStart=true&f1=link1
$f1 = $_GET['f1'];
$autoStart = $_GET['autoStart'];
?>

    <script>
        marmoset.embed( '<?php echo $f1; ?>.mview', { width: 800, height: 600, autoStart: <?php echo $autoStart; ?>, fullFrame: true, pagePreset: false } );
    </script>

</body>
</html>