我设法用下面的代码把视频特效放到我的3d对象上。问题是它有很大的滞后,特别是当它循环的时候。我正在寻找一种让它渲染得更流畅的方法。
<html>
<head>
<title></title>
<script type='text/javascript' src='http://lala.cool/3d/schneosch/x3dom.js'> </script>
<link rel='stylesheet' type='text/css' href='http://lala.cool/3d/6328483_woesh/mesh/beertje.css'></link>
</head>
<body>
<x3d width='500px' height='400px'>
<scene>
<Shape>
<Appearance>
<MovieTexture repeatS="false" repeatT="false" loop='true' url='"http://lala.cool/3d/eh/schneosch011_1.mp4"'/>
</Appearance>
<Box/>
</Shape>
<Transform DEF="Camera_TRANSFORM"
>
<Viewpoint DEF="CA_Camera"
centerOfRotation="0 0 0"
position="5.00491 -6.73519 -5.43948"
orientation="0.18804 0.92111 -0.34086 2.41421"
fieldOfView="0.8"
/>
</scene>
</x3d>
</body>
</html> 在这里您可以看到它的实际效果:http://lala.cool/iwasreadingabookoflovestory.html
发布于 2017-02-06 04:17:40
它在我的电脑上工作正常。您无法在代码级执行任何操作,因为您无法控制渲染或任何可能加快场景速度的参数。在不同的浏览器中尝试您的示例,即使在不同的计算机上也是如此。这可能就是你的问题。
https://stackoverflow.com/questions/42041780
复制相似问题