Commit c23e90b8 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'optimize/button' into 'main'

Optimize/button

See merge request mycard/Neos!40
parents cd844fd3 3ca247b6
...@@ -93,7 +93,7 @@ function setupHandInteractivity( ...@@ -93,7 +93,7 @@ function setupHandInteractivity(
}); });
advancedTexture.addControl(button); advancedTexture.addControl(button);
interact.visibility = 0.2; interact.visibility = 0.01;
// interact.setEnabled(false); // interact.setEnabled(false);
} }
} }
...@@ -105,6 +105,7 @@ function setupHandAction( ...@@ -105,6 +105,7 @@ function setupHandAction(
scene: BABYLON.Scene scene: BABYLON.Scene
) { ) {
mesh.actionManager = new BABYLON.ActionManager(scene); mesh.actionManager = new BABYLON.ActionManager(scene);
mesh.actionManager.isRecursive = true;
// 监听点击事件 // 监听点击事件
mesh.actionManager.registerAction( mesh.actionManager.registerAction(
new BABYLON.ExecuteCodeAction( new BABYLON.ExecuteCodeAction(
...@@ -156,7 +157,7 @@ function setupHandAction( ...@@ -156,7 +157,7 @@ function setupHandAction(
BABYLON.ActionManager.OnPointerOverTrigger, BABYLON.ActionManager.OnPointerOverTrigger,
mesh.getChildMeshes(), mesh.getChildMeshes(),
"visibility", "visibility",
0.2, 0.01,
10 10
), ),
] ]
......
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