Skip to content

Commit eda1055

Browse files
committed
Move engine xrui to spatial package
1 parent 33dff87 commit eda1055

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/examples/Retargeting.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { DndWrapper } from '@ir-engine/editor/src/components/dnd/DndWrapper'
88
import { defineState, getMutableState, getState, none, useHookstate } from '@ir-engine/hyperflux'
99

1010
import { EntityTreeComponent, getComponent, setComponent } from '@ir-engine/ecs'
11-
import { MixamoBoneNames } from '@ir-engine/engine/src/avatar/AvatarBoneMatching'
1211
import { VRMHumanBoneName } from '@ir-engine/engine/src/avatar/maps/VRMHumanBoneName'
1312
import { AssetState } from '@ir-engine/engine/src/gltf/GLTFState'
1413
import { ReferenceSpaceState, TransformComponent } from '@ir-engine/spatial'
@@ -22,7 +21,7 @@ console.log({ bones })
2221

2322
const BoneMatchedState = defineState({
2423
name: 'BoneMatchedState',
25-
initial: {} as Record<MixamoBoneNames, boolean>
24+
initial: {} as Record<string, boolean> //Record<MixamoBoneNames, boolean>
2625
})
2726

2827
const overrideNames = [] as string[]
@@ -272,7 +271,7 @@ const RetargetingDND = () => {
272271
}
273272
}, [assetFile])
274273

275-
const nextUnmatchedBone = (boneName?: MixamoBoneNames) => {
274+
const nextUnmatchedBone = (boneName?: string) => {
276275
if (boneName && boneState.value[boneName]) return null
277276
const boneIndex = boneName ? bones.indexOf(boneName) : 0
278277
for (let i = boneIndex + 1; i < bones.length; i++) {
@@ -300,13 +299,13 @@ const RetargetingDND = () => {
300299
const mouseOver = useHookstate(false)
301300
const boneState = useHookstate(getMutableState(BoneMatchedState))
302301

303-
const nextUnmatchedBoneName = nextUnmatchedBone(boneName.value as MixamoBoneNames)
302+
const nextUnmatchedBoneName = nextUnmatchedBone(boneName.value)
304303

305304
const setBoneName = (name: string) => {
306305
if (!isBone) return
307306
bone.name = name
308307
boneHelper.name = name + '--helper'
309-
const currentBoneName = boneName.value as MixamoBoneNames
308+
const currentBoneName = boneName.value
310309
boneName.set(name)
311310
const helperEntity = UUIDComponent.getEntityByUUID(
312311
UUIDComponent.join({

src/examples/componentExamples/ComponentNamesUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import styles from './ComponentNamesUI.css?inline'
33

44
import { Entity, EntityTreeComponent, getAllComponents, getOptionalComponent } from '@ir-engine/ecs'
5-
import { useXRUIState } from '@ir-engine/engine/src/xrui/useXRUIState'
5+
import { useXRUIState } from '@ir-engine/spatial/src/xrui/useXRUIState'
66
import { useHookstate } from '@ir-engine/hyperflux'
77
import React, { useEffect } from 'react'
88

src/examples/componentExamples/componentExamples.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { SplineTrackComponent } from '@ir-engine/engine/src/scene/components/Spl
3131
import { Heuristic, VariantComponent } from '@ir-engine/engine/src/scene/components/VariantComponent'
3232
import { VideoComponent } from '@ir-engine/engine/src/scene/components/VideoComponent'
3333
import { GeometryType } from '@ir-engine/engine/src/scene/constants/GeometryTypeEnum'
34-
import { createXRUI } from '@ir-engine/engine/src/xrui/createXRUI'
34+
import { createXRUI } from '@ir-engine/spatial/src/xrui/createXRUI'
3535
import { useHookstate } from '@ir-engine/hyperflux'
3636
import { TransformComponent } from '@ir-engine/spatial'
3737
import { CallbackComponent } from '@ir-engine/spatial/src/common/CallbackComponent'

0 commit comments

Comments
 (0)