From 9ca4d2ed13ee1c8f6f3083406a7f8dc1f6619492 Mon Sep 17 00:00:00 2001 From: Jamal Date: Wed, 16 Oct 2019 14:44:30 -0400 Subject: [PATCH] [#18] Added scripts from open source project for head nodding and head shaking --- Social_AI_XR/Assets/FrameSynthesis.meta | 5 + Social_AI_XR/Assets/FrameSynthesis/MyMath.cs | 21 +++ .../Assets/FrameSynthesis/MyMath.cs.meta | 8 + .../FrameSynthesis/VRGestureRecognizer.meta | 7 + .../VRGestureRecognizer/Example.meta | 9 + .../Example/DebugGraph.meta | 7 + .../Example/DebugGraph/DebugGraph.mat | Bin 0 -> 4444 bytes .../Example/DebugGraph/DebugGraph.mat.meta | 7 + .../Example/DebugGraph/DebugGraph.prefab | Bin 0 -> 6020 bytes .../Example/DebugGraph/DebugGraph.prefab.meta | 7 + .../DebugGraph/DebugGraph.renderTexture | Bin 0 -> 4212 bytes .../DebugGraph/DebugGraph.renderTexture.meta | 7 + .../Example/DebugGraph/DebugGraphRenderer.cs | 78 +++++++++ .../DebugGraph/DebugGraphRenderer.cs.meta | 10 ++ .../Example/DebugGraph/GLLine.mat | Bin 0 -> 4212 bytes .../Example/DebugGraph/GLLine.mat.meta | 7 + .../Example/DebugGraph/GLLine.shader | 16 ++ .../Example/DebugGraph/GLLine.shader.meta | 7 + .../VRGestureRecognizer/Example/Example.unity | Bin 0 -> 18140 bytes .../Example/Example.unity.meta | 4 + .../VRGestureRecognizer/Example/Prefabs.meta | 9 + .../Example/Prefabs/YesNoMessage.prefab | Bin 0 -> 7596 bytes .../Example/Prefabs/YesNoMessage.prefab.meta | 4 + .../VRGestureRecognizer/Example/Scripts.meta | 9 + .../Example/Scripts/YesNoMessage.cs | 31 ++++ .../Example/Scripts/YesNoMessage.cs.meta | 8 + .../Example/Scripts/YesNoMessageGenerator.cs | 36 ++++ .../Scripts/YesNoMessageGenerator.cs.meta | 8 + .../VRGestureRecognizer/Recenterer.cs | 21 +++ .../VRGestureRecognizer/Recenterer.cs.meta | 12 ++ .../VRGestureRecognizer.cs | 118 +++++++++++++ .../VRGestureRecognizer.cs.meta | 11 ++ Social_AI_XR/Assets/ScriptExample.meta | 9 + Social_AI_XR/Assets/ScriptExample/Audio.meta | 5 + .../Assets/ScriptExample/Audio/gesture.wav | Bin 0 -> 24620 bytes .../ScriptExample/Audio/gesture.wav.meta | 12 ++ .../Assets/ScriptExample/Audio/po.wav | Bin 0 -> 8236 bytes .../Assets/ScriptExample/Audio/po.wav.meta | 12 ++ .../Assets/ScriptExample/Materials.meta | 9 + .../Assets/ScriptExample/Materials/Window.mat | Bin 0 -> 4220 bytes .../ScriptExample/Materials/Window.mat.meta | 4 + .../Assets/ScriptExample/Resources.meta | 5 + .../Assets/ScriptExample/Resources/script.txt | 21 +++ .../ScriptExample/Resources/script.txt.meta | 4 + .../Assets/ScriptExample/ScriptExample.unity | Bin 0 -> 27772 bytes .../ScriptExample/ScriptExample.unity.meta | 4 + .../Assets/ScriptExample/Scripts.meta | 9 + .../Assets/ScriptExample/Scripts/Main.cs | 37 ++++ .../Assets/ScriptExample/Scripts/Main.cs.meta | 8 + .../ScriptExample/Scripts/MessageWindow.cs | 63 +++++++ .../Scripts/MessageWindow.cs.meta | 8 + .../ScriptExample/Scripts/ScriptEngine.cs | 161 ++++++++++++++++++ .../Scripts/ScriptEngine.cs.meta | 8 + .../Assets/ScriptExample/Textures.meta | 9 + .../Assets/ScriptExample/Textures/Window.png | Bin 0 -> 23175 bytes .../ScriptExample/Textures/Window.png.meta | 45 +++++ 56 files changed, 900 insertions(+) create mode 100644 Social_AI_XR/Assets/FrameSynthesis.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/MyMath.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/MyMath.cs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.prefab create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.prefab.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.renderTexture create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.renderTexture.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.mat create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.mat.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.shader create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.shader.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Example.unity create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Example.unity.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Prefabs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Prefabs/YesNoMessage.prefab create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Prefabs/YesNoMessage.prefab.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessage.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessage.cs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs.meta create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs create mode 100644 Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs.meta create mode 100644 Social_AI_XR/Assets/ScriptExample.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Audio.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav create mode 100644 Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Audio/po.wav create mode 100644 Social_AI_XR/Assets/ScriptExample/Audio/po.wav.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Materials.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Materials/Window.mat create mode 100644 Social_AI_XR/Assets/ScriptExample/Materials/Window.mat.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Resources.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Resources/script.txt create mode 100644 Social_AI_XR/Assets/ScriptExample/Resources/script.txt.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/ScriptExample.unity create mode 100644 Social_AI_XR/Assets/ScriptExample/ScriptExample.unity.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/Main.cs create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/Main.cs.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/MessageWindow.cs create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/MessageWindow.cs.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs create mode 100644 Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Textures.meta create mode 100644 Social_AI_XR/Assets/ScriptExample/Textures/Window.png create mode 100644 Social_AI_XR/Assets/ScriptExample/Textures/Window.png.meta diff --git a/Social_AI_XR/Assets/FrameSynthesis.meta b/Social_AI_XR/Assets/FrameSynthesis.meta new file mode 100644 index 0000000..1eb9e90 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4d5000a8a89e52c4c8d499939663bf53 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs b/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs new file mode 100644 index 0000000..2fd14b0 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +namespace FrameSynthesis +{ + public class MyMath + { + public static float LinearMap(float value, float s0, float s1, float d0, float d1) + { + return d0 + (value - s0) * (d1 - d0) / (s1 - s0); + } + + public static float WrapDegree(float degree) + { + if (degree > 180f) + { + return degree - 360f; + } + return degree; + } + } +} \ No newline at end of file diff --git a/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs.meta new file mode 100644 index 0000000..22847ea --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/MyMath.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05b33d9d734fa314ba20df196d84992c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer.meta new file mode 100644 index 0000000..8f7a16c --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b345acec6a0958f4db8b092d24d5dfbf +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example.meta new file mode 100644 index 0000000..6f5004c --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2e72abbcf6561b84cb6d0a3e1515b2e6 +folderAsset: yes +timeCreated: 1507562349 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph.meta new file mode 100644 index 0000000..fb8935b --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4e4afd144a0cfab488982b8d964ae759 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat new file mode 100644 index 0000000000000000000000000000000000000000..ebb11babb9101fdb7e96901a1f2f6bb1dec3cfe9 GIT binary patch literal 4444 zcmeH~&2Jk;7{=fAS7-`_@KH)jX`p0_J&U)`Q0iH;$fYvNOM#edhhxogItp z`BG%;y5OJ4Be;m1JTY}@a%ysFb4vd1cDs%P_5=sI-QxV%%gT@i`IX~OSC!zB) z`VXXIJ)Ms;lKhnF(D+uKO_A*BZfP28Tz-NL;JaglklF5GX;BC$!W7wB+n{4 z58)o#IZCc-R#q|h1620+8tw=*yl^Uuo^0=b^@()w49+RTxjQ=O#)Y*^9LY@2I zU!zU?pCnAk?KmGW+>Y~8G@moA^Io!;5_jN_dwSI5Eno)B#?|*;aFuWl5puG<|++(m`qKqq@FW}*R@EpjS z1N=bBPaCdv4uVtXEyG8oU+2sK@9CU1Jfre;6gte~Ir4<|+xgeoDBLT>xTeN=PXugl~p zgMKX%CgiqXZyRp=bp?Dkzp$4=gVpwH+3>tv!%Fmvd-*%4BIB4}Q2x%~X8OB=>h$qb zDK8K3(44!i*sm{-ME2< znpbJKH813_ZkfgvZ|7z^tVIAze!UU5+^zYhTW7x%xa*J#qSy^K{Gfi##kxVvp}BSk zLlwW~)fN`fpY23(yS3&8SY);1bv%jU5Vu@)>&xzz)clB2HNAG(jUq3ScLP7(DTnPX zFN}984bO`qRB>;3wG{f8)T&8MqT?N!TwU+@&DamB-gX?i zB6r?DeC(UGPZvJ=_4AA6>itnm#|RD^!w3u`FpR)30>cRWe-Rjk)SS28sV{`?Rzn|H zM4j~Y8a#lo@ZhLh`Ug9IBvmLKuZvcw~m{(+9ui68iZ7ezSOPfuUSf~)n_cbv0&TKcN| T=;?5HpfEnw%9gkBANT(QQ*7!@ literal 0 HcmV?d00001 diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat.meta new file mode 100644 index 0000000..47b98c3 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.mat.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cc341bb2ea57d724887459ae6c8eeac2 +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.prefab b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.prefab new file mode 100644 index 0000000000000000000000000000000000000000..7f343a7223d7b23943da037d78337fe6da0b2eee GIT binary patch literal 6020 zcmdT|e~cVe9e=ZX*J42_Y6U5td!?e#T6(1fLa^-J^;%Bv=yKP)L=#fxcHiwz-JLmS zW|tm@xFmoz2J{a=AevnLg9J4s{0b^YFd8EfF&di~{=krEtcDmP8WK%iKcDyJ&Ai!e zo9mxW?%mA$%zK~rec$i<{+JbF%Zd<}-Y0~(M2Ib4$6f5%J$A#cv0Y=!W8%NPUe6f@ z=I}+Y_vxE{_?;i!fA#4n9=zi8qwj3`&j`?a(KzILLUeCH!;~Jnc;YliJXsXoXC2WU z0z?|!6rnf?{32k56fcN3G4n&{b9~XlcY)`l=wFb$GdvFzME7S2j}g@Yqs_D7EIb=i z+z}_i{|WRdKi3%VQr3bq26@O zD~j8JQ-1b8km8#EF#6>GAnt?sw{U#W;7dOi=~Kn^LQzfe){z-^Rfd>!*sagUq374}JY5ZZ+-`F_ zvodO!5!2ClHTF7E2@g##z5CSbH~!{=7d|sG{*C7GCttV<@;#i$7{lKG&;GU-_U@91yiXpDESL;oh;(cd&al#6ThH-p=Dq`zt0Q9KRw zx!(~qN45NUVEi|@%~MKoN3Ht>^l7hAg?BMW>+>G;$-hnEYd{O)gvidxm3_F;=k`9_ z=<{Oj@oE(8LFSAxh>c+#K8Sc#XD4X;@XB?HC*1RfPk z=7JzT6xP(UnmpBR%5dDTH)V9Ihj^rH-RnJ5In~+m<;4Xmb?AL7;ooK9C7hFg0OvWmR^gP@5yTyU#C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kyCv#!c*{RMqVe^0-wbMb62F# zhDd$Xr#8Z)J{v=>u|fF1hY#(a-a~U~uL(`ZerOWkM7*1L(%WYPUPJrbOx&AEb{)01 zF)7~?a*ee?cVSYK=`*8*{Mk!*WRX$*Ho_4;jf^<;D#~-ni0>dAsV^ZT?jNKJ?fc)A z9A}KN&L2p=Tj7r--=pv+lJ8acGs*WU{I%ru3jZMaeuaOO{D8tgOMXz{UnM`J@Kwnh z6pm}c>(AkkYu-7oA+Nza;&H0+`47pDD*UJ9#}rdjrD;|U{cRc6UU%)r|UltPWw6I(RD5)KO5n%P=8$xo6#i85iy`;>`9kt0g};-WzTY&m+{$rhoG*xZhqKX9;dJ)rOkq3y3xZn})3&-; zX?DOY@}V@us38gvgGQyGw{`#wm5e;^vn>>h3Sl;PPw>ig%ZwCyAX)=)DG-+faU~FK zfoKmzM|#u>q(l$0$$8I4R>4V%jYE#{fNP7w1dd+oyLeGq=h04w0Vdhb10y2jULI9f&&+ ucOdRS+<~|Q|3?StPi>md&F3??3oQI&&$wx)J3b2G_#^SxWEuXF`1x;9X&7Vx literal 0 HcmV?d00001 diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.renderTexture.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.renderTexture.meta new file mode 100644 index 0000000..cea0f76 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraph.renderTexture.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3d06d1a28a25997448ddf91405f51fa0 +NativeFormatImporter: + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs new file mode 100644 index 0000000..b30db9e --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs @@ -0,0 +1,78 @@ +using UnityEngine; + +namespace FrameSynthesis.VR +{ + public class DebugGraphRenderer : MonoBehaviour + { + [SerializeField] + Material material; + + void OnPostRender() + { + material.SetPass(0); + + GL.LoadOrtho(); + GL.Begin(GL.LINES); + + GL.Color(new Color(1f, 1f, 1f, 0.5f)); + GL.Vertex3(0f, 0.5f, 0f); + GL.Vertex3(1f, 0.5f, 0f); + GL.Vertex3(0.5f, 0f, 0f); + GL.Vertex3(0.5f, 1f, 0f); + + var poseSamples = VRGestureRecognizer.Current.PoseSamples; + + GL.Color(Color.red); + + var prevGraphPosition = Vector2.zero; + var i = 0; + foreach (var poseSample in poseSamples) + { + var graphPosition = GetGraphPositionFromPoseSamplePitch(poseSample); + if (i > 0) + { + GL.Vertex3(prevGraphPosition.x, prevGraphPosition.y, 0f); + GL.Vertex3(graphPosition.x, graphPosition.y, 0f); + } + prevGraphPosition = graphPosition; + i++; + } + + GL.Color(Color.green); + + i = 0; + foreach (var poseSample in poseSamples) + { + var graphPosition = GetGraphPositionFromPoseSampleYaw(poseSample); + if (i > 0) + { + GL.Vertex3(prevGraphPosition.x, prevGraphPosition.y, 0f); + GL.Vertex3(graphPosition.x, graphPosition.y, 0f); + } + prevGraphPosition = graphPosition; + i++; + } + + GL.End(); + } + + Vector2 GetGraphPositionFromPoseSamplePitch(PoseSample poseSample) + { + float x = Time.time - poseSample.timestamp; + float y = ProjectDegreeTo01(poseSample.orientation.eulerAngles.x); + return new Vector2(x, y); + } + + Vector2 GetGraphPositionFromPoseSampleYaw(PoseSample poseSample) + { + float x = ProjectDegreeTo01(poseSample.orientation.eulerAngles.y); + float y = Time.time - poseSample.timestamp; + return new Vector2(x, y); + } + + float ProjectDegreeTo01(float degree) + { + return MyMath.LinearMap(MyMath.WrapDegree(degree), -180f, 180f, 0f, 1f); + } + } +} diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs.meta new file mode 100644 index 0000000..f728352 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/DebugGraphRenderer.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1e42bfd12228bd84cb74deefb7011851 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.mat b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/DebugGraph/GLLine.mat new file mode 100644 index 0000000000000000000000000000000000000000..238a294ea92f7951bf7a5588afac372e53812260 GIT binary patch literal 4212 zcmeH~yKfvt9LIlqFOviU<`IGe&V>-3!NdV$^00lxub9~QoC^^Z)+V=iUUc5IcJ~~+ zTM3Ca1r?%#0*W*UXsAF64TuhRSNqDuqE_dByUxjFd{pt!Mq-kHzLe&_et9j`_9 zg(8n6A~K9CE+VH-jZcn^kBv9R<=;-H<2YbXaH7+xEDTTFzVXlM?F--j`sZ&lTLYcK ze2LR&lOic@>8L>};^61Yyrkbak`@3drOlCj=-&Z<5Z9dHIr$wLM=|F5d=DRk&Wjj7 zkj-^IhwS>LNe|MdEt^y&;5?#M;x-+~VP=N?YVdveY={GpN4XQx7*SAHJB zJ@j)wxw5>hVeN-7jt>~_2sC6G#&~IL(6{1!NHNWO{XA&6_Hz+q`tvZZlB)HVpDg5F zeh!l>v;BP3a9ywWF=kwk!Pr>GW$d(}`XY}jdY^xkarKx~G-v)l0jJI(7#nr|2LB3u z`u`+hN^a-*u;F%|pCU(N{*R*W%rkXH2vhQcs^e!FKVo>%%Fol_IzJ_=j?a)QD_M0M zHC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zgS$-qjGYo5}iWMQ#(3QT&!H=fsWUc4}tlsTg$7().text = yesNo ? YesText : NoText; + } + + void Update() + { + transform.Translate(velocity * Time.deltaTime); + } + } +} diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessage.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessage.cs.meta new file mode 100644 index 0000000..5719941 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessage.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ed8e5ac8a24c7404293a3416019b424c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs new file mode 100644 index 0000000..443cd1c --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs @@ -0,0 +1,36 @@ +using UnityEngine; + +namespace FrameSynthesis.VR.Example +{ + public class YesNoMessageGenerator : MonoBehaviour + { + [SerializeField] + GameObject yesNoMessagePrefab; + + void Start() + { + VRGestureRecognizer.Current.NodHandler += OnNod; + VRGestureRecognizer.Current.HeadshakeHandler += OnHeadshake; + } + + void OnNod() + { + InstantiateYesNoMessage(true); + } + + void OnHeadshake() + { + InstantiateYesNoMessage(false); + } + + void InstantiateYesNoMessage(bool yesNo) + { + var go = Instantiate(yesNoMessagePrefab); + go.GetComponent().Initialize(yesNo); + + go.transform.SetParent(Camera.main.transform); + go.transform.localPosition = new Vector3(0f, 0f, 10f); + go.transform.localRotation = Quaternion.identity; + } + } +} diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs.meta new file mode 100644 index 0000000..2f56e31 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Example/Scripts/YesNoMessageGenerator.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 278baf2913811094892291487316f023 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs new file mode 100644 index 0000000..c368b05 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using UnityEngine.XR; + +namespace FrameSynthesis.VR +{ + public class Recenterer : MonoBehaviour + { + void Start() + { + XRDevice.SetTrackingSpaceType(TrackingSpaceType.Stationary); + } + + void Update() + { + if (Input.GetKeyDown(KeyCode.R)) + { + InputTracking.Recenter(); + } + } + } +} diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs.meta new file mode 100644 index 0000000..d2d1d6f --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/Recenterer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0fd0fb61c246f114eae3cb1d0477a38f +timeCreated: 1507555191 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs new file mode 100644 index 0000000..de31852 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs @@ -0,0 +1,118 @@ +using UnityEngine; +using UnityEngine.XR; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace FrameSynthesis.VR +{ + public struct PoseSample + { + public float timestamp; + public Quaternion orientation; + public Vector3 eulerAngles; + + public PoseSample(float timestamp, Quaternion orientation) + { + this.timestamp = timestamp; + this.orientation = orientation; + + eulerAngles = orientation.eulerAngles; + eulerAngles.x = MyMath.WrapDegree(eulerAngles.x); + eulerAngles.y = MyMath.WrapDegree(eulerAngles.y); + } + } + + public class VRGestureRecognizer : MonoBehaviour + { + public static VRGestureRecognizer Current { get; private set; } + + [SerializeField] + float recognitionInterval = 0.5f; + + public event Action NodHandler; + public event Action HeadshakeHandler; + + public Queue PoseSamples { get; } = new Queue(); + + float prevGestureTime; + + void Awake() + { + Current = this; + } + + void Update() + { + var orientation = InputTracking.GetLocalRotation(XRNode.Head); + + // Record orientation + PoseSamples.Enqueue(new PoseSample(Time.time, orientation)); + if (PoseSamples.Count >= 120) + { + PoseSamples.Dequeue(); + } + + // Recognize gestures + RecognizeNod(); + RecognizeHeadshake(); + } + + IEnumerable PoseSamplesWithin(float startTime, float endTime) + { + return PoseSamples.Where(sample => + sample.timestamp < Time.time - startTime && + sample.timestamp >= Time.time - endTime); + } + + void RecognizeNod() + { + try + { + var averagePitch = PoseSamplesWithin(0.2f, 0.4f).Average(sample => sample.eulerAngles.x); + var maxPitch = PoseSamplesWithin(0.01f, 0.2f).Max(sample => sample.eulerAngles.x); + var pitch = PoseSamples.First().eulerAngles.x; + + if (maxPitch - averagePitch > 10f && + Mathf.Abs(pitch - averagePitch) < 5f) + { + if (prevGestureTime < Time.time - recognitionInterval) + { + prevGestureTime = Time.time; + NodHandler?.Invoke(); + } + } + } + catch (InvalidOperationException) + { + // PoseSamplesWithin contains no entry + } + } + + void RecognizeHeadshake() + { + try + { + var averageYaw = PoseSamplesWithin(0.2f, 0.4f).Average(sample => sample.eulerAngles.y); + var maxYaw = PoseSamplesWithin(0.01f, 0.2f).Max(sample => sample.eulerAngles.y); + var minYaw = PoseSamplesWithin(0.01f, 0.2f).Min(sample => sample.eulerAngles.y); + var yaw = PoseSamples.First().eulerAngles.y; + + if ((maxYaw - averageYaw > 10f || averageYaw - minYaw > 10f) && + Mathf.Abs(yaw - averageYaw) < 5f) + { + if (prevGestureTime < Time.time - recognitionInterval) + { + prevGestureTime = Time.time; + HeadshakeHandler?.Invoke(); + } + } + } + catch (InvalidOperationException) + { + // PoseSamplesWithin contains no entry + } + } + } +} + diff --git a/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs.meta b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs.meta new file mode 100644 index 0000000..0939172 --- /dev/null +++ b/Social_AI_XR/Assets/FrameSynthesis/VRGestureRecognizer/VRGestureRecognizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f90909e5f08798444aa89e4fcc2d9dea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/ScriptExample.meta b/Social_AI_XR/Assets/ScriptExample.meta new file mode 100644 index 0000000..7d91471 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c6b532bb92ca88846aec1a66b60a10e1 +folderAsset: yes +timeCreated: 1507562069 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/ScriptExample/Audio.meta b/Social_AI_XR/Assets/ScriptExample/Audio.meta new file mode 100644 index 0000000..a27110a --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Audio.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 628ed10993205bf44afcbaf6d6039bf5 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav b/Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav new file mode 100644 index 0000000000000000000000000000000000000000..b75b92e31284e0c535e36614157a82f292b81c78 GIT binary patch literal 24620 zcmeI4yNjJw6vfY-yhQWTfKd??u}mYRv55*XBE~`mtpo#VAy@=b2T37VNV+L(A_NSA z5F+^l>=g}Sq1f2T5ET>ONoJ07If2b)JzD8D`6lIk@!2Cs9(}Ep zSDt$L={Mg#@$lYK%B(Dv!=IG0_rg-yTK1OLkDWMH*6+M}@5Xg@Wif4>+-@#LKf5v| ze@gcJb8cq-W`6dmcRzNc|B7#?-RLdwWbB6TW$upMjNQ!N0lfvDjQ57`W$td~-E8J( zpL+LWH@D_HKi(VtdmX#^?{?!!nBGqR-{7bB&e)CK&)ChaxtrVR_d5Tq`nQP5l)G7k zjZfyCsn}C-=bvUO_Eg;Q%=sOhYR`*s=Xdi{`DqchC*^bz?s(?Bt-MJ;-1L*C@Wj({$_d=fO+Rshc0Dbpnu1Ag`U%_K z@wA+JQciQzPr2zQPr}sGa*A#3M+Zu*H6wCia()f7x}(@)s;j;H0+ zlX9Aye#%Whc@n0cmQ!qNCpZ11DLnDCoN@wpbJI_ppj}VPsit6(n|{K!cRVepo`h*` z`w83L@ia_54O1j|2MOBoBuq7lCrI!Pr)byHFx4bXu2@<@+DcbckOf`uoNYD-^ zXjhYXqDegA6zy_~b~OnTP2mX=yu&Hl^)yU1i6=f_6EDyPARtCvX?r-r*GPdQwg~fxEfcpE!lPeOlb$1nx#_ zV<%4G?#77i7AJ6b5$^mhr*L->HYad*D(?JWn~FUZcRX``N5-CGAB*f_em9!^(<1CX zEp9Br9nYM%6DUy?yo4&j!bm;D;OM9B$*&RB%>*%hF zS1(@u>bIt^e-C~3N7Dy?hR)p4^y7}ECwGKC+TL{E_NL`+%iG?%*7U=*rsuCWUAP|F zb))Ibme5OEns#n!`g|#Ldg=7i@zvw2=Wgn|)zFT$rpMMoAJ3ZJoi)8N3q3PyIxuV6 zH`_P+d97({ZMwfU9jKv0wdvCmI$N5SOVfKLbh4Z*r|PNt{!J~{(1*3@Tx~jE&({}9 z({rWia0xw8njSAr2g||oMQyrNo4%<{-`3Fgwds)(dZ;u#SehOvq5WllS*a`a@=g6z zL%-CfUu)BqdZq3uO}k6e&Jwz-G~HR6{;H_IYtug!wY@ZLE1|9H-`>e|qlQ*1YORKr p*1rpMqpBPHS^tXB@iR6sHZV3YHZV3YHZV3YHZV3YHt;{+z`tuWAtnF- literal 0 HcmV?d00001 diff --git a/Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav.meta b/Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav.meta new file mode 100644 index 0000000..9838be6 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Audio/gesture.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ec4611231a033f7488b933bbc0b771c7 +AudioImporter: + serializedVersion: 4 + format: 0 + quality: .5 + stream: 0 + 3D: 0 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Audio/po.wav b/Social_AI_XR/Assets/ScriptExample/Audio/po.wav new file mode 100644 index 0000000000000000000000000000000000000000..36fb00176f0a84adc72c43358bf290229bd08130 GIT binary patch literal 8236 zcmeI%JxE(o7{>AEUSr}{Fo>T;s7S#@iVCixpn_BdJ17o;2Gl|5q_a2`oZMU;0)n7} z;3Bx_;?RN)4uVkJR75dBTca_r_woc@#6b#Y>N)qfUJmE|zvKBjG&uOF1(@g?ADH<* z-;w~}!AJiFkl6AOK>|~$`4obGlJ(}LFU>Q5%VfRzTc$7FJuGlTHunr?H(QgZ+1%9iG`oG9dxo={ zt;y4DZt8lP-Twd7bK#1*uGRhxb==ZoMr~)ev%~S>cxM%Tu2j7hG*hlt%ji5ty)m^G zrN(Gu^dfhWn|)M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.mat.meta new file mode 100644 index 0000000..87de50a --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Materials/Window.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a838c0812fc77414b80a3f0e2f2b4ebb +NativeFormatImporter: + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Resources.meta b/Social_AI_XR/Assets/ScriptExample/Resources.meta new file mode 100644 index 0000000..021e2b5 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Resources.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4e2aee29186805346a2b1bd7cb093cb6 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Resources/script.txt b/Social_AI_XR/Assets/ScriptExample/Resources/script.txt new file mode 100644 index 0000000..9e3ed92 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Resources/script.txt @@ -0,0 +1,21 @@ +delay 500 + +*start +わたしを お城まで 連れて +帰ってくださいますのね? +gesture *yes, *no + +*yes +delay 300 +うれしゅうございます。 +ぽっ…。 +delay 1500 +goto *start + +*no +delay 300 +そんな ひどい…。 +delay 1500 +goto *start + + diff --git a/Social_AI_XR/Assets/ScriptExample/Resources/script.txt.meta b/Social_AI_XR/Assets/ScriptExample/Resources/script.txt.meta new file mode 100644 index 0000000..9d65749 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Resources/script.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2498aa33a8c99dd4ab8280dd0615337f +TextScriptImporter: + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/ScriptExample.unity b/Social_AI_XR/Assets/ScriptExample/ScriptExample.unity new file mode 100644 index 0000000000000000000000000000000000000000..7dbf960665519ea85f76234b6438476a12f3210c GIT binary patch literal 27772 zcmeHQ3wT^rwLX)SS1Ahh0R@C)K&YVn2D)@cZ z@9X}$GkgDMowfH~XRW=~-se%rIb)gQWY##2vzOzX(T87W*36@in=xy~tfRY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`U6tJHffcHHUdFsCTG9CI#n4 z{sw?*=a7z>dTEbS&I$HKd7wU8vb3}7AAjsIx&}=N7H+%kaKXmF zNKe#X?W@kU#C0xanfAA=ZN5C2iTxvf+u>Y<0h~LRW(zK2f)weZX)Ik)KcKYyRhtd* zKAS?ZpA{{cZ|RwTK`*v zB``m#%QDXJ5y!dxw%h8Ms~sby9w!fGULzeJiX&2#o&^7F`VpOo08x2z?tL$=3uRG_ zPgvK(`W@+3MOE!bV<#TexQAtpi&)mUiDiweSf+j;zBLa@ycag4u^o8_sWkV7^|YBM)gimjl;He-2;9>N!yE_$FZp1%dw!nk~v-LJM=z~W)PdJJj1bHm`?Q-@ydzB z!@3sMukbn5%6k1m$L!onq?Ayc{b3xl+Qu<_&`ytS>sR^5m@upGJmpmg#YEfU5gen= z$hwPmjD-5;dMS?muRXWC_TZVimS9=e8Z7Htgk_H3-XeQXVg~ZmH4)1}l5tkn#a=j{ zGwHg7A`k zdog#Dx2|8=U+J@qyK>Iv9R3zET6SIatvM@LVTm$X5eP&=)UH;sN)^&{Hv zKg6D_n{Z6uL+97NaN;Zboi+F7D=$vGxpq3*`e;8!HnVX2AjIo-uh1Uo=YmVKpeo~o6{jH@N x^N+R{olm(h5Z^sMW= message.Length) + { + running = false; + scriptEngine.NextCommand(); + return; + } + + textMesh.text = message.Substring(0, cursor + 1); + + if (prevCursor != cursor) + { + prevCursor = cursor; + var letter = message[cursor]; + if (letter != 32 && letter != 10) + { + audioSource.Play(); + } + } + } + + void OnShowMessage(string message) + { + this.message = message; + messageStartTime = Time.time; + running = true; + prevCursor = -1; + } + } +} diff --git a/Social_AI_XR/Assets/ScriptExample/Scripts/MessageWindow.cs.meta b/Social_AI_XR/Assets/ScriptExample/Scripts/MessageWindow.cs.meta new file mode 100644 index 0000000..4f70a49 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Scripts/MessageWindow.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6cad35a15e546e54d93a35eed9664799 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs b/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs new file mode 100644 index 0000000..4fcc794 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs @@ -0,0 +1,161 @@ +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace ScriptExample +{ + public class ScriptEngine : MonoBehaviour + { + public bool IsWaitingYesNo => state == State.WaitingYesNo; + + public event Action ShowMessageHandler; + + int cursor; + string[] lines; + + readonly string[] commands = { + "gesture", + "delay", + "goto" + }; + + public enum State + { + Normal, + WaitingYesNo, + } + + State state; + + string yesLabel; + string noLabel; + + readonly Dictionary labels = new Dictionary(); + + void Start() + { + var textAsset = Resources.Load("script") as TextAsset; + lines = textAsset.text.Split('\n'); + + for (var i = 0; i < lines.Length; i++) + { + // Trim + var line = lines[i].Trim(); + + // Comment + if (line.StartsWith(";")) + { + line = ""; + } + + // Label + if (line.StartsWith("*")) + { + labels.Add(line.Substring(1), i); + line = ""; + } + lines[i] = line; + } + + state = State.Normal; + + NextCommand(); + } + + string GetCommand(string line) + { + foreach (var command in commands) + { + if (line.StartsWith(command)) + { + return command; + } + } + return ""; + } + + public void NextCommand() + { + var command = GetCommand(lines[cursor]); + switch (command) + { + case "gesture": + var r = new Regex(@"^gesture\s+\*(\w+)\s*,\s*\*(\w+)$"); + var m = r.Match(lines[cursor]); + + if (m.Groups.Count == 3) + { + yesLabel = m.Groups[1].ToString(); + noLabel = m.Groups[2].ToString(); + state = State.WaitingYesNo; + return; + } + throw new Exception("Syntax error"); + + case "delay": + r = new Regex(@"^delay\s+(\d+)$"); + m = r.Match(lines[cursor]); + + if (m.Groups.Count == 2) + { + cursor++; + var time = int.Parse(m.Groups[1].ToString()); + Invoke(nameof(NextCommand), time / 1000f); + return; + } + throw new Exception("Syntax error"); + + case "goto": + r = new Regex(@"^goto\s+\*(\w+)$"); + m = r.Match(lines[cursor]); + + if (m.Groups.Count == 2) + { + var label = m.Groups[1].ToString(); + GoTo(label); + return; + } + throw new Exception("Syntax error"); + } + + var message = ""; + + while (GetCommand(lines[cursor]) == "") + { + string line = lines[cursor]; + if (line != "") + { + message += line + "\n"; + } + cursor++; + } + + ShowMessageHandler?.Invoke(message); + } + + public void GoTo(string label) + { + cursor = labels[label]; + NextCommand(); + } + + public void AnswerYes() + { + if (state == State.WaitingYesNo) + { + state = State.Normal; + GoTo(yesLabel); + } + } + + public void AnswerNo() + { + if (state == State.WaitingYesNo) + { + state = State.Normal; + GoTo(noLabel); + } + } + } +} diff --git a/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs.meta b/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs.meta new file mode 100644 index 0000000..673ae34 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Scripts/ScriptEngine.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ddceca155a8ec394187ad9218fa477a8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Social_AI_XR/Assets/ScriptExample/Textures.meta b/Social_AI_XR/Assets/ScriptExample/Textures.meta new file mode 100644 index 0000000..7c18262 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: acb34574d9e767c4c99ae237d2ffa66b +folderAsset: yes +timeCreated: 1507562121 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Social_AI_XR/Assets/ScriptExample/Textures/Window.png b/Social_AI_XR/Assets/ScriptExample/Textures/Window.png new file mode 100644 index 0000000000000000000000000000000000000000..a70f4a7ff0e545246defc00beef6b031406d9051 GIT binary patch literal 23175 zcmeI42{@GN`^R5Pg(63bN-~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O5kw+Pu({F(ueC&@nYeuw7nHwXf^-7Cs6G#TE0BO!tT1C zlOtGsGjZ6xqRGi>)FJKlEUHCx{yWwj*{6EmMk}^|F%|_ZBop;_orz)F7Qn|yjZ z)1KO8l*M45NJS>Kr}&krq>it14F{F>W)CZqv8<=%T7sQB#qNH!+HaT87p@G(RWNQ? ztVvjtkRLAzlLGF~E6FSwDbXsi#V!A8das?zYVuv1LvP{USN`|B;|G12*V6B{hL6kv cfUz+FU_Gg1ptQkD4fFyGH*M2P(Xl`9KTFQP-~a#s literal 0 HcmV?d00001 diff --git a/Social_AI_XR/Assets/ScriptExample/Textures/Window.png.meta b/Social_AI_XR/Assets/ScriptExample/Textures/Window.png.meta new file mode 100644 index 0000000..370ed14 --- /dev/null +++ b/Social_AI_XR/Assets/ScriptExample/Textures/Window.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: 81530f30f7bba05429a1d73be2333835 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: