This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func routes(_ app: Application) throws { | |
var webSocketClients = [WebSocket]() | |
app.webSocket("commands") { request, ws in | |
ws.send("Connection OK") | |
webSocketClients.append(ws) | |
ws.onText { ws, string in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func routes(_ app: Application) throws { | |
app.webSocket("commands") { request, ws in | |
ws.send("Connection OK") | |
ws.onText { ws, string in | |
ws.send(string + " : OK") | |
} | |
ws.onClose.whenComplete { result in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Artificial Intelligence Airline Company</title> | |
<link rel="shortcut icon" href="TemplateData/favicon-32x32_0.png"> | |
<link rel="stylesheet" href="TemplateData/style.css"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"date": "", | |
"transformMatrix": "", | |
"imageResolution": "", | |
"matrixIntrinsic": "", | |
"focalLength": "", | |
"depthImage": "", | |
"imageFullFrame": "", | |
"accelerometerData": [{ | |
"x": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script type = "text/javascript"> | |
if ("WebSocket" in window) { | |
console.log("WebSocket is supported by the Browser!"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 10, 172, 0, 0, 8, 0, 8, 6, 0, 0, 0, 89, 175, 128, 174, 0, 0, 0, 1, 115, 82, 71, 66, 0, 174, 206, 28, 233, 0, 0, 0, 68, 101, 88, 73, 102, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 135, 105, 0, 4, 0, 0, 0, 1, 0, 0, 0, 26, 0, 0, 0, 0, 0, 3, 160, 1, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 160, 2, 0, 4, 0, 0, 0, 1, 0, 0, 10, 172, 160, 3, 0, 4, 0, 0, 0, 1, 0, 0, 8, 0, 0, 0, 0, 0, 188, 5, 169, 172, 0, 0, 0, 28, 105, 68, 79, 84, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 40, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 225, 72, 157, 189, 137, 112, 0, 0, 64, 0, 73, 68, 65, 84, 120, 1, 236, 218, 177, 13, 0, 48, 12, 195, 176, 252, 255, 116, 123, 133, 38, 115, 232, 26, 160, 6, 71, 221, 221, 61, 207, 6, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 161, 1, 227, 134, 227, 138, 129, 5, 209, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, 12, 48, 192, 0, 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static | |
func badge(_ completion: @escaping (Result<(HTTPURLResponse, Int?), Error>) -> Void) { | |
struct Payload: Decodable { | |
var value: Int | |
} | |
GalaxyRouter | |
.request(.myBadge) | |
.build(headers: ["Authorization": "Bearer \(getUserInfos()?.value(forKeyPath: "token") as! String)", ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loadModel(named: String, result: ARRaycastResult) { | |
var usdzToLoad: String = "" | |
switch named { | |
case "DYNO": | |
usdzToLoad = "toy_robot_vintage" | |
default: | |
break; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loadModel(named: String, result: ARRaycastResult) { | |
var usdzToLoad: String = "" | |
switch named { | |
case "DYNO": | |
usdzToLoad = "toy_robot_vintage.usdz" | |
default: | |
break; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func createPulse() { | |
for _ in 0...2 { | |
let circularPath = UIBezierPath(arcCenter: .zero, radius: UIScreen.main.bounds.size.width/2.0, startAngle: 0, endAngle: 2 * .pi, clockwise: true) | |
let pulseLayer1 = CAShapeLayer() | |
pulseLayer1.path = circularPath.cgPath | |
pulseLayer1.fillColor = UIColor.clear.cgColor | |
pulseLayer1.lineCap = CAShapeLayerLineCap.round |
NewerOlder