-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/add-auto-assign-review-action
- Loading branch information
Showing
116 changed files
with
39,362 additions
and
1,559 deletions.
There are no files selected for viewing
1,599 changes: 694 additions & 905 deletions
1,599
...s/DCL/AvatarRendering/AvatarShape/Assets/Animations/Animator/CharacterAnimator.controller
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+2.66 MB
(140%)
Explorer/Assets/DCL/AvatarRendering/AvatarShape/Assets/Animations/Avatar_Locomotion.fbx
Binary file not shown.
393 changes: 327 additions & 66 deletions
393
Explorer/Assets/DCL/AvatarRendering/AvatarShape/Assets/Animations/Avatar_Locomotion.fbx.meta
Large diffs are not rendered by default.
Oops, something went wrong.
2,277 changes: 2,126 additions & 151 deletions
2,277
Explorer/Assets/DCL/AvatarRendering/AvatarShape/Assets/AvatarBase.prefab
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 24 additions & 22 deletions
46
Explorer/Assets/DCL/AvatarRendering/AvatarShape/AvatarShape.asmdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using Arch.Core; | ||
using Arch.System; | ||
using Arch.SystemGroups; | ||
using DCL.AvatarRendering.AvatarShape.Components; | ||
using DCL.AvatarRendering.Wearables.Helpers; | ||
using DCL.Character.Components; | ||
using DCL.CharacterCamera; | ||
using ECS.Abstract; | ||
using System.Runtime.CompilerServices; | ||
using UnityEngine; | ||
|
||
namespace DCL.AvatarRendering.AvatarShape.Systems | ||
{ | ||
[UpdateInGroup(typeof(CameraGroup))] | ||
public partial class AvatarShapeVisibilitySystem : BaseUnityLoopSystem | ||
{ | ||
private SingleInstanceEntity camera; | ||
|
||
public AvatarShapeVisibilitySystem(World world) : base(world) { } | ||
|
||
public override void Initialize() | ||
{ | ||
camera = World.CacheCamera(); | ||
} | ||
|
||
protected override void Update(float t) | ||
{ | ||
UpdatePlayerFirstPersonQuery(World, camera.GetCameraComponent(World)); | ||
} | ||
|
||
[Query] | ||
[All(typeof(PlayerComponent))] | ||
private void UpdatePlayerFirstPerson([Data] in CameraComponent camera, ref AvatarShapeComponent avatarShape) | ||
{ | ||
bool shouldBeHidden = camera.Mode == CameraMode.FirstPerson; | ||
|
||
switch (avatarShape.IsVisible) | ||
{ | ||
case true when shouldBeHidden: | ||
Hide(ref avatarShape); | ||
break; | ||
case false when !shouldBeHidden: | ||
Show(ref avatarShape); | ||
break; | ||
} | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
private static void Show(ref AvatarShapeComponent avatarShape) | ||
{ | ||
ToggleAvatarShape(ref avatarShape, true); | ||
avatarShape.IsVisible = true; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
private static void Hide(ref AvatarShapeComponent avatarShape) | ||
{ | ||
ToggleAvatarShape(ref avatarShape, false); | ||
avatarShape.IsVisible = false; | ||
} | ||
|
||
private static void ToggleAvatarShape(ref AvatarShapeComponent avatarShape, bool toggle) | ||
{ | ||
foreach (CachedWearable wearable in avatarShape.InstantiatedWearables) | ||
foreach (Renderer renderer in wearable.Renderers) | ||
renderer.enabled = toggle; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Explorer/Assets/DCL/AvatarRendering/AvatarShape/Systems/AvatarShapeVisibilitySystem.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "DemoScripts", | ||
"rootNamespace": "", | ||
"references": [ | ||
"GUID:1b8e1e1bd01505f478f0369c04a4fb2f", | ||
"GUID:3c7b57a14671040bd8c549056adc04f5", | ||
"GUID:5eabe9a3d4dd19d42a16208ea5411062", | ||
"GUID:101b8b6ebaf64668909b49c4b7a1420d", | ||
"GUID:9e314663ce958b746873cb22d57ede55", | ||
"GUID:286980af24684da6acc1caa413039811", | ||
"GUID:f51ebe6a0ceec4240a699833d6309b23", | ||
"GUID:9e24947de15b9834991c9d8411ea37cf", | ||
"GUID:6e2b4bed29ad1c549ab19b744f36f388", | ||
"GUID:4794e238ed0f65142a4aea5848b513e5", | ||
"GUID:fa7b3fdbb04d67549916da7bd2af58ab", | ||
"GUID:d8b63aba1907145bea998dd612889d6b", | ||
"GUID:2665a8d13d1b3f18800f46e256720795", | ||
"GUID:6055be8ebefd69e48b49212b09b47b2f", | ||
"GUID:e0eedfa2deb9406daf86fd8368728e39", | ||
"GUID:e0cd26848372d4e5c891c569017e11f1", | ||
"GUID:4725c02394ab4ce19f889e4e8001f989", | ||
"GUID:7f7d1af65c2641843945d409d28f2e20", | ||
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5", | ||
"GUID:275e22790c04e9b47a5085d7b0c4432a", | ||
"GUID:c80c82a8f4e04453b85fbab973d6774a", | ||
"GUID:d0ec51c740809fd4680d3ea27279dca7", | ||
"GUID:007bff6000804d90ac597452fb69a4ee", | ||
"GUID:d414ef88f3b15f746a4b97636b50dfb4" | ||
], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
7 changes: 7 additions & 0 deletions
7
Explorer/Assets/DCL/AvatarRendering/DemoScripts/DemoScripts.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...e/DemoScripts/PlayerAnimatorController.cs → ...g/DemoScripts/PlayerAnimatorController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...e/DemoScripts/RandomAnimatorController.cs → ...g/DemoScripts/RandomAnimatorController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.