Skip to content

Instantly share code, notes, and snippets.

View sorab2142's full-sized avatar

Sorab Pithawala sorab2142

View GitHub Profile
@sorab2142
sorab2142 / polygonMesh.d.ts
Created September 30, 2019 13:40
Port of wallBuilder and buildHouseFromFloorPlan to Typescript - BabylonJS - 2
import { Scene } from "../scene";
import { Vector2, Path2 } from "../Maths/math";
import { Mesh } from "../Meshes/mesh";
import { VertexData } from "../Meshes/mesh.vertexData";
/**
* Polygon
* @see https://doc.babylonjs.com/how_to/parametric_shapes#non-regular-polygon
*/
export declare class Polygon {
/**
@sorab2142
sorab2142 / wallBuilder.ts
Last active September 30, 2019 13:37
Port of wallBuilder and buildHouseFromFloorPlan to Typescript - BabylonJS
import { Vector3, Scene, Vector4, Color4, PolygonMeshBuilder, Vector2, VertexData, Mesh } from '@babylonjs/core/Legacy/legacy';
import earcut from 'earcut';
export const corner = (x: number, y: number) => {
return new Vector3(x, 0, y);
}
class door {
constructor(public width: number, public height: number) { }
}
@sorab2142
sorab2142 / Application.h
Created July 6, 2015 06:34
Use Embedded WebView for Google Login
#ifndef Unity_iPhone_Application_h
#define Unity_iPhone_Application_h
#endif
#import <UIKit/UIKit.h>
#define ApplicationOpenGoogleAuthNotification @"ApplicationOpenGoogleAuthNotification"