Commit 7b62de46 authored by Chunchi Che's avatar Chunchi Che

fix small

parent f2b33acb
...@@ -90,7 +90,8 @@ function setupHandInteractivity( ...@@ -90,7 +90,8 @@ function setupHandInteractivity(
}); });
advancedTexture.addControl(button); advancedTexture.addControl(button);
interact.visibility = 0; interact.visibility = 0.2;
// interact.setEnabled(false);
} }
} }
...@@ -123,15 +124,12 @@ function setupHandAction( ...@@ -123,15 +124,12 @@ function setupHandAction(
"scaling", "scaling",
CONFIG.HandHoverScaling() CONFIG.HandHoverScaling()
), ),
// TODO: 这里后续应该加上显示可操作按钮的处理 new BABYLON.InterpolateValueAction(
new BABYLON.ExecuteCodeAction(
BABYLON.ActionManager.OnPointerOverTrigger, BABYLON.ActionManager.OnPointerOverTrigger,
(event) => { mesh.getChildMeshes(),
console.log(`<Hover>hand: ${handIdx}`, "event: ", event); "visibility",
for (let child of mesh.getChildMeshes()) { 1.0,
child.visibility = 1; 10
}
}
), ),
] ]
) )
...@@ -149,15 +147,12 @@ function setupHandAction( ...@@ -149,15 +147,12 @@ function setupHandAction(
"scaling", "scaling",
CONFIG.HandHoverOutScaling() CONFIG.HandHoverOutScaling()
), ),
// TODO: 这里后续应该加上禁用可操作按钮的处理 new BABYLON.InterpolateValueAction(
new BABYLON.ExecuteCodeAction( BABYLON.ActionManager.OnPointerOverTrigger,
BABYLON.ActionManager.OnPointerOutTrigger, mesh.getChildMeshes(),
(event) => { "visibility",
console.log(`<Hover Out>hand: ${handIdx}`, "event:", event); 0.2,
for (let child of mesh.getChildMeshes()) { 10
child.visibility = 0;
}
}
), ),
] ]
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment