final update
This commit is contained in:
-7
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2b340718fb041247b1d8050d08978b3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1303ced47dd14124ea32bc4184162b30
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5f5a6908ce77674e89d3dd9a23749a9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -125,7 +125,10 @@ public class AnimationHandler : MonoBehaviour
|
||||
foreach(var item in _objects)
|
||||
{
|
||||
item.DOScale(0, .2f)
|
||||
.OnComplete(()=> item.DOLocalMove(Vector3.zero, 0));
|
||||
.OnComplete(()=>
|
||||
{
|
||||
item.DOLocalMove(Vector3.zero, 0);
|
||||
});
|
||||
}
|
||||
|
||||
_sberPrimeLogo.DOScale(Vector3.zero, .2f);
|
||||
|
||||
@@ -17,6 +17,7 @@ public class MirrorAnimationHandler : MonoBehaviour
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_material.DOFade(0, .5f);
|
||||
_visualizer.OnDetectionStatusChanged += isDetected =>
|
||||
{
|
||||
if(isDetected) _material.DOFade(1, .5f);
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Video;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
|
||||
public class TimeOfDayHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private VideoPlayer _videoPlayer;
|
||||
[Space(16)]
|
||||
[SerializeField] private VideoClip _dayClip;
|
||||
[SerializeField] private VideoClip _dayTransitionClip;
|
||||
[Space(16)]
|
||||
[SerializeField] private VideoClip _nightClip;
|
||||
[SerializeField] private VideoClip _nightTransitionClip;
|
||||
[Space(16)]
|
||||
[SerializeField] private Light _directionLight;
|
||||
[SerializeField] private Color _dayLight;
|
||||
[SerializeField] private Color _nightLight;
|
||||
|
||||
private void Start() {
|
||||
_videoPlayer.clip = _dayClip;
|
||||
_videoPlayer.Play();
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
if(Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
if(_videoPlayer.clip == _dayClip)
|
||||
{
|
||||
_directionLight.DOIntensity(.5f, 15f);
|
||||
_directionLight.DOColor(_nightLight, 15f);
|
||||
|
||||
_videoPlayer.Stop();
|
||||
_videoPlayer.clip = _dayTransitionClip;
|
||||
_videoPlayer.Play();
|
||||
_videoPlayer.loopPointReached += player =>
|
||||
{
|
||||
_videoPlayer.Stop();
|
||||
_videoPlayer.clip = _nightClip;
|
||||
_videoPlayer.Play();
|
||||
};
|
||||
}
|
||||
else if(_videoPlayer.clip == _nightClip)
|
||||
{
|
||||
_directionLight.DOIntensity(.5f, 15f);
|
||||
_directionLight.DOColor(_dayLight, 15f);
|
||||
|
||||
_videoPlayer.Stop();
|
||||
_videoPlayer.clip = _nightTransitionClip;
|
||||
_videoPlayer.Play();
|
||||
_videoPlayer.loopPointReached += player =>
|
||||
{
|
||||
_videoPlayer.Stop();
|
||||
_videoPlayer.clip = _dayClip;
|
||||
_videoPlayer.Play();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cc0f62b4a8f53c4098327c26a6d4c96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class RenderTexturesHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private RenderTexture _main;
|
||||
[SerializeField] private RenderTexture _second;
|
||||
|
||||
private void Awake() {
|
||||
_main.height = Screen.height;
|
||||
_main.width = Screen.width;
|
||||
|
||||
_second.height = Screen.height;
|
||||
_second.width = Screen.width;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8865ef3cc46bcfe4e89da37d2d1b3a39
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -21,6 +21,16 @@ public class SettingsUI : MonoBehaviour
|
||||
[SerializeField] private Slider _maskSlider;
|
||||
[SerializeField] private RectTransform _mask;
|
||||
|
||||
[SerializeField] private Transform _firstCamera;
|
||||
[SerializeField] private Slider _firstCameraX;
|
||||
[SerializeField] private Slider _firstCameraY;
|
||||
[SerializeField] private Slider _firstCameraZ;
|
||||
|
||||
[SerializeField] private Transform _secondCamera;
|
||||
[SerializeField] private Slider _secondCameraX;
|
||||
[SerializeField] private Slider _secondCameraY;
|
||||
[SerializeField] private Slider _secondCameraZ;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_maskSlider.minValue = _mask.rect.width - (_mask.rect.width / 2);
|
||||
@@ -38,6 +48,43 @@ public class SettingsUI : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
_acceptButton.onClick.AddListener(() => OnAcceptButtonClick());
|
||||
|
||||
_firstCameraX.value = _firstCamera.localPosition.x;
|
||||
_firstCameraX.minValue = _firstCamera.localPosition.x - 5f;
|
||||
_firstCameraX.maxValue = _firstCamera.localPosition.x + 5f;
|
||||
_firstCameraX.onValueChanged
|
||||
.AddListener(value => _firstCamera.localPosition = new Vector3(value, _firstCamera.localPosition.y, _firstCamera.localPosition.z));
|
||||
|
||||
_firstCameraY.value = _firstCamera.localPosition.y;
|
||||
_firstCameraY.minValue = _firstCamera.localPosition.y - 5f;
|
||||
_firstCameraY.maxValue = _firstCamera.localPosition.y + 5f;
|
||||
_firstCameraY.onValueChanged
|
||||
.AddListener(value => _firstCamera.localPosition = new Vector3(_firstCamera.localPosition.x, value, _firstCamera.localPosition.z));
|
||||
|
||||
_firstCameraZ.value = _firstCamera.localPosition.z;
|
||||
_firstCameraZ.minValue = _firstCamera.localPosition.z - 5f;
|
||||
_firstCameraZ.maxValue = _firstCamera.localPosition.z + 5f;
|
||||
_firstCameraZ.onValueChanged
|
||||
.AddListener(value => _firstCamera.localPosition = new Vector3(_firstCamera.localPosition.x, _firstCamera.localPosition.y, value));
|
||||
|
||||
|
||||
_secondCameraX.value = _secondCamera.localPosition.x;
|
||||
_secondCameraX.minValue = _secondCamera.localPosition.x - 5f;
|
||||
_secondCameraX.maxValue = _secondCamera.localPosition.x + 5f;
|
||||
_secondCameraX.onValueChanged
|
||||
.AddListener(value => _secondCamera.localPosition = new Vector3(value, _secondCamera.localPosition.y, _secondCamera.localPosition.z));
|
||||
|
||||
_secondCameraY.value = _secondCamera.localPosition.y;
|
||||
_secondCameraY.minValue = _secondCamera.localPosition.y - 5f;
|
||||
_secondCameraY.maxValue = _secondCamera.localPosition.y + 5f;
|
||||
_secondCameraY.onValueChanged
|
||||
.AddListener(value => _secondCamera.localPosition = new Vector3(_secondCamera.localPosition.x, value, _secondCamera.localPosition.z));
|
||||
|
||||
_secondCameraZ.value = _secondCamera.localPosition.z;
|
||||
_secondCameraZ.minValue = _secondCamera.localPosition.z - 5f;
|
||||
_secondCameraZ.maxValue = _secondCamera.localPosition.z + 5f;
|
||||
_secondCameraZ.onValueChanged
|
||||
.AddListener(value => _secondCamera.localPosition = new Vector3(_secondCamera.localPosition.x, _secondCamera.localPosition.y, value));
|
||||
}
|
||||
|
||||
private void OnAcceptButtonClick(float min = -1f)
|
||||
@@ -48,7 +95,7 @@ public class SettingsUI : MonoBehaviour
|
||||
_visualizer.Init();
|
||||
FindAnyObjectByType<MirrorAnimationHandler>().Init();
|
||||
|
||||
Destroy(gameObject);
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace UltraFace
|
||||
if(!_detectionSetup.isValidate) return;
|
||||
|
||||
_detectedCounter.Add(maxFaceHeight >= _detectionSetup.correctFaceHeight ? true : false);
|
||||
if(_detectedCounter.Count == 32)
|
||||
if(_detectedCounter.Count == 64)
|
||||
{
|
||||
var trueCounter = _detectedCounter.Count(x => x == true);
|
||||
var falseCounter = _detectedCounter.Count(x => x == false);
|
||||
|
||||
+294
-90
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@ RenderTexture:
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_UseDynamicScale: 1
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
|
||||
@@ -23,7 +23,7 @@ RenderTexture:
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_UseDynamicScale: 1
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
|
||||
@@ -23,7 +23,7 @@ RenderTexture:
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_UseDynamicScale: 1
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_TextureSettings:
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b42a8b971aea3bc4887a25508dd5bfd6
|
||||
guid: 6a18d8dbc3a7d1e428d01902e832c4fa
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4afffb0779811794fb2f9c984ee11dd8
|
||||
guid: 932f1d5fb722bda46994ad2a129f3b21
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7291da3c62bdaec41b715bff66d51c84
|
||||
guid: 79f487e7ebae80949bfe98af4bd35972
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90adb10ac109e254b974a32c5b47a6ad
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
frameRange: 0
|
||||
startFrame: -1
|
||||
endFrame: -1
|
||||
colorSpace: 0
|
||||
deinterlace: 0
|
||||
encodeAlpha: 0
|
||||
flipVertical: 0
|
||||
flipHorizontal: 0
|
||||
importAudio: 1
|
||||
targetSettings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+2963
-55
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -17,7 +17,7 @@ PlayerSettings:
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
m_ShowUnitySplashScreen: 0
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
@@ -76,7 +76,7 @@ PlayerSettings:
|
||||
androidFullscreenMode: 1
|
||||
defaultIsNativeResolution: 1
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 0
|
||||
runInBackground: 1
|
||||
captureSingleScreen: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
|
||||
Reference in New Issue
Block a user