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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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
using System.Collections.Generic; | |
using ProceduralToolkit; | |
using ProceduralToolkit.Samples.Primitives; | |
using UnityEngine; | |
using XNode; | |
public enum PrimitiveType | |
{ | |
Dodecahedron, | |
Octahedron |
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
def gltf(request, lat, lng, distance): | |
scale = 100000 | |
pnt = GEOSGeometry(f'POINT({lng} {lat})', srid=4326) | |
buildings = Building.objects.filter(outline__distance_lte=(pnt, D(km=distance))) | |
scene = Scene() | |
centroid_total = (0,0) | |
count = 0.0 |
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
{ | |
"Name": "Snapping", | |
"ShapeType": "Johnson", | |
"PolyTypeCategory": "All", | |
"PolyType": "Small_Cubicuboctahedron", | |
"JohnsonPolyType": "Cupola", | |
"OtherPolyType": "L1", | |
"GridType": "Square", | |
"GridShape": "Cube", | |
"BypassOps": false, |
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
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class DepthNormalsFeature : ScriptableRendererFeature | |
{ | |
private DepthNormalsPass depthNormalsPass; | |
RenderTargetHandle m_DepthNormalsTexture; | |
public override void Create() |
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
using UnityEngine; | |
public ChangeStuff() | |
{ | |
gameobject.GetComponent<MeshRenderer>().material.color = Color.red; | |
transform.localScale = new Vector3(5,5,5); | |
} |
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
{ | |
"Name": "Brazier", | |
"ShapeType": "Uniform", | |
"PolyType": 39, | |
"JohnsonPolyType": 4, | |
"BypassOps": false, | |
"TwoSided": true, | |
"GridType": "Hex", | |
"PrismP": 5, | |
"PrismQ": 2, |
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
{ | |
"Name": "Vicious", | |
"ShapeType": "Uniform", | |
"PolyType": 29, | |
"JohnsonPolyType": 4, | |
"BypassOps": false, | |
"TwoSided": true, | |
"GridType": "Hex", | |
"PrismP": 5, | |
"PrismQ": 2, |
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
using UnityEngine; | |
public static class C | |
{ | |
public static Camera Cam | |
{ | |
get { return Camera.main;} | |
} | |
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
using UnityEngine; | |
using UnityEngine.Playables; | |
using UnityEngine.XR; | |
public class PlayerController : MonoBehaviour | |
{ | |
public Transform Player1Start; | |
public Transform Player2Start; |