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
| (function(E,I){typeof exports=="object"&&typeof module<"u"?I(exports):typeof define=="function"&&define.amd?define(["exports"],I):(E=typeof globalThis<"u"?globalThis:E||self,I(E.FOUR={}))})(this,function(E){"use strict";var I=1e-6,R=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var r=0,i=arguments.length;i--;)r+=arguments[i]*arguments[i];return Math.sqrt(r)});function G(){var r=new R(9);return R!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function j(r,i){var t=i[0],e=i[1],a=i[2],n=i[3],s=i[4],l=i[5],h=i[6],c=i[7],x=i[8],w=i[9],A=i[10],m=i[11],M=i[12],p=i[13],y=i[14],b=i[15],S=t*l-e*s,d=t*h-a*s,f=t*c-n*s,g=e*h-a*l,v=e*c-n*l,T=a*c-n*h,V=x*p-w*M,_=x*y-A*M,u=x*b-m*M,U=w*y-A*p,z=w*b-m*p,F=A*b-m*y,o=S*F-d*z+f*U+g*u-v*_+T*V;return o?(o=1/o,r[0]=(l*F-h*z+c*U)*o,r[1]=(h*u-s*F-c*_)*o,r[2]=(s*z-l*u+c*V)*o,r[3]=(a*z-e*F-n*U)*o,r[4]=(t*F-a*u+n*_)*o,r[5]=(e*u-t*z-n*V)*o,r[6]=(p*T-y*v+b*g)*o,r[7]=(y*f-M*T-b*d)*o,r[8]=(M*v-p*f+b*S)*o,r):null}function L |
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 { mat4, quat, vec3, mat3 } from 'gl-matrix' | |
| export class Object3D { | |
| readonly matrix = mat4.create() | |
| readonly quaternion = quat.create() | |
| readonly position = vec3.create() | |
| readonly scale = vec3.set(vec3.create(), 1, 1, 1) | |
| readonly up = vec3.set(vec3.create(), 0, 1, 0) | |
| readonly children: Object3D[] = [] | |
| public parent: Object3D | null = null |
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 { GUI } from 'https://unpkg.com/[email protected]/examples/jsm/libs/lil-gui.module.min.js' | |
| const canvas = document.createElement('canvas') | |
| const gl = canvas.getContext('webgl2') | |
| const ext = gl.getExtension('KHR_parallel_shader_compile') | |
| const parameters = { | |
| count: 1000, | |
| series: false, | |
| KHR: 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
| import { Vector3, Camera } from 'three' | |
| // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons | |
| enum BUTTONS { | |
| NONE = 0, | |
| LEFT = 1, | |
| RIGHT = 2, | |
| } | |
| const KEYBOARD_ZOOM_SPEED = 0.04 |
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
| /** | |
| * Matches against GLSL shader outputs. | |
| */ | |
| const VARYING_REGEX = /[^\w](?:varying|out)\s+\w+\s+(\w+)\s*;/g | |
| /** | |
| * Adds line numbers to a string with an optional starting offset. | |
| */ | |
| const lineNumbers = (source: string, offset = 0): string => source.replace(/^/gm, () => `${offset++}:`) |
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
| diff --git a/node_modules/react-native/Libraries/Blob/BlobManager.js b/node_modules/react-native/Libraries/Blob/BlobManager.js | |
| index 0d4cee7..9e39534 100644 | |
| --- a/node_modules/react-native/Libraries/Blob/BlobManager.js | |
| +++ b/node_modules/react-native/Libraries/Blob/BlobManager.js | |
| @@ -14,6 +14,7 @@ const BlobRegistry = require('./BlobRegistry'); | |
| import type {BlobData, BlobOptions, BlobCollector} from './BlobTypes'; | |
| import NativeBlobModule from './NativeBlobModule'; | |
| import invariant from 'invariant'; | |
| +import { getBlobForArrayBuffer } from 'react-native-blob-jsi-helper'; | |
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 { Asset } from 'expo-asset' | |
| /** | |
| * Generates an asset based on input type. | |
| */ | |
| const getAsset = (input) => { | |
| if (input instanceof Asset) return input | |
| switch (typeof input) { |
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
| /** | |
| * react-native example using R3F v7. | |
| * | |
| * Dependencies: | |
| * - @react-three/fiber 7.0.29 | |
| * - react 17.0.1 | |
| * - react-native 0.68.2 | |
| * - expo-gl 11.3.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
| /** | |
| * Constructs a WebGL FBO with MRT and multi-sampling. | |
| */ | |
| export class WebGLFBO { | |
| readonly gl: WebGL2RenderingContext | |
| readonly width: number | |
| readonly height: number | |
| readonly count: number | |
| readonly samples: number | |
| readonly frameBuffer: WebGLFramebuffer |
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 { Asset } from 'expo-asset' | |
| /** | |
| * Generates an asset based on input type. | |
| */ | |
| const getAsset = (input) => { | |
| if (input instanceof Asset) return input | |
| switch (typeof input) { |