From ba9c61489789932f6fc1003d59d7e399bf248b5b Mon Sep 17 00:00:00 2001 From: Michael Estes Date: Tue, 18 Jun 2024 10:31:41 -0700 Subject: [PATCH] IR-1775-Changes-for-examples (#10387) * Overrideable asset loader for blob files, reparent canvas to previous parent, update mocap data structure * Remove test pose data * Fix for resource loading manager not being loaded anymore * Don't undo default tier if getGPUTier fails * wip * Revert "wip" This reverts commit 530603280e38b516bd9e55bd59330b8e7e912edd. --- .../src/hooks/useRemoveEngineCanvas.ts | 6 +- .../engine/src/assets/classes/AssetLoader.ts | 10 +- .../functions/resourceLoaderFunctions.ts | 16 +- .../engine/src/assets/loaders/base/Loader.ts | 3 + .../state/ResourceLoadingManagerState.ts | 28 +- .../src/mocap/testPoses/mocapArmTurn90.json | 402 ------------------ .../src/mocap/testPoses/mocapLeanForward.json | 402 ------------------ .../src/mocap/testPoses/mocapSideBend.json | 402 ------------------ .../src/mocap/testPoses/mocapTPose.json | 402 ------------------ .../src/mocap/testPoses/mocapTurn45.json | 402 ------------------ .../src/mocap/testPoses/mocapTurn90.json | 402 ------------------ .../spatial/src/renderer/PerformanceState.ts | 2 +- 12 files changed, 44 insertions(+), 2433 deletions(-) delete mode 100644 packages/engine/src/mocap/testPoses/mocapArmTurn90.json delete mode 100644 packages/engine/src/mocap/testPoses/mocapLeanForward.json delete mode 100644 packages/engine/src/mocap/testPoses/mocapSideBend.json delete mode 100644 packages/engine/src/mocap/testPoses/mocapTPose.json delete mode 100644 packages/engine/src/mocap/testPoses/mocapTurn45.json delete mode 100644 packages/engine/src/mocap/testPoses/mocapTurn90.json diff --git a/packages/client-core/src/hooks/useRemoveEngineCanvas.ts b/packages/client-core/src/hooks/useRemoveEngineCanvas.ts index 9c75752020..c468f17088 100644 --- a/packages/client-core/src/hooks/useRemoveEngineCanvas.ts +++ b/packages/client-core/src/hooks/useRemoveEngineCanvas.ts @@ -28,11 +28,11 @@ import { useEffect } from 'react' export const useRemoveEngineCanvas = () => { useEffect(() => { const canvas = document.getElementById('engine-renderer-canvas')! - canvas.parentElement?.removeChild(canvas) + const parent = canvas.parentElement + parent?.removeChild(canvas) return () => { - const body = document.body - body.appendChild(canvas) + parent?.appendChild(canvas) } }, []) diff --git a/packages/engine/src/assets/classes/AssetLoader.ts b/packages/engine/src/assets/classes/AssetLoader.ts index 544529f865..9726f0d04b 100644 --- a/packages/engine/src/assets/classes/AssetLoader.ts +++ b/packages/engine/src/assets/classes/AssetLoader.ts @@ -99,15 +99,19 @@ const loadAsset = async ( onLoad: (response: T) => void = () => {}, onProgress: (request: ProgressEvent) => void = () => {}, onError: (event: ErrorEvent | Error) => void = () => {}, - signal?: AbortSignal + signal?: AbortSignal, + loader?: ReturnType ) => { if (!url) { onError(new Error('URL is empty')) return } url = getAbsolutePath(url) - const assetExt = AssetLoader.getAssetType(url) - const loader = getLoader(assetExt) + + if (!loader) { + const assetExt = AssetLoader.getAssetType(url) + loader = getLoader(assetExt) + } try { return loader.load(url, onLoad, onProgress, onError, signal) diff --git a/packages/engine/src/assets/functions/resourceLoaderFunctions.ts b/packages/engine/src/assets/functions/resourceLoaderFunctions.ts index b1f8574960..c92d244096 100644 --- a/packages/engine/src/assets/functions/resourceLoaderFunctions.ts +++ b/packages/engine/src/assets/functions/resourceLoaderFunctions.ts @@ -33,7 +33,18 @@ import { ResourceType } from '@etherealengine/spatial/src/resources/ResourceState' -import { AssetLoader } from '../classes/AssetLoader' +import { AssetExt } from '@etherealengine/common/src/constants/AssetType' +import { AssetLoader, getLoader } from '../classes/AssetLoader' + +const getLoaderForResourceType = (resourceType: ResourceType) => { + switch (resourceType) { + case ResourceType.GLTF: + return getLoader(AssetExt.GLTF) + default: + break + } + return undefined +} export const loadResource = ( url: string, @@ -96,7 +107,8 @@ export const loadResource = ( onError(error) ResourceManager.unload(url, entity, uuid) }, - signal + signal, + getLoaderForResourceType(resourceType) ) } diff --git a/packages/engine/src/assets/loaders/base/Loader.ts b/packages/engine/src/assets/loaders/base/Loader.ts index da58992509..419b1644bf 100644 --- a/packages/engine/src/assets/loaders/base/Loader.ts +++ b/packages/engine/src/assets/loaders/base/Loader.ts @@ -24,6 +24,7 @@ Ethereal Engine. All Rights Reserved. */ import { DefaultLoadingManager, LoadingManager } from 'three' +import { ResourceLoadingManagerState } from '../../state/ResourceLoadingManagerState' interface Load { load: ( @@ -53,6 +54,8 @@ class Loader implements Load { this.path = '' this.resourcePath = '' this.requestHeader = {} + + ResourceLoadingManagerState.initialize() } load( diff --git a/packages/engine/src/assets/state/ResourceLoadingManagerState.ts b/packages/engine/src/assets/state/ResourceLoadingManagerState.ts index 36b0ee6fe2..7ef61aa1cd 100644 --- a/packages/engine/src/assets/state/ResourceLoadingManagerState.ts +++ b/packages/engine/src/assets/state/ResourceLoadingManagerState.ts @@ -31,18 +31,6 @@ import { ResourceManager, ResourceState, ResourceStatus } from '@etherealengine/ import { ResourceLoadingManager } from '../loaders/base/ResourceLoadingManager' -export const ResourceLoadingManagerState = defineState({ - name: 'ResourceLoadingManagerState', - initial: () => new ResourceLoadingManager(onItemStart, onStart, onLoad, onProgress, onError), - reactor: () => { - const resourceLoadingManager = useMutableState(ResourceLoadingManagerState) - - useEffect(() => { - setDefaultLoadingManager(resourceLoadingManager.value as LoadingManager) - }, [resourceLoadingManager]) - } -}) - export const setDefaultLoadingManager = ( loadingManager: LoadingManager = new ResourceLoadingManager( onItemStart, @@ -91,3 +79,19 @@ const onLoad = () => { const onProgress = (url: string, loaded: number, total: number) => {} const onError = (url: string) => {} + +export const ResourceLoadingManagerState = defineState({ + name: 'ResourceLoadingManagerState', + initial: () => new ResourceLoadingManager(onItemStart, onStart, onLoad, onProgress, onError), + reactor: () => { + const resourceLoadingManager = useMutableState(ResourceLoadingManagerState) + + useEffect(() => { + setDefaultLoadingManager(resourceLoadingManager.value as LoadingManager) + }, [resourceLoadingManager]) + }, + initialize: () => { + // This is for getting around this file being removed during tree shaking + getState(ResourceLoadingManagerState) + } +}) diff --git a/packages/engine/src/mocap/testPoses/mocapArmTurn90.json b/packages/engine/src/mocap/testPoses/mocapArmTurn90.json deleted file mode 100644 index f7cf59bea9..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapArmTurn90.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": -0.010845700278878212, - "y": -0.624730110168457, - "z": -0.2899782061576843, - "visibility": 0.9993030428886414 - }, - { - "x": 0.011388253420591354, - "y": -0.6407288312911987, - "z": -0.28045690059661865, - "visibility": 0.9971452355384827 - }, - { - "x": 0.010579835623502731, - "y": -0.6430412530899048, - "z": -0.2709256410598755, - "visibility": 0.9969613552093506 - }, - { - "x": 0.008401600643992424, - "y": -0.6420998573303223, - "z": -0.2719743549823761, - "visibility": 0.9973686933517456 - }, - { - "x": -0.01303650438785553, - "y": -0.6542823314666748, - "z": -0.2931331396102905, - "visibility": 0.9982795715332031 - }, - { - "x": -0.012049184180796146, - "y": -0.6533104181289673, - "z": -0.30480408668518066, - "visibility": 0.9985842704772949 - }, - { - "x": -0.009347683750092983, - "y": -0.6397141814231873, - "z": -0.2857268154621124, - "visibility": 0.998765766620636 - }, - { - "x": 0.08474789559841156, - "y": -0.6252511143684387, - "z": -0.18160995841026306, - "visibility": 0.9982292652130127 - }, - { - "x": -0.0700114294886589, - "y": -0.5988756418228149, - "z": -0.17136067152023315, - "visibility": 0.9975172877311707 - }, - { - "x": 0.02834683656692505, - "y": -0.6071179509162903, - "z": -0.24462361633777618, - "visibility": 0.9983299970626831 - }, - { - "x": -0.015064605511724949, - "y": -0.5813403725624084, - "z": -0.26796627044677734, - "visibility": 0.998447835445404 - }, - { - "x": 0.17960232496261597, - "y": -0.4903228282928467, - "z": -0.04665807634592056, - "visibility": 0.9985371232032776 - }, - { - "x": -0.1347476691007614, - "y": -0.5596282482147217, - "z": -0.012645001523196697, - "visibility": 0.9983355402946472 - }, - { - "x": 0.3703579604625702, - "y": -0.49638423323631287, - "z": -0.050811462104320526, - "visibility": 0.9626644253730774 - }, - { - "x": -0.31547391414642334, - "y": -0.5188623666763306, - "z": -0.08467601239681244, - "visibility": 0.9642548561096191 - }, - { - "x": 0.41374334692955017, - "y": -0.661191999912262, - "z": -0.06417278945446014, - "visibility": 0.9715077877044678 - }, - { - "x": -0.3781282901763916, - "y": -0.675881564617157, - "z": -0.16656920313835144, - "visibility": 0.9831878542900085 - }, - { - "x": 0.40839794278144836, - "y": -0.7160409092903137, - "z": -0.07546029984951019, - "visibility": 0.9617819786071777 - }, - { - "x": -0.35775521397590637, - "y": -0.7270250916481018, - "z": -0.2130979299545288, - "visibility": 0.9677969813346863 - }, - { - "x": 0.3809126317501068, - "y": -0.7424152493476868, - "z": -0.07719433307647705, - "visibility": 0.9629064202308655 - }, - { - "x": -0.32102662324905396, - "y": -0.7725598216056824, - "z": -0.2034563273191452, - "visibility": 0.9661695957183838 - }, - { - "x": 0.40767425298690796, - "y": -0.6629803776741028, - "z": -0.07045262306928635, - "visibility": 0.9554662704467773 - }, - { - "x": -0.3665502071380615, - "y": -0.6987348794937134, - "z": -0.17067593336105347, - "visibility": 0.9665071964263916 - }, - { - "x": 0.0903659537434578, - "y": -0.007804737892001867, - "z": 0.02886185050010681, - "visibility": 0.9960402846336365 - }, - { - "x": -0.08814448863267899, - "y": 0.0011587340850383043, - "z": -0.027090847492218018, - "visibility": 0.996871292591095 - }, - { - "x": 0.0969572588801384, - "y": 0.34417426586151123, - "z": 0.009869995526969433, - "visibility": 0.29967305064201355 - }, - { - "x": -0.07060506194829941, - "y": 0.27191221714019775, - "z": 0.004078581929206848, - "visibility": 0.29040858149528503 - }, - { - "x": 0.10003946721553802, - "y": 0.6466129422187805, - "z": 0.22101493179798126, - "visibility": 0.1141325980424881 - }, - { - "x": -0.09226427227258682, - "y": 0.6080873608589172, - "z": 0.21215423941612244, - "visibility": 0.14957137405872345 - }, - { - "x": 0.07812077552080154, - "y": 0.6756660342216492, - "z": 0.24886725842952728, - "visibility": 0.0872141420841217 - }, - { - "x": -0.09256808459758759, - "y": 0.6350835561752319, - "z": 0.19587038457393646, - "visibility": 0.1219632476568222 - }, - { - "x": 0.062373336404561996, - "y": 0.7109174132347107, - "z": 0.22726446390151978, - "visibility": 0.07835923135280609 - }, - { - "x": -0.111188605427742, - "y": 0.6579461693763733, - "z": 0.1701509952545166, - "visibility": 0.07257498800754547 - } - ], - "poseLandmarks": [ - { - "x": 0.5616105198860168, - "y": 0.24963636696338654, - "z": -0.2960653603076935, - "visibility": 0.9993030428886414 - }, - { - "x": 0.5692285299301147, - "y": 0.22961199283599854, - "z": -0.27030816674232483, - "visibility": 0.9971452355384827 - }, - { - "x": 0.5742396712303162, - "y": 0.23043549060821533, - "z": -0.27067339420318604, - "visibility": 0.9969613552093506 - }, - { - "x": 0.5794728398323059, - "y": 0.23191045224666595, - "z": -0.2706829905509949, - "visibility": 0.9973686933517456 - }, - { - "x": 0.5565596222877502, - "y": 0.22824551165103912, - "z": -0.2711889445781708, - "visibility": 0.9982795715332031 - }, - { - "x": 0.5530906319618225, - "y": 0.22811870276927948, - "z": -0.2716143727302551, - "visibility": 0.9985842704772949 - }, - { - "x": 0.549027681350708, - "y": 0.22808025777339935, - "z": -0.27188315987586975, - "visibility": 0.998765766620636 - }, - { - "x": 0.5859355330467224, - "y": 0.24114057421684265, - "z": -0.12803961336612701, - "visibility": 0.9982292652130127 - }, - { - "x": 0.5439146161079407, - "y": 0.2370314747095108, - "z": -0.13217084109783173, - "visibility": 0.9975172877311707 - }, - { - "x": 0.5693373084068298, - "y": 0.2722114324569702, - "z": -0.23934906721115112, - "visibility": 0.9983299970626831 - }, - { - "x": 0.5539265871047974, - "y": 0.2690344452857971, - "z": -0.24309566617012024, - "visibility": 0.998447835445404 - }, - { - "x": 0.6251866221427917, - "y": 0.3548562824726105, - "z": -0.0345652811229229, - "visibility": 0.9985371232032776 - }, - { - "x": 0.5061377286911011, - "y": 0.34965598583221436, - "z": -0.0535762757062912, - "visibility": 0.9983355402946472 - }, - { - "x": 0.7165631651878357, - "y": 0.3744097948074341, - "z": -0.05603460222482681, - "visibility": 0.9626644253730774 - }, - { - "x": 0.4225550591945648, - "y": 0.36888694763183594, - "z": -0.12177824229001999, - "visibility": 0.9642548561096191 - }, - { - "x": 0.727797269821167, - "y": 0.22625833749771118, - "z": -0.18620970845222473, - "visibility": 0.9715077877044678 - }, - { - "x": 0.40473249554634094, - "y": 0.22668689489364624, - "z": -0.262989342212677, - "visibility": 0.9831878542900085 - }, - { - "x": 0.733855664730072, - "y": 0.17994827032089233, - "z": -0.21290525794029236, - "visibility": 0.9617819786071777 - }, - { - "x": 0.40331098437309265, - "y": 0.18169285356998444, - "z": -0.3065045177936554, - "visibility": 0.9677969813346863 - }, - { - "x": 0.7226611375808716, - "y": 0.16816876828670502, - "z": -0.22764085233211517, - "visibility": 0.9629064202308655 - }, - { - "x": 0.4139403998851776, - "y": 0.17378294467926025, - "z": -0.30211207270622253, - "visibility": 0.9661695957183838 - }, - { - "x": 0.7152575850486755, - "y": 0.18649958074092865, - "z": -0.19491954147815704, - "visibility": 0.9554662704467773 - }, - { - "x": 0.4175983965396881, - "y": 0.19038255512714386, - "z": -0.26853668689727783, - "visibility": 0.9665071964263916 - }, - { - "x": 0.6029550433158875, - "y": 0.7136155962944031, - "z": 0.009296679869294167, - "visibility": 0.9960402846336365 - }, - { - "x": 0.5320556163787842, - "y": 0.7162886261940002, - "z": -0.009448765777051449, - "visibility": 0.996871292591095 - }, - { - "x": 0.6036747694015503, - "y": 0.922763466835022, - "z": 0.03588176518678665, - "visibility": 0.29967305064201355 - }, - { - "x": 0.5259670615196228, - "y": 0.9262484908103943, - "z": 0.026698028668761253, - "visibility": 0.29040858149528503 - }, - { - "x": 0.5980361104011536, - "y": 1.1516362428665161, - "z": 0.28714096546173096, - "visibility": 0.1141325980424881 - }, - { - "x": 0.527730405330658, - "y": 1.1358356475830078, - "z": 0.2501455247402191, - "visibility": 0.14957137405872345 - }, - { - "x": 0.5980566143989563, - "y": 1.178519368171692, - "z": 0.30603545904159546, - "visibility": 0.0872141420841217 - }, - { - "x": 0.5320765376091003, - "y": 1.168411135673523, - "z": 0.2676840126514435, - "visibility": 0.1219632476568222 - }, - { - "x": 0.5854879021644592, - "y": 1.2254058122634888, - "z": 0.19375576078891754, - "visibility": 0.07835923135280609 - }, - { - "x": 0.5203741788864136, - "y": 1.2015697956085205, - "z": 0.1567998230457306, - "visibility": 0.07257498800754547 - } - ] -} \ No newline at end of file diff --git a/packages/engine/src/mocap/testPoses/mocapLeanForward.json b/packages/engine/src/mocap/testPoses/mocapLeanForward.json deleted file mode 100644 index 0c7f9fe130..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapLeanForward.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": -0.02911965921521187, - "y": -0.4548158347606659, - "z": -0.6127341985702515, - "visibility": 0.9999792575836182 - }, - { - "x": -0.005001416429877281, - "y": -0.4783687889575958, - "z": -0.611644446849823, - "visibility": 0.999946653842926 - }, - { - "x": -0.003723097499459982, - "y": -0.4763898253440857, - "z": -0.5978847742080688, - "visibility": 0.9999402165412903 - }, - { - "x": -0.0053043728694319725, - "y": -0.4766179025173187, - "z": -0.6008248925209045, - "visibility": 0.9999426007270813 - }, - { - "x": -0.030808279290795326, - "y": -0.489997535943985, - "z": -0.6180739402770996, - "visibility": 0.9999643564224243 - }, - { - "x": -0.029511356726288795, - "y": -0.48724183440208435, - "z": -0.6323904991149902, - "visibility": 0.9999703764915466 - }, - { - "x": -0.025268567726016045, - "y": -0.47339317202568054, - "z": -0.6094112992286682, - "visibility": 0.999975860118866 - }, - { - "x": 0.0874420553445816, - "y": -0.4888365864753723, - "z": -0.48895904421806335, - "visibility": 0.9999510645866394 - }, - { - "x": -0.08062490075826645, - "y": -0.4662960171699524, - "z": -0.47158703207969666, - "visibility": 0.9999367594718933 - }, - { - "x": 0.01665487140417099, - "y": -0.4516722559928894, - "z": -0.5517948865890503, - "visibility": 0.999951183795929 - }, - { - "x": -0.025050435215234756, - "y": -0.4269196689128876, - "z": -0.5742926597595215, - "visibility": 0.9999576210975647 - }, - { - "x": 0.1943313628435135, - "y": -0.3710092306137085, - "z": -0.29208239912986755, - "visibility": 0.9999480247497559 - }, - { - "x": -0.15071865916252136, - "y": -0.4581408202648163, - "z": -0.24023915827274323, - "visibility": 0.9999544024467468 - }, - { - "x": 0.25788986682891846, - "y": -0.19375963509082794, - "z": -0.22507517039775848, - "visibility": 0.994509220123291 - }, - { - "x": -0.2035544365644455, - "y": -0.21172499656677246, - "z": -0.19148878753185272, - "visibility": 0.9968401789665222 - }, - { - "x": 0.2927146852016449, - "y": 0.03599154204130173, - "z": -0.16887661814689636, - "visibility": 0.9859216213226318 - }, - { - "x": -0.24280980229377747, - "y": 0.015424278564751148, - "z": -0.19013093411922455, - "visibility": 0.9954146146774292 - }, - { - "x": 0.2998315393924713, - "y": 0.08268116414546967, - "z": -0.16402119398117065, - "visibility": 0.9645297527313232 - }, - { - "x": -0.22140508890151978, - "y": 0.06953791528940201, - "z": -0.2263382375240326, - "visibility": 0.9837177395820618 - }, - { - "x": 0.25727036595344543, - "y": 0.09647737443447113, - "z": -0.19584058225154877, - "visibility": 0.9701171517372131 - }, - { - "x": -0.1803656369447708, - "y": 0.05115695297718048, - "z": -0.24654680490493774, - "visibility": 0.9864470958709717 - }, - { - "x": 0.28229373693466187, - "y": 0.07319491356611252, - "z": -0.18195395171642303, - "visibility": 0.9646221399307251 - }, - { - "x": -0.2208474576473236, - "y": 0.026603790000081062, - "z": -0.20988282561302185, - "visibility": 0.9823938608169556 - }, - { - "x": 0.10532543063163757, - "y": 0.007659330032765865, - "z": 0.01898718997836113, - "visibility": 0.9980354309082031 - }, - { - "x": -0.1038840115070343, - "y": -0.012263408862054348, - "z": -0.018274495378136635, - "visibility": 0.9984992742538452 - }, - { - "x": 0.12663909792900085, - "y": 0.33600541949272156, - "z": -0.04476557672023773, - "visibility": 0.6659371852874756 - }, - { - "x": -0.09459646046161652, - "y": 0.26197579503059387, - "z": 0.05744175985455513, - "visibility": 0.4603741765022278 - }, - { - "x": 0.16709567606449127, - "y": 0.6239997744560242, - "z": 0.09283798933029175, - "visibility": 0.2543848752975464 - }, - { - "x": -0.11182114481925964, - "y": 0.5976864695549011, - "z": 0.2512804865837097, - "visibility": 0.1547754853963852 - }, - { - "x": 0.14997941255569458, - "y": 0.6532749533653259, - "z": 0.10869169235229492, - "visibility": 0.11109277606010437 - }, - { - "x": -0.11415845900774002, - "y": 0.625349760055542, - "z": 0.2333233505487442, - "visibility": 0.09265053272247314 - }, - { - "x": 0.11045660078525543, - "y": 0.693947970867157, - "z": 0.046598274260759354, - "visibility": 0.20788630843162537 - }, - { - "x": -0.1281459927558899, - "y": 0.6466692686080933, - "z": 0.18930038809776306, - "visibility": 0.10743998736143112 - } - ], - "poseLandmarks": [ - { - "x": 0.5573164224624634, - "y": 0.41741397976875305, - "z": -0.6721971035003662, - "visibility": 0.9999792575836182 - }, - { - "x": 0.5663908123970032, - "y": 0.3887508809566498, - "z": -0.6613392233848572, - "visibility": 0.999946653842926 - }, - { - "x": 0.5726579427719116, - "y": 0.3874710202217102, - "z": -0.6617952585220337, - "visibility": 0.9999402165412903 - }, - { - "x": 0.577315092086792, - "y": 0.3872460722923279, - "z": -0.6617952585220337, - "visibility": 0.9999426007270813 - }, - { - "x": 0.5517767667770386, - "y": 0.388873815536499, - "z": -0.6578932404518127, - "visibility": 0.9999643564224243 - }, - { - "x": 0.5464905500411987, - "y": 0.3877672255039215, - "z": -0.6582091450691223, - "visibility": 0.9999703764915466 - }, - { - "x": 0.5424126982688904, - "y": 0.38630935549736023, - "z": -0.6585592031478882, - "visibility": 0.999975860118866 - }, - { - "x": 0.5861982107162476, - "y": 0.38789084553718567, - "z": -0.5198638439178467, - "visibility": 0.9999510645866394 - }, - { - "x": 0.5384733080863953, - "y": 0.38467416167259216, - "z": -0.5032581686973572, - "visibility": 0.9999367594718933 - }, - { - "x": 0.5660737752914429, - "y": 0.43482378125190735, - "z": -0.6106955409049988, - "visibility": 0.999951183795929 - }, - { - "x": 0.5493199825286865, - "y": 0.4362632930278778, - "z": -0.607408344745636, - "visibility": 0.9999576210975647 - }, - { - "x": 0.6321125030517578, - "y": 0.48973461985588074, - "z": -0.37105220556259155, - "visibility": 0.9999480247497559 - }, - { - "x": 0.4956464171409607, - "y": 0.479202538728714, - "z": -0.3368763029575348, - "visibility": 0.9999544024467468 - }, - { - "x": 0.6560819149017334, - "y": 0.6284002065658569, - "z": -0.2842365801334381, - "visibility": 0.994509220123291 - }, - { - "x": 0.4695712924003601, - "y": 0.6171059608459473, - "z": -0.24211226403713226, - "visibility": 0.9968401789665222 - }, - { - "x": 0.6577186584472656, - "y": 0.7724160552024841, - "z": -0.3335821032524109, - "visibility": 0.9859216213226318 - }, - { - "x": 0.4722801148891449, - "y": 0.7644181251525879, - "z": -0.2750561833381653, - "visibility": 0.9954146146774292 - }, - { - "x": 0.6624841690063477, - "y": 0.8178319931030273, - "z": -0.3634585440158844, - "visibility": 0.9645297527313232 - }, - { - "x": 0.4688664376735687, - "y": 0.810904860496521, - "z": -0.30418145656585693, - "visibility": 0.9837177395820618 - }, - { - "x": 0.6536139845848083, - "y": 0.819465160369873, - "z": -0.4046403169631958, - "visibility": 0.9701171517372131 - }, - { - "x": 0.47923824191093445, - "y": 0.8116353750228882, - "z": -0.33982616662979126, - "visibility": 0.9864470958709717 - }, - { - "x": 0.6470164060592651, - "y": 0.8046761155128479, - "z": -0.3497644364833832, - "visibility": 0.9646221399307251 - }, - { - "x": 0.48423540592193604, - "y": 0.7952500581741333, - "z": -0.28995516896247864, - "visibility": 0.9823938608169556 - }, - { - "x": 0.5975397825241089, - "y": 0.7486836910247803, - "z": -0.01602642424404621, - "visibility": 0.9980354309082031 - }, - { - "x": 0.5222603678703308, - "y": 0.7460940480232239, - "z": 0.015866460278630257, - "visibility": 0.9984992742538452 - }, - { - "x": 0.5992724299430847, - "y": 0.9289050102233887, - "z": -0.05494236201047897, - "visibility": 0.6659371852874756 - }, - { - "x": 0.52272629737854, - "y": 0.9302981495857239, - "z": 0.07329216599464417, - "visibility": 0.4603741765022278 - }, - { - "x": 0.6105510592460632, - "y": 1.141161561012268, - "z": 0.07863783836364746, - "visibility": 0.2543848752975464 - }, - { - "x": 0.519781231880188, - "y": 1.1193376779556274, - "z": 0.2668704390525818, - "visibility": 0.1547754853963852 - }, - { - "x": 0.6140167117118835, - "y": 1.165633201599121, - "z": 0.08446992188692093, - "visibility": 0.11109277606010437 - }, - { - "x": 0.5231659412384033, - "y": 1.147874116897583, - "z": 0.2808583676815033, - "visibility": 0.09265053272247314 - }, - { - "x": 0.5928096175193787, - "y": 1.215881586074829, - "z": -0.04922979697585106, - "visibility": 0.20788630843162537 - }, - { - "x": 0.5151289105415344, - "y": 1.1857441663742065, - "z": 0.16661249101161957, - "visibility": 0.10743998736143112 - } - ] -} \ No newline at end of file diff --git a/packages/engine/src/mocap/testPoses/mocapSideBend.json b/packages/engine/src/mocap/testPoses/mocapSideBend.json deleted file mode 100644 index 7ac6453963..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapSideBend.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": 0.22328370809555054, - "y": -0.5210535526275635, - "z": -0.2771596908569336, - "visibility": 0.9985100030899048 - }, - { - "x": 0.26225101947784424, - "y": -0.5178291201591492, - "z": -0.2681899964809418, - "visibility": 0.9981025457382202 - }, - { - "x": 0.26182302832603455, - "y": -0.5214785933494568, - "z": -0.2588774561882019, - "visibility": 0.9982110857963562 - }, - { - "x": 0.26175498962402344, - "y": -0.5231740474700928, - "z": -0.259611040353775, - "visibility": 0.9987872242927551 - }, - { - "x": 0.25122347474098206, - "y": -0.5460677146911621, - "z": -0.27907952666282654, - "visibility": 0.9967231750488281 - }, - { - "x": 0.2532123029232025, - "y": -0.5458102226257324, - "z": -0.2927659749984741, - "visibility": 0.9964831471443176 - }, - { - "x": 0.25129416584968567, - "y": -0.5309946537017822, - "z": -0.2735929787158966, - "visibility": 0.9963384866714478 - }, - { - "x": 0.29996976256370544, - "y": -0.4759303331375122, - "z": -0.1743815690279007, - "visibility": 0.998991847038269 - }, - { - "x": 0.19178509712219238, - "y": -0.5319193601608276, - "z": -0.17682653665542603, - "visibility": 0.9896591901779175 - }, - { - "x": 0.23824076354503632, - "y": -0.49558356404304504, - "z": -0.23603682219982147, - "visibility": 0.9967872500419617 - }, - { - "x": 0.20207442343235016, - "y": -0.49308380484580994, - "z": -0.26391077041625977, - "visibility": 0.9948540925979614 - }, - { - "x": 0.2751649022102356, - "y": -0.3240348994731903, - "z": -0.08431126177310944, - "visibility": 0.9995427131652832 - }, - { - "x": 0.11223594099283218, - "y": -0.5920115113258362, - "z": -0.03699338436126709, - "visibility": 0.9926854968070984 - }, - { - "x": 0.2966654300689697, - "y": -0.13796110451221466, - "z": -0.14003056287765503, - "visibility": 0.9729321002960205 - }, - { - "x": 0.10377728939056396, - "y": -0.7356331944465637, - "z": -0.12747898697853088, - "visibility": 0.850867748260498 - }, - { - "x": 0.35977375507354736, - "y": 0.024695569649338722, - "z": -0.19766059517860413, - "visibility": 0.9775554537773132 - }, - { - "x": 0.08026190102100372, - "y": -0.9576056599617004, - "z": -0.18719686567783356, - "visibility": 0.7162067890167236 - }, - { - "x": 0.38003188371658325, - "y": 0.038936059921979904, - "z": -0.20113980770111084, - "visibility": 0.9567921161651611 - }, - { - "x": 0.09957237541675568, - "y": -1.017547369003296, - "z": -0.2413192093372345, - "visibility": 0.5960161089897156 - }, - { - "x": 0.37502092123031616, - "y": 0.03774379938840866, - "z": -0.23018623888492584, - "visibility": 0.9646739363670349 - }, - { - "x": 0.1395767480134964, - "y": -1.0467435121536255, - "z": -0.24309155344963074, - "visibility": 0.6134809851646423 - }, - { - "x": 0.3556159734725952, - "y": 0.04968832805752754, - "z": -0.21369409561157227, - "visibility": 0.9614365100860596 - }, - { - "x": 0.09388572722673416, - "y": -0.9777981042861938, - "z": -0.19982656836509705, - "visibility": 0.6395266056060791 - }, - { - "x": 0.08278781920671463, - "y": 0.010400000959634781, - "z": 0.01969815231859684, - "visibility": 0.9970877766609192 - }, - { - "x": -0.07778198271989822, - "y": -0.013717057183384895, - "z": -0.017024965956807137, - "visibility": 0.9950355887413025 - }, - { - "x": 0.10598741471767426, - "y": 0.3737104535102844, - "z": -0.001704434514977038, - "visibility": 0.8118464946746826 - }, - { - "x": -0.09941279888153076, - "y": 0.3065353333950043, - "z": 0.013536188751459122, - "visibility": 0.6193692088127136 - }, - { - "x": 0.14420728385448456, - "y": 0.6806351542472839, - "z": 0.16041767597198486, - "visibility": 0.5444814562797546 - }, - { - "x": -0.17073491215705872, - "y": 0.623928427696228, - "z": 0.19847747683525085, - "visibility": 0.3420032560825348 - }, - { - "x": 0.13203436136245728, - "y": 0.706531822681427, - "z": 0.18538586795330048, - "visibility": 0.2320227473974228 - }, - { - "x": -0.17420943081378937, - "y": 0.649351179599762, - "z": 0.17682982981204987, - "visibility": 0.15169313549995422 - }, - { - "x": 0.13414064049720764, - "y": 0.7020589709281921, - "z": 0.14579753577709198, - "visibility": 0.4569977819919586 - }, - { - "x": -0.18325892090797424, - "y": 0.6656619310379028, - "z": 0.12866777181625366, - "visibility": 0.25068768858909607 - } - ], - "poseLandmarks": [ - { - "x": 0.6334875822067261, - "y": 0.34042811393737793, - "z": -0.2695785164833069, - "visibility": 0.9985100030899048 - }, - { - "x": 0.6468685865402222, - "y": 0.33677417039871216, - "z": -0.24622482061386108, - "visibility": 0.9981025457382202 - }, - { - "x": 0.6504542231559753, - "y": 0.34346920251846313, - "z": -0.2467530369758606, - "visibility": 0.9982110857963562 - }, - { - "x": 0.6540712714195251, - "y": 0.34985655546188354, - "z": -0.2467261701822281, - "visibility": 0.9987872242927551 - }, - { - "x": 0.6379380822181702, - "y": 0.3143124282360077, - "z": -0.24973583221435547, - "visibility": 0.9967231750488281 - }, - { - "x": 0.6346614956855774, - "y": 0.3061191737651825, - "z": -0.2501320540904999, - "visibility": 0.9964831471443176 - }, - { - "x": 0.6320233941078186, - "y": 0.2997942268848419, - "z": -0.2503972053527832, - "visibility": 0.9963384866714478 - }, - { - "x": 0.6539650559425354, - "y": 0.35763806104660034, - "z": -0.12323129177093506, - "visibility": 0.998991847038269 - }, - { - "x": 0.627431333065033, - "y": 0.2999598979949951, - "z": -0.14042504131793976, - "visibility": 0.9896591901779175 - }, - { - "x": 0.6290992498397827, - "y": 0.3675173223018646, - "z": -0.21922898292541504, - "visibility": 0.9967872500419617 - }, - { - "x": 0.6179906129837036, - "y": 0.3381725549697876, - "z": -0.2280898094177246, - "visibility": 0.9948540925979614 - }, - { - "x": 0.631445586681366, - "y": 0.48329082131385803, - "z": -0.10546759516000748, - "visibility": 0.9995427131652832 - }, - { - "x": 0.5624746084213257, - "y": 0.31184613704681396, - "z": -0.08538500219583511, - "visibility": 0.9926854968070984 - }, - { - "x": 0.6310847401618958, - "y": 0.631844162940979, - "z": -0.18277792632579803, - "visibility": 0.9729321002960205 - }, - { - "x": 0.5599104166030884, - "y": 0.15436114370822906, - "z": -0.19966864585876465, - "visibility": 0.850867748260498 - }, - { - "x": 0.6661017537117004, - "y": 0.7511628270149231, - "z": -0.4168538451194763, - "visibility": 0.9775554537773132 - }, - { - "x": 0.5609034299850464, - "y": -0.019412260502576828, - "z": -0.3131362795829773, - "visibility": 0.7162067890167236 - }, - { - "x": 0.6775792241096497, - "y": 0.7996792793273926, - "z": -0.45950067043304443, - "visibility": 0.9567921161651611 - }, - { - "x": 0.5638265013694763, - "y": -0.06602352112531662, - "z": -0.36243918538093567, - "visibility": 0.5960161089897156 - }, - { - "x": 0.6812052130699158, - "y": 0.8016806244850159, - "z": -0.5029590129852295, - "visibility": 0.9646739363670349 - }, - { - "x": 0.5605952143669128, - "y": -0.0835535079240799, - "z": -0.3696165382862091, - "visibility": 0.6134809851646423 - }, - { - "x": 0.67527174949646, - "y": 0.7861735820770264, - "z": -0.44016507267951965, - "visibility": 0.9614365100860596 - }, - { - "x": 0.5628787279129028, - "y": -0.06108614429831505, - "z": -0.327735036611557, - "visibility": 0.6395266056060791 - }, - { - "x": 0.5652886629104614, - "y": 0.7251026034355164, - "z": 0.004384330939501524, - "visibility": 0.9970877766609192 - }, - { - "x": 0.49887993931770325, - "y": 0.7110351324081421, - "z": -0.004659521393477917, - "visibility": 0.9950355887413025 - }, - { - "x": 0.5694720149040222, - "y": 0.9326620697975159, - "z": 0.035960838198661804, - "visibility": 0.8118464946746826 - }, - { - "x": 0.4828599989414215, - "y": 0.9390605092048645, - "z": 0.038819752633571625, - "visibility": 0.6193692088127136 - }, - { - "x": 0.574198305606842, - "y": 1.1079822778701782, - "z": 0.22889423370361328, - "visibility": 0.5444814562797546 - }, - { - "x": 0.47653383016586304, - "y": 1.0722967386245728, - "z": 0.23004548251628876, - "visibility": 0.3420032560825348 - }, - { - "x": 0.5749195218086243, - "y": 1.215214490890503, - "z": 0.24010062217712402, - "visibility": 0.2320227473974228 - }, - { - "x": 0.4683327078819275, - "y": 1.1734906435012817, - "z": 0.24307122826576233, - "visibility": 0.15169313549995422 - }, - { - "x": 0.5560212731361389, - "y": 1.2283904552459717, - "z": 0.09674999117851257, - "visibility": 0.4569977819919586 - }, - { - "x": 0.4552294611930847, - "y": 1.2021005153656006, - "z": 0.11337430775165558, - "visibility": 0.25068768858909607 - } - ] -} \ No newline at end of file diff --git a/packages/engine/src/mocap/testPoses/mocapTPose.json b/packages/engine/src/mocap/testPoses/mocapTPose.json deleted file mode 100644 index 073a6a42c6..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapTPose.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": -0.007053094916045666, - "y": -0.6320917010307312, - "z": -0.323504239320755, - "visibility": 0.9999204277992249 - }, - { - "x": 0.017228709533810616, - "y": -0.6500597596168518, - "z": -0.308614045381546, - "visibility": 0.9994785189628601 - }, - { - "x": 0.016602324321866035, - "y": -0.6510304808616638, - "z": -0.29994192719459534, - "visibility": 0.9994955062866211 - }, - { - "x": 0.015237858518958092, - "y": -0.6519933342933655, - "z": -0.3009498417377472, - "visibility": 0.9995196461677551 - }, - { - "x": -0.0075996266677975655, - "y": -0.6623488068580627, - "z": -0.32343968749046326, - "visibility": 0.9996850490570068 - }, - { - "x": -0.0064974562264978886, - "y": -0.6624884605407715, - "z": -0.33438870310783386, - "visibility": 0.999750554561615 - }, - { - "x": -0.00210475642234087, - "y": -0.6474242210388184, - "z": -0.31541433930397034, - "visibility": 0.9997403621673584 - }, - { - "x": 0.09149063378572464, - "y": -0.6359021663665771, - "z": -0.20414359867572784, - "visibility": 0.999610960483551 - }, - { - "x": -0.06417226791381836, - "y": -0.609200119972229, - "z": -0.19889923930168152, - "visibility": 0.9993587136268616 - }, - { - "x": 0.033527445048093796, - "y": -0.617594301700592, - "z": -0.2745838761329651, - "visibility": 0.9994397759437561 - }, - { - "x": -0.00807112641632557, - "y": -0.5904011726379395, - "z": -0.29975786805152893, - "visibility": 0.9994106888771057 - }, - { - "x": 0.18553473055362701, - "y": -0.4979110062122345, - "z": -0.09585471451282501, - "visibility": 0.9997286200523376 - }, - { - "x": -0.13814571499824524, - "y": -0.5824010372161865, - "z": -0.042800866067409515, - "visibility": 0.9994127750396729 - }, - { - "x": 0.4166327714920044, - "y": -0.5008195638656616, - "z": -0.09031601995229721, - "visibility": 0.994158148765564 - }, - { - "x": -0.3429141938686371, - "y": -0.5230728387832642, - "z": -0.09437975287437439, - "visibility": 0.990031898021698 - }, - { - "x": 0.6444019079208374, - "y": -0.4775509834289551, - "z": -0.061789777129888535, - "visibility": 0.9799461364746094 - }, - { - "x": -0.5744578838348389, - "y": -0.5218408703804016, - "z": -0.16397807002067566, - "visibility": 0.9743562936782837 - }, - { - "x": 0.7010523080825806, - "y": -0.48855650424957275, - "z": -0.049407925456762314, - "visibility": 0.9496636986732483 - }, - { - "x": -0.6059343814849854, - "y": -0.5329732894897461, - "z": -0.19457729160785675, - "visibility": 0.9286133646965027 - }, - { - "x": 0.6976305246353149, - "y": -0.4981168210506439, - "z": -0.08676474541425705, - "visibility": 0.9616929888725281 - }, - { - "x": -0.5979604721069336, - "y": -0.5689891576766968, - "z": -0.22148437798023224, - "visibility": 0.9407404661178589 - }, - { - "x": 0.660815954208374, - "y": -0.4618189334869385, - "z": -0.08360119163990021, - "visibility": 0.9696133732795715 - }, - { - "x": -0.5830641984939575, - "y": -0.5313885807991028, - "z": -0.18367324769496918, - "visibility": 0.9525795578956604 - }, - { - "x": 0.08966615796089172, - "y": -0.002101391088217497, - "z": 0.020731326192617416, - "visibility": 0.9980512857437134 - }, - { - "x": -0.08707059174776077, - "y": -0.002535354346036911, - "z": -0.0188601054251194, - "visibility": 0.9979225397109985 - }, - { - "x": 0.12225660681724548, - "y": 0.35831722617149353, - "z": -0.012156344950199127, - "visibility": 0.3905699849128723 - }, - { - "x": -0.06044534593820572, - "y": 0.28482598066329956, - "z": -0.014480657875537872, - "visibility": 0.31241440773010254 - }, - { - "x": 0.10990377515554428, - "y": 0.6906343102455139, - "z": 0.15591855347156525, - "visibility": 0.07974904030561447 - }, - { - "x": -0.1087847426533699, - "y": 0.6324514150619507, - "z": 0.164417564868927, - "visibility": 0.0713137686252594 - }, - { - "x": 0.08606813102960587, - "y": 0.7237378358840942, - "z": 0.1780734658241272, - "visibility": 0.07788235694169998 - }, - { - "x": -0.11147096753120422, - "y": 0.6596052646636963, - "z": 0.14343512058258057, - "visibility": 0.06521165370941162 - }, - { - "x": 0.06713280826807022, - "y": 0.7413052916526794, - "z": 0.14182281494140625, - "visibility": 0.0770961344242096 - }, - { - "x": -0.11254151910543442, - "y": 0.668465793132782, - "z": 0.10637348890304565, - "visibility": 0.05720389261841774 - } - ], - "poseLandmarks": [ - { - "x": 0.5136849284172058, - "y": 0.25215253233909607, - "z": -0.3026796281337738, - "visibility": 0.9999204277992249 - }, - { - "x": 0.5217649936676025, - "y": 0.23142461478710175, - "z": -0.2800382971763611, - "visibility": 0.9994785189628601 - }, - { - "x": 0.5273787379264832, - "y": 0.23220381140708923, - "z": -0.2803437113761902, - "visibility": 0.9994955062866211 - }, - { - "x": 0.5318905711174011, - "y": 0.23326726257801056, - "z": -0.2803437113761902, - "visibility": 0.9995196461677551 - }, - { - "x": 0.5088120698928833, - "y": 0.23133215308189392, - "z": -0.2812596261501312, - "visibility": 0.9996850490570068 - }, - { - "x": 0.5047356486320496, - "y": 0.23178553581237793, - "z": -0.28168317675590515, - "visibility": 0.999750554561615 - }, - { - "x": 0.5008147358894348, - "y": 0.23204946517944336, - "z": -0.2818954885005951, - "visibility": 0.9997403621673584 - }, - { - "x": 0.5382643342018127, - "y": 0.2443392127752304, - "z": -0.15353608131408691, - "visibility": 0.999610960483551 - }, - { - "x": 0.49489307403564453, - "y": 0.24158351123332977, - "z": -0.15914154052734375, - "visibility": 0.9993587136268616 - }, - { - "x": 0.5239865183830261, - "y": 0.2757304012775421, - "z": -0.2531401216983795, - "visibility": 0.9994397759437561 - }, - { - "x": 0.5074965953826904, - "y": 0.27336251735687256, - "z": -0.2570992410182953, - "visibility": 0.9994106888771057 - }, - { - "x": 0.5773906111717224, - "y": 0.359514445066452, - "z": -0.09168184548616409, - "visibility": 0.9997286200523376 - }, - { - "x": 0.45210638642311096, - "y": 0.3535013198852539, - "z": -0.09610586613416672, - "visibility": 0.9994127750396729 - }, - { - "x": 0.6759425401687622, - "y": 0.3733188807964325, - "z": -0.09226422756910324, - "visibility": 0.994158148765564 - }, - { - "x": 0.36675435304641724, - "y": 0.3539654314517975, - "z": -0.1391891986131668, - "visibility": 0.990031898021698 - }, - { - "x": 0.7711330056190491, - "y": 0.3761022090911865, - "z": -0.20341001451015472, - "visibility": 0.9799461364746094 - }, - { - "x": 0.2749881148338318, - "y": 0.3547942042350769, - "z": -0.26801949739456177, - "visibility": 0.9743562936782837 - }, - { - "x": 0.8001641631126404, - "y": 0.37781691551208496, - "z": -0.21842625737190247, - "visibility": 0.9496636986732483 - }, - { - "x": 0.24749869108200073, - "y": 0.3511947691440582, - "z": -0.29917559027671814, - "visibility": 0.9286133646965027 - }, - { - "x": 0.804277241230011, - "y": 0.3725301921367645, - "z": -0.265790194272995, - "visibility": 0.9616929888725281 - }, - { - "x": 0.24433255195617676, - "y": 0.35045722126960754, - "z": -0.33431851863861084, - "visibility": 0.9407404661178589 - }, - { - "x": 0.7938420176506042, - "y": 0.374710351228714, - "z": -0.22710289061069489, - "visibility": 0.9696133732795715 - }, - { - "x": 0.25372114777565, - "y": 0.35755857825279236, - "z": -0.29058489203453064, - "visibility": 0.9525795578956604 - }, - { - "x": 0.5524542927742004, - "y": 0.7185513973236084, - "z": 0.004576945677399635, - "visibility": 0.9980512857437134 - }, - { - "x": 0.48055869340896606, - "y": 0.7217444181442261, - "z": -0.004886041395366192, - "visibility": 0.9979225397109985 - }, - { - "x": 0.5578121542930603, - "y": 0.9323566555976868, - "z": 0.011323675513267517, - "visibility": 0.3905699849128723 - }, - { - "x": 0.4778205454349518, - "y": 0.9440845251083374, - "z": -0.022558439522981644, - "visibility": 0.31241440773010254 - }, - { - "x": 0.5539041757583618, - "y": 1.1882671117782593, - "z": 0.17523179948329926, - "visibility": 0.07974904030561447 - }, - { - "x": 0.4726439416408539, - "y": 1.1538734436035156, - "z": 0.14412134885787964, - "visibility": 0.0713137686252594 - }, - { - "x": 0.553936779499054, - "y": 1.218368649482727, - "z": 0.18444277346134186, - "visibility": 0.07788235694169998 - }, - { - "x": 0.4733692705631256, - "y": 1.1843791007995605, - "z": 0.15646347403526306, - "visibility": 0.06521165370941162 - }, - { - "x": 0.5391252040863037, - "y": 1.2547801733016968, - "z": 0.07064264267683029, - "visibility": 0.0770961344242096 - }, - { - "x": 0.4718703627586365, - "y": 1.2149633169174194, - "z": 0.05272931605577469, - "visibility": 0.05720389261841774 - } - ] -} diff --git a/packages/engine/src/mocap/testPoses/mocapTurn45.json b/packages/engine/src/mocap/testPoses/mocapTurn45.json deleted file mode 100644 index 292c298853..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapTurn45.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": 0.09801330417394638, - "y": -0.6289465427398682, - "z": -0.24616003036499023, - "visibility": 0.9999741911888123 - }, - { - "x": 0.0885687842965126, - "y": -0.6484243869781494, - "z": -0.2371109277009964, - "visibility": 0.9998708963394165 - }, - { - "x": 0.08568582683801651, - "y": -0.6513887047767639, - "z": -0.2244856208562851, - "visibility": 0.9998950362205505 - }, - { - "x": 0.08515600115060806, - "y": -0.6499975919723511, - "z": -0.2260143905878067, - "visibility": 0.9998969435691833 - }, - { - "x": 0.07701489329338074, - "y": -0.6606019735336304, - "z": -0.26787465810775757, - "visibility": 0.9999397397041321 - }, - { - "x": 0.07793200016021729, - "y": -0.6588027477264404, - "z": -0.28073376417160034, - "visibility": 0.999968409538269 - }, - { - "x": 0.0821988433599472, - "y": -0.6458126902580261, - "z": -0.26141586899757385, - "visibility": 0.9999575018882751 - }, - { - "x": 0.05912420526146889, - "y": -0.6444712281227112, - "z": -0.13999810814857483, - "visibility": 0.9999710321426392 - }, - { - "x": -0.02593660168349743, - "y": -0.5888156890869141, - "z": -0.23653464019298553, - "visibility": 0.9999219179153442 - }, - { - "x": 0.10968197137117386, - "y": -0.6236624717712402, - "z": -0.1960017830133438, - "visibility": 0.9999280571937561 - }, - { - "x": 0.08763992786407471, - "y": -0.5853642821311951, - "z": -0.24924591183662415, - "visibility": 0.9999117851257324 - }, - { - "x": 0.11448436230421066, - "y": -0.5293052196502686, - "z": 0.01546761766076088, - "visibility": 0.9999665021896362 - }, - { - "x": -0.09636572003364563, - "y": -0.5666733980178833, - "z": -0.13426852226257324, - "visibility": 0.9999326467514038 - }, - { - "x": 0.24386097490787506, - "y": -0.557210385799408, - "z": 0.2419789880514145, - "visibility": 0.5653735399246216 - }, - { - "x": -0.24996450543403625, - "y": -0.44266027212142944, - "z": -0.33029302954673767, - "visibility": 0.9305912256240845 - }, - { - "x": 0.40216514468193054, - "y": -0.5530730485916138, - "z": 0.4925784766674042, - "visibility": 0.8908469676971436 - }, - { - "x": -0.4824851155281067, - "y": -0.4224843680858612, - "z": -0.5024199485778809, - "visibility": 0.9789025187492371 - }, - { - "x": 0.4335384666919708, - "y": -0.5673584342002869, - "z": 0.5488537549972534, - "visibility": 0.8979458808898926 - }, - { - "x": -0.5275068879127502, - "y": -0.44995927810668945, - "z": -0.5609756112098694, - "visibility": 0.9769966006278992 - }, - { - "x": 0.4199979901313782, - "y": -0.5825574398040771, - "z": 0.5256758332252502, - "visibility": 0.9251841902732849 - }, - { - "x": -0.5125421285629272, - "y": -0.4681665599346161, - "z": -0.5630901455879211, - "visibility": 0.9796069860458374 - }, - { - "x": 0.4204762578010559, - "y": -0.5412827134132385, - "z": 0.48607316613197327, - "visibility": 0.9374017119407654 - }, - { - "x": -0.4937835931777954, - "y": -0.4280085563659668, - "z": -0.5167016386985779, - "visibility": 0.9789846539497375 - }, - { - "x": 0.06142799183726311, - "y": -0.0008761698263697326, - "z": 0.09048028290271759, - "visibility": 0.9981825947761536 - }, - { - "x": -0.05945460870862007, - "y": -0.0062023368664085865, - "z": -0.08594359457492828, - "visibility": 0.9980601072311401 - }, - { - "x": 0.014606509357690811, - "y": 0.3929745852947235, - "z": 0.1265045404434204, - "visibility": 0.027015792205929756 - }, - { - "x": -0.04443681612610817, - "y": 0.29871806502342224, - "z": -0.00819902028888464, - "visibility": 0.059985220432281494 - }, - { - "x": -0.07010136544704437, - "y": 0.7084983587265015, - "z": 0.27142903208732605, - "visibility": 0.014271608553826809 - }, - { - "x": -0.1449287384748459, - "y": 0.687058687210083, - "z": 0.19019784033298492, - "visibility": 0.048497654497623444 - }, - { - "x": -0.09801586717367172, - "y": 0.7441152334213257, - "z": 0.2935694456100464, - "visibility": 0.06291162967681885 - }, - { - "x": -0.14667336642742157, - "y": 0.7210890650749207, - "z": 0.16681918501853943, - "visibility": 0.07663436233997345 - }, - { - "x": -0.04854501783847809, - "y": 0.7764477133750916, - "z": 0.28274691104888916, - "visibility": 0.03787495568394661 - }, - { - "x": -0.08384976536035538, - "y": 0.7230747938156128, - "z": 0.1220589205622673, - "visibility": 0.03867141529917717 - } - ], - "poseLandmarks": [ - { - "x": 0.5940812826156616, - "y": 0.24610507488250732, - "z": -0.23367594182491302, - "visibility": 0.9999741911888123 - }, - { - "x": 0.5891717672348022, - "y": 0.22566719353199005, - "z": -0.21442756056785583, - "visibility": 0.9998708963394165 - }, - { - "x": 0.589259684085846, - "y": 0.224705770611763, - "z": -0.21479080617427826, - "visibility": 0.9998950362205505 - }, - { - "x": 0.5894700288772583, - "y": 0.22344312071800232, - "z": -0.2150333821773529, - "visibility": 0.9998969435691833 - }, - { - "x": 0.5834782719612122, - "y": 0.22612330317497253, - "z": -0.2460506111383438, - "visibility": 0.9999397397041321 - }, - { - "x": 0.5805694460868835, - "y": 0.2265242040157318, - "z": -0.2465023398399353, - "visibility": 0.999968409538269 - }, - { - "x": 0.5761899948120117, - "y": 0.22678270936012268, - "z": -0.24685412645339966, - "visibility": 0.9999575018882751 - }, - { - "x": 0.573352038860321, - "y": 0.23497086763381958, - "z": -0.10072053968906403, - "visibility": 0.9999710321426392 - }, - { - "x": 0.5578970313072205, - "y": 0.23726704716682434, - "z": -0.24359610676765442, - "visibility": 0.9999219179153442 - }, - { - "x": 0.5899617671966553, - "y": 0.27017074823379517, - "z": -0.18584558367729187, - "visibility": 0.9999280571937561 - }, - { - "x": 0.5840234756469727, - "y": 0.2699383497238159, - "z": -0.22961010038852692, - "visibility": 0.9999117851257324 - }, - { - "x": 0.5976133942604065, - "y": 0.34173113107681274, - "z": 0.028369536623358727, - "visibility": 0.9999665021896362 - }, - { - "x": 0.5143858194351196, - "y": 0.3529675006866455, - "z": -0.25334784388542175, - "visibility": 0.9999326467514038 - }, - { - "x": 0.6359642744064331, - "y": 0.3565772473812103, - "z": 0.32938891649246216, - "visibility": 0.5653735399246216 - }, - { - "x": 0.44430798292160034, - "y": 0.36119943857192993, - "z": -0.4809931814670563, - "visibility": 0.9305912256240845 - }, - { - "x": 0.6907599568367004, - "y": 0.35003551840782166, - "z": 0.5580769777297974, - "visibility": 0.8908469676971436 - }, - { - "x": 0.35673004388809204, - "y": 0.3665185272693634, - "z": -0.7432311773300171, - "visibility": 0.9789025187492371 - }, - { - "x": 0.7031053304672241, - "y": 0.35499894618988037, - "z": 0.6065552830696106, - "visibility": 0.8979458808898926 - }, - { - "x": 0.3247259557247162, - "y": 0.35277119278907776, - "z": -0.8032522797584534, - "visibility": 0.9769966006278992 - }, - { - "x": 0.7061694860458374, - "y": 0.3517785966396332, - "z": 0.5537815093994141, - "visibility": 0.9251841902732849 - }, - { - "x": 0.3226831257343292, - "y": 0.35495486855506897, - "z": -0.8126211762428284, - "visibility": 0.9796069860458374 - }, - { - "x": 0.701516330242157, - "y": 0.35293060541152954, - "z": 0.5419104099273682, - "visibility": 0.9374017119407654 - }, - { - "x": 0.3329748213291168, - "y": 0.36517298221588135, - "z": -0.7583130598068237, - "visibility": 0.9789846539497375 - }, - { - "x": 0.5867010951042175, - "y": 0.695889413356781, - "z": 0.09428350627422333, - "visibility": 0.9981825947761536 - }, - { - "x": 0.5376742482185364, - "y": 0.6991077065467834, - "z": -0.09446927160024643, - "visibility": 0.9980601072311401 - }, - { - "x": 0.565243661403656, - "y": 0.9218544363975525, - "z": 0.18800625205039978, - "visibility": 0.027015792205929756 - }, - { - "x": 0.530925989151001, - "y": 0.9286053776741028, - "z": 0.015020573511719704, - "visibility": 0.059985220432281494 - }, - { - "x": 0.5470254421234131, - "y": 1.1424154043197632, - "z": 0.3400646150112152, - "visibility": 0.014271608553826809 - }, - { - "x": 0.5103258490562439, - "y": 1.164440393447876, - "z": 0.18162816762924194, - "visibility": 0.048497654497623444 - }, - { - "x": 0.5376311540603638, - "y": 1.1721446514129639, - "z": 0.3489547371864319, - "visibility": 0.06291162967681885 - }, - { - "x": 0.49901464581489563, - "y": 1.2063831090927124, - "z": 0.19295789301395416, - "visibility": 0.07663436233997345 - }, - { - "x": 0.5648912191390991, - "y": 1.2075514793395996, - "z": 0.27425238490104675, - "visibility": 0.03787495568394661 - }, - { - "x": 0.5418471097946167, - "y": 1.217419147491455, - "z": 0.09018196165561676, - "visibility": 0.03867141529917717 - } - ] -} \ No newline at end of file diff --git a/packages/engine/src/mocap/testPoses/mocapTurn90.json b/packages/engine/src/mocap/testPoses/mocapTurn90.json deleted file mode 100644 index 9686c4b5c1..0000000000 --- a/packages/engine/src/mocap/testPoses/mocapTurn90.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "poseWorldLandmarks": [ - { - "x": 0.14580945670604706, - "y": -0.6457381844520569, - "z": -0.13387420773506165, - "visibility": 0.9982167482376099 - }, - { - "x": 0.12624840438365936, - "y": -0.6658949851989746, - "z": -0.13089799880981445, - "visibility": 0.9964545369148254 - }, - { - "x": 0.1245400458574295, - "y": -0.6694913506507874, - "z": -0.1122329980134964, - "visibility": 0.9964612126350403 - }, - { - "x": 0.12378599494695663, - "y": -0.6671819686889648, - "z": -0.11576808989048004, - "visibility": 0.9968522787094116 - }, - { - "x": 0.12650173902511597, - "y": -0.6818546056747437, - "z": -0.1667596399784088, - "visibility": 0.9982468485832214 - }, - { - "x": 0.12796957790851593, - "y": -0.674894392490387, - "z": -0.18362782895565033, - "visibility": 0.9990474581718445 - }, - { - "x": 0.1323525309562683, - "y": -0.6680509448051453, - "z": -0.16277143359184265, - "visibility": 0.999073326587677 - }, - { - "x": 0.03486403822898865, - "y": -0.6544984579086304, - "z": -0.059605930000543594, - "visibility": 0.9988311529159546 - }, - { - "x": 0.010302333161234856, - "y": -0.5996251106262207, - "z": -0.20038487017154694, - "visibility": 0.9982977509498596 - }, - { - "x": 0.12850703299045563, - "y": -0.6337776780128479, - "z": -0.09045494347810745, - "visibility": 0.9970428347587585 - }, - { - "x": 0.12430810183286667, - "y": -0.5952099561691284, - "z": -0.15809012949466705, - "visibility": 0.9967553019523621 - }, - { - "x": 0.001208469388075173, - "y": -0.5180464386940002, - "z": 0.09159563481807709, - "visibility": 0.999489963054657 - }, - { - "x": -0.02087457664310932, - "y": -0.5660766363143921, - "z": -0.1559726446866989, - "visibility": 0.999749481678009 - }, - { - "x": -0.007535802200436592, - "y": -0.49823227524757385, - "z": 0.3240455985069275, - "visibility": 0.007885611616075039 - }, - { - "x": 0.014899102039635181, - "y": -0.42453837394714355, - "z": -0.4281117916107178, - "visibility": 0.828565239906311 - }, - { - "x": 0.008639038540422916, - "y": -0.49407365918159485, - "z": 0.6189588904380798, - "visibility": 0.02875368669629097 - }, - { - "x": 0.0011654928093776107, - "y": -0.3952065706253052, - "z": -0.6408798098564148, - "visibility": 0.9700158834457397 - }, - { - "x": -0.006080399267375469, - "y": -0.49705344438552856, - "z": 0.6848729252815247, - "visibility": 0.08196968585252762 - }, - { - "x": 0.013665126636624336, - "y": -0.40990975499153137, - "z": -0.7010717391967773, - "visibility": 0.9791136384010315 - }, - { - "x": -0.016482552513480186, - "y": -0.5106360912322998, - "z": 0.7026452422142029, - "visibility": 0.09942536801099777 - }, - { - "x": 0.03978119418025017, - "y": -0.44076740741729736, - "z": -0.6947527527809143, - "visibility": 0.9798918962478638 - }, - { - "x": 0.02247830107808113, - "y": -0.48021596670150757, - "z": 0.6362296938896179, - "visibility": 0.08901142328977585 - }, - { - "x": 0.004725725390017033, - "y": -0.4125979244709015, - "z": -0.6515325307846069, - "visibility": 0.9745544195175171 - }, - { - "x": 0.013458031229674816, - "y": -0.008079247549176216, - "z": 0.11920580267906189, - "visibility": 0.9966726303100586 - }, - { - "x": -0.014080471359193325, - "y": -0.0017988828476518393, - "z": -0.1142512634396553, - "visibility": 0.9977098107337952 - }, - { - "x": 0.006719282362610102, - "y": 0.3732716143131256, - "z": 0.20106707513332367, - "visibility": 0.01604008674621582 - }, - { - "x": 0.050268784165382385, - "y": 0.3059673607349396, - "z": -0.02266486920416355, - "visibility": 0.23293541371822357 - }, - { - "x": -0.003389523597434163, - "y": 0.7147197127342224, - "z": 0.36263415217399597, - "visibility": 0.027105318382382393 - }, - { - "x": -0.05378197133541107, - "y": 0.6660857796669006, - "z": 0.1322479546070099, - "visibility": 0.21983498334884644 - }, - { - "x": -0.026817817240953445, - "y": 0.7555696964263916, - "z": 0.38729700446128845, - "visibility": 0.12509727478027344 - }, - { - "x": -0.05662171170115471, - "y": 0.6950214505195618, - "z": 0.10861556977033615, - "visibility": 0.2684205174446106 - }, - { - "x": 0.05576304718852043, - "y": 0.7762835025787354, - "z": 0.3953425884246826, - "visibility": 0.086270272731781 - }, - { - "x": 0.046179693192243576, - "y": 0.6777438521385193, - "z": 0.09125739336013794, - "visibility": 0.14718550443649292 - } - ], - "poseLandmarks": [ - { - "x": 0.5791527032852173, - "y": 0.25572773814201355, - "z": -0.07077214121818542, - "visibility": 0.9982167482376099 - }, - { - "x": 0.5723447799682617, - "y": 0.23187215626239777, - "z": -0.05463436618447304, - "visibility": 0.9964545369148254 - }, - { - "x": 0.570339024066925, - "y": 0.23196206986904144, - "z": -0.05501285940408707, - "visibility": 0.9964612126350403 - }, - { - "x": 0.5683955550193787, - "y": 0.23228201270103455, - "z": -0.05511697009205818, - "visibility": 0.9968522787094116 - }, - { - "x": 0.5703589916229248, - "y": 0.23131102323532104, - "z": -0.1049208864569664, - "visibility": 0.9982468485832214 - }, - { - "x": 0.5674454569816589, - "y": 0.2314499467611313, - "z": -0.10524002462625504, - "visibility": 0.9990474581718445 - }, - { - "x": 0.5646834969520569, - "y": 0.23192979395389557, - "z": -0.10554983466863632, - "visibility": 0.999073326587677 - }, - { - "x": 0.5514814853668213, - "y": 0.24126821756362915, - "z": 0.029720276594161987, - "visibility": 0.9988311529159546 - }, - { - "x": 0.5459417104721069, - "y": 0.24328657984733582, - "z": -0.19868068397045135, - "visibility": 0.9982977509498596 - }, - { - "x": 0.57267165184021, - "y": 0.2784460186958313, - "z": -0.031693145632743835, - "visibility": 0.9970428347587585 - }, - { - "x": 0.5711023807525635, - "y": 0.2778182923793793, - "z": -0.09978518635034561, - "visibility": 0.9967553019523621 - }, - { - "x": 0.52365642786026, - "y": 0.35425612330436707, - "z": 0.17114226520061493, - "visibility": 0.999489963054657 - }, - { - "x": 0.5242745876312256, - "y": 0.3453262746334076, - "z": -0.31269195675849915, - "visibility": 0.999749481678009 - }, - { - "x": 0.5283524394035339, - "y": 0.41608819365501404, - "z": 0.5338389277458191, - "visibility": 0.007885611616075039 - }, - { - "x": 0.5247524380683899, - "y": 0.39296165108680725, - "z": -0.6941549181938171, - "visibility": 0.828565239906311 - }, - { - "x": 0.5277997851371765, - "y": 0.4314039647579193, - "z": 0.8637083172798157, - "visibility": 0.02875368669629097 - }, - { - "x": 0.5302783846855164, - "y": 0.38160738348960876, - "z": -1.0194450616836548, - "visibility": 0.9700158834457397 - }, - { - "x": 0.5291812419891357, - "y": 0.42223817110061646, - "z": 0.9329563975334167, - "visibility": 0.08196968585252762 - }, - { - "x": 0.5220643281936646, - "y": 0.3848729729652405, - "z": -1.094968318939209, - "visibility": 0.9791136384010315 - }, - { - "x": 0.5228673815727234, - "y": 0.42823150753974915, - "z": 0.9100288152694702, - "visibility": 0.09942536801099777 - }, - { - "x": 0.5274105668067932, - "y": 0.374004065990448, - "z": -1.0869572162628174, - "visibility": 0.9798918962478638 - }, - { - "x": 0.525829017162323, - "y": 0.4276358187198639, - "z": 0.8669667840003967, - "visibility": 0.08901142328977585 - }, - { - "x": 0.531191349029541, - "y": 0.3729681968688965, - "z": -1.0266820192337036, - "visibility": 0.9745544195175171 - }, - { - "x": 0.5334163904190063, - "y": 0.7185657024383545, - "z": 0.1532447636127472, - "visibility": 0.9966726303100586 - }, - { - "x": 0.5300628542900085, - "y": 0.7285027503967285, - "z": -0.15314064919948578, - "visibility": 0.9977098107337952 - }, - { - "x": 0.5302104353904724, - "y": 0.9388797283172607, - "z": 0.30307915806770325, - "visibility": 0.01604008674621582 - }, - { - "x": 0.5348203182220459, - "y": 0.9624567031860352, - "z": -0.036200858652591705, - "visibility": 0.23293541371822357 - }, - { - "x": 0.5229222774505615, - "y": 1.1885335445404053, - "z": 0.45945194363594055, - "visibility": 0.027105318382382393 - }, - { - "x": 0.5163639187812805, - "y": 1.2067768573760986, - "z": 0.06722957640886307, - "visibility": 0.21983498334884644 - }, - { - "x": 0.5150221586227417, - "y": 1.2304176092147827, - "z": 0.4714605212211609, - "visibility": 0.12509727478027344 - }, - { - "x": 0.4968891143798828, - "y": 1.2541937828063965, - "z": 0.07489769160747528, - "visibility": 0.2684205174446106 - }, - { - "x": 0.5520731210708618, - "y": 1.237723708152771, - "z": 0.42754998803138733, - "visibility": 0.086270272731781 - }, - { - "x": 0.5762662887573242, - "y": 1.2444217205047607, - "z": -0.016388507559895515, - "visibility": 0.14718550443649292 - } - ] -} \ No newline at end of file diff --git a/packages/spatial/src/renderer/PerformanceState.ts b/packages/spatial/src/renderer/PerformanceState.ts index 29719998ea..6af8a81ba6 100644 --- a/packages/spatial/src/renderer/PerformanceState.ts +++ b/packages/spatial/src/renderer/PerformanceState.ts @@ -432,7 +432,7 @@ const buildPerformanceState = async ( mobileTiers: [0, 15, 30, 45, 60, 75], override }) - let tier = gpuTier.tier + let tier = gpuTier.type === 'FALLBACK' ? performanceState.gpuTier.value : gpuTier.tier performanceState.isMobileGPU.set(!!gpuTier.isMobile) if (gpuTier.gpu) performanceState.gpu.set(gpuTier.gpu) if (gpuTier.device) performanceState.device.set(gpuTier.device)