<commit_before>import { update, rotate, zoom } from './orbitControls'

import most from 'most'
import { fromEvent, combineArray, combine, mergeArray } from 'most'
import { interactionsFromEvents, pointerGestures } from '../interactions/pointerGestures'

import { model } from '../utils/modelUtils'

export function controlsLoop (targetEl, cameraData, fullData) {
  const {settings, camera} = cameraData

  const interactions$ = interactionsFromEvents(targetEl)
  const gestures = pointerGestures(interactions$)
  console.log('controlsLoop', cameraData)
  // gestures.taps.taps$.forEach(e=>console.log('taps',e))
  gestures.taps.shortSingleTaps$.forEach(e => console.log('shortSingleTaps', e))
  gestures.taps.shortDoubleTaps$.forEach(e => console.log('shortDoubleTaps', e))
  gestures.taps.longTaps$.forEach(e => console.log('longTaps', e))

  const heartBeat$ = most.periodic(40, 'x')

  const dragMoves$ = gestures.dragMoves
    .loop(function (acc, moveData) {
      const delta = !acc ? [0, 0] : [acc.mouseEvent.offsetX - moveData.mouseEvent.offsetX, moveData.mouseEvent.offsetY - acc.mouseEvent.offsetY] // [moveData.delta.left, moveData.delta.top]
      return {seed: moveData, value: delta}
    }, undefined).startWith([0, 0])
    .filter(x => x !== undefined)
    .map(function (delta) {
      const angle = [Math.PI * delta[0], - Math.PI * delta[1]]
      console.log('angle', angle)
      return angle
    })<commit_msg>refactor(update speed): tried increasing the camera /controls update speed (see renderer changes): it works !<commit_after>import { update, rotate, zoom } from './orbitControls'

import most from 'most'
import { fromEvent, combineArray, combine, mergeArray } from 'most'
import { interactionsFromEvents, pointerGestures } from '../interactions/pointerGestures'

import { model } from '../utils/modelUtils'

export function controlsLoop (targetEl, cameraData, fullData) {
  const {settings, camera} = cameraData

  const interactions$ = interactionsFromEvents(targetEl)
  const gestures = pointerGestures(interactions$)
  console.log('controlsLoop', cameraData)
  // gestures.taps.taps$.forEach(e=>console.log('taps',e))
  gestures.taps.shortSingleTaps$.forEach(e => console.log('shortSingleTaps', e))
  gestures.taps.shortDoubleTaps$.forEach(e => console.log('shortDoubleTaps', e))
  gestures.taps.longTaps$.forEach(e => console.log('longTaps', e))

  const heartBeat$ = most.periodic(20, 'x')

  const dragMoves$ = gestures.dragMoves
    .loop(function (acc, moveData) {
      const delta = !acc ? [0, 0] : [acc.mouseEvent.offsetX - moveData.mouseEvent.offsetX, moveData.mouseEvent.offsetY - acc.mouseEvent.offsetY] // [moveData.delta.left, moveData.delta.top]
      return {seed: moveData, value: delta}
    }, undefined).startWith([0, 0])
    .filter(x => x !== undefined)
    .map(function (delta) {
      const angle = [Math.PI * delta[0], - Math.PI * delta[1]]
      console.log('angle', angle)
      return angle
    })
{'fraction_non_alphanumeric': 0.14614343707713126, 'fraction_numerical': 0.005412719891745603, 'mean_word_length': 4.496282527881041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1348208', 'n_tokens_mistral': 943, 'n_tokens_neox': 910, 'n_words': 208}