mirror of
https://github.com/kou029w/pucchinglgl.git
synced 2025-01-18 08:15:02 +00:00
feat: vibrate
This commit is contained in:
parent
57e9adf317
commit
33bc465182
1 changed files with 5 additions and 0 deletions
|
@ -35,11 +35,16 @@ function render() {
|
|||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
function vibrate() {
|
||||
if ("vibrate" in navigator) navigator.vibrate(100);
|
||||
}
|
||||
|
||||
function drawRect() {
|
||||
raycaster.setFromCamera(mouse, camera);
|
||||
const [intersect] = raycaster.intersectObjects(panels);
|
||||
if (!intersect) return;
|
||||
|
||||
vibrate();
|
||||
try {
|
||||
// FIXME: Error: Start time must be strictly greater than previous start time.
|
||||
synth.triggerAttackRelease("C4", "16n");
|
||||
|
|
Loading…
Add table
Reference in a new issue