与早期版本(0.5.0)相比,A-Frame的最新稳定版本(0.9.0)无法为多维数据集设置动画

问题描述 投票:0回答:1

当我将src =“https://aframe.io/releases/0.5.0/aframe.min.js”更新到最新版本0.9.0时(src =“https://aframe.io/releases/0.9。 0 / aframe.min.js根据https://github.com/aframevr/aframe#builds),所有的动画都无法工作。有谁知道为什么?

<!DOCTYPE html>
<html>
<head>
	<title>Animate - A-Frame</title>
	<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
</head>
<body>
	<a-scene>
		<a-assets>
			<img id="boxTexture" src="https://i.imgur.com/mYmmbrp.jpg">
			<img id="skyTexture" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/sechelt.jpg">
			<img id="groundTexture" src="https://cdn.aframe.io/a-painter/images/floor.jpg">
		</a-assets>

		<a-box position="0 2 -5" rotation="0 45 45" scale="2 2 2" src="#boxTexture" >
			<a-animation attribute="position" direction="alternate" dur="2000" repeat="indefinite"
				  to="0 1.8 -5"></a-animation>
			<a-animation attribute="rotation" begin="click" dur="2000" to="360 405 45"></a-animation>
			<a-animation attribute="scale" begin="mouseenter" dur="300" to="2.5 2.5 2.5"></a-animation>
			<a-animation attribute="scale" begin="mouseleave" dur="300" to="2 2 2"></a-animation>
		</a-box>
          
		<a-sky src="#skyTexture"></a-sky>
		<a-light type="ambient" color="#445451"></a-light>
		<a-light type="point" intensity="2" position="2 4 4"></a-light>
		<a-plane src="#groundTexture" rotation="-90 0 0" width="30" height="30"></a-plane>
		<a-camera>
			<a-cursor color="#ffffff"></a-cursor>
		</a-camera>
	</a-scene> 
</body>
</html>
animation build aframe
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.