This file contains 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
//only allow to sign up if the user exists on firestore. | |
const functions = require('firebase-functions'); | |
const admin = require("firebase-admin"); | |
admin.initializeApp(); | |
exports.blockSignup = functions.auth.user().onCreate(user => { | |
return new Promise((resolve, reject) => { | |
admin.firestore().collection('users').doc(user.email).get().then(doc => { | |
if (doc.exists) { |
This file contains 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
rules_version = '2'; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /users/{userEmail} { | |
allow read: if request.auth.token.email.lower() == userEmail.lower(); | |
} | |
} | |
} |
This file contains 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
//GoogleAnalytics.jslib | |
mergeInto(LibraryManager.library, { | |
sendGoogleAnalyticsEvent: function(hspt) { | |
gtag('event', 'Click', { | |
'event_category' : 'Hotspot', | |
'event_label' : Pointer_stringify(hspt) | |
}); | |
} | |
}); |
This file contains 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
[[headers]] | |
for = "/Build/*.data.br" | |
[headers.values] | |
Content-Encoding = "br" | |
Content-Type = "application/octet-stream" | |
[[headers]] | |
for = "/Build/*.wasm.br" | |
[headers.values] | |
Content-Encoding = "br" |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FreeCamera : MonoBehaviour | |
{ | |
public float sensitivity = 10f; | |
public float maxYAngle = 80f; | |
private Vector2 currentRotation; | |
void Update() |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FlipNormals : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
Mesh mesh = this.GetComponent<MeshFilter>().sharedMesh; | |
Vector3[] normals = mesh.normals; |