{#if isPlaying} {/if} { isHovering = true; paddleScale.set(1.2); }} on:pointerleave={() => { isHovering = false; paddleScale.set(1); }} on:click={() => { if (!$isPresenting) return; isPlaying = !isPlaying; }} > {#if isPlaying} { // get world position of hit area const position = hitArea?.getWorldPosition(new THREE.Vector3()); // reset ball position to above the paddle ball?.setTranslation({ x: position.x, y: position.y + 0.4, z: position.z }, true); ball?.setLinvel({ x: 0, y: 0, z: 0 }, true); ball?.setAngvel({ x: 0, y: 0, z: 0 }, true); if (score > highscore) { highscore = score; newHighscore(); } score = 0; }} args={[20, 1, 20]} > {/if}