From 3ab7d9b3a013f2ce1c03b01d50d1c51bf11ec219 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Fri, 3 Mar 2023 10:25:33 +0100 Subject: [PATCH] non working raycaster --- index.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/index.html b/index.html index eab2968..48c9847 100644 --- a/index.html +++ b/index.html @@ -2459,6 +2459,18 @@ const notes = {"C": "#7af500", "C#": "#00f500", "D": "#00f57a", "D#": "#00f5f5", const drumKit = { "C": "bass.wav", "C#": "clap.wav", "D": "cymbal.wav", "D#": "hi hat.wav", "E": "bass.wav", "F": "clap.wav", "F#": "cymbal.wav", "G": "hi hat.wav" } const drumkitBaseURL = "https://fabien.benetou.fr/pub/home/future_of_text_demo/content/Roland808DrumKit/" +AFRAME.registerComponent('collider-check', { +// to test with +// testNote = addBlockCodeExample("A"); testNote.classList.add("musicalnote"); testNote.setAttribute("position", "0 1.5 -0.2") +// didn't work even with a primitive... + dependencies: ['raycaster'], + init: function () { + this.el.addEventListener('raycaster-intersection', function () { + console.log('Player hit something!'); + }); + } +}); + AFRAME.registerComponent('play-musicalnote-on-pinchend-secondary', { schema: { note: {type: 'string', default: 'C3'} @@ -2504,6 +2516,13 @@ AFRAME.registerComponent('play-musicalnote-on-pinchend-secondary', { + + + + + + +