mirror of
https://github.com/Mukheem/TwinTurbine.git
synced 2025-04-20 09:40:33 +02:00
Websocket connections updated
User testing done with both Headsets and collaboration Co-Authored-By: ZeinabBF <145973209+ZeinabBF@users.noreply.github.com> Co-Authored-By: MinaMaddahi <145911367+MinaMaddahi@users.noreply.github.com> Co-Authored-By: Masoomeh <145902196+dalarna2022@users.noreply.github.com>
This commit is contained in:
parent
4cc86e0a42
commit
bce28e1235
Assets
SceneSharing/Materials
GreenButton.matGreenButton.mat.metaPodium_AlbedoTransparency-Green.pngPodium_AlbedoTransparency-Green.png.meta
SharedSpatialAnchors
ProjectSettings
82
Assets/SceneSharing/Materials/GreenButton.mat
Normal file
82
Assets/SceneSharing/Materials/GreenButton.mat
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: GreenButton
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _METALLICGLOSSMAP
|
||||||
|
- _NORMALMAP
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 93cef7b123baace49a4508c4b6f2cec3, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 9f393d521eced1743813048ee4c113a7, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 2800000, guid: d067328b96a9e22468bb2cbd30c51050, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 48b5754585338eb40872d655be3f9d31, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
8
Assets/SceneSharing/Materials/GreenButton.mat.meta
Normal file
8
Assets/SceneSharing/Materials/GreenButton.mat.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 496d80de84119434795ada5b79b544f3
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
After ![]() (image error) Size: 10 KiB |
@ -0,0 +1,147 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9f393d521eced1743813048ee4c113a7
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Windows Store Apps
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -912,7 +912,7 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4890728644967733176}
|
m_GameObject: {fileID: 4890728644967733176}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -0.12994087, y: 0.080064446, z: 1.5369034}
|
m_LocalPosition: {x: -0.014, y: 0.080064446, z: 1.5369034}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@ -1139,6 +1139,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7516989854951799700, guid: d2d6934a666a18d46b8b7a3864dc9f63, type: 3}
|
||||||
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2100000, guid: 496d80de84119434795ada5b79b544f3, type: 2}
|
||||||
- target: {fileID: 7516989854951799702, guid: d2d6934a666a18d46b8b7a3864dc9f63, type: 3}
|
- target: {fileID: 7516989854951799702, guid: d2d6934a666a18d46b8b7a3864dc9f63, type: 3}
|
||||||
propertyPath: _hoverColor.b
|
propertyPath: _hoverColor.b
|
||||||
value: 0.003921569
|
value: 0.003921569
|
||||||
|
@ -964,8 +964,8 @@ Transform:
|
|||||||
m_GameObject: {fileID: 3128949758138181256}
|
m_GameObject: {fileID: 3128949758138181256}
|
||||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||||
m_LocalPosition: {x: 1.42, y: 0, z: 0}
|
m_LocalPosition: {x: 1.42, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1.25, y: 1.3, z: 1.3}
|
m_LocalScale: {x: 0.83, y: 0.86319995, z: 0.86319995}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5280034911807405635}
|
- {fileID: 5280034911807405635}
|
||||||
- {fileID: 7815928270693653670}
|
- {fileID: 7815928270693653670}
|
||||||
|
@ -7,6 +7,7 @@ using System.Security.Cryptography;
|
|||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
using WebSocketSharp;
|
||||||
//https://github.com/GlitchEnzo/NuGetForUnity
|
//https://github.com/GlitchEnzo/NuGetForUnity
|
||||||
// Creating the data structure according to the expected Json
|
// Creating the data structure according to the expected Json
|
||||||
[Serializable]
|
[Serializable]
|
||||||
@ -70,6 +71,10 @@ public class API : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (isButtonPressed)
|
if (isButtonPressed)
|
||||||
{
|
{
|
||||||
|
if (webSocketControllerScript.ws.ReadyState != WebSocketState.Open)
|
||||||
|
{
|
||||||
|
webSocketControllerScript.ws.Connect();
|
||||||
|
}
|
||||||
photonView = PhotonView.Get(this);
|
photonView = PhotonView.Get(this);
|
||||||
photonView.RPC("RPC_VoltageUpdate", RpcTarget.All, webSocketControllerScript.voltageValue.ToString());
|
photonView.RPC("RPC_VoltageUpdate", RpcTarget.All, webSocketControllerScript.voltageValue.ToString());
|
||||||
|
|
||||||
@ -80,6 +85,7 @@ public class API : MonoBehaviour
|
|||||||
{
|
{
|
||||||
webSocketController = GameObject.FindGameObjectWithTag("WebController");
|
webSocketController = GameObject.FindGameObjectWithTag("WebController");
|
||||||
webSocketControllerScript = webSocketController.GetComponent<WebSocketController>();
|
webSocketControllerScript = webSocketController.GetComponent<WebSocketController>();
|
||||||
|
webSocketControllerScript.ConnectWithESP32();
|
||||||
StartCoroutine(GetText());
|
StartCoroutine(GetText());
|
||||||
|
|
||||||
avatar = GameObject.FindGameObjectWithTag("Avatar");
|
avatar = GameObject.FindGameObjectWithTag("Avatar");
|
||||||
@ -150,6 +156,10 @@ public void ExtractDataFromJson(string json)
|
|||||||
latestWD = point.values[0];
|
latestWD = point.values[0];
|
||||||
windDirectionInDirectionTerms = GetWindDirection(latestWD);
|
windDirectionInDirectionTerms = GetWindDirection(latestWD);
|
||||||
//windDirValue.SetText(latestWD.ToString());
|
//windDirValue.SetText(latestWD.ToString());
|
||||||
|
if (webSocketControllerScript.ws.ReadyState != WebSocketState.Open)
|
||||||
|
{
|
||||||
|
webSocketControllerScript.ws.Connect();
|
||||||
|
}
|
||||||
webSocketControllerScript.ws.Send(latestWD.ToString()+":take input");
|
webSocketControllerScript.ws.Send(latestWD.ToString()+":take input");
|
||||||
Debug.Log(latestWD.ToString()+" - Degrees sent to ESP");
|
Debug.Log(latestWD.ToString()+" - Degrees sent to ESP");
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class WebSocketController : MonoBehaviour
|
|||||||
public String voltageValue = "0.0f";
|
public String voltageValue = "0.0f";
|
||||||
|
|
||||||
public void Start(){
|
public void Start(){
|
||||||
ConnectWithESP32();
|
//ConnectWithESP32();
|
||||||
//narrationController.GetComponent<NarrationController>();
|
//narrationController.GetComponent<NarrationController>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +54,7 @@ public class WebSocketController : MonoBehaviour
|
|||||||
};
|
};
|
||||||
ws.Connect();
|
ws.Connect();
|
||||||
Debug.Log("Websocket state - " + ws.ReadyState);
|
Debug.Log("Websocket state - " + ws.ReadyState);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ PlayerSettings:
|
|||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 53
|
bundleVersion: 75
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 0}
|
- {fileID: 0}
|
||||||
- {fileID: 0}
|
- {fileID: 0}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user