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
import Ammo from 'ammojs-typed'; | |
export class AmmoProvider { | |
private static api: typeof Ammo; | |
public static async getApi() { | |
if (!AmmoProvider.api) { | |
AmmoProvider.api = await Ammo();; | |
} |
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
import { createContext, FC, useEffect, useState } from "react"; | |
import Ammo from 'ammojs-typed'; | |
import * as THREE from 'three'; | |
import { useFrame } from "@react-three/fiber"; | |
const clock = new THREE.Clock(true); | |
const createWorld = async () => { | |
const api = await Ammo(); |
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
export class Thread<RT> { | |
private _worker: Worker; | |
private _listeners: (data: RT[]) => void; | |
constructor(lambda: (this: Worker) => void) { | |
const textContent = lambda.toString().replace(/^function .+\{?|\}$/g, ""); | |
const blob = new Blob([textContent], { type: "application/java-script" }); | |
this._worker = new Worker(URL.createObjectURL(blob)); | |
this._worker.addEventListener("message", this._loger); |
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
var canvas = document.createElement('canvas'); | |
var gl; | |
var debugInfo; | |
var vendor; | |
var renderer; | |
try { | |
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
} catch (e) { | |
} |
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
<script src="https://apis.google.com/js/api.js"></script> | |
<script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" | |
rel="stylesheet"> | |
<div class="header"> | |
Test application Spreadsheets API | |
</div> |