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
| export interface BlobLike { | |
| size: number; | |
| slice(start_offset: number, end_offset: number): BlobLike | Promise<BlobLike>; | |
| arrayBuffer(): Promise<ArrayBuffer>; | |
| } | |
| export const enum LogLevel { | |
| OFF, | |
| ERROR, |
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"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Harpagia: Zen Video Tracking</title> | |
| <style> | |
| body > .container { | |
| position: relative; |
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
| type ParamType = [0|1, 1|2|3|4]; | |
| export const F4: ParamType = [0,4]; | |
| export const F3: ParamType = [0,3]; | |
| export const F2: ParamType = [0,2]; | |
| export const F1: ParamType = [0,1]; | |
| export const U4: ParamType = [1,4]; | |
| export const U3: ParamType = [1,3]; | |
| export const U2: ParamType = [1,2]; | |
| export const U1: ParamType = [1,1]; |
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
| class Reader { | |
| constructor(ptr, buffer) { | |
| this.ptr = ptr; | |
| this.buffer = buffer; | |
| this.offset = 0; | |
| } | |
| Float3() { | |
| this.offset += 4 * 3; | |
| return new Float32Array(this.buffer, this.ptr + this.offset - 12, 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
| import fs from 'fs'; | |
| const wasmBuffer = fs.readFileSync('./build/release.wasm'); | |
| interface WasmExports { | |
| asyncStackPtr: number; | |
| initAsyncStack(): void; | |
| asyncify_start_unwind(stackPtr: number): void; | |
| asyncify_start_rewind(stackPtr: number): void; | |
| asyncify_stop_rewind(): void; | |
| run(): void; |
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
| const data = new Uint32Array([65531, 65528, 0, 65531, 65529, 0, 65531, 65530, 0, 65531, 65531, 0, 65531, 65532, 0, 65531, 65533, 0, 65531, 65534, 0, 65531, 65535, 0, 65531, 0, 0, 65531, 1, 0, 65531, 2, 0, 65531, 3, 0, 65531, 4, 0, 65531, 5, 0, 65531, 6, 0, 65532, 65528, 0, 65532, 65529, 0, 65532, 65530, 0, 65532, 65531, 0, 65532, 65532, 0, 65532, 65533, 0, 65532, 65534, 0, 65532, 65535, 0, 65532, 0, 0, 65532, 1, 0, 65532, 2, 0, 65532, 3, 0, 65532, 4, 0, 65532, 5, 0, 65532, 6, 0, 65533, 65528, 0, 65533, 65529, 0, 65533, 65530, 0, 65533, 65531, 0, 65533, 65532, 0, 65533, 65533, 0, 65533, 65534, 0, 65533, 65535, 0, 65533, 0, 0, 65533, 1, 0, 65533, 2, 0, 65533, 3, 0, 65533, 4, 0, 65533, 5, 0, 65533, 6, 0, 65534, 65528, 0, 65534, 65529, 0, 65534, 65530, 0, 65534, 65531, 0, 65534, 65532, 0, 65534, 65533, 0, 65534, 65534, 0, 65534, 65535, 0, 65534, 0, 0, 65534, 1, 0, 65534, 2, 0, 65534, 3, 0, 65534, 4, 0, 65534, 5, 0, 65534, 6, 0, 65535, 65528, 0, 65535, 65529, 0, 65535, 65530, 0, 65535, 65531, 0, 65535, 65532, 0, 6 |
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
| { | |
| "class": { | |
| "FixedConstraintSettings": { | |
| "properties": ["mPoint1", "mPoint2"] | |
| }, | |
| "PointConstraintSettings": { | |
| "properties": ["mPoint1", "mPoint2"] | |
| }, | |
| "DistanceConstraintSettings": { | |
| "properties": ["mPoint1", "mPoint2", "mLimitsSpringSettings"] |
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"> | |
| <head> | |
| <title>JoltPhysics.js demo</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
| <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/jrouwe/[email protected]/Examples/style.css"> | |
| <script type="importmap"> | |
| { |
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"> | |
| <head> | |
| <title>JoltPhysics.js demo</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
| <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/jrouwe/[email protected]/Examples///style.css"> | |
| <script type="importmap"> | |
| { |
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
| import * as THREE from 'three'; | |
| import Stats from 'stats.js'; | |
| import JOLT_NS from 'jolt-physics/wasm-compat'; | |
| export var Jolt: typeof JOLT_NS; | |
| import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js' | |
| import { WebGL } from './webgl'; | |
| // Graphics variables | |
| let container: HTMLDivElement; |
NewerOlder