如果ID为m1的单选按钮被选中,我的网格将更新位置。
我尝试让网格在"#m1"不再被选中时返回到原始位置。
如果选中了,则需要触发一个函数,如果未选中,则需要触发另一个函数吗?
<input id="m1" type="radio" name="radio" value="">
<input id="mx" type="radio" name="radio" value="">
var geometry = new THREE.BoxGeometry( 1, 0.05, 1 );
var mesh = new THREE.Mesh( geometry);
mesh.position.set( 0, 0.012, 0 );
mesh.scale.set( 1, 1, 2 );
mesh.add( plane );
$('#m1').change(function() {
if(this.checked) {
var tween = new TWEEN.Tween(mesh.position).to({ x: 0, y: 0.112, z:0 }, 2000).start();
tween.easing(TWEEN.Easing.Cubic.In);
tween.yoyo(true);
}
});