Skip to content

Commit

Permalink
Rename aux stores with auxDevices to avoid the error on cloning o…
Browse files Browse the repository at this point in the history
…n NFTS filesystem (feedback by @arcatdmz)
  • Loading branch information
baku89 committed Jun 10, 2024
1 parent 18fb2d6 commit e3cbf01
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {mat4, quat, vec3, vec4} from 'linearly'
import Tq from 'tweeq'
import {useAuxStore} from '@/stores/aux'
import {useAuxDevicesStore} from '@/stores/auxDevices'
import {useOscStore} from '@/stores/osc'
defineProps<{
Expand All @@ -14,7 +14,7 @@ const emit = defineEmits<{
record: [matrix: mat4]
}>()
const aux = useAuxStore()
const aux = useAuxDevicesStore()
const osc = useOscStore()
let positions: vec3[] = []
Expand Down
4 changes: 2 additions & 2 deletions src/components/TitleBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import prettyBytes from 'pretty-bytes'
import Tq from 'tweeq'
import {computed, onUnmounted, ref} from 'vue'
import {useAuxStore} from '@/stores/aux'
import {useAuxDevicesStore} from '@/stores/auxDevices'
import {useCameraStore} from '@/stores/camera'
import {useCncStore} from '@/stores/cnc'
import {useOpfsStore} from '@/stores/opfs'
Expand All @@ -19,7 +19,7 @@ const viewport = useViewportStore()
const project = useProjectStore()
const camera = useCameraStore()
const timer = useTimerStore()
const aux = useAuxStore()
const aux = useAuxDevicesStore()
const cnc = useCncStore()
const gamepads = ref<string[]>([])
Expand Down
2 changes: 1 addition & 1 deletion src/stores/aux.ts → src/stores/auxDevices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {computed} from 'vue'

import {useOscStore} from './osc'

export const useAuxStore = defineStore('aux', () => {
export const useAuxDevicesStore = defineStore('aux', () => {
const osc = useOscStore()

const tracker = osc.receivers({
Expand Down
16 changes: 10 additions & 6 deletions src/stores/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {defineStore} from 'pinia'
import {useAppConfigStore} from 'tweeq'
import {computed} from 'vue'

import {useAuxStore} from './aux'
import {useAuxDevicesStore} from './auxDevices'
import {useProjectStore} from './project'

export const useTrackerStore = defineStore('tracker', () => {
const aux = useAuxStore()
const aux = useAuxDevicesStore()
const project = useProjectStore()
const appConfig = useAppConfigStore()

Expand Down Expand Up @@ -91,10 +91,14 @@ export const useTrackerStore = defineStore('tracker', () => {
const rotationVelocities: quat[] = []

for (let i = 0; i < averageSamples.value; i++) {
const tracker = project.shot(project.captureShot.frame - 1 - i, 0)
?.tracker
const prevTracker = project.shot(project.captureShot.frame - 2 - i, 0)
?.tracker
const tracker = project.shot(
project.captureShot.frame - 1 - i,
0
)?.tracker
const prevTracker = project.shot(
project.captureShot.frame - 2 - i,
0
)?.tracker

if (tracker && prevTracker) {
const p = vec3.sub(tracker.position, prevTracker.position)
Expand Down

0 comments on commit e3cbf01

Please sign in to comment.