Compare commits
77 Commits
8928ab9922
...
docs/kicad
Author | SHA1 | Date | |
---|---|---|---|
5f057c2278 | |||
29e1c1b73a | |||
b9b6d71ba0 | |||
b0c90360b8 | |||
f2bd530d4e | |||
d814d16733 | |||
ddefd7e15f | |||
b62d0d74c6 | |||
79d5ecde9e | |||
e4cf250092 | |||
fa43f37279 | |||
2708df56a6 | |||
19b716aaf2 | |||
95aabd8903 | |||
a34b4acbc0 | |||
3a45e8e9b5 | |||
107ca935b8 | |||
922d6e85f0 | |||
2b4e0fd9ea | |||
d69dc54f48 | |||
36dd744da5 | |||
e939ee757d | |||
2b318c00f9 | |||
8477942be8 | |||
493e571e32 | |||
84cd9912c9 | |||
6744680a1f | |||
19ae3cf10f | |||
cd677468ae | |||
7574061bec | |||
edfdc6107f | |||
4fe37fdf22 | |||
4f18142cc6 | |||
d8ed35483f | |||
c89b6d1479 | |||
d67e4a9da8 | |||
cc583d0947 | |||
60ec85a572 | |||
b26a27dc5b | |||
fa6662e885 | |||
a47ec78e1c | |||
7b0d866d6f | |||
db3ce5025b | |||
f01844bed8 | |||
e002adacdd | |||
a533973e9c | |||
aed8706921 | |||
e8b420f3f7 | |||
5b7f0f3d3e | |||
4cafc40d61 | |||
69bd4f57e3 | |||
c40be321fb | |||
90b9ca279c | |||
17b344732f | |||
9b0b5bedd8 | |||
e088b4e304 | |||
b3da67f31e | |||
884169e745 | |||
36bdb86343 | |||
5784e38fbb | |||
9811022b76 | |||
a150d1c17f | |||
96ebd89dd3 | |||
370a16441b | |||
71a07cc552 | |||
b1787886c6 | |||
75018ee6cd | |||
782af8c90d | |||
ac5cb75407 | |||
9b6c1beb8d | |||
2fefc9f96d | |||
d63eff681e | |||
ca61a66ca6 | |||
3a37f93ef7 | |||
7b5d4a071b | |||
2e4b24df10 | |||
b1728b0509 |
15
AR/.gitattributes
vendored
15
AR/.gitattributes
vendored
@ -31,21 +31,6 @@
|
|||||||
# Fonts
|
# Fonts
|
||||||
*.otf filter=lfs diff=lfs merge=lfs -text
|
*.otf filter=lfs diff=lfs merge=lfs -text
|
||||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
# Images
|
|
||||||
*.bmp filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.exr filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.gif filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.hdr filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.iff filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.pict filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.png filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.psd filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.tga filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.tif filter=lfs diff=lfs merge=lfs -text
|
|
||||||
*.tiff filter=lfs diff=lfs merge=lfs -text
|
|
||||||
|
|
||||||
|
|
||||||
# Collapse Unity-generated files on GitHub
|
# Collapse Unity-generated files on GitHub
|
||||||
*.asset linguist-generated
|
*.asset linguist-generated
|
||||||
|
8
AR/Assets/Editor.meta
generated
Normal file
8
AR/Assets/Editor.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 833e12f1d550f2c4b96eb6fa3a5ea199
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/Editor/Migration.meta
generated
Normal file
8
AR/Assets/Editor/Migration.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 784c1ed2aa16453488a41efb0eeae8ce
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
477
AR/Assets/Editor/Migration/AddVuforiaEnginePackage.cs
Normal file
477
AR/Assets/Editor/Migration/AddVuforiaEnginePackage.cs
Normal file
@ -0,0 +1,477 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[InitializeOnLoad]
|
||||||
|
public class AddVuforiaEnginePackage
|
||||||
|
{
|
||||||
|
static readonly string sPackagesPath = Path.Combine(Application.dataPath, "..", "Packages");
|
||||||
|
static readonly string sManifestJsonPath = Path.Combine(sPackagesPath, "manifest.json");
|
||||||
|
const string VUFORIA_VERSION = "10.14.4";
|
||||||
|
const string VUFORIA_TAR_FILE_DIR = "Assets/Editor/Migration/";
|
||||||
|
const string DEPENDENCIES_DIR = "Assets/Resources/VuforiaDependencies";
|
||||||
|
const string PACKAGES_RELATIVE_PATH = "Packages";
|
||||||
|
const string MRTK_PACKAGE = "com.microsoft.mixedreality.toolkit.foundation";
|
||||||
|
|
||||||
|
static readonly ScopedRegistry sVuforiaRegistry = new ScopedRegistry
|
||||||
|
{
|
||||||
|
name = "Vuforia",
|
||||||
|
url = "https://registry.packages.developer.vuforia.com/",
|
||||||
|
scopes = new[] { "com.ptc.vuforia" }
|
||||||
|
};
|
||||||
|
|
||||||
|
static AddVuforiaEnginePackage()
|
||||||
|
{
|
||||||
|
if (Application.isBatchMode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var manifest = Manifest.JsonDeserialize(sManifestJsonPath);
|
||||||
|
|
||||||
|
var packages = GetPackageDescriptions();
|
||||||
|
|
||||||
|
if (!packages.All(p => IsVuforiaUpToDate(manifest, p.BundleId)))
|
||||||
|
DisplayAddPackageDialog(manifest, packages);
|
||||||
|
|
||||||
|
ResolveDependencies(manifest);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ResolveDependenciesSilent()
|
||||||
|
{
|
||||||
|
var manifest = Manifest.JsonDeserialize(sManifestJsonPath);
|
||||||
|
|
||||||
|
var packages = GetDependencyDescriptions();
|
||||||
|
if (packages != null && packages.Count > 0)
|
||||||
|
MoveDependencies(manifest, packages);
|
||||||
|
|
||||||
|
CleanupDependenciesFolder();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ResolveDependencies(Manifest manifest)
|
||||||
|
{
|
||||||
|
var packages = GetDependencyDescriptions();
|
||||||
|
if (packages != null && packages.Count > 0)
|
||||||
|
DisplayDependenciesDialog(manifest, packages);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool IsVuforiaUpToDate(Manifest manifest, string bundleId)
|
||||||
|
{
|
||||||
|
var dependencies = manifest.Dependencies.Split(',').ToList();
|
||||||
|
var upToDate = false;
|
||||||
|
|
||||||
|
if(dependencies.Any(d => d.Contains(bundleId) && d.Contains("file:")))
|
||||||
|
upToDate = IsUsingRightFileVersion(manifest, bundleId);
|
||||||
|
|
||||||
|
return upToDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool IsUsingRightFileVersion(Manifest manifest, string bundleId)
|
||||||
|
{
|
||||||
|
var dependencies = manifest.Dependencies.Split(',').ToList();
|
||||||
|
return dependencies.Any(d => d.Contains(bundleId) && d.Contains("file:") && VersionNumberIsTheLatestTarball(d));
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool VersionNumberIsTheLatestTarball(string package)
|
||||||
|
{
|
||||||
|
var version = package.Split('-');
|
||||||
|
if (version.Length >= 2)
|
||||||
|
{
|
||||||
|
version[1] = version[1].TrimEnd(".tgz\"".ToCharArray());
|
||||||
|
return IsCurrentVersionHigher(version[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool IsCurrentVersionHigher(string currentVersionString)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(currentVersionString) || string.IsNullOrEmpty(VUFORIA_VERSION))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var currentVersion = TryConvertStringToVersion(currentVersionString);
|
||||||
|
var updatingVersion = TryConvertStringToVersion(VUFORIA_VERSION);
|
||||||
|
|
||||||
|
if (currentVersion >= updatingVersion)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Version TryConvertStringToVersion(string versionString)
|
||||||
|
{
|
||||||
|
Version res;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
res = new Version(versionString);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return new Version();
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Version(res.Major, res.Minor, res.Build);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DisplayAddPackageDialog(Manifest manifest, IEnumerable<PackageDescription> packages)
|
||||||
|
{
|
||||||
|
if (EditorUtility.DisplayDialog("Add Vuforia Engine Package",
|
||||||
|
$"Would you like to update your project to include the Vuforia Engine {VUFORIA_VERSION} package from the unitypackage?\n" +
|
||||||
|
$"If an older Vuforia Engine package is already present in your project it will be upgraded to version {VUFORIA_VERSION}\n\n",
|
||||||
|
"Update", "Cancel"))
|
||||||
|
{
|
||||||
|
foreach (var package in packages)
|
||||||
|
{
|
||||||
|
MovePackageFile(VUFORIA_TAR_FILE_DIR, package.FileName);
|
||||||
|
UpdateManifest(manifest, package.BundleId, package.FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DisplayDependenciesDialog(Manifest manifest, IEnumerable<PackageDescription> packages)
|
||||||
|
{
|
||||||
|
if (EditorUtility.DisplayDialog("Add Sample Dependencies",
|
||||||
|
"Would you like to update your project to include all of its dependencies?\n" +
|
||||||
|
"If a different version of the package is already present, it will be deleted.\n\n",
|
||||||
|
"Update", "Cancel"))
|
||||||
|
{
|
||||||
|
MoveDependencies(manifest, packages);
|
||||||
|
CleanupDependenciesFolder();
|
||||||
|
if (ShouldProjectRestart(packages))
|
||||||
|
DisplayRestartDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DisplayRestartDialog()
|
||||||
|
{
|
||||||
|
if (EditorUtility.DisplayDialog("Restart Unity Editor",
|
||||||
|
"Due to a Unity lifecycle issue, this project needs to be closed and re-opened " +
|
||||||
|
"after importing this Vuforia Engine sample.\n\n",
|
||||||
|
"Restart", "Cancel"))
|
||||||
|
{
|
||||||
|
RestartEditor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PackageDescription> GetPackageDescriptions()
|
||||||
|
{
|
||||||
|
var tarFilePaths = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), VUFORIA_TAR_FILE_DIR)).Where(f => f.EndsWith(".tgz"));
|
||||||
|
|
||||||
|
// Define a regular expression for repeated words.
|
||||||
|
var rx = new Regex(@"(([a-z]+)(\.[a-z]+)*)\-((\d+)\.(\d+)\.(\d+))", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
var packageDescriptions = new List<PackageDescription>();
|
||||||
|
|
||||||
|
foreach (var filePath in tarFilePaths)
|
||||||
|
{
|
||||||
|
var fileName = Path.GetFileName(filePath);
|
||||||
|
// Find matches.
|
||||||
|
var matches = rx.Matches(fileName);
|
||||||
|
|
||||||
|
// Report on each match.
|
||||||
|
foreach (Match match in matches)
|
||||||
|
{
|
||||||
|
var groups = match.Groups;
|
||||||
|
var bundleId = groups[1].Value;
|
||||||
|
var versionString = groups[4].Value;
|
||||||
|
|
||||||
|
if (string.Equals(versionString, VUFORIA_VERSION))
|
||||||
|
{
|
||||||
|
packageDescriptions.Add(new PackageDescription()
|
||||||
|
{
|
||||||
|
BundleId = bundleId,
|
||||||
|
FileName = fileName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return packageDescriptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<PackageDescription> GetDependencyDescriptions()
|
||||||
|
{
|
||||||
|
var dependencyDirectory = Path.Combine(Directory.GetCurrentDirectory(), DEPENDENCIES_DIR);
|
||||||
|
if (!Directory.Exists(dependencyDirectory))
|
||||||
|
return null;
|
||||||
|
var tarFilePaths = Directory.GetFiles(dependencyDirectory).Where(f => f.EndsWith(".tgz"));
|
||||||
|
|
||||||
|
// Define a regular expression for repeated words.
|
||||||
|
var rx = new Regex(@"(([a-z]+)(\.[a-z]+)+)(\-((\d+)\.(\d+)\.(\d+)))*", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
var packageDescriptions = new List<PackageDescription>();
|
||||||
|
|
||||||
|
foreach (var filePath in tarFilePaths)
|
||||||
|
{
|
||||||
|
var fileName = Path.GetFileName(filePath);
|
||||||
|
// Find matches.
|
||||||
|
var matches = rx.Matches(fileName);
|
||||||
|
|
||||||
|
// Report on each match.
|
||||||
|
foreach (Match match in matches)
|
||||||
|
{
|
||||||
|
var groups = match.Groups;
|
||||||
|
var bundleId = groups[1].Value;
|
||||||
|
bundleId = bundleId.Replace(".tgz", "");
|
||||||
|
|
||||||
|
packageDescriptions.Add(new PackageDescription
|
||||||
|
{
|
||||||
|
BundleId = bundleId,
|
||||||
|
FileName = fileName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return packageDescriptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void MoveDependencies(Manifest manifest, IEnumerable<PackageDescription> packages)
|
||||||
|
{
|
||||||
|
foreach (var package in packages)
|
||||||
|
{
|
||||||
|
RemoveDependency(manifest, package.BundleId, package.FileName);
|
||||||
|
MovePackageFile(DEPENDENCIES_DIR, package.FileName);
|
||||||
|
UpdateManifest(manifest, package.BundleId, package.FileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void MovePackageFile(string folder, string fileName)
|
||||||
|
{
|
||||||
|
var sourceFile = Path.Combine(Directory.GetCurrentDirectory(), folder, fileName);
|
||||||
|
var destFile = Path.Combine(Directory.GetCurrentDirectory(), PACKAGES_RELATIVE_PATH, fileName);
|
||||||
|
File.Copy(sourceFile, destFile, true);
|
||||||
|
File.Delete(sourceFile);
|
||||||
|
File.Delete(sourceFile + ".meta");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UpdateManifest(Manifest manifest, string bundleId, string fileName)
|
||||||
|
{
|
||||||
|
//remove existing, outdated NPM scoped registry if present
|
||||||
|
var registries = manifest.ScopedRegistries.ToList();
|
||||||
|
if (registries.Contains(sVuforiaRegistry))
|
||||||
|
{
|
||||||
|
registries.Remove(sVuforiaRegistry);
|
||||||
|
manifest.ScopedRegistries = registries.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
//add specified vuforia version via Git URL
|
||||||
|
SetVuforiaVersion(manifest, bundleId, fileName);
|
||||||
|
|
||||||
|
manifest.JsonSerialize(sManifestJsonPath);
|
||||||
|
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RemoveDependency(Manifest manifest, string bundleId, string fileName)
|
||||||
|
{
|
||||||
|
var destFile = Path.Combine(Directory.GetCurrentDirectory(), PACKAGES_RELATIVE_PATH, fileName);
|
||||||
|
if (File.Exists(destFile))
|
||||||
|
File.Delete(destFile);
|
||||||
|
|
||||||
|
// remove existing
|
||||||
|
var dependencies = manifest.Dependencies.Split(',').ToList();
|
||||||
|
for (var i = 0; i < dependencies.Count; i++)
|
||||||
|
{
|
||||||
|
if (dependencies[i].Contains(bundleId))
|
||||||
|
{
|
||||||
|
dependencies.RemoveAt(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
manifest.Dependencies = string.Join(",", dependencies);
|
||||||
|
|
||||||
|
manifest.JsonSerialize(sManifestJsonPath);
|
||||||
|
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CleanupDependenciesFolder()
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(DEPENDENCIES_DIR))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Directory.Delete(DEPENDENCIES_DIR);
|
||||||
|
File.Delete(DEPENDENCIES_DIR + ".meta");
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ShouldProjectRestart(IEnumerable<PackageDescription> packages)
|
||||||
|
{
|
||||||
|
return packages.Any(p => p.BundleId == MRTK_PACKAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RestartEditor()
|
||||||
|
{
|
||||||
|
EditorApplication.OpenProject(Directory.GetCurrentDirectory());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SetVuforiaVersion(Manifest manifest, string bundleId, string fileName)
|
||||||
|
{
|
||||||
|
var dependencies = manifest.Dependencies.Split(',').ToList();
|
||||||
|
|
||||||
|
var versionEntry = $"\"file:{fileName}\"";
|
||||||
|
var versionSet = false;
|
||||||
|
for (var i = 0; i < dependencies.Count; i++)
|
||||||
|
{
|
||||||
|
if (!dependencies[i].Contains(bundleId))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var kvp = dependencies[i].Split(':');
|
||||||
|
dependencies[i] = kvp[0] + ": " + versionEntry;
|
||||||
|
versionSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!versionSet)
|
||||||
|
dependencies.Insert(0, $"\n \"{bundleId}\": {versionEntry}");
|
||||||
|
|
||||||
|
manifest.Dependencies = string.Join(",", dependencies);
|
||||||
|
}
|
||||||
|
|
||||||
|
class Manifest
|
||||||
|
{
|
||||||
|
const int INDEX_NOT_FOUND = -1;
|
||||||
|
const string DEPENDENCIES_KEY = "\"dependencies\"";
|
||||||
|
|
||||||
|
public ScopedRegistry[] ScopedRegistries;
|
||||||
|
public string Dependencies;
|
||||||
|
|
||||||
|
public void JsonSerialize(string path)
|
||||||
|
{
|
||||||
|
var jsonString = GetJsonString();
|
||||||
|
|
||||||
|
var startIndex = GetDependenciesStart(jsonString);
|
||||||
|
var endIndex = GetDependenciesEnd(jsonString, startIndex);
|
||||||
|
|
||||||
|
var stringBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
stringBuilder.Append(jsonString.Substring(0, startIndex));
|
||||||
|
stringBuilder.Append(Dependencies);
|
||||||
|
stringBuilder.Append(jsonString.Substring(endIndex, jsonString.Length - endIndex));
|
||||||
|
|
||||||
|
File.WriteAllText(path, stringBuilder.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
string GetJsonString()
|
||||||
|
{
|
||||||
|
if (ScopedRegistries.Length > 0)
|
||||||
|
return JsonUtility.ToJson(
|
||||||
|
new UnitySerializableManifest { scopedRegistries = ScopedRegistries, dependencies = new DependencyPlaceholder() },
|
||||||
|
true);
|
||||||
|
|
||||||
|
return JsonUtility.ToJson(
|
||||||
|
new UnitySerializableManifestDependenciesOnly() { dependencies = new DependencyPlaceholder() },
|
||||||
|
true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Manifest JsonDeserialize(string path)
|
||||||
|
{
|
||||||
|
var jsonString = File.ReadAllText(path);
|
||||||
|
|
||||||
|
var registries = JsonUtility.FromJson<UnitySerializableManifest>(jsonString).scopedRegistries ?? new ScopedRegistry[0];
|
||||||
|
var dependencies = DeserializeDependencies(jsonString);
|
||||||
|
|
||||||
|
return new Manifest { ScopedRegistries = registries, Dependencies = dependencies };
|
||||||
|
}
|
||||||
|
|
||||||
|
static string DeserializeDependencies(string json)
|
||||||
|
{
|
||||||
|
var startIndex = GetDependenciesStart(json);
|
||||||
|
var endIndex = GetDependenciesEnd(json, startIndex);
|
||||||
|
|
||||||
|
if (startIndex == INDEX_NOT_FOUND || endIndex == INDEX_NOT_FOUND)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var dependencies = json.Substring(startIndex, endIndex - startIndex);
|
||||||
|
return dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetDependenciesStart(string json)
|
||||||
|
{
|
||||||
|
var dependenciesIndex = json.IndexOf(DEPENDENCIES_KEY, StringComparison.InvariantCulture);
|
||||||
|
if (dependenciesIndex == INDEX_NOT_FOUND)
|
||||||
|
return INDEX_NOT_FOUND;
|
||||||
|
|
||||||
|
var dependenciesStartIndex = json.IndexOf('{', dependenciesIndex + DEPENDENCIES_KEY.Length);
|
||||||
|
|
||||||
|
if (dependenciesStartIndex == INDEX_NOT_FOUND)
|
||||||
|
return INDEX_NOT_FOUND;
|
||||||
|
|
||||||
|
dependenciesStartIndex++; //add length of '{' to starting point
|
||||||
|
|
||||||
|
return dependenciesStartIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int GetDependenciesEnd(string jsonString, int dependenciesStartIndex)
|
||||||
|
{
|
||||||
|
return jsonString.IndexOf('}', dependenciesStartIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UnitySerializableManifestDependenciesOnly
|
||||||
|
{
|
||||||
|
public DependencyPlaceholder dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
class UnitySerializableManifest
|
||||||
|
{
|
||||||
|
public ScopedRegistry[] scopedRegistries;
|
||||||
|
public DependencyPlaceholder dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
struct ScopedRegistry
|
||||||
|
{
|
||||||
|
public string name;
|
||||||
|
public string url;
|
||||||
|
public string[] scopes;
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
if (!(obj is ScopedRegistry))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var other = (ScopedRegistry)obj;
|
||||||
|
|
||||||
|
return name == other.name &&
|
||||||
|
url == other.url &&
|
||||||
|
scopes.SequenceEqual(other.scopes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator ==(ScopedRegistry a, ScopedRegistry b)
|
||||||
|
{
|
||||||
|
return a.Equals(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator !=(ScopedRegistry a, ScopedRegistry b)
|
||||||
|
{
|
||||||
|
return !a.Equals(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
var hash = 17;
|
||||||
|
|
||||||
|
foreach (var scope in scopes)
|
||||||
|
hash = hash * 23 + (scope == null ? 0 : scope.GetHashCode());
|
||||||
|
|
||||||
|
hash = hash * 23 + (name == null ? 0 : name.GetHashCode());
|
||||||
|
hash = hash * 23 + (url == null ? 0 : url.GetHashCode());
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
struct DependencyPlaceholder { }
|
||||||
|
|
||||||
|
struct PackageDescription
|
||||||
|
{
|
||||||
|
public string BundleId;
|
||||||
|
public string FileName;
|
||||||
|
}
|
||||||
|
}
|
11
AR/Assets/Editor/Migration/AddVuforiaEnginePackage.cs.meta
generated
Normal file
11
AR/Assets/Editor/Migration/AddVuforiaEnginePackage.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3bbef22eb814a9647b6c1f03e99d95da
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/Editor/Vuforia.meta
generated
Normal file
8
AR/Assets/Editor/Vuforia.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 830a6bd5feeeb9c4ea096ee3bdc366a9
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/Editor/Vuforia/ImageTargetTextures.meta
generated
Normal file
8
AR/Assets/Editor/Vuforia/ImageTargetTextures.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ed76deef4aaffc74590d653945149045
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/Editor/Vuforia/ImageTargetTextures/test.meta
generated
Normal file
8
AR/Assets/Editor/Vuforia/ImageTargetTextures/test.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 05c55ebf740335542bc44bb9da461dbe
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e9c6dd7d259b3738805048b0228f2adf48396e4dd989ebd06fd0d22349e2bc58
|
||||||
|
size 2903
|
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/06_scaled.jpg.meta
generated
Normal file
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/06_scaled.jpg.meta
generated
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: af78b85e48844ee69e6e4d53778d6d87
|
||||||
|
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: 1
|
||||||
|
cookieLightType: 2
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Lumin
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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:
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bc5ef04b2cb1a58078f3e0b3cf3184be35ebd5a2a9be157c7f87a5c9c72e516a
|
||||||
|
size 28896
|
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/Lhotse_Mountain_8-Bit_Grayscale_scaled.jpg.meta
generated
Normal file
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/Lhotse_Mountain_8-Bit_Grayscale_scaled.jpg.meta
generated
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ca6a6582f69f4168b8b55930aabf4f66
|
||||||
|
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: 1
|
||||||
|
cookieLightType: 2
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Lumin
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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:
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2ef725f01a3027d3f8bc64422a65036fbbb083b78cc26c3066f86fd261196669
|
||||||
|
size 34858
|
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/trash_1_scaled.jpg.meta
generated
Normal file
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/trash_1_scaled.jpg.meta
generated
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eec26345541b4109a38391fcfee93c51
|
||||||
|
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: 1
|
||||||
|
cookieLightType: 2
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Lumin
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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:
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bc9d0a05777982acda4feabf76387a78dd171b8147ac88e6121048b04e370216
|
||||||
|
size 50066
|
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/trash_2_scaled.jpg.meta
generated
Normal file
183
AR/Assets/Editor/Vuforia/ImageTargetTextures/test/trash_2_scaled.jpg.meta
generated
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b16e7c066cdc45f19652f8dd5164ff94
|
||||||
|
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: 1
|
||||||
|
cookieLightType: 2
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
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: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Lumin
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
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: 0
|
||||||
|
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:
|
@ -40,6 +40,21 @@ public class MarkerTracker : MonoBehaviour
|
|||||||
}
|
}
|
||||||
private void OnTrackedImagesChanged(ARTrackedImagesChangedEventArgs eventArgs)
|
private void OnTrackedImagesChanged(ARTrackedImagesChangedEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
foreach (var trackedImage in eventArgs.added)
|
||||||
|
{
|
||||||
|
foreach (var arPrefab in ArPrefabs)
|
||||||
|
{
|
||||||
|
if (arPrefab.name == trackedImage.referenceImage.name && !_instantiatedPrefabs.ContainsKey(ArPrefabs[0].name))
|
||||||
|
{
|
||||||
|
Debug.Log("New" + ArPrefabs[0].name);
|
||||||
|
var newPrefab = Instantiate(ArPrefabs[0], trackedImage.transform);
|
||||||
|
_instantiatedPrefabs.Add(ArPrefabs[0].name, newPrefab);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var trackedImage in eventArgs.updated)
|
foreach (var trackedImage in eventArgs.updated)
|
||||||
{
|
{
|
||||||
// var imageName = trackedImage.referenceImage.name;
|
// var imageName = trackedImage.referenceImage.name;
|
||||||
@ -53,19 +68,33 @@ public class MarkerTracker : MonoBehaviour
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
Debug.Log(_instantiatedPrefabs.Keys);
|
//Debug.Log("Updated : " + trackedImage.referenceImage.name);
|
||||||
if (_instantiatedPrefabs.ContainsKey(trackedImage.referenceImage.name))
|
//_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(trackedImage.trackingState == TrackingState.Tracking);
|
||||||
|
foreach (var existingPrefab in _instantiatedPrefabs)
|
||||||
|
{
|
||||||
|
if (existingPrefab.Key == trackedImage.referenceImage.name)
|
||||||
{
|
{
|
||||||
_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(trackedImage.trackingState == TrackingState.Tracking);
|
_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(trackedImage.trackingState == TrackingState.Tracking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var trackedImage in eventArgs.removed) {
|
foreach (var trackedImage in eventArgs.removed) {
|
||||||
// Destroy its prefab
|
// Destroy its prefabDestroy(_instantiatedPrefabs[trackedImage.referenceImage.name]);
|
||||||
Destroy(_instantiatedPrefabs[trackedImage.referenceImage.name]);
|
|
||||||
|
foreach (var existingPrefab in _instantiatedPrefabs)
|
||||||
|
{
|
||||||
|
if (existingPrefab.Key == trackedImage.referenceImage.name)
|
||||||
|
{
|
||||||
|
Debug.Log("Deleted : " + existingPrefab.Key);
|
||||||
|
_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Also remove the instance from our array
|
// Also remove the instance from our array
|
||||||
_instantiatedPrefabs.Remove(trackedImage.referenceImage.name);
|
//Debug.Log("Deleted : " + trackedImage.referenceImage.name);
|
||||||
|
//_instantiatedPrefabs.Remove(trackedImage.referenceImage.name);
|
||||||
// Or, simply set the prefab instance to inactive
|
// Or, simply set the prefab instance to inactive
|
||||||
//_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(false);
|
//_instantiatedPrefabs[trackedImage.referenceImage.name].SetActive(false);
|
||||||
}
|
}
|
||||||
|
47
AR/Assets/PocketBaseDataProvider.cs
Normal file
47
AR/Assets/PocketBaseDataProvider.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using models;
|
||||||
|
using UnityEngine;
|
||||||
|
using CandyCoded.env;
|
||||||
|
using services;
|
||||||
|
|
||||||
|
public class PocketBaseDataProvider : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
[SerializeField] public String userToken = null;
|
||||||
|
[SerializeField] public static List<Trash> trashes = new List<Trash>();
|
||||||
|
[SerializeField] public float timeBetweenUpdate = 10f;
|
||||||
|
private float currentCountdown;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
this.currentCountdown = this.timeBetweenUpdate;
|
||||||
|
env.TryParseEnvironmentVariable("API_USER", out string user);
|
||||||
|
env.TryParseEnvironmentVariable("API_PASSWORD", out string password);
|
||||||
|
LoginResponse res = UserService.Login(new LoginRequest(user, password));
|
||||||
|
userToken = res.token;
|
||||||
|
this.UpdateData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
this.currentCountdown -= Time.deltaTime;
|
||||||
|
if (this.currentCountdown <= 0)
|
||||||
|
{
|
||||||
|
this.currentCountdown = this.timeBetweenUpdate;
|
||||||
|
this.UpdateData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateData()
|
||||||
|
{
|
||||||
|
TrashList list = TrashService.ListTrash(userToken);
|
||||||
|
foreach (Trash trash in list.items)
|
||||||
|
{
|
||||||
|
DataList trashData = TrashService.ListTrashData(userToken, trash.id);
|
||||||
|
trash.data = trashData.items;
|
||||||
|
}
|
||||||
|
trashes = list.items.ToList();
|
||||||
|
}
|
||||||
|
}
|
3
AR/Assets/PocketBaseDataProvider.cs.meta
generated
Normal file
3
AR/Assets/PocketBaseDataProvider.cs.meta
generated
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5d109dd9f21341b3ad486eda9c3e70ff
|
||||||
|
timeCreated: 1681820450
|
@ -1,75 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Net;
|
|
||||||
using CandyCoded.env;
|
|
||||||
using models;
|
|
||||||
using services;
|
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public enum TrashType
|
|
||||||
{
|
|
||||||
Temperature,
|
|
||||||
Distance,
|
|
||||||
Gyro
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PocketBaseDataRepository : MonoBehaviour
|
|
||||||
{
|
|
||||||
[SerializeField] public String userToken;
|
|
||||||
[SerializeField] public Trash[] trashes;
|
|
||||||
[SerializeField] public TrashType type = TrashType.Distance;
|
|
||||||
[SerializeField] public TextMeshPro textToUpdate;
|
|
||||||
[SerializeField] public float timeBetweenUpdate = 10f;
|
|
||||||
private float currentCountdown;
|
|
||||||
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
this.currentCountdown = this.timeBetweenUpdate;
|
|
||||||
env.TryParseEnvironmentVariable("API_USER", out string user);
|
|
||||||
env.TryParseEnvironmentVariable("API_PASSWORD", out string password);
|
|
||||||
LoginResponse res = UserService.Login(new LoginRequest(user, password));
|
|
||||||
this.userToken = res.token;
|
|
||||||
this.UpdateData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateData()
|
|
||||||
{
|
|
||||||
TrashList list = TrashService.ListTrash(this.userToken);
|
|
||||||
foreach (Trash trash in list.items)
|
|
||||||
{
|
|
||||||
DataList trashData = TrashService.ListTrashData(userToken, trash.id);
|
|
||||||
trash.data = trashData.items;
|
|
||||||
}
|
|
||||||
this.trashes = list.items;
|
|
||||||
this.UpdateText();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateText()
|
|
||||||
{
|
|
||||||
if (this.trashes.Length <= 0 || this.textToUpdate == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.textToUpdate.text = "" + this.trashes[0].data[0].value + " " + this.trashes[0].data[0].unit;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
this.currentCountdown -= Time.deltaTime;
|
|
||||||
if (this.currentCountdown <= 0)
|
|
||||||
{
|
|
||||||
this.currentCountdown = this.timeBetweenUpdate;
|
|
||||||
this.UpdateData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LateUpdate()
|
|
||||||
{
|
|
||||||
this.textToUpdate.transform.LookAt(Camera.main.transform.position);
|
|
||||||
this.textToUpdate.transform.rotation = Quaternion.LookRotation(this.textToUpdate.transform.position - Camera.main.transform.position);
|
|
||||||
}
|
|
||||||
}
|
|
14
AR/Assets/ReferenceImageLibrary.asset
generated
14
AR/Assets/ReferenceImageLibrary.asset
generated
File diff suppressed because one or more lines are too long
52
AR/Assets/Resources/VuforiaConfiguration.asset
generated
Normal file
52
AR/Assets/Resources/VuforiaConfiguration.asset
generated
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -2067402452, guid: 1e108ae5f2133934f948edded555f03e, type: 3}
|
||||||
|
m_Name: VuforiaConfiguration
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
vuforia:
|
||||||
|
vuforiaLicenseKey: AQxbUaT/////AAABmcZ6t7Ncj05anQJttObkLa4eD1cWPevqBDTvmDHnXpPaLKNegpLOtKxtNUApdlbhLVVg6wvI+udkzd/VrRZrReg69CRecVhQRIrli/m6b5WQl/gkN4tdaDWbvVxvjuI9oOe5nLCVIY9Oe3WtZfcdCr8Xuiu7U3qkSL19omHJvRUXSEpUU4OXVX4cbPdfUXNX05Eq5MFT4tpUhEMPJwaV/JcA3k5CkXHT51SsPqXt22XNqt55goOhkRO5wy1DEoXz3jWQibRY89u3zTgNbElKcKymOzrddWPwuGtOKOmPD2ItEssjajax1Pw2iAb2r4gUaVFvIXPOMXUqbkAMkD0WVsUXkK5d9TfglqeygPe7xswk
|
||||||
|
ufoLicenseKey: QVhmVG0yVC8vLy8vQUFBQUtPMGgyQ2V2ZlVaSXZtVHhTbng3elZVRkhISnZzYUhHSXREUEY5OGtLZTBlWW9pTTM3RUl1a0w5M09KcWM0OXVKVksxODRJM29hWkdTWmNXbmtkTVVEcXhkdjRKSHViUzdyaDZlS2ZZb0NwaWtsckZjQnRsWDlIRVM2RHYzVTdMNHA4S09kS3FUSFBYR3FHbHEyTStDVDNNTTdnYUVlajhFa0FnQUUxZkR6TDhXYnFsbE5BVFdIZFpGYWtOY2FXNis0eGNrTFJGUHBucDlDOEU5YUY5N1czRFZ2MmF2ZEtoWkxzMG5QeWdLMDYwQ1lQYVhMV0pZRjlBVG00WnlRcmY1WXRRNUdGUzArMVg3MWtjMGwvWjBDSDJ3N3ZRY3Jzdy96L3NBNmVBUW9LYUhpS3R2MzE1Q2ZMVlhEMjhzdk1ZTU5CTnZsZzBqU0RPcnkwYjlUSUNlWlZMNVBvZExFZjBxRnc1VzhXTFByOXU=
|
||||||
|
delayedInitialization: 0
|
||||||
|
cameraFocusModeSetting: 2
|
||||||
|
cameraDeviceModeSetting: -2
|
||||||
|
maxSimultaneousImageTargets: 3
|
||||||
|
virtualSceneScaleFactor: 1
|
||||||
|
modelTargetRecoWhileExtendedTracked: 1
|
||||||
|
shareRecordingsInITunes: 0
|
||||||
|
logLevel: 0
|
||||||
|
version: 10.14.4
|
||||||
|
eulaAcceptedVersions: '{"Values":["10.14"]}'
|
||||||
|
database:
|
||||||
|
disableModelExtraction: 0
|
||||||
|
shaders:
|
||||||
|
depthMaskShader: {fileID: 4800000, guid: 9894afa5f3a5e4bbca625981beb1b20e, type: 3}
|
||||||
|
outlineShader: {fileID: 4800000, guid: 88d3b6b5cf364476ca39fcec255331b1, type: 3}
|
||||||
|
unlitTransparentShader: {fileID: 10750, guid: 0000000000000000f000000000000000,
|
||||||
|
type: 0}
|
||||||
|
videoBackground:
|
||||||
|
numDivisions: 2
|
||||||
|
videoBackgroundShader: {fileID: 4800000, guid: 144dfca22ac584ade9e538e24a5ddded,
|
||||||
|
type: 3}
|
||||||
|
unlitShader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
videoBackgroundEnabled: 1
|
||||||
|
deviceTracker:
|
||||||
|
autoStartTracker: 1
|
||||||
|
arcoreRequirement: 1
|
||||||
|
autoImportArcore: 1
|
||||||
|
thirdPartyARCoreClientDetected: 1
|
||||||
|
playmode:
|
||||||
|
mSequencePath:
|
||||||
|
playModeType: 1
|
||||||
|
webcam:
|
||||||
|
renderTextureLayer: 30
|
||||||
|
packageInformation:
|
||||||
|
ARFoundationVersion: 4.2.7
|
8
AR/Assets/Resources/VuforiaConfiguration.asset.meta
generated
Normal file
8
AR/Assets/Resources/VuforiaConfiguration.asset.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d7c0c52072a25164baf5aa63879fb81f
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
488
AR/Assets/Scenes/AR Scene.unity
generated
Normal file
488
AR/Assets/Scenes/AR Scene.unity
generated
Normal file
@ -0,0 +1,488 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 0
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.574817, a: 1}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 1
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 12
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_AtlasSize: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAmbientOcclusion: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 512
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVREnvironmentSampleCount: 256
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_PVRFilteringMode: 1
|
||||||
|
m_PVRDenoiserTypeDirect: 1
|
||||||
|
m_PVRDenoiserTypeIndirect: 1
|
||||||
|
m_PVRDenoiserTypeAO: 1
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVREnvironmentMIS: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &365779701
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 365779707}
|
||||||
|
- component: {fileID: 365779702}
|
||||||
|
- component: {fileID: 365779706}
|
||||||
|
- component: {fileID: 365779705}
|
||||||
|
- component: {fileID: 365779704}
|
||||||
|
- component: {fileID: 365779703}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AR Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!20 &365779702
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.1
|
||||||
|
far clip plane: 20
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!114 &365779703
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 816b289ef451e094f9ae174fb4cf8db0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UseCustomMaterial: 0
|
||||||
|
m_CustomMaterial: {fileID: 0}
|
||||||
|
--- !u!114 &365779704
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FocusMode: -1
|
||||||
|
m_LightEstimationMode: -1
|
||||||
|
m_AutoFocus: 1
|
||||||
|
m_LightEstimation: 0
|
||||||
|
m_FacingDirection: 1
|
||||||
|
--- !u!114 &365779705
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 6e3c44306fb1e439a9f18b2212b8ab70, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!81 &365779706
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!4 &365779707
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 365779701}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1925243077}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1649109357
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1649109360}
|
||||||
|
- component: {fileID: 1649109359}
|
||||||
|
- component: {fileID: 1649109358}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AR Session
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1649109358
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649109357}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &1649109359
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649109357}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_AttemptUpdate: 1
|
||||||
|
m_MatchFrameRate: 1
|
||||||
|
m_TrackingMode: 2
|
||||||
|
--- !u!4 &1649109360
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649109357}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1880509872
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1880509874}
|
||||||
|
- component: {fileID: 1880509873}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Directional Light
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!108 &1880509873
|
||||||
|
Light:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1880509872}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 10
|
||||||
|
m_Type: 1
|
||||||
|
m_Shape: 0
|
||||||
|
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||||
|
m_Intensity: 1
|
||||||
|
m_Range: 10
|
||||||
|
m_SpotAngle: 30
|
||||||
|
m_InnerSpotAngle: 21.80208
|
||||||
|
m_CookieSize: 10
|
||||||
|
m_Shadows:
|
||||||
|
m_Type: 2
|
||||||
|
m_Resolution: -1
|
||||||
|
m_CustomResolution: -1
|
||||||
|
m_Strength: 1
|
||||||
|
m_Bias: 0.05
|
||||||
|
m_NormalBias: 0.4
|
||||||
|
m_NearPlane: 0.2
|
||||||
|
m_CullingMatrixOverride:
|
||||||
|
e00: 1
|
||||||
|
e01: 0
|
||||||
|
e02: 0
|
||||||
|
e03: 0
|
||||||
|
e10: 0
|
||||||
|
e11: 1
|
||||||
|
e12: 0
|
||||||
|
e13: 0
|
||||||
|
e20: 0
|
||||||
|
e21: 0
|
||||||
|
e22: 1
|
||||||
|
e23: 0
|
||||||
|
e30: 0
|
||||||
|
e31: 0
|
||||||
|
e32: 0
|
||||||
|
e33: 1
|
||||||
|
m_UseCullingMatrixOverride: 0
|
||||||
|
m_Cookie: {fileID: 0}
|
||||||
|
m_DrawHalo: 0
|
||||||
|
m_Flare: {fileID: 0}
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_Lightmapping: 4
|
||||||
|
m_LightShadowCasterMode: 0
|
||||||
|
m_AreaSize: {x: 1, y: 1}
|
||||||
|
m_BounceIntensity: 1
|
||||||
|
m_ColorTemperature: 6570
|
||||||
|
m_UseColorTemperature: 0
|
||||||
|
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_UseBoundingSphereOverride: 0
|
||||||
|
m_UseViewFrustumForShadowCasterCull: 1
|
||||||
|
m_ShadowRadius: 0
|
||||||
|
m_ShadowAngle: 0
|
||||||
|
--- !u!4 &1880509874
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1880509872}
|
||||||
|
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||||
|
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||||
|
--- !u!1 &1925243075
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1925243077}
|
||||||
|
- component: {fileID: 1925243076}
|
||||||
|
- component: {fileID: 1925243079}
|
||||||
|
- component: {fileID: 1925243078}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AR Session Origin
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1925243076
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1925243075}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 520bb47c46cf8624fafb307b7d1b862a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Camera: {fileID: 365779702}
|
||||||
|
--- !u!4 &1925243077
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1925243075}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 365779707}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1925243078
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1925243075}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 092788e83c82b9c4ebc2934e32540ef7, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
ArPrefabs:
|
||||||
|
- {fileID: 5129063431480463809, guid: 677b677f966f56a4b8f6a9ee34fe24d5, type: 3}
|
||||||
|
- {fileID: 5129063431480463809, guid: c06842cb3c407c54699aaed3b4293c4e, type: 3}
|
||||||
|
--- !u!114 &1925243079
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1925243075}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4dea56a9eaadd1c439095de4f9a371cb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_SerializedLibrary: {fileID: 11400000, guid: 0be731162aacf034589ae8160cfb24fb,
|
||||||
|
type: 2}
|
||||||
|
m_MaxNumberOfMovingImages: 3
|
||||||
|
m_TrackedImagePrefab: {fileID: 0}
|
@ -1,6 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4de63a3b6b3e51f4d89d0220718aeab2
|
guid: 63d620d70769e2c40bc69691c26f4621
|
||||||
TextScriptImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
1130
AR/Assets/Scenes/Vuforia test.unity
generated
Normal file
1130
AR/Assets/Scenes/Vuforia test.unity
generated
Normal file
File diff suppressed because it is too large
Load Diff
7
AR/Assets/Scenes/Vuforia test.unity.meta
generated
Normal file
7
AR/Assets/Scenes/Vuforia test.unity.meta
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 43487ec4eeee9a74f8a2e5f738259bc2
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/StreamingAssets.meta
generated
Normal file
8
AR/Assets/StreamingAssets.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 967aa6c2c0269a4489605f35d4c17ce1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
AR/Assets/StreamingAssets/Vuforia.meta
generated
Normal file
8
AR/Assets/StreamingAssets/Vuforia.meta
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9ed754e9904a20e479cf10161b0e5f08
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
AR/Assets/StreamingAssets/Vuforia/test.dat
Normal file
BIN
AR/Assets/StreamingAssets/Vuforia/test.dat
Normal file
Binary file not shown.
2
AR/Assets/StreamingAssets/Vuforia/test.dat.meta
generated
Normal file
2
AR/Assets/StreamingAssets/Vuforia/test.dat.meta
generated
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4758c794622f43c58e676f11d1983f6e
|
8
AR/Assets/StreamingAssets/Vuforia/test.xml
Normal file
8
AR/Assets/StreamingAssets/Vuforia/test.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<QCARConfig>
|
||||||
|
<Tracking>
|
||||||
|
<ImageTarget name="trash_2" size="5.000000 5.000000" />
|
||||||
|
<ImageTarget name="Lhotse_Mountain_8-Bit_Grayscale" size="5.000000 3.480000" />
|
||||||
|
<ImageTarget name="trash_1" size="5.000000 5.000000" />
|
||||||
|
</Tracking>
|
||||||
|
</QCARConfig>
|
2
AR/Assets/StreamingAssets/Vuforia/test.xml.meta
generated
Normal file
2
AR/Assets/StreamingAssets/Vuforia/test.xml.meta
generated
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2eacf8f5987e446d866538c724f33906
|
75
AR/Assets/TrashDataExtractor.cs
Normal file
75
AR/Assets/TrashDataExtractor.cs
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using models;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public enum TrashType
|
||||||
|
{
|
||||||
|
Temperature, // T/H
|
||||||
|
Distance, // D
|
||||||
|
Poids // W
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrashDataExtractor : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] public TrashType type = TrashType.Distance;
|
||||||
|
[SerializeField] public TextMeshPro valueText;
|
||||||
|
[SerializeField] public TextMeshPro dateText;
|
||||||
|
[SerializeField] public TextMeshPro trashText;
|
||||||
|
|
||||||
|
[SerializeField] public float timeBetweenUpdate = 2f;
|
||||||
|
private float currentCountdown;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
this.currentCountdown = this.timeBetweenUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateText()
|
||||||
|
{
|
||||||
|
String unit = "T/H";
|
||||||
|
if (this.type == TrashType.Distance)
|
||||||
|
{
|
||||||
|
unit = "D";
|
||||||
|
} else if (this.type == TrashType.Poids)
|
||||||
|
{
|
||||||
|
unit = "W";
|
||||||
|
}
|
||||||
|
if (PocketBaseDataProvider.trashes.Count <= 0 || PocketBaseDataProvider.trashes[0].data.Count <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var trashesFiltered = PocketBaseDataProvider.trashes.Where((trash => trash.data.Count > 0 && trash.data[0].unit == unit)).ToList();
|
||||||
|
if (trashesFiltered.Count <= 0 || trashesFiltered[0].data.Count <= 0)
|
||||||
|
{
|
||||||
|
return; // No trashes found
|
||||||
|
}
|
||||||
|
Data lastData = trashesFiltered[0].data[0];
|
||||||
|
foreach (var data in trashesFiltered[0].data)
|
||||||
|
{
|
||||||
|
if (DateTime.Parse(lastData.updated) < DateTime.Parse(data.updated))
|
||||||
|
{
|
||||||
|
lastData = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.trashText.text = "Trash n° " + trashesFiltered[0].id;
|
||||||
|
this.dateText.text = "Mis à jour le " + DateTime.Parse(lastData.updated).ToString("G");
|
||||||
|
this.valueText.text = lastData.value + " " + lastData.unit;
|
||||||
|
if (this.type == TrashType.Temperature)
|
||||||
|
{
|
||||||
|
String[] v = lastData.value.Split(";");
|
||||||
|
this.valueText.text = v[0] + " °C - " + v[1] + "% d'humidité";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
this.currentCountdown -= Time.deltaTime;
|
||||||
|
if (this.currentCountdown <= 0)
|
||||||
|
{
|
||||||
|
this.currentCountdown = this.timeBetweenUpdate;
|
||||||
|
this.UpdateText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
675
AR/Assets/TrashPrefab.prefab
generated
Normal file
675
AR/Assets/TrashPrefab.prefab
generated
Normal file
@ -0,0 +1,675 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2330318410863980442
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5564622505428002350}
|
||||||
|
- component: {fileID: 3913286370707363092}
|
||||||
|
- component: {fileID: 9209312088537782796}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Text (2)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &5564622505428002350
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2330318410863980442}
|
||||||
|
m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0.0092}
|
||||||
|
m_LocalScale: {x: 0.024999995, y: 0.05, z: 0.49999985}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 5372390858040414447}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 1.42, y: -0.226}
|
||||||
|
m_SizeDelta: {x: 33.175, y: 5}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!23 &3913286370707363092
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2330318410863980442}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!114 &9209312088537782796
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2330318410863980442}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: 'Valeur
|
||||||
|
|
||||||
|
'
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 1
|
||||||
|
m_VerticalAlignment: 256
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 0
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: -0.059911728, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
_SortingLayer: 0
|
||||||
|
_SortingLayerID: 0
|
||||||
|
_SortingOrder: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_renderer: {fileID: 3913286370707363092}
|
||||||
|
m_maskType: 0
|
||||||
|
--- !u!1 &2606774767926802148
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3736559373457103841}
|
||||||
|
- component: {fileID: 3823117051908795808}
|
||||||
|
- component: {fileID: 1268601807478007134}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Text
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &3736559373457103841
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2606774767926802148}
|
||||||
|
m_LocalRotation: {x: 0.0014850197, y: -0.7071053, z: -0.0014850365, w: 0.7071053}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -0.0187}
|
||||||
|
m_LocalScale: {x: 0.024999995, y: 0.05, z: 0.49999985}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 5372390858040414447}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: -90, z: -0.241}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 1.4200026, y: 0.2994}
|
||||||
|
m_SizeDelta: {x: 30.938, y: 5}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!23 &3823117051908795808
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2606774767926802148}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!114 &1268601807478007134
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2606774767926802148}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: "Trash n\xB0 1"
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 1
|
||||||
|
m_VerticalAlignment: 256
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 0
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: -0.059911728, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
_SortingLayer: 0
|
||||||
|
_SortingLayerID: 0
|
||||||
|
_SortingOrder: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_renderer: {fileID: 3823117051908795808}
|
||||||
|
m_maskType: 0
|
||||||
|
--- !u!1 &5106339144663151372
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5372390858040414447}
|
||||||
|
- component: {fileID: 6673302204551288243}
|
||||||
|
- component: {fileID: 3108883063290793039}
|
||||||
|
- component: {fileID: 1560653856305504418}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cube
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &5372390858040414447
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5106339144663151372}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 2, y: 20, z: 40}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 3736559373457103841}
|
||||||
|
- {fileID: 1272978659607169466}
|
||||||
|
- {fileID: 5564622505428002350}
|
||||||
|
m_Father: {fileID: 6889461186404486481}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &6673302204551288243
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5106339144663151372}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &3108883063290793039
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5106339144663151372}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &1560653856305504418
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5106339144663151372}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &5129063431480463809
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6889461186404486481}
|
||||||
|
- component: {fileID: 7692855769418497485}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrashPrefab
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6889461186404486481
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5129063431480463809}
|
||||||
|
m_LocalRotation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 5372390858040414447}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 90}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 20, y: 5}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &7692855769418497485
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5129063431480463809}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8a652d58e66666249a20951649c4ddcd, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
type: 0
|
||||||
|
valueText: {fileID: 9209312088537782796}
|
||||||
|
dateText: {fileID: 4595555074173856422}
|
||||||
|
trashText: {fileID: 1268601807478007134}
|
||||||
|
timeBetweenUpdate: 2
|
||||||
|
--- !u!1 &6515507305487752798
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1272978659607169466}
|
||||||
|
- component: {fileID: 3116260282969843872}
|
||||||
|
- component: {fileID: 4595555074173856422}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Text (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1272978659607169466
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6515507305487752798}
|
||||||
|
m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0.0103}
|
||||||
|
m_LocalScale: {x: 0.024999995, y: 0.05, z: 0.49999985}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 5372390858040414447}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 1.42, y: 0.141}
|
||||||
|
m_SizeDelta: {x: 33.264, y: 5}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!23 &3116260282969843872
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6515507305487752798}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!114 &4595555074173856422
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6515507305487752798}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: "Mis \xE0 jour:\n"
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 1
|
||||||
|
m_VerticalAlignment: 256
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 0
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: -0.059911728, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
_SortingLayer: 0
|
||||||
|
_SortingLayerID: 0
|
||||||
|
_SortingOrder: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_renderer: {fileID: 3116260282969843872}
|
||||||
|
m_maskType: 0
|
@ -9,9 +9,9 @@ namespace models
|
|||||||
public String id;
|
public String id;
|
||||||
public String collectionId;
|
public String collectionId;
|
||||||
public String collectionName;
|
public String collectionName;
|
||||||
public DateTime created;
|
public String created;
|
||||||
public DateTime updated;
|
public String updated;
|
||||||
public int value;
|
public String value;
|
||||||
public String trash_id;
|
public String trash_id;
|
||||||
public String unit;
|
public String unit;
|
||||||
public Boolean status;
|
public Boolean status;
|
||||||
|
3
AR/Assets/trash_1.jpg
Normal file
3
AR/Assets/trash_1.jpg
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:70af98900986e5b980a067b68933eac9a0f22220a0de97e391f9443f7701eaaa
|
||||||
|
size 34888
|
147
AR/Assets/trash_1.jpg.meta
generated
Normal file
147
AR/Assets/trash_1.jpg.meta
generated
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 016e4aea5f903204bac204dbc9e6d829
|
||||||
|
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: Server
|
||||||
|
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: WebGL
|
||||||
|
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:
|
@ -183,7 +183,7 @@ GameObject:
|
|||||||
- component: {fileID: 6889461186404486481}
|
- component: {fileID: 6889461186404486481}
|
||||||
- component: {fileID: 5156714047157019152}
|
- component: {fileID: 5156714047157019152}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: chart
|
m_Name: trash_1
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -224,6 +224,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
userToken:
|
userToken:
|
||||||
trashes: []
|
trashes: []
|
||||||
type: 0
|
type: 2
|
||||||
textToUpdate: {fileID: 1268601807478007134}
|
textToUpdate: {fileID: 1268601807478007134}
|
||||||
timeBetweenUpdate: 20
|
timeBetweenUpdate: 20
|
7
AR/Assets/trash_1.prefab.meta
generated
Normal file
7
AR/Assets/trash_1.prefab.meta
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c06842cb3c407c54699aaed3b4293c4e
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
AR/Packages/com.ptc.vuforia.engine-10.14.4.tgz
Normal file
BIN
AR/Packages/com.ptc.vuforia.engine-10.14.4.tgz
Normal file
Binary file not shown.
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"com.ptc.vuforia.engine": "file:com.ptc.vuforia.engine-10.14.4.tgz",
|
||||||
"com.unity.collab-proxy": "2.0.0",
|
"com.unity.collab-proxy": "2.0.0",
|
||||||
"com.unity.feature.ar": "1.0.0",
|
"com.unity.feature.ar": "1.0.0",
|
||||||
"com.unity.feature.development": "1.0.1",
|
"com.unity.feature.development": "1.0.1",
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"com.ptc.vuforia.engine": {
|
||||||
|
"version": "file:com.ptc.vuforia.engine-10.14.4.tgz",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "local-tarball",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.ugui": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"com.unity.collab-proxy": {
|
"com.unity.collab-proxy": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
8
AR/ProjectSettings/EditorBuildSettings.asset
generated
8
AR/ProjectSettings/EditorBuildSettings.asset
generated
@ -5,9 +5,15 @@ EditorBuildSettings:
|
|||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes:
|
m_Scenes:
|
||||||
- enabled: 1
|
- enabled: 0
|
||||||
path: Assets/ExampleAssets/Scenes/SampleScene.unity
|
path: Assets/ExampleAssets/Scenes/SampleScene.unity
|
||||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||||
|
- enabled: 0
|
||||||
|
path: Assets/Scenes/AR Scene.unity
|
||||||
|
guid: 63d620d70769e2c40bc69691c26f4621
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Vuforia test.unity
|
||||||
|
guid: 43487ec4eeee9a74f8a2e5f738259bc2
|
||||||
m_configObjects:
|
m_configObjects:
|
||||||
Unity.XR.WindowsMR.Settings: {fileID: 11400000, guid: 744b813df90924c169af73489b8325de,
|
Unity.XR.WindowsMR.Settings: {fileID: 11400000, guid: 744b813df90924c169af73489b8325de,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
11
AR/ProjectSettings/ProjectSettings.asset
generated
11
AR/ProjectSettings/ProjectSettings.asset
generated
@ -135,12 +135,7 @@ PlayerSettings:
|
|||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 1.0
|
bundleVersion: 1.0
|
||||||
preloadedAssets:
|
preloadedAssets: []
|
||||||
- {fileID: -274928316463721240, guid: 58f40b12bbc864f3c96c6505a9a1e1e3, type: 2}
|
|
||||||
- {fileID: 11400000, guid: 1eb95d77acb39444e8cf44313496a874, type: 2}
|
|
||||||
- {fileID: -816260072586540286, guid: 6bb381a8ba31f114d9724357633b4625, type: 2}
|
|
||||||
- {fileID: 11400000, guid: b700a43cd50f9c049864a67cfbdcafed, type: 2}
|
|
||||||
- {fileID: 4800000, guid: c9f956787b1d945e7b36e0516201fc76, type: 3}
|
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
m_HolographicPauseOnTrackingLoss: 1
|
m_HolographicPauseOnTrackingLoss: 1
|
||||||
@ -167,7 +162,7 @@ PlayerSettings:
|
|||||||
tvOS: 0
|
tvOS: 0
|
||||||
overrideDefaultApplicationIdentifier: 1
|
overrideDefaultApplicationIdentifier: 1
|
||||||
AndroidBundleVersionCode: 1
|
AndroidBundleVersionCode: 1
|
||||||
AndroidMinSdkVersion: 24
|
AndroidMinSdkVersion: 26
|
||||||
AndroidTargetSdkVersion: 0
|
AndroidTargetSdkVersion: 0
|
||||||
AndroidPreferredInstallLocation: 1
|
AndroidPreferredInstallLocation: 1
|
||||||
aotOptions:
|
aotOptions:
|
||||||
@ -250,7 +245,7 @@ PlayerSettings:
|
|||||||
useCustomBaseGradleTemplate: 0
|
useCustomBaseGradleTemplate: 0
|
||||||
useCustomGradlePropertiesTemplate: 0
|
useCustomGradlePropertiesTemplate: 0
|
||||||
useCustomProguardFile: 0
|
useCustomProguardFile: 0
|
||||||
AndroidTargetArchitectures: 3
|
AndroidTargetArchitectures: 2
|
||||||
AndroidTargetDevices: 0
|
AndroidTargetDevices: 0
|
||||||
AndroidSplashScreenScale: 0
|
AndroidSplashScreenScale: 0
|
||||||
androidSplashScreen: {fileID: 0}
|
androidSplashScreen: {fileID: 0}
|
||||||
|
1
AR/QCAR/lh
Normal file
1
AR/QCAR/lh
Normal file
@ -0,0 +1 @@
|
|||||||
|
SYa2<EFBFBD>q<><71>[<5B><>"b<> %S<><53><EFBFBD>xY<><13>e.
|
1
AR/QCAR/somedata16
Normal file
1
AR/QCAR/somedata16
Normal file
@ -0,0 +1 @@
|
|||||||
|
AAABmQWapYRGu7Loo2wvgwZUGzXNOVLSaix1jbBp7+6hM1WFhjBkddUoLqWxkauNc7gcguqgEle3Gl3JhXdUv8TOSygVCeRnuokmoncR2/5V78p0F0Cfn5gBebVC39W8GQ6XkVyp75Y8d30EG+W8VKPfuse2cfavkxXpI2Nl3LSy0VRONL0XNPimQXCFL0ahAeUkOc37yrfYL9FrG7wg4Rw+k4YLs++CGJhpcKysknksOgQGrDLh9Hj9lfoKw+YWYwvTA55r6X388fA3hXuRGNehejMd4orrTqM65do7Uf0KR4eC/KXr5cmkSwN4FwRxWaGm16G0tXit+hD29lyZbT/XJ64=
|
18
IOT/config.cppcheck
Normal file
18
IOT/config.cppcheck
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="1">
|
||||||
|
<builddir>.cppcheck-build</builddir>
|
||||||
|
<platform>Unspecified</platform>
|
||||||
|
<analyze-all-vs-configs>true</analyze-all-vs-configs>
|
||||||
|
<check-headers>true</check-headers>
|
||||||
|
<check-unused-templates>false</check-unused-templates>
|
||||||
|
<max-ctu-depth>10</max-ctu-depth>
|
||||||
|
<exclude>
|
||||||
|
<path name="./.pio/" />
|
||||||
|
</exclude>
|
||||||
|
<suppressions>
|
||||||
|
<suppression>noCopyConstructor</suppression>
|
||||||
|
<suppression>noExplicitConstructor</suppression>
|
||||||
|
<suppression>unusedFunction</suppression>
|
||||||
|
<suppression>noOperatorEq</suppression>
|
||||||
|
</suppressions>
|
||||||
|
</project>
|
@ -14,7 +14,38 @@ build_flags =
|
|||||||
-D MONITOR_SPEED=${config.monitor_speed}
|
-D MONITOR_SPEED=${config.monitor_speed}
|
||||||
; DO NOT TOUCH --- END
|
; DO NOT TOUCH --- END
|
||||||
|
|
||||||
|
; taille ecran oled
|
||||||
|
; 3,3v
|
||||||
|
-D OLED_WIDTH=128
|
||||||
|
-D OLED_HEIGHT=64
|
||||||
|
; pin de reset de l'ecran oled
|
||||||
|
-D OLED_RESET=-1
|
||||||
|
|
||||||
|
|
||||||
|
; DHT pin and type
|
||||||
|
; 5v
|
||||||
|
-D DHTTYPE=\"DHT11\"
|
||||||
|
-D DHTPIN=2
|
||||||
|
|
||||||
|
; ULTRASON pin
|
||||||
|
; 5v
|
||||||
|
-D ULTRA_SOUND_TRIGD=12
|
||||||
|
-D ULTRA_SOUND_ECHO=13
|
||||||
|
|
||||||
|
; Capteur poids
|
||||||
|
; 3,3v
|
||||||
|
-D POID_DOUT=14
|
||||||
|
-D POID_SCK=15
|
||||||
|
|
||||||
|
; trash can ID
|
||||||
|
-D TRASHCAN_ONE=\"gdnuxl0wlgurtj3\"
|
||||||
|
-D TRASHCAN_TWO=\"4brip5fwm001bs9\"
|
||||||
|
-D TRASHCAN_THREE=\"n4il9ckl5016aqi\"
|
||||||
|
|
||||||
-D API_HOST=\"iot.epi.cb85.software\"
|
-D API_HOST=\"iot.epi.cb85.software\"
|
||||||
|
|
||||||
-D EXAMPLE_NUMBER=69
|
;---CAPTEUR FULL CONFIG---
|
||||||
|
|
||||||
|
-D ULTRA_SOUND_FULL=\"10\"
|
||||||
|
-D DHT_FULL=\"20:30/60:80\"
|
||||||
|
-D POID_FULL=\"100\"
|
@ -18,7 +18,50 @@ Class Program {
|
|||||||
+ setup()
|
+ setup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract Class Capteur {
|
||||||
|
# full: bool
|
||||||
|
# type: String
|
||||||
|
# fullVall: String
|
||||||
|
+ Capteur(type: String, fullVal: String)
|
||||||
|
+ {abstract} tar(val: int): bool
|
||||||
|
+ {abstract} read(): String = 0
|
||||||
|
+ isFull(): bool
|
||||||
|
+ getValType(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
class Balance{
|
||||||
|
- capteur: HX711*
|
||||||
|
- initialized: bool
|
||||||
|
- calibrationFact: int
|
||||||
|
- initialVal: long
|
||||||
|
+ Balance(doutPin: int, sck: int, fullVal:String)
|
||||||
|
+ read(): String
|
||||||
|
+ initCalibration(): bool
|
||||||
|
+ calibration(poidsRef: int, moyenneCalibration: int): bool
|
||||||
|
+ tar(val: int = 0): bool
|
||||||
|
}
|
||||||
|
|
||||||
|
class Ultrason{
|
||||||
|
- capteur: DHT*
|
||||||
|
+ HumiTemp(pin: int, type: String, fullVal: String)
|
||||||
|
+ read(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
class Ultrason{
|
||||||
|
- capteur: Ultrasonic*
|
||||||
|
+ Ultrason(triguer: int, echo: int, fullVal: String)
|
||||||
|
+ read(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
Balance --|> Capteur
|
||||||
|
Ultrason --|> Capteur
|
||||||
|
HumiTemp --|> Capteur
|
||||||
|
|
||||||
|
|
||||||
|
API -> Program
|
||||||
|
Program <-- Balance
|
||||||
|
Program <-- Ultrason
|
||||||
|
Program <-- HumiTemp
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
@enduml
|
1
IOT/docs/schéma/shéma poubelle/#auto_saved_files#
Normal file
1
IOT/docs/schéma/shéma poubelle/#auto_saved_files#
Normal file
@ -0,0 +1 @@
|
|||||||
|
/run/media/clement/Data/Mes_Docmument/Documents/Epitech/T-DEV-811/projet/project/IOT/docs/schéma/shéma poubelle/_autosave-shéma poubelle.kicad_sch
|
1267
IOT/docs/schéma/shéma poubelle/_autosave-shéma poubelle.kicad_sch
Normal file
1267
IOT/docs/schéma/shéma poubelle/_autosave-shéma poubelle.kicad_sch
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
2
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_pcb
Normal file
2
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_pcb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
(kicad_pcb (version 20221018) (generator pcbnew)
|
||||||
|
)
|
77
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_prl
Normal file
77
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_prl
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"board": {
|
||||||
|
"active_layer": 0,
|
||||||
|
"active_layer_preset": "",
|
||||||
|
"auto_track_width": true,
|
||||||
|
"hidden_netclasses": [],
|
||||||
|
"hidden_nets": [],
|
||||||
|
"high_contrast_mode": 0,
|
||||||
|
"net_color_mode": 1,
|
||||||
|
"opacity": {
|
||||||
|
"images": 0.6,
|
||||||
|
"pads": 1.0,
|
||||||
|
"tracks": 1.0,
|
||||||
|
"vias": 1.0,
|
||||||
|
"zones": 0.6
|
||||||
|
},
|
||||||
|
"selection_filter": {
|
||||||
|
"dimensions": true,
|
||||||
|
"footprints": true,
|
||||||
|
"graphics": true,
|
||||||
|
"keepouts": true,
|
||||||
|
"lockedItems": false,
|
||||||
|
"otherItems": true,
|
||||||
|
"pads": true,
|
||||||
|
"text": true,
|
||||||
|
"tracks": true,
|
||||||
|
"vias": true,
|
||||||
|
"zones": true
|
||||||
|
},
|
||||||
|
"visible_items": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
11,
|
||||||
|
12,
|
||||||
|
13,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
19,
|
||||||
|
20,
|
||||||
|
21,
|
||||||
|
22,
|
||||||
|
23,
|
||||||
|
24,
|
||||||
|
25,
|
||||||
|
26,
|
||||||
|
27,
|
||||||
|
28,
|
||||||
|
29,
|
||||||
|
30,
|
||||||
|
32,
|
||||||
|
33,
|
||||||
|
34,
|
||||||
|
35,
|
||||||
|
36,
|
||||||
|
39,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"visible_layers": "fffffff_ffffffff",
|
||||||
|
"zone_display_mode": 0
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"filename": "shéma poubelle.kicad_prl",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"files": []
|
||||||
|
}
|
||||||
|
}
|
327
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_pro
Normal file
327
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_pro
Normal file
@ -0,0 +1,327 @@
|
|||||||
|
{
|
||||||
|
"board": {
|
||||||
|
"3dviewports": [],
|
||||||
|
"design_settings": {
|
||||||
|
"defaults": {
|
||||||
|
"board_outline_line_width": 0.1,
|
||||||
|
"copper_line_width": 0.2,
|
||||||
|
"copper_text_size_h": 1.5,
|
||||||
|
"copper_text_size_v": 1.5,
|
||||||
|
"copper_text_thickness": 0.3,
|
||||||
|
"other_line_width": 0.15,
|
||||||
|
"silk_line_width": 0.15,
|
||||||
|
"silk_text_size_h": 1.0,
|
||||||
|
"silk_text_size_v": 1.0,
|
||||||
|
"silk_text_thickness": 0.15
|
||||||
|
},
|
||||||
|
"diff_pair_dimensions": [],
|
||||||
|
"drc_exclusions": [],
|
||||||
|
"rules": {
|
||||||
|
"min_copper_edge_clearance": 0.0,
|
||||||
|
"solder_mask_clearance": 0.0,
|
||||||
|
"solder_mask_min_width": 0.0
|
||||||
|
},
|
||||||
|
"track_widths": [],
|
||||||
|
"via_dimensions": []
|
||||||
|
},
|
||||||
|
"layer_presets": [],
|
||||||
|
"viewports": []
|
||||||
|
},
|
||||||
|
"boards": [],
|
||||||
|
"cvpcb": {
|
||||||
|
"equivalence_files": []
|
||||||
|
},
|
||||||
|
"erc": {
|
||||||
|
"erc_exclusions": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 0
|
||||||
|
},
|
||||||
|
"pin_map": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rule_severities": {
|
||||||
|
"bus_definition_conflict": "error",
|
||||||
|
"bus_entry_needed": "error",
|
||||||
|
"bus_to_bus_conflict": "error",
|
||||||
|
"bus_to_net_conflict": "error",
|
||||||
|
"conflicting_netclasses": "error",
|
||||||
|
"different_unit_footprint": "error",
|
||||||
|
"different_unit_net": "error",
|
||||||
|
"duplicate_reference": "error",
|
||||||
|
"duplicate_sheet_names": "error",
|
||||||
|
"endpoint_off_grid": "warning",
|
||||||
|
"extra_units": "error",
|
||||||
|
"global_label_dangling": "warning",
|
||||||
|
"hier_label_mismatch": "error",
|
||||||
|
"label_dangling": "error",
|
||||||
|
"lib_symbol_issues": "warning",
|
||||||
|
"missing_bidi_pin": "warning",
|
||||||
|
"missing_input_pin": "warning",
|
||||||
|
"missing_power_pin": "error",
|
||||||
|
"missing_unit": "warning",
|
||||||
|
"multiple_net_names": "warning",
|
||||||
|
"net_not_bus_member": "warning",
|
||||||
|
"no_connect_connected": "warning",
|
||||||
|
"no_connect_dangling": "warning",
|
||||||
|
"pin_not_connected": "error",
|
||||||
|
"pin_not_driven": "error",
|
||||||
|
"pin_to_pin": "warning",
|
||||||
|
"power_pin_not_driven": "error",
|
||||||
|
"similar_labels": "warning",
|
||||||
|
"simulation_model_issue": "ignore",
|
||||||
|
"unannotated": "error",
|
||||||
|
"unit_value_mismatch": "error",
|
||||||
|
"unresolved_variable": "error",
|
||||||
|
"wire_dangling": "error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"pinned_footprint_libs": [],
|
||||||
|
"pinned_symbol_libs": []
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"filename": "shéma poubelle.kicad_pro",
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_settings": {
|
||||||
|
"classes": [
|
||||||
|
{
|
||||||
|
"bus_width": 12,
|
||||||
|
"clearance": 0.2,
|
||||||
|
"diff_pair_gap": 0.25,
|
||||||
|
"diff_pair_via_gap": 0.25,
|
||||||
|
"diff_pair_width": 0.2,
|
||||||
|
"line_style": 0,
|
||||||
|
"microvia_diameter": 0.3,
|
||||||
|
"microvia_drill": 0.1,
|
||||||
|
"name": "Default",
|
||||||
|
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
||||||
|
"track_width": 0.25,
|
||||||
|
"via_diameter": 0.8,
|
||||||
|
"via_drill": 0.4,
|
||||||
|
"wire_width": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"net_colors": null,
|
||||||
|
"netclass_assignments": null,
|
||||||
|
"netclass_patterns": []
|
||||||
|
},
|
||||||
|
"pcbnew": {
|
||||||
|
"last_paths": {
|
||||||
|
"gencad": "",
|
||||||
|
"idf": "",
|
||||||
|
"netlist": "",
|
||||||
|
"specctra_dsn": "",
|
||||||
|
"step": "",
|
||||||
|
"vrml": ""
|
||||||
|
},
|
||||||
|
"page_layout_descr_file": ""
|
||||||
|
},
|
||||||
|
"schematic": {
|
||||||
|
"annotate_start_num": 0,
|
||||||
|
"drawing": {
|
||||||
|
"dashed_lines_dash_length_ratio": 12.0,
|
||||||
|
"dashed_lines_gap_length_ratio": 3.0,
|
||||||
|
"default_line_thickness": 6.0,
|
||||||
|
"default_text_size": 50.0,
|
||||||
|
"field_names": [],
|
||||||
|
"intersheets_ref_own_page": false,
|
||||||
|
"intersheets_ref_prefix": "",
|
||||||
|
"intersheets_ref_short": false,
|
||||||
|
"intersheets_ref_show": false,
|
||||||
|
"intersheets_ref_suffix": "",
|
||||||
|
"junction_size_choice": 3,
|
||||||
|
"label_size_ratio": 0.375,
|
||||||
|
"pin_symbol_size": 25.0,
|
||||||
|
"text_offset_ratio": 0.15
|
||||||
|
},
|
||||||
|
"legacy_lib_dir": "",
|
||||||
|
"legacy_lib_list": [],
|
||||||
|
"meta": {
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
"net_format_name": "",
|
||||||
|
"page_layout_descr_file": "",
|
||||||
|
"plot_directory": "",
|
||||||
|
"spice_current_sheet_as_root": false,
|
||||||
|
"spice_external_command": "spice \"%I\"",
|
||||||
|
"spice_model_current_sheet_as_root": true,
|
||||||
|
"spice_save_all_currents": false,
|
||||||
|
"spice_save_all_voltages": false,
|
||||||
|
"subpart_first_id": 65,
|
||||||
|
"subpart_id_separator": 0
|
||||||
|
},
|
||||||
|
"sheets": [],
|
||||||
|
"text_variables": {}
|
||||||
|
}
|
5
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_sch
Normal file
5
IOT/docs/schéma/shéma poubelle/shéma poubelle.kicad_sch
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
(kicad_sch (version 20230121) (generator eeschema)
|
||||||
|
(paper "A4")
|
||||||
|
(lib_symbols)
|
||||||
|
(symbol_instances)
|
||||||
|
)
|
20
IOT/docs/schéma/ultrasound.lib
Normal file
20
IOT/docs/schéma/ultrasound.lib
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
EESchema-LIBRARY Version 2.3
|
||||||
|
#encoding utf-8
|
||||||
|
#
|
||||||
|
# HC-SR04
|
||||||
|
#
|
||||||
|
DEF HC-SR04 U 0 40 Y Y 1 F N
|
||||||
|
F0 "U" -250 -300 60 H V C CNN
|
||||||
|
F1 "HC-SR04" -100 300 60 H V C CNN
|
||||||
|
F2 "" 0 0 60 H V C CNN
|
||||||
|
F3 "" 0 0 60 H V C CNN
|
||||||
|
DRAW
|
||||||
|
S 0 250 -300 -250 0 1 0 N
|
||||||
|
X VCC 1 200 150 200 L 50 50 1 1 I
|
||||||
|
X TRIG 2 200 50 200 L 50 50 1 1 I
|
||||||
|
X ECHO 3 200 -50 200 L 50 50 1 1 I
|
||||||
|
X GND 4 200 -150 200 L 50 50 1 1 I
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
#End Library
|
@ -1,4 +1,10 @@
|
|||||||
; Add additionnal environments in this file
|
; Add additionnal environments in this file
|
||||||
|
; Debug environemnt
|
||||||
|
[env:test]
|
||||||
|
test_build_src = true
|
||||||
|
build_type = debug
|
||||||
|
build_flags = ${env.build_flags}
|
||||||
|
-D TESTING
|
||||||
|
|
||||||
; Default production environment
|
; Default production environment
|
||||||
[env:prod]
|
[env:prod]
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
#ifndef PROGRAM_H
|
#ifndef PROGRAM_H
|
||||||
#define PROGRAM_H
|
#define PROGRAM_H
|
||||||
|
|
||||||
|
#include <DHT.h>
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <Ultrasonic.h>
|
||||||
|
|
||||||
|
#include "API.h"
|
||||||
|
#include "Capteur.h"
|
||||||
|
#include "Ultrason.h"
|
||||||
|
#include "HumiTemp.h"
|
||||||
|
#include "Balance.h"
|
||||||
|
#include "OledScreen.h"
|
||||||
|
|
||||||
class Program{
|
class Program{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@ -17,5 +28,35 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/* data */
|
/* data */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief capteur humi/temp
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Capteur *dht;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief capteur ultra son pour le niveau de remplissage de la poubelle
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Capteur *ultrasonic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief capteur poid pour le niveau de remplissage de la poubelle
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Capteur *balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OledScreen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
OledScreen* screen;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Réference de l'API pour les calls
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
API *api;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
@ -41,8 +41,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool sendValue(String val, String poubelleID, String unit, bool full);
|
bool sendValue(String val, String poubelleID, String unit, bool full);
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
/**
|
||||||
* @brief connect l'utilisateur a l'api et met a jour le token
|
* @brief connect l'utilisateur a l'api et met a jour le token
|
||||||
*
|
*
|
||||||
@ -51,6 +49,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
bool connect();
|
bool connect();
|
||||||
|
|
||||||
|
//TODO :: Check wifibegin avant
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ID de l'utilisateur
|
* @brief ID de l'utilisateur
|
||||||
*
|
*
|
||||||
|
@ -59,7 +59,8 @@ bool API::connect(){
|
|||||||
this->client->println();
|
this->client->println();
|
||||||
|
|
||||||
|
|
||||||
while (!client->available()) {}
|
while (!client->available()) {
|
||||||
|
}
|
||||||
|
|
||||||
String responce = "";
|
String responce = "";
|
||||||
while (client->available()) {
|
while (client->available()) {
|
||||||
@ -77,7 +78,10 @@ bool API::connect(){
|
|||||||
this->client->stop();
|
this->client->stop();
|
||||||
|
|
||||||
sortie = true;
|
sortie = true;
|
||||||
|
if (JSONVar::stringify(JSONVar::parse(str)["code"]) == "400") {
|
||||||
|
Serial.println("Failed to authenticate");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return sortie;
|
return sortie;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
76
IOT/lib/Capteur/include/Balance.h
Normal file
76
IOT/lib/Capteur/include/Balance.h
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#ifndef BALANCE_H
|
||||||
|
#define BALANCE_H
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <HX711.h>
|
||||||
|
|
||||||
|
#include "Capteur.h"
|
||||||
|
|
||||||
|
class Balance: public Capteur{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief constructeur
|
||||||
|
*
|
||||||
|
* @param[in] doutPin : pin DOUT du module HX711
|
||||||
|
* @param[in] sckPin : pin horloge du module HX711
|
||||||
|
* @param[in] fullVall : valeur a la quel la poubelle est pleine
|
||||||
|
*/
|
||||||
|
Balance(int doutPin, int sckPin, String fullVall);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief lit la valeur du capteur de poid
|
||||||
|
*
|
||||||
|
* @return String retour la valeur
|
||||||
|
*/
|
||||||
|
String read();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief tare et scale a 0, et recuperation de la valeur brut du plateau
|
||||||
|
*/
|
||||||
|
bool initCalibration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief initialisation du calibrage
|
||||||
|
*
|
||||||
|
* @param[in] poidsRef : poid de reférence pour la calibration
|
||||||
|
* @param[in] moyenne_calibration : nombre de valeurs a lire pour une mesure
|
||||||
|
*
|
||||||
|
* @return renvoi un true si calibration bien effectue
|
||||||
|
*/
|
||||||
|
bool calibration(int poidsRef,int moyenne_calibration);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief tar le capteur de poids
|
||||||
|
*
|
||||||
|
* @param[in] val valeur de référence du capteur
|
||||||
|
* @return true si la tarre a bien réussi (ou si il n'a pas besoins de tarre)
|
||||||
|
* @return false erreur durrant la tar
|
||||||
|
*/
|
||||||
|
bool tar(int val = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Variable issue de la librairie HX711 qui permet d'utiliser les fonctions de celle-ci
|
||||||
|
*/
|
||||||
|
HX711* capteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief true = calibration et false = erreur
|
||||||
|
*/
|
||||||
|
bool initialized;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Facteur de calibration obtenu par : (val brute poids ref - val brute poids plexiglas)/ poids ref
|
||||||
|
*/
|
||||||
|
int calibrationFact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Valeur moyenne brute du poids sans rien sur la balance juste le plexiglas
|
||||||
|
*/
|
||||||
|
long initialVal;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
67
IOT/lib/Capteur/include/Capteur.h
Normal file
67
IOT/lib/Capteur/include/Capteur.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#ifndef CAPTEUR_H
|
||||||
|
#define CAPTEUR_H
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
class Capteur{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Capteur object
|
||||||
|
*
|
||||||
|
* @param[in] type type de mesure lue (T/H, W, D,...)
|
||||||
|
* @param[in] fullVal valeur a la quel la poubelle est considéré comme pleine
|
||||||
|
*/
|
||||||
|
Capteur(String type, String fullVal);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief tar le capteur si il a besoins d'être tarré
|
||||||
|
*
|
||||||
|
* @param[in] val *opt* si le capteur a besoins d'une valeur de ref pour être tarré
|
||||||
|
* @return true si la tarre a bien réussi (ou si il n'a pas besoins de tarre)
|
||||||
|
* @return false erreur durrant la tar
|
||||||
|
*/
|
||||||
|
virtual bool tar(int val = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief lit la valeur du capteur
|
||||||
|
*
|
||||||
|
* @return String retour la valeur
|
||||||
|
*/
|
||||||
|
virtual String read() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief revoie la valeur full
|
||||||
|
*
|
||||||
|
* @return true la poubelle est pleine
|
||||||
|
* @return false la poubelle n'est pas pleine
|
||||||
|
*/
|
||||||
|
bool isFull();
|
||||||
|
|
||||||
|
String getValType();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief la poubelle est pleinne
|
||||||
|
* est mis a jours par read()
|
||||||
|
*/
|
||||||
|
bool full;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief type de mesure lue (T/H, W, D,...)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief valeur a la quel la poubelle est considéré comme pleine
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
String fullVall;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // CAPTEUR_H
|
35
IOT/lib/Capteur/include/HumiTemp.h
Normal file
35
IOT/lib/Capteur/include/HumiTemp.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#ifndef HUMI_TEMP_H
|
||||||
|
#define HUMI_TEMP_H
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <DHT.h>
|
||||||
|
#include "Capteur.h"
|
||||||
|
|
||||||
|
class HumiTemp : public Capteur{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Humi Temp object
|
||||||
|
*
|
||||||
|
* @param pin pin du capteur dht
|
||||||
|
* @param type type de capteur dht (11,22,...)
|
||||||
|
* @param fullVal valeur au quel la poubelle est considéré comme pleinne
|
||||||
|
*/
|
||||||
|
HumiTemp(int pin, String type, String fullVall);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief lit le capteur d'humi/temp
|
||||||
|
*
|
||||||
|
* @return String valeur format "XX/YY" X% et Y°C
|
||||||
|
*/
|
||||||
|
String read();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
DHT* capteur;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //HUMI_TEMP_H
|
38
IOT/lib/Capteur/include/Ultrason.h
Normal file
38
IOT/lib/Capteur/include/Ultrason.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#ifndef ULTRASON_H
|
||||||
|
#define ULTRASON_H
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <Ultrasonic.h>
|
||||||
|
|
||||||
|
#include "Capteur.h"
|
||||||
|
|
||||||
|
class Ultrason: public Capteur{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Ultrason object
|
||||||
|
*
|
||||||
|
* @param trigeur pin trigeur du capteur ultra son
|
||||||
|
* @param echo pin echo du capteur ultra son
|
||||||
|
* @param fullVall valeur a la quel la poubelle est pleine
|
||||||
|
*/
|
||||||
|
Ultrason(int trigeur, int echo, String fullVall);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief lit la valeur du capteur ultra son
|
||||||
|
*
|
||||||
|
* @return String retour la valeur
|
||||||
|
*/
|
||||||
|
String read();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief capteur utiliser ultrason utiliser pour la mesure
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Ultrasonic* capteur;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ULTRASON_H
|
58
IOT/lib/Capteur/src/Balance.cpp
Normal file
58
IOT/lib/Capteur/src/Balance.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include "../include/Balance.h"
|
||||||
|
|
||||||
|
Balance::Balance(int doutPin, int sckPin, String fullVall):
|
||||||
|
Capteur("W", fullVall){
|
||||||
|
|
||||||
|
this->capteur = new HX711();
|
||||||
|
this->capteur->begin(doutPin, sckPin);
|
||||||
|
this->initialized = false;
|
||||||
|
this->capteur->set_scale();
|
||||||
|
this->capteur->tare();
|
||||||
|
this->initialVal = 0;
|
||||||
|
this->calibrationFact = 0;
|
||||||
|
this->initCalibration();
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean Balance::initCalibration() {
|
||||||
|
|
||||||
|
this->capteur->set_scale();
|
||||||
|
this->capteur->tare();
|
||||||
|
this->initialVal = this->capteur->read_average(20);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean Balance::calibration(int poidsRef,int moyenne_calibration) {
|
||||||
|
|
||||||
|
int rawValref = 0; // Valeur brute de plexiglas et poids réf
|
||||||
|
int tempPoids = 0; // C'est la valeur du poids en grammes calculée grâce au facteur de calibration
|
||||||
|
|
||||||
|
rawValref = this->capteur->read_average(moyenne_calibration);
|
||||||
|
this->calibrationFact = (rawValref - this->initialVal) / poidsRef;
|
||||||
|
do {
|
||||||
|
this->capteur->set_scale(calibrationFact);
|
||||||
|
tempPoids = this->capteur->get_units(5);
|
||||||
|
if (tempPoids < poidsRef) {
|
||||||
|
calibrationFact -= 1;
|
||||||
|
} else if (tempPoids > poidsRef) {
|
||||||
|
calibrationFact += 1;
|
||||||
|
}
|
||||||
|
} while (tempPoids != poidsRef);
|
||||||
|
return initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String Balance::read() {
|
||||||
|
int sortie = (int)this->capteur->get_units();
|
||||||
|
this->full = sortie > this->fullVall.toInt();
|
||||||
|
if (this->initialized == true) {
|
||||||
|
return String(sortie);
|
||||||
|
} else {
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Balance::tar(int val){
|
||||||
|
this->initialized = true;
|
||||||
|
this->calibrationFact = val;
|
||||||
|
this->capteur->set_scale(val);
|
||||||
|
return this->initialized;
|
||||||
|
}
|
22
IOT/lib/Capteur/src/Capteur.cpp
Normal file
22
IOT/lib/Capteur/src/Capteur.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "../include/Capteur.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Capteur::Capteur(String type, String fullVall){
|
||||||
|
this->type = type;
|
||||||
|
this->fullVall = fullVall;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Capteur::tar(int val){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Capteur::isFull(){
|
||||||
|
return this->full;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String Capteur::getValType(){
|
||||||
|
return this->type;
|
||||||
|
}
|
26
IOT/lib/Capteur/src/HumiTemp.cpp
Normal file
26
IOT/lib/Capteur/src/HumiTemp.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "../include/HumiTemp.h"
|
||||||
|
|
||||||
|
HumiTemp::HumiTemp(int pin, String type, String fullVall):
|
||||||
|
Capteur("H/T",fullVall){
|
||||||
|
this->capteur = new DHT(pin, type.c_str());
|
||||||
|
this->capteur->begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
String HumiTemp::read(){
|
||||||
|
String sortie = "";
|
||||||
|
int hum = this->capteur->readHumidity(true);
|
||||||
|
int temp = this->capteur->readTemperature(false,true);
|
||||||
|
|
||||||
|
//valeur pour un élevage d'astico de pèche selon chatGPT
|
||||||
|
if((temp > 20 && temp < 30) && (hum > 60 && hum < 80)){//TODO: passer les valeurs en config
|
||||||
|
this->full = true;
|
||||||
|
}else{
|
||||||
|
this->full = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sortie += String(hum);
|
||||||
|
sortie += "/";
|
||||||
|
sortie += String(temp);
|
||||||
|
return sortie;
|
||||||
|
}
|
||||||
|
//TODO: faire en soirte qu'il y ai un nombre de cycle pour l'aparition d'asticots (entre 1 et 3 jours)
|
19
IOT/lib/Capteur/src/Ultrason.cpp
Normal file
19
IOT/lib/Capteur/src/Ultrason.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include "../include/Ultrason.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Ultrason::Ultrason(int trigeur, int echo, String fullVall):
|
||||||
|
Capteur("D",fullVall){
|
||||||
|
this->capteur = new Ultrasonic(trigeur, echo);
|
||||||
|
}
|
||||||
|
|
||||||
|
String Ultrason::read(){
|
||||||
|
int sortie = this->capteur->read();
|
||||||
|
if (sortie < this->fullVall.toInt())
|
||||||
|
{
|
||||||
|
this->full = true;
|
||||||
|
}else{
|
||||||
|
this->full = false;
|
||||||
|
}
|
||||||
|
return String(sortie);
|
||||||
|
}//TODO: faire en sorte que full se reset avec une autre val
|
59
IOT/lib/OledScreen/include/OledScreen.h
Normal file
59
IOT/lib/OledScreen/include/OledScreen.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#ifndef OLED_SCREEN_H
|
||||||
|
#define OLED_SCREEN_H
|
||||||
|
|
||||||
|
#include <Adafruit_SSD1306.h>
|
||||||
|
|
||||||
|
|
||||||
|
class OledScreen {
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Oled Screen object
|
||||||
|
*
|
||||||
|
* @param screenWidth The width of the screen
|
||||||
|
* @param screenHeight The height of the screen
|
||||||
|
* @param oledResetPin The pin used to reset the screen (default: -1)
|
||||||
|
*/
|
||||||
|
OledScreen(int screenWidth, int screenHeight, int oledResetPin = -1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief display welcome screen
|
||||||
|
*/
|
||||||
|
void welcome();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief print the total amount on the screen
|
||||||
|
*
|
||||||
|
* @param amount The total amount to print in centimes
|
||||||
|
*/
|
||||||
|
void printAmount(int amount);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the screen
|
||||||
|
*/
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief messsage for wifi waiting
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void wifiWaiting();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief show the sensor value
|
||||||
|
*
|
||||||
|
* @param distance length value
|
||||||
|
* @param poid weith value
|
||||||
|
* @param humitemp humidity and temperature value
|
||||||
|
*/
|
||||||
|
void printVal(String distance, String poid, String humitemp);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Adafruit_SSD1306* display;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
76
IOT/lib/OledScreen/src/OledScreeen.cpp
Normal file
76
IOT/lib/OledScreen/src/OledScreeen.cpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#include "../include/OledScreen.h"
|
||||||
|
|
||||||
|
OledScreen::OledScreen(int screenWidth, int screenHeight, int oledResetPin) {
|
||||||
|
this->display = new Adafruit_SSD1306(screenWidth, screenHeight, &Wire, oledResetPin);
|
||||||
|
if (!display->begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
|
||||||
|
Serial.println(F("SSD1306 allocation failed"));
|
||||||
|
for (;;); // Don't proceed, loop forever
|
||||||
|
}
|
||||||
|
this->display->clearDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OledScreen::welcome() {
|
||||||
|
this->display->clearDisplay();
|
||||||
|
this->display->setCursor(0, 0);
|
||||||
|
this->display->setTextSize(2);
|
||||||
|
this->display->setTextColor(WHITE);
|
||||||
|
this->display->println(F("\nBienvenue!"));
|
||||||
|
this->display->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OledScreen::printVal(String distance, String poid, String humitemp){
|
||||||
|
this->display->clearDisplay();
|
||||||
|
this->display->setCursor(0, 0);
|
||||||
|
this->display->setTextSize(2);
|
||||||
|
this->display->setTextColor(WHITE);
|
||||||
|
this->display->print(F("Dist:"));
|
||||||
|
this->display->print(distance);
|
||||||
|
this->display->println();
|
||||||
|
this->display->print(F("Poids:"));
|
||||||
|
this->display->print(poid);
|
||||||
|
this->display->println();
|
||||||
|
this->display->print(F("humi:"));
|
||||||
|
this->display->print(humitemp.substring(0,humitemp.indexOf("/")));
|
||||||
|
this->display->println();
|
||||||
|
this->display->print(F("temp:"));
|
||||||
|
this->display->print(humitemp.substring(humitemp.indexOf("/")+1,humitemp.length()));
|
||||||
|
this->display->println();
|
||||||
|
this->display->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void OledScreen::printAmount(int amount) {
|
||||||
|
this->display->clearDisplay();
|
||||||
|
this->display->setCursor(0, 0);
|
||||||
|
this->display->setTextSize(2);
|
||||||
|
this->display->setTextColor(WHITE);
|
||||||
|
this->display->println(F(" Total: "));
|
||||||
|
this->display->println();
|
||||||
|
|
||||||
|
this->display->print(amount / 100);
|
||||||
|
this->display->print(F(","));
|
||||||
|
int centimes = amount % 100;
|
||||||
|
if (centimes < 10) {
|
||||||
|
this->display->print(F("0"));
|
||||||
|
}
|
||||||
|
this->display->println(centimes);
|
||||||
|
this->display->print(F(" EUR"));
|
||||||
|
this->display->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OledScreen::wifiWaiting() {
|
||||||
|
this->clear();
|
||||||
|
this->display->setCursor(0, 0);
|
||||||
|
this->display->setTextSize(2);
|
||||||
|
this->display->setTextColor(WHITE);
|
||||||
|
this->display->println(F("Connection\n"));
|
||||||
|
this->display->println(F(" WiFi...\n"));
|
||||||
|
this->display->println();
|
||||||
|
this->display->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OledScreen::clear() {
|
||||||
|
this->display->clearDisplay();
|
||||||
|
}
|
@ -38,6 +38,11 @@ monitor_flags =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
bportaluri/WiFiEsp@^2.2.2 ; gestion des commande 'AT' de l'esp01
|
bportaluri/WiFiEsp@^2.2.2 ; gestion des commande 'AT' de l'esp01
|
||||||
arduino-libraries/Arduino_JSON@^0.2.0 ; gestion des json
|
arduino-libraries/Arduino_JSON@^0.2.0 ; gestion des json
|
||||||
|
adafruit/DHT sensor library@^1.4.4 ; DHT11 lib
|
||||||
|
adafruit/Adafruit Unified Sensor@^1.1.9 ; adafruit sensor lib (required by DHT11)
|
||||||
|
ericksimoes/Ultrasonic@^3.0.0 ; lib capteur ultra son
|
||||||
|
bogde/HX711@0.7.5 ; lib pour la balance
|
||||||
|
adafruit/Adafruit SSD1306@^2.5.7 ; librairie pour l'ecran oled
|
||||||
; example:
|
; example:
|
||||||
; erropix/ESP32 AnalogWrite@^0.2
|
; erropix/ESP32 AnalogWrite@^0.2
|
||||||
|
|
||||||
|
@ -2,9 +2,49 @@
|
|||||||
|
|
||||||
|
|
||||||
Program::Program(){
|
Program::Program(){
|
||||||
|
////////SERIALS//////
|
||||||
|
Serial1.begin(MONITOR_SPEED);
|
||||||
|
Serial.begin(MONITOR_SPEED);
|
||||||
|
|
||||||
|
//////Oled Screen/////
|
||||||
|
this->screen = new OledScreen(OLED_WIDTH, OLED_HEIGHT, OLED_RESET);
|
||||||
|
this->screen->wifiWaiting();
|
||||||
|
|
||||||
|
////////API///////
|
||||||
|
this->api = new API(USER_NAME, USER_PASSWORD, API_HOST);
|
||||||
|
this->api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial1);
|
||||||
|
|
||||||
|
|
||||||
|
//////CAPTEUR/////
|
||||||
|
this->ultrasonic = new Ultrason(ULTRA_SOUND_TRIGD, ULTRA_SOUND_ECHO, ULTRA_SOUND_FULL);
|
||||||
|
this->dht = new HumiTemp(DHTPIN, DHTTYPE, DHT_FULL);
|
||||||
|
this->balance = new Balance(POID_DOUT,POID_SCK, POID_FULL);
|
||||||
|
this->balance->tar(1077);
|
||||||
|
|
||||||
|
this->screen->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Program::loop(){
|
void Program::loop(){
|
||||||
|
String distance = this->ultrasonic->read();
|
||||||
|
String humitemp = this->dht->read();
|
||||||
|
String poid = this->balance->read();
|
||||||
|
|
||||||
|
|
||||||
|
this->screen->printVal(distance, poid, humitemp);
|
||||||
|
|
||||||
|
this->api->sendValue(distance, TRASHCAN_ONE, this->ultrasonic->getValType(), this->ultrasonic->isFull());
|
||||||
|
Serial.print("Distance in CM = " + distance);
|
||||||
|
Serial.println(this->ultrasonic->isFull()?" true":" false");
|
||||||
|
|
||||||
|
this->api->sendValue(humitemp, TRASHCAN_TWO, this->dht->getValType(), this->dht->isFull());
|
||||||
|
Serial.print("humiTemp = " + humitemp);
|
||||||
|
Serial.println(this->dht->isFull()?" true":" false");
|
||||||
|
|
||||||
|
this->api->sendValue(poid, TRASHCAN_THREE, this->balance->getValType(), this->balance->isFull());
|
||||||
|
Serial.print("poid = " + poid);
|
||||||
|
Serial.println(this->balance->isFull()?" true":" false");
|
||||||
|
|
||||||
|
Serial.println();
|
||||||
|
|
||||||
|
delay(1000);
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
#ifndef TESTING
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "Program.h"
|
#include "Program.h"
|
||||||
|
|
||||||
@ -10,3 +12,4 @@ void setup() {
|
|||||||
void loop() {
|
void loop() {
|
||||||
program->loop();
|
program->loop();
|
||||||
}
|
}
|
||||||
|
#endif
|
23
IOT/test/main.cpp
Normal file
23
IOT/test/main.cpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include <Arduino.h>
|
||||||
|
#include <unity.h>
|
||||||
|
#include "test.h"
|
||||||
|
void setup() {
|
||||||
|
delay(2000);
|
||||||
|
// start unit tests engine
|
||||||
|
UNITY_BEGIN();
|
||||||
|
Serial.begin(115200);
|
||||||
|
RUN_TEST(TestWifiBeginConnected);
|
||||||
|
RUN_TEST(TestWifiBeginNotConnected);
|
||||||
|
RUN_TEST(TestConnectAPI);
|
||||||
|
// RUN_TEST(TestConnectAPIFailed);
|
||||||
|
RUN_TEST(TestSendValue);
|
||||||
|
|
||||||
|
|
||||||
|
UNITY_END();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
}
|
10
IOT/test/test.h
Normal file
10
IOT/test/test.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef TEST_H
|
||||||
|
#define TEST_H
|
||||||
|
|
||||||
|
void TestWifiBeginConnected();
|
||||||
|
void TestWifiBeginNotConnected();
|
||||||
|
void TestConnectAPI();
|
||||||
|
void TestConnectAPIFailed();
|
||||||
|
void TestSendValue();
|
||||||
|
|
||||||
|
#endif
|
48
IOT/test/test_api.cpp
Normal file
48
IOT/test/test_api.cpp
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#include "test.h"
|
||||||
|
#include <unity.h>
|
||||||
|
#include "API.h"
|
||||||
|
|
||||||
|
|
||||||
|
//Testing WifiBegin function
|
||||||
|
void TestWifiBeginConnected() {
|
||||||
|
API* api = new API(USER_NAME, USER_PASSWORD, API_HOST);
|
||||||
|
|
||||||
|
Serial1.begin(MONITOR_SPEED);
|
||||||
|
TEST_ASSERT_EQUAL_MESSAGE(true, api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial1), "Wifi not connected");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestWifiBeginNotConnected() {
|
||||||
|
API* api = new API(USER_NAME, USER_PASSWORD, API_HOST);
|
||||||
|
|
||||||
|
Serial2.begin(MONITOR_SPEED);
|
||||||
|
TEST_ASSERT_EQUAL_MESSAGE(false, api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial2), "Wifi connected");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Testing Connect function
|
||||||
|
void TestConnectAPI() {
|
||||||
|
API* api = new API(USER_NAME, USER_PASSWORD, API_HOST);
|
||||||
|
|
||||||
|
Serial1.begin(MONITOR_SPEED);
|
||||||
|
api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial1);
|
||||||
|
TEST_ASSERT_EQUAL_MESSAGE(true, api->connect(), "Not Connected");
|
||||||
|
}
|
||||||
|
|
||||||
|
//FIXME: boucle inf when connection failed
|
||||||
|
void TestConnectAPIFailed() {
|
||||||
|
API* api = new API("Carl", "toto", API_HOST);
|
||||||
|
|
||||||
|
Serial1.begin(MONITOR_SPEED);
|
||||||
|
api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial1);
|
||||||
|
TEST_ASSERT_EQUAL_MESSAGE(false, api->connect(), "Connected");
|
||||||
|
}
|
||||||
|
|
||||||
|
//Testing SendValue function
|
||||||
|
void TestSendValue() {
|
||||||
|
API* api = new API(USER_NAME, USER_PASSWORD, API_HOST);
|
||||||
|
|
||||||
|
Serial1.begin(MONITOR_SPEED);
|
||||||
|
api->wifiBegin(WIFI_SSID, WIFI_PASSWORD, &Serial1);
|
||||||
|
TEST_ASSERT_EQUAL_MESSAGE(true, api->sendValue("30", "gdnuxl0wlgurtj3", "W", true), "Not Connected to server");
|
||||||
|
}
|
20
README.md
20
README.md
@ -5,3 +5,23 @@ https://gitea.cb85.software/Epitech-T-DEV-811/T-DEV-811
|
|||||||
|
|
||||||
|
|
||||||
Lien de la CAO : https://cad.onshape.com/documents/d370ee863400195afb23d026/w/1a94981b6a6f71d70b075e30/e/d0feb75fc5a122c54598349b?renderMode=0&uiState=6422993bab4d903a51186392
|
Lien de la CAO : https://cad.onshape.com/documents/d370ee863400195afb23d026/w/1a94981b6a6f71d70b075e30/e/d0feb75fc5a122c54598349b?renderMode=0&uiState=6422993bab4d903a51186392
|
||||||
|
|
||||||
|
|
||||||
|
### Mobile/Unity
|
||||||
|
|
||||||
|
Pour gérer l'AR, nous avons décider d'utiliser Unity et pour résoudre le souci de multi target en AR, nous avons utilisé Vuforia.
|
||||||
|
|
||||||
|
### API: PocketBase
|
||||||
|
|
||||||
|
lien: https://iot.epi.cb85.software/
|
||||||
|
|
||||||
|
PocketBase est utilisé comme API pour ce projet.
|
||||||
|
coté IoT, les valeurs de chaque capteurs sont envoyé à l'API puis ensuite, l'app mobile unity récupére ces données a un interval X pour les affichers en AR sur chaque poubelle.
|
||||||
|
|
||||||
|
le champ 'unit' dans la collection trash correspond au type de capteur que l'IoT va envoyer a l'api. Le mapping suivant a été conventionner:
|
||||||
|
|
||||||
|
| Capteur | Unit | Valeur |
|
||||||
|
|----------------------|:----:|--------------------------------------|
|
||||||
|
| Temperature/Humidité | T/H | 10.0;50 (10 degré et 50% d'humidité) |
|
||||||
|
| Poids | W | 200 (200 gram) |
|
||||||
|
| Distance | D | 40 (40 cm) |
|
Reference in New Issue
Block a user