mirror of
https://github.com/kou029w/pucchinglgl.git
synced 2025-01-18 16:18:00 +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);
|
renderer.render(scene, camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function vibrate() {
|
||||||
|
if ("vibrate" in navigator) navigator.vibrate(100);
|
||||||
|
}
|
||||||
|
|
||||||
function drawRect() {
|
function drawRect() {
|
||||||
raycaster.setFromCamera(mouse, camera);
|
raycaster.setFromCamera(mouse, camera);
|
||||||
const [intersect] = raycaster.intersectObjects(panels);
|
const [intersect] = raycaster.intersectObjects(panels);
|
||||||
if (!intersect) return;
|
if (!intersect) return;
|
||||||
|
|
||||||
|
vibrate();
|
||||||
try {
|
try {
|
||||||
// FIXME: Error: Start time must be strictly greater than previous start time.
|
// FIXME: Error: Start time must be strictly greater than previous start time.
|
||||||
synth.triggerAttackRelease("C4", "16n");
|
synth.triggerAttackRelease("C4", "16n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue