├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle.kts ├── src └── jsMain │ ├── kotlin │ ├── LightSource.kt │ ├── WebGLHelpers.kt │ ├── HTMLInputHelpers.kt │ ├── ResourceLoader.kt │ ├── com │ │ └── tanelso2 │ │ │ └── glmatrix │ │ │ ├── Mat2.kt │ │ │ ├── Mat2d.kt │ │ │ ├── Quat.kt │ │ │ ├── Vec4.kt │ │ │ ├── create_kotlin_file_from_js.py │ │ │ ├── Mat3.kt │ │ │ ├── Vec2.kt │ │ │ ├── Vec3.kt │ │ │ └── Mat4.kt │ ├── ShaderProgram.kt │ ├── Main.kt │ ├── TeapotObj.kt │ └── ObjLoader.kt │ └── resources │ ├── vertex-shader.glsl │ ├── frag-shader.glsl │ ├── index.html │ └── teapot_w_normals.obj ├── README.md ├── .gitignore ├── .github └── workflows │ └── ci.yml ├── gradlew.bat ├── gradlew └── include └── gl-matrix-min.js /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.code.style=official 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tanelso2/kotlin-webgl-test/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0" 3 | } 4 | rootProject.name = "webgl-test" 5 | 6 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/LightSource.kt: -------------------------------------------------------------------------------- 1 | class LightSource( 2 | var pos: Array, 3 | var ambientColor: Array, 4 | var diffuseColor: Array, 5 | var specularColor: Array) -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Apr 21 07:29:50 CDT 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kotlin-webgl-test 2 | Trying to relearn WebGL while also learning Kotlin.js 3 | 4 | Live demo of the current code can be found at https://tanelso2.github.io/kotlin-webgl-test 5 | 6 | # Building 7 | 8 | ```bash 9 | ./gradlew build 10 | ``` 11 | 12 | # Viewing the Built Code 13 | 14 | Use any web server to serve `build/dist/js/productionExecutable` 15 | 16 | Here's an example using Python's built-in http server: 17 | ```bash 18 | python3 -m http.server --directory build/dist/js/productionExecutable 19 | ``` 20 | -------------------------------------------------------------------------------- /src/jsMain/resources/vertex-shader.glsl: -------------------------------------------------------------------------------- 1 | attribute vec3 aVertexPosition; 2 | attribute vec3 aVertexNormal; 3 | 4 | uniform mat4 uMMatrix; 5 | uniform mat4 uVMatrix; 6 | uniform mat4 uPMatrix; 7 | uniform mat3 uNMatrix; 8 | 9 | varying vec3 vertPos; 10 | varying vec3 normalInterp; 11 | 12 | void main(void) { 13 | vec4 vertPos4 = uPMatrix * uVMatrix * uMMatrix * vec4(aVertexPosition, 1.0); 14 | gl_Position = vertPos4; 15 | gl_PointSize = 10.0; 16 | vertPos = vec3(vertPos4) / vertPos4.w; 17 | normalInterp = uNMatrix * aVertexNormal; 18 | } 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build/ 3 | !gradle/wrapper/gradle-wrapper.jar 4 | !**/src/main/**/build/ 5 | !**/src/test/**/build/ 6 | 7 | ### IntelliJ IDEA ### 8 | .idea/modules.xml 9 | .idea/jarRepositories.xml 10 | .idea/compiler.xml 11 | .idea/libraries/ 12 | .idea/ 13 | *.iws 14 | *.iml 15 | *.ipr 16 | out/ 17 | !**/src/main/**/out/ 18 | !**/src/test/**/out/ 19 | 20 | ### Eclipse ### 21 | .apt_generated 22 | .classpath 23 | .factorypath 24 | .project 25 | .settings 26 | .springBeans 27 | .sts4-cache 28 | bin/ 29 | !**/src/main/**/bin/ 30 | !**/src/test/**/bin/ 31 | 32 | ### NetBeans ### 33 | /nbproject/private/ 34 | /nbbuild/ 35 | /dist/ 36 | /nbdist/ 37 | /.nb-gradle/ 38 | 39 | ### VS Code ### 40 | .vscode/ 41 | 42 | ### Mac OS ### 43 | .DS_Store 44 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/WebGLHelpers.kt: -------------------------------------------------------------------------------- 1 | import org.khronos.webgl.WebGLRenderingContext as GL 2 | import org.khronos.webgl.WebGLShader 3 | 4 | fun GL.getShader(source: String, shaderType: Int): WebGLShader { 5 | val shader = this.createShader(shaderType) 6 | this.shaderSource(shader, source) 7 | this.compileShader(shader) 8 | if(!(this.getShaderParameter(shader, GL.COMPILE_STATUS) as Boolean)) { 9 | println(this.getShaderInfoLog(shader)) 10 | } 11 | return shader ?: throw IllegalStateException("Shader is null!") 12 | } 13 | 14 | fun GL.getFragmentShader(source: String): WebGLShader = this.getShader(source, GL.FRAGMENT_SHADER) 15 | fun GL.getVertexShader(source: String): WebGLShader = this.getShader(source, GL.VERTEX_SHADER) 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | 7 | workflow_dispatch: 8 | 9 | concurrency: 10 | group: "pages" 11 | cancel-in-progress: true 12 | 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | jobs: 19 | build: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - uses: actions/checkout@v4 23 | - run: ./gradlew build --no-daemon 24 | - run: cp -r build/dist/js/productionExecutable ./_site 25 | - name: Setup Pages 26 | uses: actions/configure-pages@v5 27 | - name: Upload artifact 28 | uses: actions/upload-pages-artifact@v3 29 | deploy: 30 | environment: 31 | name: github-pages 32 | url: ${{ steps.deployment.outputs.page_url }} 33 | runs-on: ubuntu-latest 34 | needs: build 35 | steps: 36 | - name: Deploy to Github Pages 37 | id: deployment 38 | uses: actions/deploy-pages@v4 39 | -------------------------------------------------------------------------------- /src/jsMain/resources/frag-shader.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | 3 | uniform vec3 uLightPos; 4 | uniform vec3 uAmbientColor; 5 | uniform vec3 uDiffuseColor; 6 | uniform vec3 uSpecularColor; 7 | 8 | varying vec3 vertPos; 9 | varying vec3 normalInterp; 10 | 11 | uniform float shininess; 12 | 13 | void main(void) { 14 | vec3 normal = normalize(normalInterp); 15 | vec3 lightDir = normalize(uLightPos - vertPos); 16 | float diffuseWeight = max(dot(lightDir, normal), 0.0); 17 | float specularWeight = 0.0; 18 | 19 | if (diffuseWeight > 0.0) { 20 | vec3 viewDir = normalize(-vertPos); 21 | vec3 halfDir = normalize(lightDir + viewDir); 22 | float specAngle = max(dot(halfDir, normal), 0.0); 23 | specularWeight = pow(specAngle, shininess); 24 | } 25 | 26 | vec3 colorLinear = uAmbientColor + 27 | uDiffuseColor * diffuseWeight + 28 | uSpecularColor * specularWeight; 29 | 30 | gl_FragColor = vec4(colorLinear, 1.0); 31 | } 32 | -------------------------------------------------------------------------------- /src/jsMain/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Testing Kotlin 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | Scale 14 |
15 | 16 |
17 |
18 | Shininess 19 |
20 | 21 |
22 |
23 | Light Position 24 |
25 | X 26 | 27 | Y 28 | 29 | Z 30 | 31 |
32 |
33 | Rotation Speed 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/HTMLInputHelpers.kt: -------------------------------------------------------------------------------- 1 | import kotlinx.browser.document 2 | import org.w3c.dom.HTMLInputElement 3 | import kotlin.properties.ReadOnlyProperty 4 | import kotlin.reflect.KProperty 5 | 6 | fun getInputElem(s: String): HTMLInputElement = 7 | document.getElementById(s) as HTMLInputElement 8 | 9 | class HTMLInputProperty(private val input: HTMLInputElement): ReadOnlyProperty { 10 | override fun getValue(thisRef: Any?, property: KProperty<*>): Double = input.valueAsNumber 11 | } 12 | 13 | fun HTMLInputProperty(s: String): HTMLInputProperty { 14 | val elem = getInputElem(s) 15 | return HTMLInputProperty(elem) 16 | } 17 | 18 | class ArrayOfInputsProperty(private val inputs: Array): ReadOnlyProperty> { 19 | private val cache = inputs.map { it.valueAsNumber.toFloat() }.toTypedArray() 20 | init { 21 | inputs.mapIndexed { i,input -> 22 | input.oninput = { 23 | cache[i] = input.valueAsNumber.toFloat() 24 | null // Function is required to return a js value 25 | } 26 | } 27 | } 28 | override fun getValue(thisRef: Any?, property: KProperty<*>): Array = cache 29 | } 30 | 31 | fun ArrayOfInputsProperty(vararg inputNames: String): ArrayOfInputsProperty { 32 | val elems = inputNames.map { getInputElem(it) }.toTypedArray() 33 | return ArrayOfInputsProperty(elems) 34 | } -------------------------------------------------------------------------------- /src/jsMain/kotlin/ResourceLoader.kt: -------------------------------------------------------------------------------- 1 | import kotlinx.browser.window 2 | import org.w3c.fetch.* 3 | 4 | class ResourceLoader(vararg resourceLocations: String) { 5 | private class ResourceInfo { 6 | var loaded = false 7 | var value: String? = null 8 | } 9 | private val resourceMap: MutableMap = HashMap() 10 | private val fetchParams = RequestInit(method = "GET", cache = RequestCache.NO_STORE, mode = RequestMode.SAME_ORIGIN) 11 | init { 12 | for (loc in resourceLocations) { 13 | resourceMap[loc] = ResourceInfo() 14 | makeRequest(loc) 15 | } 16 | } 17 | 18 | private fun makeRequest(uri: String) { 19 | window.fetch(uri, fetchParams) 20 | .then {response -> response.text()} 21 | .then {text -> 22 | resourceMap[uri]?.loaded = true 23 | resourceMap[uri]?.value = text 24 | return@then null //to please the compiler 25 | } 26 | .catch {e -> 27 | println("Getting $uri failed with $e. Trying again") 28 | makeRequest(uri) 29 | } 30 | } 31 | 32 | operator fun get(name: String): String? { 33 | return resourceMap[name]?.value 34 | } 35 | 36 | fun allLoaded(): Boolean { 37 | return resourceMap.all { it.value.loaded } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Mat2.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Mat2JS = Float32Array 6 | 7 | external open class mat2 { 8 | companion object { 9 | fun create(): Mat2JS = definedExternally 10 | fun clone(a: Mat2JS): Mat2JS = definedExternally 11 | fun copy(out: Mat2JS, a: Mat2JS): Mat2JS = definedExternally 12 | fun identity(out: Mat2JS): Mat2JS = definedExternally 13 | fun fromValues(m00: Number, m01: Number, m10: Number, m11: Number): Mat2JS = definedExternally 14 | fun set(out: Mat2JS, m00: Number, m01: Number, m10: Number, m11: Number): Mat2JS = definedExternally 15 | fun transpose(out: Mat2JS, a: Mat2JS): Mat2JS = definedExternally 16 | fun invert(out: Mat2JS, a: Mat2JS): Mat2JS = definedExternally 17 | fun adjoint(out: Mat2JS, a: Mat2JS): Mat2JS = definedExternally 18 | fun determinant(a: Mat2JS): Number = definedExternally 19 | fun multiply(out: Mat2JS, a: Mat2JS, b: Mat2JS): Mat2JS = definedExternally 20 | fun mul(): Nothing = definedExternally 21 | fun rotate(out: Mat2JS, a: Mat2JS, rad: Number): Mat2JS = definedExternally 22 | fun scale(out: Mat2JS, a: Mat2JS, v: Vec2JS): Mat2JS = definedExternally 23 | fun fromRotation(out: Mat2JS, rad: Number): Mat2JS = definedExternally 24 | fun fromScaling(out: Mat2JS, v: Vec2JS): Mat2JS = definedExternally 25 | fun str(a: Mat2JS): String = definedExternally 26 | fun frob(a: Mat2JS): Number = definedExternally 27 | fun LDU(L: Mat2JS, D: Mat2JS, U: Mat2JS, a: Mat2JS): Nothing = definedExternally 28 | fun add(out: Mat2JS, a: Mat2JS, b: Mat2JS): Mat2JS = definedExternally 29 | fun subtract(out: Mat2JS, a: Mat2JS, b: Mat2JS): Mat2JS = definedExternally 30 | fun sub(): Nothing = definedExternally 31 | fun exactEquals(a: Mat2JS, b: Mat2JS): Boolean = definedExternally 32 | fun equals(a: Mat2JS, b: Mat2JS): Boolean = definedExternally 33 | fun multiplyScalar(out: Mat2JS, a: Mat2JS, b: Number): Mat2JS = definedExternally 34 | fun multiplyScalarAndAdd(out: Mat2JS, a: Mat2JS, b: Mat2JS, scale: Number): Mat2JS = definedExternally 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Mat2d.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Mat2dJS = Float32Array 6 | 7 | external open class mat2d { 8 | companion object { 9 | fun create(): Mat2dJS = definedExternally 10 | fun clone(a: Mat2dJS): Mat2dJS = definedExternally 11 | fun copy(out: Mat2dJS, a: Mat2dJS): Mat2dJS = definedExternally 12 | fun identity(out: Mat2dJS): Mat2dJS = definedExternally 13 | fun fromValues(a: Number, b: Number, c: Number, d: Number, tx: Number, ty: Number): Mat2dJS = definedExternally 14 | fun set(out: Mat2dJS, a: Number, b: Number, c: Number, d: Number, tx: Number, ty: Number): Mat2dJS = definedExternally 15 | fun invert(out: Mat2dJS, a: Mat2dJS): Mat2dJS = definedExternally 16 | fun determinant(a: Mat2dJS): Number = definedExternally 17 | fun multiply(out: Mat2dJS, a: Mat2dJS, b: Mat2dJS): Mat2dJS = definedExternally 18 | fun mul(): Nothing = definedExternally 19 | fun rotate(out: Mat2dJS, a: Mat2dJS, rad: Number): Mat2dJS = definedExternally 20 | fun scale(out: Mat2dJS, a: Mat2dJS, v: Vec2JS): Mat2dJS = definedExternally 21 | fun translate(out: Mat2dJS, a: Mat2dJS, v: Vec2JS): Mat2dJS = definedExternally 22 | fun fromRotation(out: Mat2dJS, rad: Number): Mat2dJS = definedExternally 23 | fun fromScaling(out: Mat2dJS, v: Vec2JS): Mat2dJS = definedExternally 24 | fun fromTranslation(out: Mat2dJS, v: Vec2JS): Mat2dJS = definedExternally 25 | fun str(a: Mat2dJS): String = definedExternally 26 | fun frob(a: Mat2dJS): Number = definedExternally 27 | fun add(out: Mat2dJS, a: Mat2dJS, b: Mat2dJS): Mat2dJS = definedExternally 28 | fun subtract(out: Mat2dJS, a: Mat2dJS, b: Mat2dJS): Mat2dJS = definedExternally 29 | fun sub(): Nothing = definedExternally 30 | fun multiplyScalar(out: Mat2dJS, a: Mat2dJS, b: Number): Mat2dJS = definedExternally 31 | fun multiplyScalarAndAdd(out: Mat2dJS, a: Mat2dJS, b: Mat2dJS, scale: Number): Mat2dJS = definedExternally 32 | fun exactEquals(a: Mat2dJS, b: Mat2dJS): Boolean = definedExternally 33 | fun equals(a: Mat2dJS, b: Mat2dJS): Boolean = definedExternally 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Quat.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias QuatJS = Float32Array 6 | 7 | external open class quat { 8 | companion object { 9 | fun create(): QuatJS = definedExternally 10 | fun clone(a: QuatJS): QuatJS = definedExternally 11 | fun fromValues(x: Number, y: Number, z: Number, w: Number): QuatJS = definedExternally 12 | fun copy(out: QuatJS, a: QuatJS): QuatJS = definedExternally 13 | fun set(out: QuatJS, x: Number, y: Number, z: Number, w: Number): QuatJS = definedExternally 14 | fun identity(out: QuatJS): QuatJS = definedExternally 15 | fun setAxisAngle(out: QuatJS, axis: Vec3JS, rad: Number): QuatJS = definedExternally 16 | fun getAxisAngle(out_axis: Vec3JS, q: QuatJS): Number = definedExternally 17 | fun add(out: QuatJS, a: QuatJS, b: QuatJS): QuatJS = definedExternally 18 | fun multiply(out: QuatJS, a: QuatJS, b: QuatJS): QuatJS = definedExternally 19 | fun mul(): Nothing = definedExternally 20 | fun scale(out: QuatJS, a: QuatJS, b: Number): QuatJS = definedExternally 21 | fun rotateX(out: QuatJS, a: QuatJS, rad: Number): QuatJS = definedExternally 22 | fun rotateY(out: QuatJS, a: QuatJS, rad: Number): QuatJS = definedExternally 23 | fun rotateZ(out: QuatJS, a: QuatJS, rad: Number): QuatJS = definedExternally 24 | fun calculateW(out: QuatJS, a: QuatJS): QuatJS = definedExternally 25 | fun dot(a: QuatJS, b: QuatJS): Number = definedExternally 26 | fun lerp(out: QuatJS, a: QuatJS, b: QuatJS, t: Number): QuatJS = definedExternally 27 | fun slerp(out: QuatJS, a: QuatJS, b: QuatJS, t: Number): QuatJS = definedExternally 28 | fun invert(out: QuatJS, a: QuatJS): QuatJS = definedExternally 29 | fun conjugate(out: QuatJS, a: QuatJS): QuatJS = definedExternally 30 | fun length(a: QuatJS): Number = definedExternally 31 | fun len(): Nothing = definedExternally 32 | fun squaredLength(a: QuatJS): Number = definedExternally 33 | fun sqrLen(): Nothing = definedExternally 34 | fun normalize(out: QuatJS, a: QuatJS): QuatJS = definedExternally 35 | fun fromMat3(out: QuatJS, m: Mat3JS): QuatJS = definedExternally 36 | fun str(a: QuatJS): String = definedExternally 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/ShaderProgram.kt: -------------------------------------------------------------------------------- 1 | import com.tanelso2.glmatrix.Mat3 2 | import com.tanelso2.glmatrix.Mat4 3 | import org.khronos.webgl.Float32Array 4 | import org.khronos.webgl.WebGLProgram 5 | import org.khronos.webgl.WebGLRenderingContext 6 | import org.khronos.webgl.WebGLUniformLocation 7 | 8 | class ShaderProgram(private val webgl: WebGLRenderingContext) { 9 | val program: WebGLProgram = 10 | webgl.createProgram() ?: throw IllegalStateException("Failed to create shader program") 11 | 12 | fun useProgram() { 13 | webgl.useProgram(program) 14 | } 15 | 16 | fun compile(vertexShaderSource: String, fragmentShaderSource: String) { 17 | val vertexShader = webgl.getVertexShader(vertexShaderSource) 18 | val fragmentShader = webgl.getFragmentShader(fragmentShaderSource) 19 | webgl.attachShader(program, vertexShader) 20 | webgl.attachShader(program, fragmentShader) 21 | webgl.linkProgram(program) 22 | useProgram() 23 | } 24 | 25 | fun setupAttribute(name: String, array: Float32Array) { 26 | val attribute = webgl.getAttribLocation(program, name) 27 | webgl.enableVertexAttribArray(attribute) 28 | val buffer = webgl.createBuffer() 29 | webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, buffer) 30 | webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, array, WebGLRenderingContext.STATIC_DRAW) 31 | webgl.vertexAttribPointer(attribute, 3, WebGLRenderingContext.FLOAT, false, 0, 0) 32 | } 33 | 34 | fun getUniformLocation(name: String) : WebGLUniformLocation = 35 | webgl.getUniformLocation(program, name) 36 | ?: throw IllegalArgumentException("Could not find uniform named '$name'") 37 | 38 | fun setupUniformMat4(name: String, value: Mat4, transpose: Boolean = false) { 39 | webgl.uniformMatrix4fv(getUniformLocation(name), transpose, value.array) 40 | } 41 | 42 | fun setupUniformMat3(name: String, value: Mat3, transpose: Boolean = false) { 43 | webgl.uniformMatrix3fv(getUniformLocation(name), transpose, value.array) 44 | } 45 | 46 | fun setupUniformFloat(name: String, value: Float) { 47 | webgl.uniform1f(getUniformLocation(name), value) 48 | } 49 | 50 | fun setupUniformVec3Float(name: String, value: Array) { 51 | webgl.uniform3fv(getUniformLocation(name), value) 52 | } 53 | } -------------------------------------------------------------------------------- /src/jsMain/kotlin/Main.kt: -------------------------------------------------------------------------------- 1 | 2 | import org.w3c.dom.HTMLCanvasElement 3 | import kotlinx.browser.document 4 | import kotlinx.browser.window 5 | import org.khronos.webgl.WebGLRenderingContext as GL 6 | 7 | class Main { 8 | private val canvas: HTMLCanvasElement = document.getElementById("webglCanvas") as HTMLCanvasElement 9 | private val webgl: GL = canvas.getContext("webgl") as GL 10 | private val shaderProgram: ShaderProgram = ShaderProgram(webgl) 11 | 12 | private val scaleFactor by HTMLInputProperty("scaleInput") 13 | 14 | private val lightPos: Array by ArrayOfInputsProperty( 15 | "lightPosX", 16 | "lightPosY", 17 | "lightPosZ" 18 | ) 19 | 20 | private val shininess by HTMLInputProperty("shininessInput") 21 | 22 | private val rotationSpeed by HTMLInputProperty("rotationSpeedInput") 23 | 24 | private val vertexShaderLocation = "vertex-shader.glsl" 25 | private val fragmentShaderLocation = "frag-shader.glsl" 26 | private val objFileLocation = "teapot.obj" 27 | private val resourceList = arrayOf( 28 | fragmentShaderLocation, 29 | vertexShaderLocation, 30 | objFileLocation 31 | ) 32 | 33 | private val resourceLoader = ResourceLoader(*resourceList) 34 | private val teapot: TeapotObj by lazy { TeapotObj(webgl, resourceLoader[objFileLocation]!!, shaderProgram)} 35 | private val light: LightSource = LightSource( 36 | lightPos, 37 | arrayOf(0.1f, 0.1f, 0.1f), 38 | arrayOf(0.4f, 0.4f, 0.0f), 39 | arrayOf(1.0f, 1.0f, 1.0f) 40 | ) 41 | 42 | init { 43 | webgl.enable(GL.DEPTH_TEST) 44 | } 45 | 46 | fun setup() { 47 | if (resourceLoader.allLoaded()) { 48 | val vertexShaderSource = resourceLoader[vertexShaderLocation]!! 49 | val fragmentShaderSource = resourceLoader[fragmentShaderLocation]!! 50 | shaderProgram.compile(vertexShaderSource, fragmentShaderSource) 51 | 52 | window.requestAnimationFrame { render() } 53 | } else { 54 | //enable javascript to context switch and finish our requests 55 | window.requestAnimationFrame { setup() } 56 | } 57 | } 58 | 59 | 60 | var rotation = 0.0 61 | 62 | fun draw() { 63 | //setupAttributes() 64 | light.pos = lightPos 65 | rotation += rotationSpeed 66 | 67 | teapot.draw(scaleFactor, rotation, shininess, light) 68 | } 69 | 70 | fun render() { 71 | webgl.clearColor(0f, 0f, 0f, 1f) 72 | webgl.clear(GL.COLOR_BUFFER_BIT or GL.DEPTH_BUFFER_BIT) 73 | draw() 74 | window.requestAnimationFrame { render() } 75 | } 76 | } 77 | 78 | fun main() { 79 | document.body?.onload = { 80 | val wrapper = Main() 81 | window.requestAnimationFrame { wrapper.setup() } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/TeapotObj.kt: -------------------------------------------------------------------------------- 1 | import com.tanelso2.glmatrix.Mat3 2 | import com.tanelso2.glmatrix.Mat4 3 | import com.tanelso2.glmatrix.Vec3 4 | import org.khronos.webgl.WebGLRenderingContext 5 | import kotlin.math.PI 6 | 7 | class TeapotObj(private val webgl: WebGLRenderingContext, private val objFileSource: String, private val shaderProgram: ShaderProgram) { 8 | private val objLoader = ObjLoader(objFileSource) 9 | private val faces = objLoader.getFaces() 10 | private val vertices = objLoader.getVertices() 11 | private val vertexNormals = objLoader.getVertexNormals() 12 | private val numFaces = objLoader.getNumFaces() 13 | 14 | private val faceIndexBuffer = webgl.createBuffer() 15 | private val pMatrix = Mat4.perspective(PI / 3, 16.0 / 9.0, 0.1, 60.0) 16 | private val vMatrix = Mat4.lookAt(Vec3(20, 20, 20), Vec3(0, 0, 0), Vec3(0, 0, 1)) 17 | 18 | private fun setupFaceBuffer() { 19 | webgl.bindBuffer(WebGLRenderingContext.ELEMENT_ARRAY_BUFFER, faceIndexBuffer) 20 | webgl.bufferData(WebGLRenderingContext.ELEMENT_ARRAY_BUFFER, faces, WebGLRenderingContext.STATIC_DRAW) 21 | } 22 | 23 | private fun setupAttributes() { 24 | shaderProgram.apply { 25 | setupAttribute("aVertexPosition", vertices) 26 | setupAttribute("aVertexNormal", vertexNormals) 27 | } 28 | } 29 | 30 | private fun setupMatrices(scaleFactor: Double, rotation: Double) { 31 | val mMatrix = Mat4() 32 | mMatrix.scale(scaleFactor) 33 | mMatrix.rotateX(PI / 2) 34 | mMatrix.rotateY(rotation) 35 | 36 | val nMatrix = Mat3.fromMat4(vMatrix * mMatrix) 37 | nMatrix.transpose() 38 | nMatrix.invert() 39 | 40 | shaderProgram.apply { 41 | setupUniformMat3("uNMatrix", nMatrix) 42 | setupUniformMat4("uPMatrix", pMatrix) 43 | setupUniformMat4("uVMatrix", vMatrix) 44 | setupUniformMat4("uMMatrix", mMatrix) 45 | } 46 | } 47 | 48 | private fun setupLight(light: LightSource) { 49 | shaderProgram.apply { 50 | setupUniformVec3Float("uLightPos", light.pos) 51 | setupUniformVec3Float("uAmbientColor", light.ambientColor) 52 | setupUniformVec3Float("uDiffuseColor", light.diffuseColor) 53 | setupUniformVec3Float("uSpecularColor", light.specularColor) 54 | } 55 | } 56 | 57 | fun draw(scaleFactor: Double, rotation: Double, shininess: Double, light: LightSource) { 58 | shaderProgram.useProgram() 59 | setupAttributes() 60 | setupFaceBuffer() 61 | setupMatrices(scaleFactor, rotation) 62 | setupShininess(shininess) 63 | setupLight(light) 64 | webgl.drawElements(WebGLRenderingContext.TRIANGLES, numFaces * 3, WebGLRenderingContext.UNSIGNED_SHORT, 0) 65 | } 66 | 67 | private fun setupShininess(shininess: Double) { 68 | shaderProgram.setupUniformFloat("shininess", shininess.toFloat()) 69 | } 70 | } -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Vec4.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Vec4JS = Float32Array 6 | 7 | external open class vec4 { 8 | companion object { 9 | fun create(): Vec4JS = definedExternally 10 | fun clone(a: Vec4JS): Vec4JS = definedExternally 11 | fun fromValues(x: Number, y: Number, z: Number, w: Number): Vec4JS = definedExternally 12 | fun copy(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 13 | fun set(out: Vec4JS, x: Number, y: Number, z: Number, w: Number): Vec4JS = definedExternally 14 | fun add(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 15 | fun subtract(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 16 | fun sub(): Nothing = definedExternally 17 | fun multiply(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 18 | fun mul(): Nothing = definedExternally 19 | fun divide(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 20 | fun div(): Nothing = definedExternally 21 | fun ceil(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 22 | fun floor(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 23 | fun min(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 24 | fun max(out: Vec4JS, a: Vec4JS, b: Vec4JS): Vec4JS = definedExternally 25 | fun round(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 26 | fun scale(out: Vec4JS, a: Vec4JS, b: Number): Vec4JS = definedExternally 27 | fun scaleAndAdd(out: Vec4JS, a: Vec4JS, b: Vec4JS, scale: Number): Vec4JS = definedExternally 28 | fun distance(a: Vec4JS, b: Vec4JS): Number = definedExternally 29 | fun dist(): Nothing = definedExternally 30 | fun squaredDistance(a: Vec4JS, b: Vec4JS): Number = definedExternally 31 | fun sqrDist(): Nothing = definedExternally 32 | fun length(a: Vec4JS): Number = definedExternally 33 | fun len(): Nothing = definedExternally 34 | fun squaredLength(a: Vec4JS): Number = definedExternally 35 | fun sqrLen(): Nothing = definedExternally 36 | fun negate(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 37 | fun inverse(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 38 | fun normalize(out: Vec4JS, a: Vec4JS): Vec4JS = definedExternally 39 | fun dot(a: Vec4JS, b: Vec4JS): Number = definedExternally 40 | fun lerp(out: Vec4JS, a: Vec4JS, b: Vec4JS, t: Number): Vec4JS = definedExternally 41 | fun random(out: Vec4JS, scale: Number): Vec4JS = definedExternally 42 | fun transformMat4(out: Vec4JS, a: Vec4JS, m: Mat4JS): Vec4JS = definedExternally 43 | fun transformQuat(out: Vec4JS, a: Vec4JS, q: QuatJS): Vec4JS = definedExternally 44 | fun forEach(a: dynamic, stride: Number, offset: Number, count: Number, fn: dynamic, arg: dynamic): dynamic = definedExternally 45 | fun str(a: Vec4JS): String = definedExternally 46 | fun exactEquals(a: Vec4JS, b: Vec4JS): Boolean = definedExternally 47 | fun equals(a: Vec4JS, b: Vec4JS): Boolean = definedExternally 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/create_kotlin_file_from_js.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import json 3 | import subprocess 4 | import sys 5 | 6 | assert len(sys.argv) > 1, "Need to provide a filename" 7 | 8 | def extract_type_name(d): 9 | type_names_list = d["type"]["names"] 10 | assert len(type_names_list) == 1, "multiple type names! Assumptions are failing!" 11 | return type_names_list[0] 12 | 13 | def get_return_type(d): 14 | if "returns" in d: 15 | return_list = d["returns"] 16 | assert len(return_list) <= 1, "Multiple returns! Assumptions are failing!" 17 | if len(return_list) == 0: 18 | return None 19 | return extract_type_name(return_list[0]) 20 | else: 21 | return None 22 | 23 | js_to_kotlin_types = { 24 | 'Number': 'Number', 25 | 'vec2': 'Vec2JS', 26 | 'vec3': 'Vec3JS', 27 | 'vec4': 'Vec4JS', 28 | 'mat2': 'Mat2JS', 29 | 'mat3': 'Mat3JS', 30 | 'mat4': 'Mat4JS', 31 | 'mat2d': 'Mat2dJS', 32 | 'quat': 'QuatJS', 33 | 'quat4': 'QuatJS', 34 | 'String': 'String', 35 | 'Boolean': 'Boolean', 36 | 'number': 'Number' 37 | } 38 | 39 | def convert_type(type_name): 40 | if type_name not in js_to_kotlin_types: 41 | print(f"Unknown type {type_name}") 42 | return "dynamic" 43 | return js_to_kotlin_types[type_name] 44 | 45 | def function_str(func_data): 46 | name = func_data["name"] 47 | if "params" in func_data: 48 | params_strs = [f"{d['name']}: {convert_type(d['type'])}" for d in func_data["params"]] 49 | params_str = ", ".join(params_strs) 50 | else: 51 | params_str = "" 52 | if "ret_type" in func_data: 53 | ret_type = convert_type(func_data["ret_type"]) 54 | else: 55 | ret_type = "Nothing" 56 | return f"fun {name}({params_str}): {ret_type} = noImpl" 57 | 58 | for current_file in sys.argv[1:]: 59 | json_output = subprocess.check_output(["jsdoc2md", "--json", current_file]) 60 | data = json.loads(json_output) 61 | 62 | module_name = current_file.replace(".js", "") 63 | kotlin_file_name = module_name.capitalize() + ".kt" 64 | typealias_name = module_name.capitalize() + "JS" 65 | 66 | 67 | 68 | functions = list() 69 | for elem in data: 70 | if elem["kind"] == "function": 71 | function_info = dict() 72 | function_info["name"] = elem["name"] 73 | ret_type = get_return_type(elem) 74 | if ret_type is not None: 75 | function_info["ret_type"] = ret_type 76 | if "params" in elem: 77 | function_info["params"] = [{"name": d["name"], "type": extract_type_name(d)} for d in elem["params"]] 78 | functions.append(function_info) 79 | 80 | 81 | formated_functions = ('\n' + 8*' ').join([function_str(f) for f in functions]) 82 | 83 | file_format = f"""package com.tanelso2.glmatrix 84 | 85 | import org.khronos.webgl.Float32Array 86 | 87 | typealias {typealias_name} = Float32Array 88 | 89 | external open class {module_name} {{ 90 | companion object {{ 91 | {formated_functions} 92 | }} 93 | }} 94 | """ 95 | 96 | with open(kotlin_file_name, 'w') as fd: 97 | fd.write(file_format) 98 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Mat3.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Mat3JS = Float32Array 6 | 7 | class Mat3(val array: Mat3JS) { 8 | constructor(): 9 | this(mat3.create()) 10 | 11 | companion object { 12 | fun fromMat4(source: Mat4): Mat3 { 13 | val ret = Mat3() 14 | mat3.fromMat4(ret.array, source.array) 15 | return ret 16 | } 17 | } 18 | 19 | fun invert() { 20 | mat3.invert(array, array) 21 | } 22 | 23 | fun transpose() { 24 | mat3.transpose(array, array) 25 | } 26 | } 27 | 28 | external open class mat3 { 29 | companion object { 30 | fun create(): Mat3JS = definedExternally 31 | fun fromMat4(out: Mat3JS, a: Mat4JS): Mat3JS = definedExternally 32 | fun clone(a: Mat3JS): Mat3JS = definedExternally 33 | fun copy(out: Mat3JS, a: Mat3JS): Mat3JS = definedExternally 34 | fun fromValues(m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): Mat3JS = definedExternally 35 | fun set(out: Mat3JS, m00: Number, m01: Number, m02: Number, m10: Number, m11: Number, m12: Number, m20: Number, m21: Number, m22: Number): Mat3JS = definedExternally 36 | fun identity(out: Mat3JS): Mat3JS = definedExternally 37 | fun transpose(out: Mat3JS, a: Mat3JS): Mat3JS = definedExternally 38 | fun invert(out: Mat3JS, a: Mat3JS): Mat3JS = definedExternally 39 | fun adjoint(out: Mat3JS, a: Mat3JS): Mat3JS = definedExternally 40 | fun determinant(a: Mat3JS): Number = definedExternally 41 | fun multiply(out: Mat3JS, a: Mat3JS, b: Mat3JS): Mat3JS = definedExternally 42 | fun mul(): Nothing = definedExternally 43 | fun translate(out: Mat3JS, a: Mat3JS, v: Vec2JS): Mat3JS = definedExternally 44 | fun rotate(out: Mat3JS, a: Mat3JS, rad: Number): Mat3JS = definedExternally 45 | fun scale(out: Mat3JS, a: Mat3JS, v: Vec2JS): Mat3JS = definedExternally 46 | fun fromTranslation(out: Mat3JS, v: Vec2JS): Mat3JS = definedExternally 47 | fun fromRotation(out: Mat3JS, rad: Number): Mat3JS = definedExternally 48 | fun fromScaling(out: Mat3JS, v: Vec2JS): Mat3JS = definedExternally 49 | fun fromMat2d(out: Mat3JS, a: Mat2dJS): Mat3JS = definedExternally 50 | fun fromQuat(out: Mat3JS, q: QuatJS): Mat3JS = definedExternally 51 | fun normalFromMat4(out: Mat3JS, a: Mat4JS): Mat3JS = definedExternally 52 | fun str(a: Mat3JS): String = definedExternally 53 | fun frob(a: Mat3JS): Number = definedExternally 54 | fun add(out: Mat3JS, a: Mat3JS, b: Mat3JS): Mat3JS = definedExternally 55 | fun subtract(out: Mat3JS, a: Mat3JS, b: Mat3JS): Mat3JS = definedExternally 56 | fun sub(): Nothing = definedExternally 57 | fun multiplyScalar(out: Mat3JS, a: Mat3JS, b: Number): Mat3JS = definedExternally 58 | fun multiplyScalarAndAdd(out: Mat3JS, a: Mat3JS, b: Mat3JS, scale: Number): Mat3JS = definedExternally 59 | fun exactEquals(a: Mat3JS, b: Mat3JS): Boolean = definedExternally 60 | fun equals(a: Mat3JS, b: Mat3JS): Boolean = definedExternally 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Vec2.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Vec2JS = Float32Array 6 | 7 | external open class vec2 { 8 | companion object { 9 | fun create(): Vec2JS = definedExternally 10 | fun clone(a: Vec2JS): Vec2JS = definedExternally 11 | fun fromValues(x: Number, y: Number): Vec2JS = definedExternally 12 | fun copy(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 13 | fun set(out: Vec2JS, x: Number, y: Number): Vec2JS = definedExternally 14 | fun add(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 15 | fun subtract(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 16 | fun sub(): Nothing = definedExternally 17 | fun multiply(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 18 | fun mul(): Nothing = definedExternally 19 | fun divide(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 20 | fun div(): Nothing = definedExternally 21 | fun ceil(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 22 | fun floor(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 23 | fun min(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 24 | fun max(out: Vec2JS, a: Vec2JS, b: Vec2JS): Vec2JS = definedExternally 25 | fun round(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 26 | fun scale(out: Vec2JS, a: Vec2JS, b: Number): Vec2JS = definedExternally 27 | fun scaleAndAdd(out: Vec2JS, a: Vec2JS, b: Vec2JS, scale: Number): Vec2JS = definedExternally 28 | fun distance(a: Vec2JS, b: Vec2JS): Number = definedExternally 29 | fun dist(): Nothing = definedExternally 30 | fun squaredDistance(a: Vec2JS, b: Vec2JS): Number = definedExternally 31 | fun sqrDist(): Nothing = definedExternally 32 | fun length(a: Vec2JS): Number = definedExternally 33 | fun len(): Nothing = definedExternally 34 | fun squaredLength(a: Vec2JS): Number = definedExternally 35 | fun sqrLen(): Nothing = definedExternally 36 | fun negate(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 37 | fun inverse(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 38 | fun normalize(out: Vec2JS, a: Vec2JS): Vec2JS = definedExternally 39 | fun dot(a: Vec2JS, b: Vec2JS): Number = definedExternally 40 | fun cross(out: Vec3JS, a: Vec2JS, b: Vec2JS): Vec3JS = definedExternally 41 | fun lerp(out: Vec2JS, a: Vec2JS, b: Vec2JS, t: Number): Vec2JS = definedExternally 42 | fun random(out: Vec2JS, scale: Number): Vec2JS = definedExternally 43 | fun transformMat2(out: Vec2JS, a: Vec2JS, m: Mat2JS): Vec2JS = definedExternally 44 | fun transformMat2d(out: Vec2JS, a: Vec2JS, m: Mat2dJS): Vec2JS = definedExternally 45 | fun transformMat3(out: Vec2JS, a: Vec2JS, m: Mat3JS): Vec2JS = definedExternally 46 | fun transformMat4(out: Vec2JS, a: Vec2JS, m: Mat4JS): Vec2JS = definedExternally 47 | fun forEach(a: dynamic, stride: Number, offset: Number, count: Number, fn: dynamic, arg: dynamic): dynamic = definedExternally 48 | fun str(a: Vec2JS): String = definedExternally 49 | fun exactEquals(a: Vec2JS, b: Vec2JS): Boolean = definedExternally 50 | fun equals(a: Vec2JS, b: Vec2JS): Boolean = definedExternally 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/ObjLoader.kt: -------------------------------------------------------------------------------- 1 | import com.tanelso2.glmatrix.Vec3 2 | import org.khronos.webgl.Float32Array 3 | import org.khronos.webgl.Uint16Array 4 | import kotlin.random.Random 5 | 6 | class ObjLoader(source: String) { 7 | private val points = ArrayList() 8 | private val faces = ArrayList() 9 | private val normals = ArrayList() 10 | init { 11 | val lines = source.split('\n') 12 | lines.forEach { line -> 13 | val values = line.split(' ').filter { it != "" }.map { it.trim() } 14 | when(values.getOrNull(0)) { 15 | "v" -> points.add(Point( 16 | values[1].toDouble(), 17 | values[2].toDouble(), 18 | values[3].toDouble() 19 | )) 20 | "f" -> faces.add(Face( 21 | values[1].toInt() - 1, 22 | values[2].toInt() - 1, 23 | values[3].toInt() - 1 24 | )) 25 | "vn" -> normals.add(Vec3( 26 | values[1].toDouble(), 27 | values[2].toDouble(), 28 | values[3].toDouble() 29 | )) 30 | } 31 | } 32 | if (normals.isEmpty()) { 33 | computeNormals() 34 | } 35 | } 36 | 37 | fun computeNormals() { 38 | val tmpNormals = Array(points.size, { Vec3() }) 39 | faces.forEach { face -> 40 | val idx1 = face.p1.toInt() 41 | val idx2 = face.p2.toInt() 42 | val idx3 = face.p3.toInt() 43 | 44 | val p1 = points[idx1] 45 | val p2 = points[idx2] 46 | val p3 = points[idx3] 47 | 48 | val w = Vec3( 49 | p2.x - p1.x, 50 | p2.y - p1.y, 51 | p2.z - p1.z 52 | ) 53 | val v = Vec3( 54 | p3.x - p1.x, 55 | p3.y - p1.y, 56 | p3.z - p1.z 57 | ) 58 | val normal = v.cross(w) 59 | normal.normalize() 60 | 61 | tmpNormals[idx1] += normal 62 | tmpNormals[idx2] += normal 63 | tmpNormals[idx3] += normal 64 | } 65 | tmpNormals.forEach { 66 | it.normalize() 67 | normals.add(it) 68 | } 69 | } 70 | 71 | fun getVertices(): Float32Array { 72 | val floatList = points.flatMap { it.list() } 73 | return Float32Array(floatList.toTypedArray()) 74 | } 75 | 76 | fun getVertexNormals(): Float32Array { 77 | val floatList = normals.flatMap { it.list() } 78 | return Float32Array(floatList.toTypedArray()) 79 | } 80 | 81 | fun getFaces(): Uint16Array { 82 | val intList = faces.flatMap { it.list() } 83 | return Uint16Array(intList.toTypedArray()) 84 | } 85 | 86 | fun getColors(): Float32Array { 87 | val colorsList = points.flatMap { it.color.list() } 88 | return Float32Array(colorsList.toTypedArray()) 89 | } 90 | 91 | fun getNumFaces(): Int = faces.size 92 | 93 | data class Face(val p1: Short, val p2: Short, val p3: Short) { 94 | constructor(p1: Number, p2: Number, p3: Number): 95 | this(p1.toShort(), p2.toShort(), p3.toShort()) 96 | 97 | fun list() = listOf(p1, p2, p3) 98 | } 99 | 100 | data class Point(val x: Float, val y: Float, val z: Float, val color: Color) { 101 | constructor(x: Number, y: Number, z: Number): 102 | this(x.toFloat(), y.toFloat(), z.toFloat(), Color.randomColor()) 103 | 104 | fun list() = listOf(x, y, z) 105 | 106 | data class Color(val r: Float, val g: Float, val b: Float, val a: Float) { 107 | constructor(r: Number, g: Number, b: Number, a:Number): 108 | this(r.toFloat(), g.toFloat(), b.toFloat(), a.toFloat()) 109 | 110 | companion object { 111 | fun randomColor() = Color( 112 | Random.nextFloat(), 113 | Random.nextFloat(), 114 | Random.nextFloat(), 115 | 1.0 116 | ) 117 | } 118 | 119 | fun list() = listOf(r, g, b, a) 120 | } 121 | } 122 | 123 | } -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Vec3.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | import org.khronos.webgl.get 5 | 6 | typealias Vec3JS = Float32Array 7 | 8 | class Vec3(val array: Vec3JS) { 9 | constructor(x: Number, y: Number, z: Number): 10 | this(vec3.fromValues(x.toFloat(), y.toFloat(), z.toFloat())) 11 | constructor(): 12 | this(vec3.create()) 13 | 14 | fun cross(other: Vec3): Vec3 { 15 | val ret = Vec3() 16 | vec3.cross(ret.array, this.array, other.array) 17 | return ret 18 | } 19 | 20 | fun normalize() { 21 | vec3.normalize(array, array) 22 | } 23 | 24 | operator fun plus(other: Vec3) = add(other) 25 | 26 | fun add(other: Vec3): Vec3 { 27 | val ret = Vec3() 28 | vec3.add(ret.array, this.array, other.array) 29 | return ret 30 | } 31 | 32 | fun list(): List { 33 | return listOf(array[0], array[1], array[2]) 34 | } 35 | } 36 | 37 | external open class vec3 { 38 | companion object { 39 | fun create(): Vec3JS = definedExternally 40 | fun clone(a: Vec3JS): Vec3JS = definedExternally 41 | fun fromValues(x: Number, y: Number, z: Number): Vec3JS = definedExternally 42 | fun copy(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 43 | fun set(out: Vec3JS, x: Number, y: Number, z: Number): Vec3JS = definedExternally 44 | fun add(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 45 | fun subtract(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 46 | fun sub(): Nothing = definedExternally 47 | fun multiply(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 48 | fun mul(): Nothing = definedExternally 49 | fun divide(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 50 | fun div(): Nothing = definedExternally 51 | fun ceil(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 52 | fun floor(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 53 | fun min(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 54 | fun max(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 55 | fun round(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 56 | fun scale(out: Vec3JS, a: Vec3JS, b: Number): Vec3JS = definedExternally 57 | fun scaleAndAdd(out: Vec3JS, a: Vec3JS, b: Vec3JS, scale: Number): Vec3JS = definedExternally 58 | fun distance(a: Vec3JS, b: Vec3JS): Number = definedExternally 59 | fun dist(): Nothing = definedExternally 60 | fun squaredDistance(a: Vec3JS, b: Vec3JS): Number = definedExternally 61 | fun sqrDist(): Nothing = definedExternally 62 | fun length(a: Vec3JS): Number = definedExternally 63 | fun len(): Nothing = definedExternally 64 | fun squaredLength(a: Vec3JS): Number = definedExternally 65 | fun sqrLen(): Nothing = definedExternally 66 | fun negate(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 67 | fun inverse(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 68 | fun normalize(out: Vec3JS, a: Vec3JS): Vec3JS = definedExternally 69 | fun dot(a: Vec3JS, b: Vec3JS): Number = definedExternally 70 | fun cross(out: Vec3JS, a: Vec3JS, b: Vec3JS): Vec3JS = definedExternally 71 | fun lerp(out: Vec3JS, a: Vec3JS, b: Vec3JS, t: Number): Vec3JS = definedExternally 72 | fun hermite(out: Vec3JS, a: Vec3JS, b: Vec3JS, c: Vec3JS, d: Vec3JS, t: Number): Vec3JS = definedExternally 73 | fun bezier(out: Vec3JS, a: Vec3JS, b: Vec3JS, c: Vec3JS, d: Vec3JS, t: Number): Vec3JS = definedExternally 74 | fun random(out: Vec3JS, scale: Number): Vec3JS = definedExternally 75 | fun transformMat4(out: Vec3JS, a: Vec3JS, m: Mat4JS): Vec3JS = definedExternally 76 | fun transformMat3(out: Vec3JS, a: Vec3JS, m: Mat4JS): Vec3JS = definedExternally 77 | fun transformQuat(out: Vec3JS, a: Vec3JS, q: QuatJS): Vec3JS = definedExternally 78 | fun rotateX(out: Vec3JS, a: Vec3JS, b: Vec3JS, c: Number): Vec3JS = definedExternally 79 | fun rotateY(out: Vec3JS, a: Vec3JS, b: Vec3JS, c: Number): Vec3JS = definedExternally 80 | fun rotateZ(out: Vec3JS, a: Vec3JS, b: Vec3JS, c: Number): Vec3JS = definedExternally 81 | fun forEach(a: dynamic, stride: Number, offset: Number, count: Number, fn: dynamic, arg: dynamic): dynamic = definedExternally 82 | fun angle(a: Vec3JS, b: Vec3JS): Number = definedExternally 83 | fun str(a: Vec3JS): String = definedExternally 84 | fun exactEquals(a: Vec3JS, b: Vec3JS): Boolean = definedExternally 85 | fun equals(a: Vec3JS, b: Vec3JS): Boolean = definedExternally 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/jsMain/kotlin/com/tanelso2/glmatrix/Mat4.kt: -------------------------------------------------------------------------------- 1 | package com.tanelso2.glmatrix 2 | 3 | import org.khronos.webgl.Float32Array 4 | 5 | typealias Mat4JS = Float32Array 6 | 7 | class Mat4(val array: Mat4JS) { 8 | constructor() : this(Float32Array(mat4.create())) 9 | constructor(a: Array) : this(Float32Array(a)) 10 | companion object { 11 | fun lookAt(eye: Vec3, center: Vec3, up: Vec3): Mat4 { 12 | val ret = Mat4() 13 | ret.lookAt(eye, center, up) 14 | return ret 15 | } 16 | 17 | fun perspective(fovy: Number, aspect: Number, near: Number, far: Number): Mat4 { 18 | val ret = Mat4() 19 | ret.perspective(fovy, aspect, near, far) 20 | return ret 21 | } 22 | } 23 | 24 | fun clone(): Mat4 = Mat4(array) 25 | fun identity() { 26 | mat4.identity(array) 27 | } 28 | 29 | fun transpose() { 30 | mat4.transpose(array, array) 31 | } 32 | 33 | fun invert() { 34 | mat4.invert(array, array) 35 | } 36 | 37 | fun adjoint() { 38 | mat4.adjoint(array, array) 39 | } 40 | 41 | fun determinant(): Number = mat4.determinant(array) 42 | fun translate(v: Vec3) { 43 | mat4.translate(array, array, v.array) 44 | } 45 | 46 | fun rotateX(rad: Number) { 47 | mat4.rotateX(array, array, rad.toFloat()) 48 | } 49 | 50 | fun rotateY(rad: Number) { 51 | mat4.rotateY(array, array, rad.toFloat()) 52 | } 53 | 54 | fun rotateZ(rad: Number) { 55 | mat4.rotateZ(array, array, rad.toFloat()) 56 | } 57 | 58 | fun scale(amount: Number) = scale(Vec3(amount, amount, amount)) 59 | 60 | fun scale(v: Vec3) { 61 | mat4.scale(array, array, v.array) 62 | } 63 | 64 | fun lookAt(eye: Vec3, center: Vec3, up: Vec3) { 65 | mat4.lookAt(array, eye.array, center.array, up.array) 66 | } 67 | 68 | fun perspective(fovy: Number, aspect: Number, near: Number, far: Number) { 69 | mat4.perspective(array, fovy.toFloat(), aspect.toFloat(), near.toFloat(), far.toFloat()) 70 | } 71 | 72 | fun multiply(other: Mat4): Mat4 { 73 | val ret = Mat4() 74 | mat4.multiply(ret.array, array, other.array) 75 | return ret 76 | } 77 | 78 | operator fun times(other: Mat4): Mat4 = multiply(other) 79 | 80 | } 81 | 82 | external open class mat4 { 83 | companion object { 84 | fun create(): Mat4JS = definedExternally 85 | fun clone(a: Mat4JS): Mat4JS = definedExternally 86 | fun copy(out: Mat4JS, a: Mat4JS): Mat4JS = definedExternally 87 | fun fromValues(m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): Mat4JS = definedExternally 88 | fun set(out: Mat4JS, m00: Number, m01: Number, m02: Number, m03: Number, m10: Number, m11: Number, m12: Number, m13: Number, m20: Number, m21: Number, m22: Number, m23: Number, m30: Number, m31: Number, m32: Number, m33: Number): Mat4JS = definedExternally 89 | fun identity(out: Mat4JS): Mat4JS = definedExternally 90 | fun transpose(out: Mat4JS, a: Mat4JS): Mat4JS = definedExternally 91 | fun invert(out: Mat4JS, a: Mat4JS): Mat4JS = definedExternally 92 | fun adjoint(out: Mat4JS, a: Mat4JS): Mat4JS = definedExternally 93 | fun determinant(a: Mat4JS): Number = definedExternally 94 | fun multiply(out: Mat4JS, a: Mat4JS, b: Mat4JS): Mat4JS = definedExternally 95 | fun translate(out: Mat4JS, a: Mat4JS, v: Vec3JS): Mat4JS = definedExternally 96 | fun scale(out: Mat4JS, a: Mat4JS, v: Vec3JS): Mat4JS = definedExternally 97 | fun rotate(out: Mat4JS, a: Mat4JS, rad: Number, axis: Vec3JS): Mat4JS = definedExternally 98 | fun rotateX(out: Mat4JS, a: Mat4JS, rad: Number): Mat4JS = definedExternally 99 | fun rotateY(out: Mat4JS, a: Mat4JS, rad: Number): Mat4JS = definedExternally 100 | fun rotateZ(out: Mat4JS, a: Mat4JS, rad: Number): Mat4JS = definedExternally 101 | fun fromTranslation(out: Mat4JS, v: Vec3JS): Mat4JS = definedExternally 102 | fun fromScaling(out: Mat4JS, v: Vec3JS): Mat4JS = definedExternally 103 | fun fromRotation(out: Mat4JS, rad: Number, axis: Vec3JS): Mat4JS = definedExternally 104 | fun fromXRotation(out: Mat4JS, rad: Number): Mat4JS = definedExternally 105 | fun fromYRotation(out: Mat4JS, rad: Number): Mat4JS = definedExternally 106 | fun fromZRotation(out: Mat4JS, rad: Number): Mat4JS = definedExternally 107 | fun fromRotationTranslation(out: Mat4JS, q: QuatJS, v: Vec3JS): Mat4JS = definedExternally 108 | fun getTranslation(out: Vec3JS, mat: Mat4JS): Vec3JS = definedExternally 109 | fun getScaling(out: Vec3JS, mat: Mat4JS): Vec3JS = definedExternally 110 | fun getRotation(out: QuatJS, mat: Mat4JS): QuatJS = definedExternally 111 | fun fromRotationTranslationScale(out: Mat4JS, q: QuatJS, v: Vec3JS, s: Vec3JS): Mat4JS = definedExternally 112 | fun fromRotationTranslationScaleOrigin(out: Mat4JS, q: QuatJS, v: Vec3JS, s: Vec3JS, o: Vec3JS): Mat4JS = definedExternally 113 | fun fromQuat(out: Mat4JS, q: QuatJS): Mat4JS = definedExternally 114 | fun frustum(out: Mat4JS, left: Number, right: Number, bottom: Number, top: Number, near: Number, far: Number): Mat4JS = definedExternally 115 | fun perspective(out: Mat4JS, fovy: Number, aspect: Number, near: Number, far: Number): Mat4JS = definedExternally 116 | fun perspectiveFromFieldOfView(out: Mat4JS, fov: dynamic, near: Number, far: Number): Mat4JS = definedExternally 117 | fun ortho(out: Mat4JS, left: Number, right: Number, bottom: Number, top: Number, near: Number, far: Number): Mat4JS = definedExternally 118 | fun lookAt(out: Mat4JS, eye: Vec3JS, center: Vec3JS, up: Vec3JS): Mat4JS = definedExternally 119 | fun str(a: Mat4JS): String = definedExternally 120 | fun frob(a: Mat4JS): Number = definedExternally 121 | fun add(out: Mat4JS, a: Mat4JS, b: Mat4JS): Mat4JS = definedExternally 122 | fun subtract(out: Mat4JS, a: Mat4JS, b: Mat4JS): Mat4JS = definedExternally 123 | fun sub(): Nothing = definedExternally 124 | fun multiplyScalar(out: Mat4JS, a: Mat4JS, b: Number): Mat4JS = definedExternally 125 | fun multiplyScalarAndAdd(out: Mat4JS, a: Mat4JS, b: Mat4JS, scale: Number): Mat4JS = definedExternally 126 | fun exactEquals(a: Mat4JS, b: Mat4JS): Boolean = definedExternally 127 | fun equals(a: Mat4JS, b: Mat4JS): Boolean = definedExternally 128 | } 129 | } 130 | 131 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /include/gl-matrix-min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview gl-matrix - High performance matrix and vector operations 3 | * @author Brandon Jones 4 | * @author Colin MacKenzie IV 5 | * @version 2.3.2 6 | */ 7 | 8 | /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | THE SOFTWARE. */ 27 | 28 | !function(t,a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var n=a();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){function a(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}var n={};return a.m=t,a.c=n,a.p="",a(0)}([function(t,a,n){a.glMatrix=n(1),a.mat2=n(2),a.mat2d=n(3),a.mat3=n(4),a.mat4=n(5),a.quat=n(6),a.vec2=n(9),a.vec3=n(7),a.vec4=n(8)},function(t,a){var n={};n.EPSILON=1e-6,n.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random,n.ENABLE_SIMD=!1,n.SIMD_AVAILABLE=n.ARRAY_TYPE===this.Float32Array&&"SIMD"in this,n.USE_SIMD=n.ENABLE_SIMD&&n.SIMD_AVAILABLE,n.setMatrixArrayType=function(t){n.ARRAY_TYPE=t};var r=Math.PI/180;n.toRadian=function(t){return t*r},n.equals=function(t,a){return Math.abs(t-a)<=n.EPSILON*Math.max(1,Math.abs(t),Math.abs(a))},t.exports=n},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},o.clone=function(t){var a=new r.ARRAY_TYPE(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},o.fromValues=function(t,a,n,o){var u=new r.ARRAY_TYPE(4);return u[0]=t,u[1]=a,u[2]=n,u[3]=o,u},o.set=function(t,a,n,r,o){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t},o.transpose=function(t,a){if(t===a){var n=a[1];t[1]=a[2],t[2]=n}else t[0]=a[0],t[1]=a[2],t[2]=a[1],t[3]=a[3];return t},o.invert=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=n*u-o*r;return l?(l=1/l,t[0]=u*l,t[1]=-r*l,t[2]=-o*l,t[3]=n*l,t):null},o.adjoint=function(t,a){var n=a[0];return t[0]=a[3],t[1]=-a[1],t[2]=-a[2],t[3]=n,t},o.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},o.multiply=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=n[0],M=n[1],s=n[2],i=n[3];return t[0]=r*e+u*M,t[1]=o*e+l*M,t[2]=r*s+u*i,t[3]=o*s+l*i,t},o.mul=o.multiply,o.rotate=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=Math.sin(n),M=Math.cos(n);return t[0]=r*M+u*e,t[1]=o*M+l*e,t[2]=r*-e+u*M,t[3]=o*-e+l*M,t},o.scale=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=n[0],M=n[1];return t[0]=r*e,t[1]=o*e,t[2]=u*M,t[3]=l*M,t},o.fromRotation=function(t,a){var n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t},o.fromScaling=function(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=a[1],t},o.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},o.LDU=function(t,a,n,r){return t[2]=r[2]/r[0],n[0]=r[0],n[1]=r[1],n[3]=r[3]-t[2]*n[1],[t,a,n]},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t},o.sub=o.subtract,o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]},o.equals=function(t,a){var n=t[0],o=t[1],u=t[2],l=t[3],e=a[0],M=a[1],s=a[2],i=a[3];return Math.abs(n-e)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(e))&&Math.abs(o-M)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(u-s)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(s))&&Math.abs(l-i)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(i))},o.multiplyScalar=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t},o.multiplyScalarAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t},t.exports=o},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},o.clone=function(t){var a=new r.ARRAY_TYPE(6);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a[4]=t[4],a[5]=t[5],a},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},o.fromValues=function(t,a,n,o,u,l){var e=new r.ARRAY_TYPE(6);return e[0]=t,e[1]=a,e[2]=n,e[3]=o,e[4]=u,e[5]=l,e},o.set=function(t,a,n,r,o,u,l){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=u,t[5]=l,t},o.invert=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=n*u-r*o;return M?(M=1/M,t[0]=u*M,t[1]=-r*M,t[2]=-o*M,t[3]=n*M,t[4]=(o*e-u*l)*M,t[5]=(r*l-n*e)*M,t):null},o.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},o.multiply=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=n[0],i=n[1],c=n[2],h=n[3],S=n[4],I=n[5];return t[0]=r*s+u*i,t[1]=o*s+l*i,t[2]=r*c+u*h,t[3]=o*c+l*h,t[4]=r*S+u*I+e,t[5]=o*S+l*I+M,t},o.mul=o.multiply,o.rotate=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=Math.sin(n),i=Math.cos(n);return t[0]=r*i+u*s,t[1]=o*i+l*s,t[2]=r*-s+u*i,t[3]=o*-s+l*i,t[4]=e,t[5]=M,t},o.scale=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=n[0],i=n[1];return t[0]=r*s,t[1]=o*s,t[2]=u*i,t[3]=l*i,t[4]=e,t[5]=M,t},o.translate=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=n[0],i=n[1];return t[0]=r,t[1]=o,t[2]=u,t[3]=l,t[4]=r*s+u*i+e,t[5]=o*s+l*i+M,t},o.fromRotation=function(t,a){var n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=n,t[2]=-n,t[3]=r,t[4]=0,t[5]=0,t},o.fromScaling=function(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=a[1],t[4]=0,t[5]=0,t},o.fromTranslation=function(t,a){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=a[0],t[5]=a[1],t},o.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t[4]=a[4]+n[4],t[5]=a[5]+n[5],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t[4]=a[4]-n[4],t[5]=a[5]-n[5],t},o.sub=o.subtract,o.multiplyScalar=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t[4]=a[4]*n,t[5]=a[5]*n,t},o.multiplyScalarAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t[4]=a[4]+n[4]*r,t[5]=a[5]+n[5]*r,t},o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]},o.equals=function(t,a){var n=t[0],o=t[1],u=t[2],l=t[3],e=t[4],M=t[5],s=a[0],i=a[1],c=a[2],h=a[3],S=a[4],I=a[5];return Math.abs(n-s)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(o-i)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(i))&&Math.abs(u-c)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(c))&&Math.abs(l-h)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(h))&&Math.abs(e-S)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(S))&&Math.abs(M-I)<=r.EPSILON*Math.max(1,Math.abs(M),Math.abs(I))},t.exports=o},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromMat4=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[4],t[4]=a[5],t[5]=a[6],t[6]=a[8],t[7]=a[9],t[8]=a[10],t},o.clone=function(t){var a=new r.ARRAY_TYPE(9);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a[4]=t[4],a[5]=t[5],a[6]=t[6],a[7]=t[7],a[8]=t[8],a},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t},o.fromValues=function(t,a,n,o,u,l,e,M,s){var i=new r.ARRAY_TYPE(9);return i[0]=t,i[1]=a,i[2]=n,i[3]=o,i[4]=u,i[5]=l,i[6]=e,i[7]=M,i[8]=s,i},o.set=function(t,a,n,r,o,u,l,e,M,s){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=u,t[5]=l,t[6]=e,t[7]=M,t[8]=s,t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.transpose=function(t,a){if(t===a){var n=a[1],r=a[2],o=a[5];t[1]=a[3],t[2]=a[6],t[3]=n,t[5]=a[7],t[6]=r,t[7]=o}else t[0]=a[0],t[1]=a[3],t[2]=a[6],t[3]=a[1],t[4]=a[4],t[5]=a[7],t[6]=a[2],t[7]=a[5],t[8]=a[8];return t},o.invert=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=a[6],s=a[7],i=a[8],c=i*l-e*s,h=-i*u+e*M,S=s*u-l*M,I=n*c+r*h+o*S;return I?(I=1/I,t[0]=c*I,t[1]=(-i*r+o*s)*I,t[2]=(e*r-o*l)*I,t[3]=h*I,t[4]=(i*n-o*M)*I,t[5]=(-e*n+o*u)*I,t[6]=S*I,t[7]=(-s*n+r*M)*I,t[8]=(l*n-r*u)*I,t):null},o.adjoint=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=a[6],s=a[7],i=a[8];return t[0]=l*i-e*s,t[1]=o*s-r*i,t[2]=r*e-o*l,t[3]=e*M-u*i,t[4]=n*i-o*M,t[5]=o*u-n*e,t[6]=u*s-l*M,t[7]=r*M-n*s,t[8]=n*l-r*u,t},o.determinant=function(t){var a=t[0],n=t[1],r=t[2],o=t[3],u=t[4],l=t[5],e=t[6],M=t[7],s=t[8];return a*(s*u-l*M)+n*(-s*o+l*e)+r*(M*o-u*e)},o.multiply=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=a[6],i=a[7],c=a[8],h=n[0],S=n[1],I=n[2],f=n[3],x=n[4],D=n[5],F=n[6],m=n[7],d=n[8];return t[0]=h*r+S*l+I*s,t[1]=h*o+S*e+I*i,t[2]=h*u+S*M+I*c,t[3]=f*r+x*l+D*s,t[4]=f*o+x*e+D*i,t[5]=f*u+x*M+D*c,t[6]=F*r+m*l+d*s,t[7]=F*o+m*e+d*i,t[8]=F*u+m*M+d*c,t},o.mul=o.multiply,o.translate=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=a[6],i=a[7],c=a[8],h=n[0],S=n[1];return t[0]=r,t[1]=o,t[2]=u,t[3]=l,t[4]=e,t[5]=M,t[6]=h*r+S*l+s,t[7]=h*o+S*e+i,t[8]=h*u+S*M+c,t},o.rotate=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=a[6],i=a[7],c=a[8],h=Math.sin(n),S=Math.cos(n);return t[0]=S*r+h*l,t[1]=S*o+h*e,t[2]=S*u+h*M,t[3]=S*l-h*r,t[4]=S*e-h*o,t[5]=S*M-h*u,t[6]=s,t[7]=i,t[8]=c,t},o.scale=function(t,a,n){var r=n[0],o=n[1];return t[0]=r*a[0],t[1]=r*a[1],t[2]=r*a[2],t[3]=o*a[3],t[4]=o*a[4],t[5]=o*a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t},o.fromTranslation=function(t,a){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t},o.fromRotation=function(t,a){var n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromScaling=function(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},o.fromMat2d=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=0,t[3]=a[2],t[4]=a[3],t[5]=0,t[6]=a[4],t[7]=a[5],t[8]=1,t},o.fromQuat=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=n+n,e=r+r,M=o+o,s=n*l,i=r*l,c=r*e,h=o*l,S=o*e,I=o*M,f=u*l,x=u*e,D=u*M;return t[0]=1-c-I,t[3]=i-D,t[6]=h+x,t[1]=i+D,t[4]=1-s-I,t[7]=S-f,t[2]=h-x,t[5]=S+f,t[8]=1-s-c,t},o.normalFromMat4=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=a[6],s=a[7],i=a[8],c=a[9],h=a[10],S=a[11],I=a[12],f=a[13],x=a[14],D=a[15],F=n*e-r*l,m=n*M-o*l,d=n*s-u*l,b=r*M-o*e,v=r*s-u*e,z=o*s-u*M,p=i*f-c*I,w=i*x-h*I,E=i*D-S*I,A=c*x-h*f,P=c*D-S*f,L=h*D-S*x,q=F*L-m*P+d*A+b*E-v*w+z*p;return q?(q=1/q,t[0]=(e*L-M*P+s*A)*q,t[1]=(M*E-l*L-s*w)*q,t[2]=(l*P-e*E+s*p)*q,t[3]=(o*P-r*L-u*A)*q,t[4]=(n*L-o*E+u*w)*q,t[5]=(r*E-n*P-u*p)*q,t[6]=(f*z-x*v+D*b)*q,t[7]=(x*d-I*z-D*m)*q,t[8]=(I*v-f*d+D*F)*q,t):null},o.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},o.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t[4]=a[4]+n[4],t[5]=a[5]+n[5],t[6]=a[6]+n[6],t[7]=a[7]+n[7],t[8]=a[8]+n[8],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t[4]=a[4]-n[4],t[5]=a[5]-n[5],t[6]=a[6]-n[6],t[7]=a[7]-n[7],t[8]=a[8]-n[8],t},o.sub=o.subtract,o.multiplyScalar=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t[4]=a[4]*n,t[5]=a[5]*n,t[6]=a[6]*n,t[7]=a[7]*n,t[8]=a[8]*n,t},o.multiplyScalarAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t[4]=a[4]+n[4]*r,t[5]=a[5]+n[5]*r,t[6]=a[6]+n[6]*r,t[7]=a[7]+n[7]*r,t[8]=a[8]+n[8]*r,t},o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]&&t[6]===a[6]&&t[7]===a[7]&&t[8]===a[8]},o.equals=function(t,a){var n=t[0],o=t[1],u=t[2],l=t[3],e=t[4],M=t[5],s=t[6],i=t[7],c=t[8],h=a[0],S=a[1],I=a[2],f=a[3],x=a[4],D=a[5],F=t[6],m=a[7],d=a[8];return Math.abs(n-h)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-S)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(u-I)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(l-f)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(f))&&Math.abs(e-x)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(x))&&Math.abs(M-D)<=r.EPSILON*Math.max(1,Math.abs(M),Math.abs(D))&&Math.abs(s-F)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(F))&&Math.abs(i-m)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(c-d)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(d))},t.exports=o},function(t,a,n){var r=n(1),o={scalar:{},SIMD:{}};o.create=function(){var t=new r.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},o.clone=function(t){var a=new r.ARRAY_TYPE(16);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a[4]=t[4],a[5]=t[5],a[6]=t[6],a[7]=t[7],a[8]=t[8],a[9]=t[9],a[10]=t[10],a[11]=t[11],a[12]=t[12],a[13]=t[13],a[14]=t[14],a[15]=t[15],a},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t},o.fromValues=function(t,a,n,o,u,l,e,M,s,i,c,h,S,I,f,x){var D=new r.ARRAY_TYPE(16);return D[0]=t,D[1]=a,D[2]=n,D[3]=o,D[4]=u,D[5]=l,D[6]=e,D[7]=M,D[8]=s,D[9]=i,D[10]=c,D[11]=h,D[12]=S,D[13]=I,D[14]=f,D[15]=x,D},o.set=function(t,a,n,r,o,u,l,e,M,s,i,c,h,S,I,f,x){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=u,t[5]=l,t[6]=e,t[7]=M,t[8]=s,t[9]=i,t[10]=c,t[11]=h,t[12]=S,t[13]=I,t[14]=f,t[15]=x,t},o.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},o.scalar.transpose=function(t,a){if(t===a){var n=a[1],r=a[2],o=a[3],u=a[6],l=a[7],e=a[11];t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=n,t[6]=a[9],t[7]=a[13],t[8]=r,t[9]=u,t[11]=a[14],t[12]=o,t[13]=l,t[14]=e}else t[0]=a[0],t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=a[1],t[5]=a[5],t[6]=a[9],t[7]=a[13],t[8]=a[2],t[9]=a[6],t[10]=a[10],t[11]=a[14],t[12]=a[3],t[13]=a[7],t[14]=a[11],t[15]=a[15];return t},o.SIMD.transpose=function(t,a){var n,r,o,u,l,e,M,s,i,c;return n=SIMD.Float32x4.load(a,0),r=SIMD.Float32x4.load(a,4),o=SIMD.Float32x4.load(a,8),u=SIMD.Float32x4.load(a,12),l=SIMD.Float32x4.shuffle(n,r,0,1,4,5),e=SIMD.Float32x4.shuffle(o,u,0,1,4,5),M=SIMD.Float32x4.shuffle(l,e,0,2,4,6),s=SIMD.Float32x4.shuffle(l,e,1,3,5,7),SIMD.Float32x4.store(t,0,M),SIMD.Float32x4.store(t,4,s),l=SIMD.Float32x4.shuffle(n,r,2,3,6,7),e=SIMD.Float32x4.shuffle(o,u,2,3,6,7),i=SIMD.Float32x4.shuffle(l,e,0,2,4,6),c=SIMD.Float32x4.shuffle(l,e,1,3,5,7),SIMD.Float32x4.store(t,8,i),SIMD.Float32x4.store(t,12,c),t},o.transpose=r.USE_SIMD?o.SIMD.transpose:o.scalar.transpose,o.scalar.invert=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=a[6],s=a[7],i=a[8],c=a[9],h=a[10],S=a[11],I=a[12],f=a[13],x=a[14],D=a[15],F=n*e-r*l,m=n*M-o*l,d=n*s-u*l,b=r*M-o*e,v=r*s-u*e,z=o*s-u*M,p=i*f-c*I,w=i*x-h*I,E=i*D-S*I,A=c*x-h*f,P=c*D-S*f,L=h*D-S*x,q=F*L-m*P+d*A+b*E-v*w+z*p;return q?(q=1/q,t[0]=(e*L-M*P+s*A)*q,t[1]=(o*P-r*L-u*A)*q,t[2]=(f*z-x*v+D*b)*q,t[3]=(h*v-c*z-S*b)*q,t[4]=(M*E-l*L-s*w)*q,t[5]=(n*L-o*E+u*w)*q,t[6]=(x*d-I*z-D*m)*q,t[7]=(i*z-h*d+S*m)*q,t[8]=(l*P-e*E+s*p)*q,t[9]=(r*E-n*P-u*p)*q,t[10]=(I*v-f*d+D*F)*q,t[11]=(c*d-i*v-S*F)*q,t[12]=(e*w-l*A-M*p)*q,t[13]=(n*A-r*w+o*p)*q,t[14]=(f*m-I*b-x*F)*q,t[15]=(i*b-c*m+h*F)*q,t):null},o.SIMD.invert=function(t,a){var n,r,o,u,l,e,M,s,i,c,h=SIMD.Float32x4.load(a,0),S=SIMD.Float32x4.load(a,4),I=SIMD.Float32x4.load(a,8),f=SIMD.Float32x4.load(a,12);return l=SIMD.Float32x4.shuffle(h,S,0,1,4,5),r=SIMD.Float32x4.shuffle(I,f,0,1,4,5),n=SIMD.Float32x4.shuffle(l,r,0,2,4,6),r=SIMD.Float32x4.shuffle(r,l,1,3,5,7),l=SIMD.Float32x4.shuffle(h,S,2,3,6,7),u=SIMD.Float32x4.shuffle(I,f,2,3,6,7),o=SIMD.Float32x4.shuffle(l,u,0,2,4,6),u=SIMD.Float32x4.shuffle(u,l,1,3,5,7),l=SIMD.Float32x4.mul(o,u),l=SIMD.Float32x4.swizzle(l,1,0,3,2),e=SIMD.Float32x4.mul(r,l),M=SIMD.Float32x4.mul(n,l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),e=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,l),e),M=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,l),M),M=SIMD.Float32x4.swizzle(M,2,3,0,1),l=SIMD.Float32x4.mul(r,o),l=SIMD.Float32x4.swizzle(l,1,0,3,2),e=SIMD.Float32x4.add(SIMD.Float32x4.mul(u,l),e),i=SIMD.Float32x4.mul(n,l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),e=SIMD.Float32x4.sub(e,SIMD.Float32x4.mul(u,l)),i=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,l),i),i=SIMD.Float32x4.swizzle(i,2,3,0,1),l=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(r,2,3,0,1),u),l=SIMD.Float32x4.swizzle(l,1,0,3,2),o=SIMD.Float32x4.swizzle(o,2,3,0,1),e=SIMD.Float32x4.add(SIMD.Float32x4.mul(o,l),e),s=SIMD.Float32x4.mul(n,l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),e=SIMD.Float32x4.sub(e,SIMD.Float32x4.mul(o,l)),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,l),s),s=SIMD.Float32x4.swizzle(s,2,3,0,1),l=SIMD.Float32x4.mul(n,r),l=SIMD.Float32x4.swizzle(l,1,0,3,2),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(u,l),s),i=SIMD.Float32x4.sub(SIMD.Float32x4.mul(o,l),i),l=SIMD.Float32x4.swizzle(l,2,3,0,1),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(u,l),s),i=SIMD.Float32x4.sub(i,SIMD.Float32x4.mul(o,l)),l=SIMD.Float32x4.mul(n,u),l=SIMD.Float32x4.swizzle(l,1,0,3,2),M=SIMD.Float32x4.sub(M,SIMD.Float32x4.mul(o,l)),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(r,l),s),l=SIMD.Float32x4.swizzle(l,2,3,0,1),M=SIMD.Float32x4.add(SIMD.Float32x4.mul(o,l),M),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(r,l)),l=SIMD.Float32x4.mul(n,o),l=SIMD.Float32x4.swizzle(l,1,0,3,2),M=SIMD.Float32x4.add(SIMD.Float32x4.mul(u,l),M),i=SIMD.Float32x4.sub(i,SIMD.Float32x4.mul(r,l)),l=SIMD.Float32x4.swizzle(l,2,3,0,1),M=SIMD.Float32x4.sub(M,SIMD.Float32x4.mul(u,l)),i=SIMD.Float32x4.add(SIMD.Float32x4.mul(r,l),i),c=SIMD.Float32x4.mul(n,e),c=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(c,2,3,0,1),c),c=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(c,1,0,3,2),c),l=SIMD.Float32x4.reciprocalApproximation(c),c=SIMD.Float32x4.sub(SIMD.Float32x4.add(l,l),SIMD.Float32x4.mul(c,SIMD.Float32x4.mul(l,l))),(c=SIMD.Float32x4.swizzle(c,0,0,0,0))?(SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(c,e)),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(c,M)),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(c,s)),SIMD.Float32x4.store(t,12,SIMD.Float32x4.mul(c,i)),t):null},o.invert=r.USE_SIMD?o.SIMD.invert:o.scalar.invert,o.scalar.adjoint=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=a[4],e=a[5],M=a[6],s=a[7],i=a[8],c=a[9],h=a[10],S=a[11],I=a[12],f=a[13],x=a[14],D=a[15];return t[0]=e*(h*D-S*x)-c*(M*D-s*x)+f*(M*S-s*h),t[1]=-(r*(h*D-S*x)-c*(o*D-u*x)+f*(o*S-u*h)),t[2]=r*(M*D-s*x)-e*(o*D-u*x)+f*(o*s-u*M),t[3]=-(r*(M*S-s*h)-e*(o*S-u*h)+c*(o*s-u*M)),t[4]=-(l*(h*D-S*x)-i*(M*D-s*x)+I*(M*S-s*h)),t[5]=n*(h*D-S*x)-i*(o*D-u*x)+I*(o*S-u*h),t[6]=-(n*(M*D-s*x)-l*(o*D-u*x)+I*(o*s-u*M)),t[7]=n*(M*S-s*h)-l*(o*S-u*h)+i*(o*s-u*M),t[8]=l*(c*D-S*f)-i*(e*D-s*f)+I*(e*S-s*c),t[9]=-(n*(c*D-S*f)-i*(r*D-u*f)+I*(r*S-u*c)),t[10]=n*(e*D-s*f)-l*(r*D-u*f)+I*(r*s-u*e),t[11]=-(n*(e*S-s*c)-l*(r*S-u*c)+i*(r*s-u*e)),t[12]=-(l*(c*x-h*f)-i*(e*x-M*f)+I*(e*h-M*c)),t[13]=n*(c*x-h*f)-i*(r*x-o*f)+I*(r*h-o*c),t[14]=-(n*(e*x-M*f)-l*(r*x-o*f)+I*(r*M-o*e)),t[15]=n*(e*h-M*c)-l*(r*h-o*c)+i*(r*M-o*e),t},o.SIMD.adjoint=function(t,a){var n,r,o,u,l,e,M,s,i,c,h,S,I;return n=SIMD.Float32x4.load(a,0),r=SIMD.Float32x4.load(a,4),o=SIMD.Float32x4.load(a,8),u=SIMD.Float32x4.load(a,12),i=SIMD.Float32x4.shuffle(n,r,0,1,4,5),e=SIMD.Float32x4.shuffle(o,u,0,1,4,5),l=SIMD.Float32x4.shuffle(i,e,0,2,4,6),e=SIMD.Float32x4.shuffle(e,i,1,3,5,7),i=SIMD.Float32x4.shuffle(n,r,2,3,6,7),s=SIMD.Float32x4.shuffle(o,u,2,3,6,7),M=SIMD.Float32x4.shuffle(i,s,0,2,4,6),s=SIMD.Float32x4.shuffle(s,i,1,3,5,7),i=SIMD.Float32x4.mul(M,s),i=SIMD.Float32x4.swizzle(i,1,0,3,2),c=SIMD.Float32x4.mul(e,i),h=SIMD.Float32x4.mul(l,i),i=SIMD.Float32x4.swizzle(i,2,3,0,1),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(e,i),c),h=SIMD.Float32x4.sub(SIMD.Float32x4.mul(l,i),h),h=SIMD.Float32x4.swizzle(h,2,3,0,1),i=SIMD.Float32x4.mul(e,M),i=SIMD.Float32x4.swizzle(i,1,0,3,2),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(s,i),c),I=SIMD.Float32x4.mul(l,i),i=SIMD.Float32x4.swizzle(i,2,3,0,1),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(s,i)),I=SIMD.Float32x4.sub(SIMD.Float32x4.mul(l,i),I),I=SIMD.Float32x4.swizzle(I,2,3,0,1),i=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,3,0,1),s),i=SIMD.Float32x4.swizzle(i,1,0,3,2),M=SIMD.Float32x4.swizzle(M,2,3,0,1),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(M,i),c),S=SIMD.Float32x4.mul(l,i),i=SIMD.Float32x4.swizzle(i,2,3,0,1),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(M,i)),S=SIMD.Float32x4.sub(SIMD.Float32x4.mul(l,i),S),S=SIMD.Float32x4.swizzle(S,2,3,0,1),i=SIMD.Float32x4.mul(l,e),i=SIMD.Float32x4.swizzle(i,1,0,3,2),S=SIMD.Float32x4.add(SIMD.Float32x4.mul(s,i),S),I=SIMD.Float32x4.sub(SIMD.Float32x4.mul(M,i),I),i=SIMD.Float32x4.swizzle(i,2,3,0,1),S=SIMD.Float32x4.sub(SIMD.Float32x4.mul(s,i),S),I=SIMD.Float32x4.sub(I,SIMD.Float32x4.mul(M,i)),i=SIMD.Float32x4.mul(l,s),i=SIMD.Float32x4.swizzle(i,1,0,3,2),h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(M,i)),S=SIMD.Float32x4.add(SIMD.Float32x4.mul(e,i),S),i=SIMD.Float32x4.swizzle(i,2,3,0,1),h=SIMD.Float32x4.add(SIMD.Float32x4.mul(M,i),h),S=SIMD.Float32x4.sub(S,SIMD.Float32x4.mul(e,i)),i=SIMD.Float32x4.mul(l,M),i=SIMD.Float32x4.swizzle(i,1,0,3,2),h=SIMD.Float32x4.add(SIMD.Float32x4.mul(s,i),h),I=SIMD.Float32x4.sub(I,SIMD.Float32x4.mul(e,i)),i=SIMD.Float32x4.swizzle(i,2,3,0,1),h=SIMD.Float32x4.sub(h,SIMD.Float32x4.mul(s,i)),I=SIMD.Float32x4.add(SIMD.Float32x4.mul(e,i),I),SIMD.Float32x4.store(t,0,c),SIMD.Float32x4.store(t,4,h),SIMD.Float32x4.store(t,8,S),SIMD.Float32x4.store(t,12,I),t},o.adjoint=r.USE_SIMD?o.SIMD.adjoint:o.scalar.adjoint,o.determinant=function(t){var a=t[0],n=t[1],r=t[2],o=t[3],u=t[4],l=t[5],e=t[6],M=t[7],s=t[8],i=t[9],c=t[10],h=t[11],S=t[12],I=t[13],f=t[14],x=t[15],D=a*l-n*u,F=a*e-r*u,m=a*M-o*u,d=n*e-r*l,b=n*M-o*l,v=r*M-o*e,z=s*I-i*S,p=s*f-c*S,w=s*x-h*S,E=i*f-c*I,A=i*x-h*I,P=c*x-h*f;return D*P-F*A+m*E+d*w-b*p+v*z},o.SIMD.multiply=function(t,a,n){var r=SIMD.Float32x4.load(a,0),o=SIMD.Float32x4.load(a,4),u=SIMD.Float32x4.load(a,8),l=SIMD.Float32x4.load(a,12),e=SIMD.Float32x4.load(n,0),M=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,0,0,0,0),r),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,1,1,1,1),o),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,2,2,2,2),u),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(e,3,3,3,3),l))));SIMD.Float32x4.store(t,0,M);var s=SIMD.Float32x4.load(n,4),i=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,0,0,0,0),r),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,1,1,1,1),o),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,2,2,2,2),u),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,3,3,3,3),l))));SIMD.Float32x4.store(t,4,i);var c=SIMD.Float32x4.load(n,8),h=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,0,0,0,0),r),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,1,1,1,1),o),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,2,2,2,2),u),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,3,3,3,3),l))));SIMD.Float32x4.store(t,8,h);var S=SIMD.Float32x4.load(n,12),I=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(S,0,0,0,0),r),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(S,1,1,1,1),o),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(S,2,2,2,2),u),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(S,3,3,3,3),l))));return SIMD.Float32x4.store(t,12,I),t},o.scalar.multiply=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=a[6],i=a[7],c=a[8],h=a[9],S=a[10],I=a[11],f=a[12],x=a[13],D=a[14],F=a[15],m=n[0],d=n[1],b=n[2],v=n[3];return t[0]=m*r+d*e+b*c+v*f,t[1]=m*o+d*M+b*h+v*x,t[2]=m*u+d*s+b*S+v*D,t[3]=m*l+d*i+b*I+v*F,m=n[4],d=n[5],b=n[6],v=n[7],t[4]=m*r+d*e+b*c+v*f,t[5]=m*o+d*M+b*h+v*x,t[6]=m*u+d*s+b*S+v*D,t[7]=m*l+d*i+b*I+v*F,m=n[8],d=n[9],b=n[10],v=n[11],t[8]=m*r+d*e+b*c+v*f,t[9]=m*o+d*M+b*h+v*x,t[10]=m*u+d*s+b*S+v*D,t[11]=m*l+d*i+b*I+v*F,m=n[12],d=n[13],b=n[14],v=n[15],t[12]=m*r+d*e+b*c+v*f,t[13]=m*o+d*M+b*h+v*x,t[14]=m*u+d*s+b*S+v*D,t[15]=m*l+d*i+b*I+v*F,t},o.multiply=r.USE_SIMD?o.SIMD.multiply:o.scalar.multiply,o.mul=o.multiply,o.scalar.translate=function(t,a,n){var r,o,u,l,e,M,s,i,c,h,S,I,f=n[0],x=n[1],D=n[2];return a===t?(t[12]=a[0]*f+a[4]*x+a[8]*D+a[12],t[13]=a[1]*f+a[5]*x+a[9]*D+a[13],t[14]=a[2]*f+a[6]*x+a[10]*D+a[14],t[15]=a[3]*f+a[7]*x+a[11]*D+a[15]):(r=a[0],o=a[1],u=a[2],l=a[3],e=a[4],M=a[5],s=a[6],i=a[7],c=a[8],h=a[9],S=a[10],I=a[11],t[0]=r,t[1]=o,t[2]=u,t[3]=l,t[4]=e,t[5]=M,t[6]=s,t[7]=i,t[8]=c,t[9]=h,t[10]=S,t[11]=I,t[12]=r*f+e*x+c*D+a[12],t[13]=o*f+M*x+h*D+a[13],t[14]=u*f+s*x+S*D+a[14],t[15]=l*f+i*x+I*D+a[15]),t},o.SIMD.translate=function(t,a,n){var r=SIMD.Float32x4.load(a,0),o=SIMD.Float32x4.load(a,4),u=SIMD.Float32x4.load(a,8),l=SIMD.Float32x4.load(a,12),e=SIMD.Float32x4(n[0],n[1],n[2],0);a!==t&&(t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11]),r=SIMD.Float32x4.mul(r,SIMD.Float32x4.swizzle(e,0,0,0,0)),o=SIMD.Float32x4.mul(o,SIMD.Float32x4.swizzle(e,1,1,1,1)),u=SIMD.Float32x4.mul(u,SIMD.Float32x4.swizzle(e,2,2,2,2));var M=SIMD.Float32x4.add(r,SIMD.Float32x4.add(o,SIMD.Float32x4.add(u,l)));return SIMD.Float32x4.store(t,12,M),t},o.translate=r.USE_SIMD?o.SIMD.translate:o.scalar.translate,o.scalar.scale=function(t,a,n){var r=n[0],o=n[1],u=n[2];return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t[4]=a[4]*o,t[5]=a[5]*o,t[6]=a[6]*o,t[7]=a[7]*o,t[8]=a[8]*u,t[9]=a[9]*u,t[10]=a[10]*u,t[11]=a[11]*u,t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t},o.SIMD.scale=function(t,a,n){var r,o,u,l=SIMD.Float32x4(n[0],n[1],n[2],0);return r=SIMD.Float32x4.load(a,0),SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(r,SIMD.Float32x4.swizzle(l,0,0,0,0))),o=SIMD.Float32x4.load(a,4),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(o,SIMD.Float32x4.swizzle(l,1,1,1,1))),u=SIMD.Float32x4.load(a,8),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(u,SIMD.Float32x4.swizzle(l,2,2,2,2))),t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t},o.scale=r.USE_SIMD?o.SIMD.scale:o.scalar.scale,o.rotate=function(t,a,n,o){var u,l,e,M,s,i,c,h,S,I,f,x,D,F,m,d,b,v,z,p,w,E,A,P,L=o[0],q=o[1],R=o[2],N=Math.sqrt(L*L+q*q+R*R);return Math.abs(N)0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(a[6]-a[9])/r,t[1]=(a[8]-a[2])/r,t[2]=(a[1]-a[4])/r):a[0]>a[5]&a[0]>a[10]?(r=2*Math.sqrt(1+a[0]-a[5]-a[10]),t[3]=(a[6]-a[9])/r,t[0]=.25*r,t[1]=(a[1]+a[4])/r,t[2]=(a[8]+a[2])/r):a[5]>a[10]?(r=2*Math.sqrt(1+a[5]-a[0]-a[10]),t[3]=(a[8]-a[2])/r,t[0]=(a[1]+a[4])/r,t[1]=.25*r,t[2]=(a[6]+a[9])/r):(r=2*Math.sqrt(1+a[10]-a[0]-a[5]),t[3]=(a[1]-a[4])/r,t[0]=(a[8]+a[2])/r,t[1]=(a[6]+a[9])/r,t[2]=.25*r),t},o.fromRotationTranslationScale=function(t,a,n,r){var o=a[0],u=a[1],l=a[2],e=a[3],M=o+o,s=u+u,i=l+l,c=o*M,h=o*s,S=o*i,I=u*s,f=u*i,x=l*i,D=e*M,F=e*s,m=e*i,d=r[0],b=r[1],v=r[2];return t[0]=(1-(I+x))*d,t[1]=(h+m)*d,t[2]=(S-F)*d,t[3]=0,t[4]=(h-m)*b,t[5]=(1-(c+x))*b,t[6]=(f+D)*b,t[7]=0,t[8]=(S+F)*v,t[9]=(f-D)*v,t[10]=(1-(c+I))*v,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},o.fromRotationTranslationScaleOrigin=function(t,a,n,r,o){ 29 | var u=a[0],l=a[1],e=a[2],M=a[3],s=u+u,i=l+l,c=e+e,h=u*s,S=u*i,I=u*c,f=l*i,x=l*c,D=e*c,F=M*s,m=M*i,d=M*c,b=r[0],v=r[1],z=r[2],p=o[0],w=o[1],E=o[2];return t[0]=(1-(f+D))*b,t[1]=(S+d)*b,t[2]=(I-m)*b,t[3]=0,t[4]=(S-d)*v,t[5]=(1-(h+D))*v,t[6]=(x+F)*v,t[7]=0,t[8]=(I+m)*z,t[9]=(x-F)*z,t[10]=(1-(h+f))*z,t[11]=0,t[12]=n[0]+p-(t[0]*p+t[4]*w+t[8]*E),t[13]=n[1]+w-(t[1]*p+t[5]*w+t[9]*E),t[14]=n[2]+E-(t[2]*p+t[6]*w+t[10]*E),t[15]=1,t},o.fromQuat=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=n+n,e=r+r,M=o+o,s=n*l,i=r*l,c=r*e,h=o*l,S=o*e,I=o*M,f=u*l,x=u*e,D=u*M;return t[0]=1-c-I,t[1]=i+D,t[2]=h-x,t[3]=0,t[4]=i-D,t[5]=1-s-I,t[6]=S+f,t[7]=0,t[8]=h+x,t[9]=S-f,t[10]=1-s-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},o.frustum=function(t,a,n,r,o,u,l){var e=1/(n-a),M=1/(o-r),s=1/(u-l);return t[0]=2*u*e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*u*M,t[6]=0,t[7]=0,t[8]=(n+a)*e,t[9]=(o+r)*M,t[10]=(l+u)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=l*u*2*s,t[15]=0,t},o.perspective=function(t,a,n,r,o){var u=1/Math.tan(a/2),l=1/(r-o);return t[0]=u/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(o+r)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*o*r*l,t[15]=0,t},o.perspectiveFromFieldOfView=function(t,a,n,r){var o=Math.tan(a.upDegrees*Math.PI/180),u=Math.tan(a.downDegrees*Math.PI/180),l=Math.tan(a.leftDegrees*Math.PI/180),e=Math.tan(a.rightDegrees*Math.PI/180),M=2/(l+e),s=2/(o+u);return t[0]=M,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-((l-e)*M*.5),t[9]=(o-u)*s*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},o.ortho=function(t,a,n,r,o,u,l){var e=1/(a-n),M=1/(r-o),s=1/(u-l);return t[0]=-2*e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*M,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(a+n)*e,t[13]=(o+r)*M,t[14]=(l+u)*s,t[15]=1,t},o.lookAt=function(t,a,n,u){var l,e,M,s,i,c,h,S,I,f,x=a[0],D=a[1],F=a[2],m=u[0],d=u[1],b=u[2],v=n[0],z=n[1],p=n[2];return Math.abs(x-v)M?(u.cross(t,a,o),u.length(t)<1e-6&&u.cross(t,n,o),u.normalize(t,t),e.setAxisAngle(r,t,Math.PI),r):M>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(u.cross(t,o,l),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+M,e.normalize(r,r))}}(),e.setAxes=function(){var t=o.create();return function(a,n,r,o){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=o[0],t[4]=o[1],t[7]=o[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],e.normalize(a,e.fromMat3(a,t))}}(),e.clone=l.clone,e.fromValues=l.fromValues,e.copy=l.copy,e.set=l.set,e.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},e.setAxisAngle=function(t,a,n){n=.5*n;var r=Math.sin(n);return t[0]=r*a[0],t[1]=r*a[1],t[2]=r*a[2],t[3]=Math.cos(n),t},e.getAxisAngle=function(t,a){var n=2*Math.acos(a[3]),r=Math.sin(n/2);return 0!=r?(t[0]=a[0]/r,t[1]=a[1]/r,t[2]=a[2]/r):(t[0]=1,t[1]=0,t[2]=0),n},e.add=l.add,e.multiply=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3],e=n[0],M=n[1],s=n[2],i=n[3];return t[0]=r*i+l*e+o*s-u*M,t[1]=o*i+l*M+u*e-r*s,t[2]=u*i+l*s+r*M-o*e,t[3]=l*i-r*e-o*M-u*s,t},e.mul=e.multiply,e.scale=l.scale,e.rotateX=function(t,a,n){n*=.5;var r=a[0],o=a[1],u=a[2],l=a[3],e=Math.sin(n),M=Math.cos(n);return t[0]=r*M+l*e,t[1]=o*M+u*e,t[2]=u*M-o*e,t[3]=l*M-r*e,t},e.rotateY=function(t,a,n){n*=.5;var r=a[0],o=a[1],u=a[2],l=a[3],e=Math.sin(n),M=Math.cos(n);return t[0]=r*M-u*e,t[1]=o*M+l*e,t[2]=u*M+r*e,t[3]=l*M-o*e,t},e.rotateZ=function(t,a,n){n*=.5;var r=a[0],o=a[1],u=a[2],l=a[3],e=Math.sin(n),M=Math.cos(n);return t[0]=r*M+o*e,t[1]=o*M-r*e,t[2]=u*M+l*e,t[3]=l*M-u*e,t},e.calculateW=function(t,a){var n=a[0],r=a[1],o=a[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},e.dot=l.dot,e.lerp=l.lerp,e.slerp=function(t,a,n,r){var o,u,l,e,M,s=a[0],i=a[1],c=a[2],h=a[3],S=n[0],I=n[1],f=n[2],x=n[3];return u=s*S+i*I+c*f+h*x,0>u&&(u=-u,S=-S,I=-I,f=-f,x=-x),1-u>1e-6?(o=Math.acos(u),l=Math.sin(o),e=Math.sin((1-r)*o)/l,M=Math.sin(r*o)/l):(e=1-r,M=r),t[0]=e*s+M*S,t[1]=e*i+M*I,t[2]=e*c+M*f,t[3]=e*h+M*x,t},e.sqlerp=function(){var t=e.create(),a=e.create();return function(n,r,o,u,l,M){return e.slerp(t,r,l,M),e.slerp(a,o,u,M),e.slerp(n,t,a,2*M*(1-M)),n}}(),e.invert=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=n*n+r*r+o*o+u*u,e=l?1/l:0;return t[0]=-n*e,t[1]=-r*e,t[2]=-o*e,t[3]=u*e,t},e.conjugate=function(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=a[3],t},e.length=l.length,e.len=e.length,e.squaredLength=l.squaredLength,e.sqrLen=e.squaredLength,e.normalize=l.normalize,e.fromMat3=function(t,a){var n,r=a[0]+a[4]+a[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(a[5]-a[7])*n,t[1]=(a[6]-a[2])*n,t[2]=(a[1]-a[3])*n;else{var o=0;a[4]>a[0]&&(o=1),a[8]>a[3*o+o]&&(o=2);var u=(o+1)%3,l=(o+2)%3;n=Math.sqrt(a[3*o+o]-a[3*u+u]-a[3*l+l]+1),t[o]=.5*n,n=.5/n,t[3]=(a[3*u+l]-a[3*l+u])*n,t[u]=(a[3*u+o]+a[3*o+u])*n,t[l]=(a[3*l+o]+a[3*o+l])*n}return t},e.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.exactEquals=l.exactEquals,e.equals=l.equals,t.exports=e},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},o.clone=function(t){var a=new r.ARRAY_TYPE(3);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a},o.fromValues=function(t,a,n){var o=new r.ARRAY_TYPE(3);return o[0]=t,o[1]=a,o[2]=n,o},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t},o.set=function(t,a,n,r){return t[0]=a,t[1]=n,t[2]=r,t},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t},o.sub=o.subtract,o.multiply=function(t,a,n){return t[0]=a[0]*n[0],t[1]=a[1]*n[1],t[2]=a[2]*n[2],t},o.mul=o.multiply,o.divide=function(t,a,n){return t[0]=a[0]/n[0],t[1]=a[1]/n[1],t[2]=a[2]/n[2],t},o.div=o.divide,o.ceil=function(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t},o.floor=function(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t},o.min=function(t,a,n){return t[0]=Math.min(a[0],n[0]),t[1]=Math.min(a[1],n[1]),t[2]=Math.min(a[2],n[2]),t},o.max=function(t,a,n){return t[0]=Math.max(a[0],n[0]),t[1]=Math.max(a[1],n[1]),t[2]=Math.max(a[2],n[2]),t},o.round=function(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t},o.scale=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t},o.scaleAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t},o.distance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1],o=a[2]-t[2];return Math.sqrt(n*n+r*r+o*o)},o.dist=o.distance,o.squaredDistance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1],o=a[2]-t[2];return n*n+r*r+o*o},o.sqrDist=o.squaredDistance,o.length=function(t){var a=t[0],n=t[1],r=t[2];return Math.sqrt(a*a+n*n+r*r)},o.len=o.length,o.squaredLength=function(t){var a=t[0],n=t[1],r=t[2];return a*a+n*n+r*r},o.sqrLen=o.squaredLength,o.negate=function(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t},o.inverse=function(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t},o.normalize=function(t,a){var n=a[0],r=a[1],o=a[2],u=n*n+r*r+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=a[0]*u,t[1]=a[1]*u,t[2]=a[2]*u),t},o.dot=function(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]},o.cross=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=n[0],e=n[1],M=n[2];return t[0]=o*M-u*e,t[1]=u*l-r*M,t[2]=r*e-o*l,t},o.lerp=function(t,a,n,r){var o=a[0],u=a[1],l=a[2];return t[0]=o+r*(n[0]-o),t[1]=u+r*(n[1]-u),t[2]=l+r*(n[2]-l),t},o.hermite=function(t,a,n,r,o,u){var l=u*u,e=l*(2*u-3)+1,M=l*(u-2)+u,s=l*(u-1),i=l*(3-2*u);return t[0]=a[0]*e+n[0]*M+r[0]*s+o[0]*i,t[1]=a[1]*e+n[1]*M+r[1]*s+o[1]*i,t[2]=a[2]*e+n[2]*M+r[2]*s+o[2]*i,t},o.bezier=function(t,a,n,r,o,u){var l=1-u,e=l*l,M=u*u,s=e*l,i=3*u*e,c=3*M*l,h=M*u;return t[0]=a[0]*s+n[0]*i+r[0]*c+o[0]*h,t[1]=a[1]*s+n[1]*i+r[1]*c+o[1]*h,t[2]=a[2]*s+n[2]*i+r[2]*c+o[2]*h,t},o.random=function(t,a){a=a||1;var n=2*r.RANDOM()*Math.PI,o=2*r.RANDOM()-1,u=Math.sqrt(1-o*o)*a;return t[0]=Math.cos(n)*u,t[1]=Math.sin(n)*u,t[2]=o*a,t},o.transformMat4=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=n[3]*r+n[7]*o+n[11]*u+n[15];return l=l||1,t[0]=(n[0]*r+n[4]*o+n[8]*u+n[12])/l,t[1]=(n[1]*r+n[5]*o+n[9]*u+n[13])/l,t[2]=(n[2]*r+n[6]*o+n[10]*u+n[14])/l,t},o.transformMat3=function(t,a,n){var r=a[0],o=a[1],u=a[2];return t[0]=r*n[0]+o*n[3]+u*n[6],t[1]=r*n[1]+o*n[4]+u*n[7],t[2]=r*n[2]+o*n[5]+u*n[8],t},o.transformQuat=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=n[0],e=n[1],M=n[2],s=n[3],i=s*r+e*u-M*o,c=s*o+M*r-l*u,h=s*u+l*o-e*r,S=-l*r-e*o-M*u;return t[0]=i*s+S*-l+c*-M-h*-e,t[1]=c*s+S*-e+h*-l-i*-M,t[2]=h*s+S*-M+i*-e-c*-l,t},o.rotateX=function(t,a,n,r){var o=[],u=[];return o[0]=a[0]-n[0],o[1]=a[1]-n[1],o[2]=a[2]-n[2],u[0]=o[0],u[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),u[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=u[0]+n[0],t[1]=u[1]+n[1],t[2]=u[2]+n[2],t},o.rotateY=function(t,a,n,r){var o=[],u=[];return o[0]=a[0]-n[0],o[1]=a[1]-n[1],o[2]=a[2]-n[2],u[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),u[1]=o[1],u[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=u[0]+n[0],t[1]=u[1]+n[1],t[2]=u[2]+n[2],t},o.rotateZ=function(t,a,n,r){var o=[],u=[];return o[0]=a[0]-n[0],o[1]=a[1]-n[1],o[2]=a[2]-n[2],u[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),u[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),u[2]=o[2],t[0]=u[0]+n[0],t[1]=u[1]+n[1],t[2]=u[2]+n[2],t},o.forEach=function(){var t=o.create();return function(a,n,r,o,u,l){var e,M;for(n||(n=3),r||(r=0),M=o?Math.min(o*n+r,a.length):a.length,e=r;M>e;e+=n)t[0]=a[e],t[1]=a[e+1],t[2]=a[e+2],u(t,t,l),a[e]=t[0],a[e+1]=t[1],a[e+2]=t[2];return a}}(),o.angle=function(t,a){var n=o.fromValues(t[0],t[1],t[2]),r=o.fromValues(a[0],a[1],a[2]);o.normalize(n,n),o.normalize(r,r);var u=o.dot(n,r);return u>1?0:Math.acos(u)},o.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]},o.equals=function(t,a){var n=t[0],o=t[1],u=t[2],l=a[0],e=a[1],M=a[2];return Math.abs(n-l)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(o-e)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(e))&&Math.abs(u-M)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(M))},t.exports=o},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},o.clone=function(t){var a=new r.ARRAY_TYPE(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a},o.fromValues=function(t,a,n,o){var u=new r.ARRAY_TYPE(4);return u[0]=t,u[1]=a,u[2]=n,u[3]=o,u},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t},o.set=function(t,a,n,r,o){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t},o.sub=o.subtract,o.multiply=function(t,a,n){return t[0]=a[0]*n[0],t[1]=a[1]*n[1],t[2]=a[2]*n[2],t[3]=a[3]*n[3],t},o.mul=o.multiply,o.divide=function(t,a,n){return t[0]=a[0]/n[0],t[1]=a[1]/n[1],t[2]=a[2]/n[2],t[3]=a[3]/n[3],t},o.div=o.divide,o.ceil=function(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t[3]=Math.ceil(a[3]),t},o.floor=function(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t[3]=Math.floor(a[3]),t},o.min=function(t,a,n){return t[0]=Math.min(a[0],n[0]),t[1]=Math.min(a[1],n[1]),t[2]=Math.min(a[2],n[2]),t[3]=Math.min(a[3],n[3]),t},o.max=function(t,a,n){return t[0]=Math.max(a[0],n[0]),t[1]=Math.max(a[1],n[1]),t[2]=Math.max(a[2],n[2]),t[3]=Math.max(a[3],n[3]),t},o.round=function(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t[3]=Math.round(a[3]),t},o.scale=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t},o.scaleAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t},o.distance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1],o=a[2]-t[2],u=a[3]-t[3];return Math.sqrt(n*n+r*r+o*o+u*u)},o.dist=o.distance,o.squaredDistance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1],o=a[2]-t[2],u=a[3]-t[3];return n*n+r*r+o*o+u*u},o.sqrDist=o.squaredDistance,o.length=function(t){var a=t[0],n=t[1],r=t[2],o=t[3];return Math.sqrt(a*a+n*n+r*r+o*o)},o.len=o.length,o.squaredLength=function(t){var a=t[0],n=t[1],r=t[2],o=t[3];return a*a+n*n+r*r+o*o},o.sqrLen=o.squaredLength,o.negate=function(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=-a[3],t},o.inverse=function(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t[3]=1/a[3],t},o.normalize=function(t,a){var n=a[0],r=a[1],o=a[2],u=a[3],l=n*n+r*r+o*o+u*u;return l>0&&(l=1/Math.sqrt(l),t[0]=n*l,t[1]=r*l,t[2]=o*l,t[3]=u*l),t},o.dot=function(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]*a[3]},o.lerp=function(t,a,n,r){var o=a[0],u=a[1],l=a[2],e=a[3];return t[0]=o+r*(n[0]-o),t[1]=u+r*(n[1]-u),t[2]=l+r*(n[2]-l),t[3]=e+r*(n[3]-e),t},o.random=function(t,a){return a=a||1,t[0]=r.RANDOM(),t[1]=r.RANDOM(),t[2]=r.RANDOM(),t[3]=r.RANDOM(),o.normalize(t,t),o.scale(t,t,a),t},o.transformMat4=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=a[3];return t[0]=n[0]*r+n[4]*o+n[8]*u+n[12]*l,t[1]=n[1]*r+n[5]*o+n[9]*u+n[13]*l,t[2]=n[2]*r+n[6]*o+n[10]*u+n[14]*l,t[3]=n[3]*r+n[7]*o+n[11]*u+n[15]*l,t},o.transformQuat=function(t,a,n){var r=a[0],o=a[1],u=a[2],l=n[0],e=n[1],M=n[2],s=n[3],i=s*r+e*u-M*o,c=s*o+M*r-l*u,h=s*u+l*o-e*r,S=-l*r-e*o-M*u;return t[0]=i*s+S*-l+c*-M-h*-e,t[1]=c*s+S*-e+h*-l-i*-M,t[2]=h*s+S*-M+i*-e-c*-l,t[3]=a[3],t},o.forEach=function(){var t=o.create();return function(a,n,r,o,u,l){var e,M;for(n||(n=4),r||(r=0),M=o?Math.min(o*n+r,a.length):a.length,e=r;M>e;e+=n)t[0]=a[e],t[1]=a[e+1],t[2]=a[e+2],t[3]=a[e+3],u(t,t,l),a[e]=t[0],a[e+1]=t[1],a[e+2]=t[2],a[e+3]=t[3];return a}}(),o.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]},o.equals=function(t,a){var n=t[0],o=t[1],u=t[2],l=t[3],e=a[0],M=a[1],s=a[2],i=a[3];return Math.abs(n-e)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(e))&&Math.abs(o-M)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(u-s)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(s))&&Math.abs(l-i)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(i))},t.exports=o},function(t,a,n){var r=n(1),o={};o.create=function(){var t=new r.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},o.clone=function(t){var a=new r.ARRAY_TYPE(2);return a[0]=t[0],a[1]=t[1],a},o.fromValues=function(t,a){var n=new r.ARRAY_TYPE(2);return n[0]=t,n[1]=a,n},o.copy=function(t,a){return t[0]=a[0],t[1]=a[1],t},o.set=function(t,a,n){return t[0]=a,t[1]=n,t},o.add=function(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t},o.subtract=function(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t},o.sub=o.subtract,o.multiply=function(t,a,n){return t[0]=a[0]*n[0],t[1]=a[1]*n[1],t},o.mul=o.multiply,o.divide=function(t,a,n){return t[0]=a[0]/n[0],t[1]=a[1]/n[1],t},o.div=o.divide,o.ceil=function(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t},o.floor=function(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t},o.min=function(t,a,n){return t[0]=Math.min(a[0],n[0]),t[1]=Math.min(a[1],n[1]),t},o.max=function(t,a,n){return t[0]=Math.max(a[0],n[0]),t[1]=Math.max(a[1],n[1]),t},o.round=function(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t},o.scale=function(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t},o.scaleAndAdd=function(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t},o.distance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1];return Math.sqrt(n*n+r*r)},o.dist=o.distance,o.squaredDistance=function(t,a){var n=a[0]-t[0],r=a[1]-t[1];return n*n+r*r},o.sqrDist=o.squaredDistance,o.length=function(t){var a=t[0],n=t[1];return Math.sqrt(a*a+n*n)},o.len=o.length,o.squaredLength=function(t){var a=t[0],n=t[1];return a*a+n*n},o.sqrLen=o.squaredLength,o.negate=function(t,a){return t[0]=-a[0],t[1]=-a[1],t},o.inverse=function(t,a){return t[0]=1/a[0],t[1]=1/a[1],t},o.normalize=function(t,a){var n=a[0],r=a[1],o=n*n+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=a[0]*o,t[1]=a[1]*o),t},o.dot=function(t,a){return t[0]*a[0]+t[1]*a[1]},o.cross=function(t,a,n){var r=a[0]*n[1]-a[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},o.lerp=function(t,a,n,r){var o=a[0],u=a[1];return t[0]=o+r*(n[0]-o),t[1]=u+r*(n[1]-u),t},o.random=function(t,a){a=a||1;var n=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(n)*a,t[1]=Math.sin(n)*a,t},o.transformMat2=function(t,a,n){var r=a[0],o=a[1];return t[0]=n[0]*r+n[2]*o,t[1]=n[1]*r+n[3]*o,t},o.transformMat2d=function(t,a,n){var r=a[0],o=a[1];return t[0]=n[0]*r+n[2]*o+n[4],t[1]=n[1]*r+n[3]*o+n[5],t},o.transformMat3=function(t,a,n){var r=a[0],o=a[1];return t[0]=n[0]*r+n[3]*o+n[6],t[1]=n[1]*r+n[4]*o+n[7],t},o.transformMat4=function(t,a,n){var r=a[0],o=a[1];return t[0]=n[0]*r+n[4]*o+n[12],t[1]=n[1]*r+n[5]*o+n[13],t},o.forEach=function(){var t=o.create();return function(a,n,r,o,u,l){var e,M;for(n||(n=2),r||(r=0),M=o?Math.min(o*n+r,a.length):a.length,e=r;M>e;e+=n)t[0]=a[e],t[1]=a[e+1],u(t,t,l),a[e]=t[0],a[e+1]=t[1];return a}}(),o.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},o.exactEquals=function(t,a){return t[0]===a[0]&&t[1]===a[1]},o.equals=function(t,a){var n=t[0],o=t[1],u=a[0],l=a[1];return Math.abs(n-u)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(o-l)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(l))},t.exports=o}])}); -------------------------------------------------------------------------------- /src/jsMain/resources/teapot_w_normals.obj: -------------------------------------------------------------------------------- 1 | v 40.6266 28.3457 -1.10804 2 | v 40.0714 30.4443 -1.10804 3 | v 40.7155 31.1438 -1.10804 4 | v 42.0257 30.4443 -1.10804 5 | v 43.4692 28.3457 -1.10804 6 | v 37.5425 28.3457 14.5117 7 | v 37.0303 30.4443 14.2938 8 | v 37.6244 31.1438 14.5466 9 | v 38.8331 30.4443 15.0609 10 | v 40.1647 28.3457 15.6274 11 | v 29.0859 28.3457 27.1468 12 | v 28.6917 30.4443 26.7527 13 | v 29.149 31.1438 27.2099 14 | v 30.0792 30.4443 28.1402 15 | v 31.1041 28.3457 29.165 16 | v 16.4508 28.3457 35.6034 17 | v 16.2329 30.4443 35.0912 18 | v 16.4857 31.1438 35.6853 19 | v 16.9999 30.4443 36.894 20 | v 17.5665 28.3457 38.2256 21 | v 0.831025 28.3457 38.6876 22 | v 0.831025 30.4443 38.1324 23 | v 0.831025 31.1438 38.7764 24 | v 0.831025 30.4443 40.0866 25 | v 0.831025 28.3457 41.5301 26 | v -15.868 28.3457 35.6034 27 | v -15.0262 30.4443 35.0912 28 | v -14.9585 31.1438 35.6853 29 | v -15.3547 30.4443 36.894 30 | v -15.9044 28.3457 38.2256 31 | v -28.3832 28.3457 27.1468 32 | v -27.4344 30.4443 26.7527 33 | v -27.6068 31.1438 27.2099 34 | v -28.4322 30.4443 28.1402 35 | v -29.4421 28.3457 29.165 36 | v -36.2402 28.3457 14.5117 37 | v -35.52 30.4443 14.2938 38 | v -36.0073 31.1438 14.5466 39 | v -37.1767 30.4443 15.0609 40 | v -38.5027 28.3457 15.6274 41 | v -38.9646 28.3457 -1.10804 42 | v -38.4094 30.4443 -1.10804 43 | v -39.0534 31.1438 -1.10804 44 | v -40.3636 30.4443 -1.10804 45 | v -41.8071 28.3457 -1.10804 46 | v -35.8804 28.3457 -16.7278 47 | v -35.3683 30.4443 -16.5099 48 | v -35.9624 31.1438 -16.7627 49 | v -37.1711 30.4443 -17.2769 50 | v -38.5027 28.3457 -17.8435 51 | v -27.4238 28.3457 -29.3629 52 | v -27.0297 30.4443 -28.9687 53 | v -27.4869 31.1438 -29.426 54 | v -28.4172 30.4443 -30.3562 55 | v -29.4421 28.3457 -31.3811 56 | v -14.7887 28.3457 -37.8195 57 | v -14.5708 30.4443 -37.3073 58 | v -14.8236 31.1438 -37.9014 59 | v -15.3379 30.4443 -39.1101 60 | v -15.9044 28.3457 -40.4417 61 | v 0.831025 28.3457 -40.9036 62 | v 0.831025 30.4443 -40.3484 63 | v 0.831025 31.1438 -40.9925 64 | v 0.831025 30.4443 -42.3027 65 | v 0.831025 28.3457 -43.7462 66 | v 16.4508 28.3457 -37.8195 67 | v 16.2329 30.4443 -37.3073 68 | v 16.4857 31.1438 -37.9014 69 | v 16.9999 30.4443 -39.1101 70 | v 17.5665 28.3457 -40.4417 71 | v 29.0859 28.3457 -29.3629 72 | v 28.6917 30.4443 -28.9687 73 | v 29.149 31.1438 -29.426 74 | v 30.0792 30.4443 -30.3562 75 | v 31.1041 28.3457 -31.3811 76 | v 37.5425 28.3457 -16.7278 77 | v 37.0303 30.4443 -16.5099 78 | v 37.6244 31.1438 -16.7627 79 | v 38.8331 30.4443 -17.2769 80 | v 40.1647 28.3457 -17.8435 81 | v 48.6879 17.1865 -1.10804 82 | v 53.2404 6.22714 -1.10804 83 | v 56.4605 -4.33246 -1.10804 84 | v 57.6819 -14.2925 -1.10804 85 | v 44.979 17.1865 17.6758 86 | v 49.1787 6.22714 19.4626 87 | v 52.1492 -4.33246 20.7265 88 | v 53.2759 -14.2925 21.2059 89 | v 34.8094 17.1865 32.8703 90 | v 38.0417 6.22714 36.1026 91 | v 40.3279 -4.33246 38.3889 92 | v 41.1951 -14.2925 39.2561 93 | v 19.6148 17.1865 43.0399 94 | v 21.4017 6.22714 47.2396 95 | v 22.6656 -4.33246 50.2101 96 | v 23.145 -14.2925 51.3369 97 | v 0.831025 17.1865 46.7488 98 | v 0.831025 6.22714 51.3013 99 | v 0.831025 -4.33246 54.5214 100 | v 0.831025 -14.2925 55.7428 101 | v -17.9528 17.1865 43.0399 102 | v -19.7397 6.22714 47.2396 103 | v -21.0035 -4.33246 50.2101 104 | v -21.4829 -14.2925 51.3369 105 | v -33.1474 17.1865 32.8703 106 | v -36.3796 6.22714 36.1026 107 | v -38.6659 -4.33246 38.3889 108 | v -39.5331 -14.2925 39.2561 109 | v -43.3169 17.1865 17.6758 110 | v -47.5166 6.22714 19.4626 111 | v -50.4871 -4.33246 20.7265 112 | v -51.6139 -14.2925 21.2059 113 | v -47.0258 17.1865 -1.10804 114 | v -51.5784 6.22714 -1.10804 115 | v -54.7984 -4.33246 -1.10804 116 | v -56.0198 -14.2925 -1.10804 117 | v -43.3169 17.1865 -19.8919 118 | v -47.5166 6.22714 -21.6787 119 | v -50.4871 -4.33246 -22.9426 120 | v -51.6139 -14.2925 -23.422 121 | v -33.1474 17.1865 -35.0864 122 | v -36.3796 6.22714 -38.3187 123 | v -38.6659 -4.33246 -40.6049 124 | v -39.5331 -14.2925 -41.4721 125 | v -17.9528 17.1865 -45.256 126 | v -19.7397 6.22714 -49.4557 127 | v -21.0035 -4.33246 -52.4262 128 | v -21.4829 -14.2925 -53.5529 129 | v 0.831025 17.1865 -48.9649 130 | v 0.831025 6.22714 -53.5174 131 | v 0.831025 -4.33246 -56.7375 132 | v 0.831025 -14.2925 -57.9589 133 | v 19.6148 17.1865 -45.256 134 | v 21.4017 6.22714 -49.4557 135 | v 22.6656 -4.33246 -52.4262 136 | v 23.145 -14.2925 -53.5529 137 | v 34.8094 17.1865 -35.0864 138 | v 38.0417 6.22714 -38.3187 139 | v 40.3279 -4.33246 -40.6049 140 | v 41.1951 -14.2925 -41.4721 141 | v 44.979 17.1865 -19.8919 142 | v 49.1787 6.22714 -21.6787 143 | v 52.1492 -4.33246 -22.9426 144 | v 53.2759 -14.2925 -23.422 145 | v 55.4611 -22.7202 -1.10804 146 | v 50.5755 -28.9493 -1.10804 147 | v 45.6899 -33.1798 -1.10804 148 | v 43.4692 -35.6115 -1.10804 149 | v 51.2273 -22.7202 20.3343 150 | v 46.7203 -28.9493 18.4167 151 | v 42.2133 -33.1798 16.4991 152 | v 40.1647 -35.6115 15.6274 153 | v 39.6184 -22.7202 37.6793 154 | v 36.1496 -28.9493 34.2106 155 | v 32.6808 -33.1798 30.7418 156 | v 31.1041 -35.6115 29.165 157 | v 22.2733 -22.7202 49.2882 158 | v 20.3557 -28.9493 44.7813 159 | v 18.4381 -33.1798 40.2743 160 | v 17.5665 -35.6115 38.2256 161 | v 0.831025 -22.7202 53.5221 162 | v 0.831025 -28.9493 48.6365 163 | v 0.831025 -33.1798 43.7508 164 | v 0.831025 -35.6115 41.5301 165 | v -20.6113 -22.7202 49.2882 166 | v -18.6937 -28.9493 44.7813 167 | v -16.7761 -33.1798 40.2743 168 | v -15.9044 -35.6115 38.2256 169 | v -37.9564 -22.7202 37.6793 170 | v -34.4876 -28.9493 34.2106 171 | v -31.0188 -33.1798 30.7418 172 | v -29.4421 -35.6115 29.165 173 | v -49.5653 -22.7202 20.3343 174 | v -45.0583 -28.9493 18.4167 175 | v -40.5513 -33.1798 16.4991 176 | v -38.5027 -35.6115 15.6274 177 | v -53.7991 -22.7202 -1.10804 178 | v -48.9135 -28.9493 -1.10804 179 | v -44.0279 -33.1798 -1.10804 180 | v -41.8071 -35.6115 -1.10804 181 | v -49.5653 -22.7202 -22.5504 182 | v -45.0583 -28.9493 -20.6327 183 | v -40.5513 -33.1798 -18.7151 184 | v -38.5027 -35.6115 -17.8435 185 | v -37.9564 -22.7202 -39.8954 186 | v -34.4876 -28.9493 -36.4266 187 | v -31.0188 -33.1798 -32.9578 188 | v -29.4421 -35.6115 -31.3811 189 | v -20.6113 -22.7202 -51.5043 190 | v -18.6937 -28.9493 -46.9973 191 | v -16.7761 -33.1798 -42.4903 192 | v -15.9044 -35.6115 -40.4417 193 | v 0.831025 -22.7202 -55.7382 194 | v 0.831025 -28.9493 -50.8525 195 | v 0.831025 -33.1798 -45.9669 196 | v 0.831025 -35.6115 -43.7462 197 | v 22.2733 -22.7202 -51.5043 198 | v 20.3557 -28.9493 -46.9973 199 | v 18.4381 -33.1798 -42.4903 200 | v 17.5665 -35.6115 -40.4417 201 | v 39.6184 -22.7202 -39.8954 202 | v 36.1496 -28.9493 -36.4266 203 | v 32.6808 -33.1798 -32.9578 204 | v 31.1041 -35.6115 -31.3811 205 | v 51.2273 -22.7202 -22.5504 206 | v 46.7203 -28.9493 -20.6327 207 | v 42.2133 -33.1798 -18.7151 208 | v 40.1647 -35.6115 -17.8435 209 | v 42.5031 -37.1772 -1.10804 210 | v 37.3399 -38.5429 -1.10804 211 | v 24.5818 -39.5089 -1.10804 212 | v 0.831025 -39.8754 -1.10804 213 | v 39.2736 -37.1772 15.2483 214 | v 34.5105 -38.5429 13.2217 215 | v 22.7411 -39.5089 8.21414 216 | v 30.4182 -37.1772 28.4792 217 | v 26.7523 -38.5429 24.8133 218 | v 17.6941 -39.5089 15.755 219 | v 17.1873 -37.1772 37.3345 220 | v 15.1608 -38.5429 32.5714 221 | v 10.1532 -39.5089 20.8021 222 | v 0.831025 -37.1772 40.5641 223 | v 0.831025 -38.5429 35.4009 224 | v 0.831025 -39.5089 22.6427 225 | v -15.5253 -37.1772 37.3345 226 | v -13.4987 -38.5429 32.5714 227 | v -8.49115 -39.5089 20.8021 228 | v -28.7562 -37.1772 28.4792 229 | v -25.0903 -38.5429 24.8133 230 | v -16.032 -39.5089 15.755 231 | v -37.6115 -37.1772 15.2483 232 | v -32.8484 -38.5429 13.2217 233 | v -21.0791 -39.5089 8.21414 234 | v -40.8411 -37.1772 -1.10804 235 | v -35.6779 -38.5429 -1.10804 236 | v -22.9198 -39.5089 -1.10804 237 | v -37.6115 -37.1772 -17.4643 238 | v -32.8484 -38.5429 -15.4378 239 | v -21.0791 -39.5089 -10.4302 240 | v -28.7562 -37.1772 -30.6952 241 | v -25.0903 -38.5429 -27.0294 242 | v -16.032 -39.5089 -17.9711 243 | v -15.5253 -37.1772 -39.5506 244 | v -13.4987 -38.5429 -34.7875 245 | v -8.49115 -39.5089 -23.0181 246 | v 0.831025 -37.1772 -42.7802 247 | v 0.831025 -38.5429 -37.6169 248 | v 0.831025 -39.5089 -24.8588 249 | v 17.1873 -37.1772 -39.5506 250 | v 15.1608 -38.5429 -34.7875 251 | v 10.1532 -39.5089 -23.0181 252 | v 30.4182 -37.1772 -30.6952 253 | v 26.7523 -38.5429 -27.0294 254 | v 17.6941 -39.5089 -17.9711 255 | v 39.2736 -37.1772 -17.4643 256 | v 34.5105 -38.5429 -15.4378 257 | v 22.7411 -39.5089 -10.4302 258 | v -44.6497 17.6861 -1.10804 259 | v -57.9297 17.5862 -1.10804 260 | v -67.7453 16.8867 -1.10804 261 | v -73.8301 14.9879 -1.10804 262 | v -75.9176 11.2904 -1.10804 263 | v -44.2055 18.6855 3.68876 264 | v -58.3252 18.5699 3.68876 265 | v -68.6891 17.7611 3.68876 266 | v -75.0724 15.5657 3.68876 267 | v -77.2501 11.2904 3.68876 268 | v -43.2284 20.884 5.28769 269 | v -59.1955 20.7341 5.28769 270 | v -70.7655 19.6848 5.28769 271 | v -77.8053 16.8367 5.28769 272 | v -80.1814 11.2904 5.28769 273 | v -42.2513 23.0825 3.68876 274 | v -60.0657 22.8983 3.68876 275 | v -72.8419 21.6085 3.68876 276 | v -80.5381 18.1077 3.68876 277 | v -83.1128 11.2904 3.68876 278 | v -41.8071 24.0819 -1.10804 279 | v -60.4613 23.882 -1.10804 280 | v -73.7857 22.4829 -1.10804 281 | v -81.7804 18.6855 -1.10804 282 | v -84.4453 11.2904 -1.10804 283 | v -42.2513 23.0825 -5.90483 284 | v -60.0657 22.8983 -5.90483 285 | v -72.8419 21.6085 -5.90483 286 | v -80.5381 18.1077 -5.90483 287 | v -83.1128 11.2904 -5.90483 288 | v -43.2284 20.884 -7.50376 289 | v -59.1955 20.7341 -7.50376 290 | v -70.7655 19.6848 -7.50376 291 | v -77.8053 16.8367 -7.50376 292 | v -80.1814 11.2904 -7.50376 293 | v -44.2055 18.6855 -5.90483 294 | v -58.3252 18.5699 -5.90483 295 | v -68.6891 17.7611 -5.90483 296 | v -75.0724 15.5657 -5.90483 297 | v -77.2501 11.2904 -5.90483 298 | v -74.8073 5.4943 -1.10804 299 | v -71.2985 -1.50103 -1.10804 300 | v -65.1248 -8.49634 -1.10804 301 | v -56.0198 -14.2925 -1.10804 302 | v -76.0183 4.93477 3.68876 303 | v -72.159 -2.35462 3.68876 304 | v -65.4267 -9.55033 3.68876 305 | v -55.5757 -15.6249 3.68876 306 | v -78.6824 3.70383 5.28769 307 | v -74.0522 -4.23253 5.28769 308 | v -66.0909 -11.8691 5.28769 309 | v -54.5986 -18.5563 5.28769 310 | v -81.3466 2.47288 3.68876 311 | v -75.9454 -6.11044 3.68876 312 | v -66.755 -14.1878 3.68876 313 | v -53.6214 -21.4877 3.68876 314 | v -82.5576 1.91336 -1.10804 315 | v -76.8059 -6.96404 -1.10804 316 | v -67.0569 -15.2418 -1.10804 317 | v -53.1773 -22.8201 -1.10804 318 | v -81.3466 2.47288 -5.90483 319 | v -75.9454 -6.11044 -5.90483 320 | v -66.755 -14.1878 -5.90483 321 | v -53.6214 -21.4877 -5.90483 322 | v -78.6824 3.70383 -7.50376 323 | v -74.0522 -4.23253 -7.50376 324 | v -66.0909 -11.8691 -7.50376 325 | v -54.5986 -18.5563 -7.50376 326 | v -76.0183 4.93477 -5.90483 327 | v -72.159 -2.35462 -5.90483 328 | v -65.4267 -9.55033 -5.90483 329 | v -55.5757 -15.6249 -5.90483 330 | v 49.1543 0.630882 -1.10804 331 | v 62.7896 3.76212 -1.10804 332 | v 68.6967 11.2904 -1.10804 333 | v 71.939 20.4176 -1.10804 334 | v 77.5797 28.3457 -1.10804 335 | v 49.1543 -3.03333 9.4449 336 | v 63.8305 1.04519 8.42059 337 | v 70.0292 9.70814 6.1671 338 | v 73.5629 19.8451 3.91361 339 | v 80.2446 28.3457 2.88929 340 | v 49.1543 -11.0946 12.9626 341 | v 66.1207 -4.93206 11.5968 342 | v 72.9605 6.22714 8.59214 343 | v 77.1355 18.5855 5.58749 344 | v 86.1073 28.3457 4.22173 345 | v 49.1543 -19.1559 9.4449 346 | v 68.4108 -10.9093 8.42059 347 | v 75.8919 2.74614 6.1671 348 | v 80.7081 17.326 3.91361 349 | v 91.97 28.3457 2.88929 350 | v 49.1543 -22.8201 -1.10804 351 | v 69.4518 -13.6262 -1.10804 352 | v 77.2244 1.16386 -1.10804 353 | v 82.3321 16.7534 -1.10804 354 | v 94.6349 28.3457 -1.10804 355 | v 49.1543 -19.1559 -11.661 356 | v 68.4108 -10.9093 -10.6367 357 | v 75.8919 2.74614 -8.38317 358 | v 80.7081 17.326 -6.12968 359 | v 91.97 28.3457 -5.10536 360 | v 49.1543 -11.0946 -15.1786 361 | v 66.1207 -4.93206 -13.8129 362 | v 72.9605 6.22714 -10.8082 363 | v 77.1355 18.5855 -7.80356 364 | v 86.1073 28.3457 -6.4378 365 | v 49.1543 -3.03333 -11.661 366 | v 63.8305 1.04519 -10.6367 367 | v 70.0292 9.70814 -8.38317 368 | v 73.5629 19.8451 -6.12968 369 | v 80.2446 28.3457 -5.10536 370 | v 79.6227 29.5449 -1.10804 371 | v 81.1329 29.9446 -1.10804 372 | v 81.577 29.5449 -1.10804 373 | v 80.4222 28.3457 -1.10804 374 | v 82.4767 29.6034 2.63946 375 | v 83.8116 30.0383 2.08983 376 | v 83.8515 29.6268 1.54019 377 | v 82.1988 28.3457 1.29036 378 | v 88.7555 29.7322 3.88862 379 | v 89.7049 30.2444 3.15578 380 | v 88.8555 29.8072 2.42294 381 | v 86.1073 28.3457 2.08983 382 | v 95.0343 29.8611 2.63946 383 | v 95.5982 30.4505 2.08983 384 | v 93.8594 29.9875 1.54019 385 | v 90.0158 28.3457 1.29036 386 | v 97.8883 29.9196 -1.10804 387 | v 98.2769 30.5442 -1.10804 388 | v 96.1339 30.0695 -1.10804 389 | v 91.7924 28.3457 -1.10804 390 | v 95.0343 29.8611 -4.85553 391 | v 95.5982 30.4505 -4.3059 392 | v 93.8594 29.9875 -3.75626 393 | v 90.0158 28.3457 -3.50643 394 | v 88.7555 29.7322 -6.10469 395 | v 89.7049 30.2444 -5.37185 396 | v 88.8555 29.8072 -4.63901 397 | v 86.1073 28.3457 -4.3059 398 | v 82.4767 29.6034 -4.85553 399 | v 83.8116 30.0383 -4.3059 400 | v 83.8515 29.6268 -3.75626 401 | v 82.1988 28.3457 -3.50643 402 | v 0.831025 49.6647 -1.10804 403 | v 10.5134 48.2657 -1.10804 404 | v 10.0693 44.868 -1.10804 405 | v 6.42728 40.6708 -1.10804 406 | v 6.51611 36.8733 -1.10804 407 | v 9.76642 48.2657 2.70243 408 | v 9.35632 44.868 2.52698 409 | v 5.9947 40.6708 1.09187 410 | v 6.07552 36.8733 1.12336 411 | v 7.71453 48.2657 5.77547 412 | v 7.39819 44.868 5.45913 413 | v 4.80736 40.6708 2.8683 414 | v 4.86744 36.8733 2.92838 415 | v 4.64149 48.2657 7.82736 416 | v 4.46604 44.868 7.41726 417 | v 3.03093 40.6708 4.05564 418 | v 3.06242 36.8733 4.13646 419 | v 0.831025 48.2657 8.57438 420 | v 0.831025 44.868 8.13023 421 | v 0.831025 40.6708 4.48822 422 | v 0.831025 36.8733 4.57705 423 | v -2.97944 48.2657 7.82736 424 | v -2.80399 44.868 7.41726 425 | v -1.36888 40.6708 4.05564 426 | v -1.40037 36.8733 4.13646 427 | v -6.05248 48.2657 5.77547 428 | v -5.73614 44.868 5.45913 429 | v -3.14531 40.6708 2.8683 430 | v -3.20539 36.8733 2.92838 431 | v -8.10437 48.2657 2.70243 432 | v -7.69427 44.868 2.52698 433 | v -4.33265 40.6708 1.09187 434 | v -4.41347 36.8733 1.12336 435 | v -8.85139 48.2657 -1.10804 436 | v -8.40724 44.868 -1.10804 437 | v -4.76523 40.6708 -1.10804 438 | v -4.85406 36.8733 -1.10804 439 | v -8.10437 48.2657 -4.9185 440 | v -7.69427 44.868 -4.74305 441 | v -4.33265 40.6708 -3.30794 442 | v -4.41347 36.8733 -3.33943 443 | v -6.05248 48.2657 -7.99154 444 | v -5.73614 44.868 -7.6752 445 | v -3.14531 40.6708 -5.08437 446 | v -3.20539 36.8733 -5.14445 447 | v -2.97944 48.2657 -10.0434 448 | v -2.80399 44.868 -9.63333 449 | v -1.36888 40.6708 -6.27171 450 | v -1.40037 36.8733 -6.35253 451 | v 0.831025 48.2657 -10.7904 452 | v 0.831025 44.868 -10.3463 453 | v 0.831025 40.6708 -6.70429 454 | v 0.831025 36.8733 -6.79312 455 | v 4.64149 48.2657 -10.0434 456 | v 4.46604 44.868 -9.63333 457 | v 3.03093 40.6708 -6.27171 458 | v 3.06242 36.8733 -6.35253 459 | v 7.71453 48.2657 -7.99154 460 | v 7.39819 44.868 -7.6752 461 | v 4.80736 40.6708 -5.08437 462 | v 4.86744 36.8733 -5.14445 463 | v 9.76642 48.2657 -4.9185 464 | v 9.35632 44.868 -4.74305 465 | v 5.9947 40.6708 -3.30794 466 | v 6.07552 36.8733 -3.33943 467 | v 13.8001 34.3417 -1.10804 468 | v 24.282 32.6095 -1.10804 469 | v 33.6979 30.8773 -1.10804 470 | v 37.7841 28.3457 -1.10804 471 | v 12.795 34.3417 3.98234 472 | v 22.4646 32.6095 8.09647 473 | v 31.1507 30.8773 11.7922 474 | v 34.9202 28.3457 13.396 475 | v 10.0391 34.3417 8.10003 476 | v 17.4812 32.6095 15.5422 477 | v 24.1665 30.8773 22.2275 478 | v 27.0677 28.3457 25.1286 479 | v 5.9214 34.3417 10.856 480 | v 10.0355 32.6095 20.5255 481 | v 13.7313 30.8773 29.2117 482 | v 15.3351 28.3457 32.9812 483 | v 0.831025 34.3417 11.8611 484 | v 0.831025 32.6095 22.3429 485 | v 0.831025 30.8773 31.7589 486 | v 0.831025 28.3457 35.845 487 | v -4.25935 34.3417 10.856 488 | v -8.37348 32.6095 20.5255 489 | v -12.0692 30.8773 29.2117 490 | v -13.673 28.3457 32.9812 491 | v -8.37704 34.3417 8.10003 492 | v -15.8192 32.6095 15.5422 493 | v -22.5045 30.8773 22.2275 494 | v -25.4056 28.3457 25.1286 495 | v -11.133 34.3417 3.98234 496 | v -20.8025 32.6095 8.09647 497 | v -29.4887 30.8773 11.7922 498 | v -33.2582 28.3457 13.396 499 | v -12.1381 34.3417 -1.10804 500 | v -22.62 32.6095 -1.10804 501 | v -32.0359 30.8773 -1.10804 502 | v -36.122 28.3457 -1.10804 503 | v -11.133 34.3417 -6.19841 504 | v -20.8025 32.6095 -10.3125 505 | v -29.4887 30.8773 -14.0083 506 | v -33.2582 28.3457 -15.6121 507 | v -8.37704 34.3417 -10.3161 508 | v -15.8192 32.6095 -17.7582 509 | v -22.5045 30.8773 -24.4435 510 | v -25.4056 28.3457 -27.3447 511 | v -4.25935 34.3417 -13.072 512 | v -8.37348 32.6095 -22.7416 513 | v -12.0692 30.8773 -31.4277 514 | v -13.673 28.3457 -35.1972 515 | v 0.831025 34.3417 -14.0771 516 | v 0.831025 32.6095 -24.559 517 | v 0.831025 30.8773 -33.9749 518 | v 0.831025 28.3457 -38.0611 519 | v 5.9214 34.3417 -13.072 520 | v 10.0355 32.6095 -22.7416 521 | v 13.7313 30.8773 -31.4277 522 | v 15.3351 28.3457 -35.1972 523 | v 10.0391 34.3417 -10.3161 524 | v 17.4812 32.6095 -17.7582 525 | v 24.1665 30.8773 -24.4435 526 | v 27.0677 28.3457 -27.3447 527 | v 12.795 34.3417 -6.19841 528 | v 22.4646 32.6095 -10.3125 529 | v 31.1507 30.8773 -14.0083 530 | v 34.9202 28.3457 -15.6121 531 | 532 | vn -0.966742 -0.255752 9.97231e-09 533 | vn -0.966824 0.255443 3.11149e-08 534 | vn -0.092052 0.995754 4.45989e-08 535 | vn 0.68205 0.731305 0 536 | vn 0.870301 0.492521 -4.87195e-09 537 | vn -0.893014 -0.256345 -0.369882 538 | vn -0.893437 0.255997 -0.369102 539 | vn -0.0838771 0.995843 -0.0355068 540 | vn 0.629724 0.73186 0.260439 541 | vn 0.803725 0.49337 0.332584 542 | vn -0.683407 -0.256729 -0.683407 543 | vn -0.683531 0.256067 -0.683531 544 | vn -0.0649249 0.995776 -0.0649248 545 | vn 0.481398 0.732469 0.481398 546 | vn 0.614804 0.493997 0.614804 547 | vn -0.369882 -0.256345 -0.893014 548 | vn -0.369102 0.255997 -0.893437 549 | vn -0.0355067 0.995843 -0.0838772 550 | vn 0.260439 0.73186 0.629724 551 | vn 0.332584 0.49337 0.803725 552 | vn -0.00284834 -0.257863 -0.966177 553 | vn -0.00192311 0.254736 -0.967009 554 | vn -0.000266114 0.995734 -0.0922702 555 | vn 2.39288e-05 0.731295 0.682061 556 | vn 2.43342e-09 0.492521 0.870301 557 | vn 0.379058 -0.3593 -0.852771 558 | vn 0.37711 0.149086 -0.914091 559 | vn 0.0275022 0.992081 -0.122551 560 | vn -0.26101 0.726762 0.635367 561 | vn -0.332485 0.492546 0.804271 562 | vn 0.663548 -0.410791 -0.625264 563 | vn 0.712664 0.0737216 -0.697621 564 | vn 0.0997268 0.987509 -0.121984 565 | vn -0.48732 0.723754 0.488568 566 | vn -0.615242 0.492602 0.615484 567 | vn 0.880028 -0.332908 -0.338709 568 | vn 0.917276 0.167113 -0.361493 569 | vn 0.113584 0.992365 -0.0480695 570 | vn -0.63415 0.727508 0.261889 571 | vn -0.804126 0.492634 0.332705 572 | vn 0.96669 -0.255738 0.0104537 573 | vn 0.967442 0.252962 0.00810329 574 | vn 0.0934365 0.995624 0.00128063 575 | vn -0.682167 0.731196 -0.00034353 576 | vn -0.870322 0.492483 -5.42436e-05 577 | vn 0.893014 -0.256345 0.369882 578 | vn 0.893437 0.255997 0.369102 579 | vn 0.0838768 0.995843 0.0355066 580 | vn -0.629724 0.73186 -0.260439 581 | vn -0.803725 0.49337 -0.332584 582 | vn 0.683407 -0.256729 0.683407 583 | vn 0.683531 0.256067 0.683531 584 | vn 0.0649249 0.995776 0.0649249 585 | vn -0.481398 0.732469 -0.481398 586 | vn -0.614804 0.493997 -0.614804 587 | vn 0.369882 -0.256345 0.893014 588 | vn 0.369102 0.255997 0.893437 589 | vn 0.0355067 0.995843 0.083877 590 | vn -0.260439 0.73186 -0.629724 591 | vn -0.332584 0.49337 -0.803725 592 | vn 3.83985e-09 -0.255752 0.966742 593 | vn 2.59359e-09 0.255443 0.966824 594 | vn 3.99081e-08 0.995754 0.092052 595 | vn 1.03862e-08 0.731305 -0.68205 596 | vn -2.43342e-09 0.492521 -0.870301 597 | vn -0.369882 -0.256345 0.893014 598 | vn -0.369102 0.255996 0.893437 599 | vn -0.0355068 0.995843 0.0838771 600 | vn 0.260439 0.73186 -0.629724 601 | vn 0.332584 0.49337 -0.803725 602 | vn -0.683407 -0.256729 0.683407 603 | vn -0.683531 0.256067 0.683531 604 | vn -0.0649249 0.995776 0.064925 605 | vn 0.481398 0.732469 -0.481398 606 | vn 0.614804 0.493997 -0.614804 607 | vn -0.893014 -0.256345 0.369882 608 | vn -0.893437 0.255997 0.369102 609 | vn -0.0838767 0.995843 0.0355066 610 | vn 0.629724 0.73186 -0.260439 611 | vn 0.803725 0.49337 -0.332584 612 | vn 0.915321 0.402725 4.83311e-09 613 | vn 0.941808 0.336151 -4.85769e-09 614 | vn 0.97869 0.205342 4.90003e-09 615 | vn 0.997804 -0.0662397 1.0073e-08 616 | vn 0.845438 0.403546 0.349835 617 | vn 0.869996 0.336859 0.360047 618 | vn 0.904193 0.205791 0.37428 619 | vn 0.921879 -0.0663697 0.381752 620 | vn 0.646802 0.404096 0.646802 621 | vn 0.665655 0.337351 0.665655 622 | vn 0.691923 0.20612 0.691923 623 | vn 0.705542 -0.0664796 0.705543 624 | vn 0.349835 0.403546 0.845438 625 | vn 0.360047 0.336859 0.869996 626 | vn 0.37428 0.205791 0.904193 627 | vn 0.381752 -0.0663697 0.921879 628 | vn -1.31462e-09 0.402725 0.915321 629 | vn 9.76689e-10 0.336151 0.941808 630 | vn -1.9304e-08 0.205342 0.97869 631 | vn -2.15056e-08 -0.0662397 0.997804 632 | vn -0.349835 0.403546 0.845438 633 | vn -0.360047 0.336859 0.869996 634 | vn -0.37428 0.205791 0.904193 635 | vn -0.381752 -0.0663697 0.921879 636 | vn -0.646802 0.404096 0.646802 637 | vn -0.665655 0.337351 0.665655 638 | vn -0.691923 0.20612 0.691923 639 | vn -0.705543 -0.0664796 0.705543 640 | vn -0.845438 0.403546 0.349835 641 | vn -0.869996 0.336859 0.360047 642 | vn -0.904193 0.205791 0.37428 643 | vn -0.921879 -0.0663697 0.381752 644 | vn -0.915321 0.402725 -2.41655e-09 645 | vn -0.941808 0.336151 -1.21442e-08 646 | vn -0.97869 0.205342 -3.18502e-08 647 | vn -0.997804 -0.0662397 -2.26643e-08 648 | vn -0.845438 0.403546 -0.349835 649 | vn -0.869996 0.336859 -0.360047 650 | vn -0.904193 0.205791 -0.37428 651 | vn -0.921879 -0.0663697 -0.381752 652 | vn -0.646802 0.404096 -0.646802 653 | vn -0.665655 0.337351 -0.665655 654 | vn -0.691923 0.20612 -0.691923 655 | vn -0.705542 -0.0664796 -0.705543 656 | vn -0.349835 0.403546 -0.845438 657 | vn -0.360047 0.336859 -0.869996 658 | vn -0.37428 0.205791 -0.904193 659 | vn -0.381752 -0.0663697 -0.921879 660 | vn 1.31462e-09 0.402725 -0.915321 661 | vn -9.76689e-10 0.336151 -0.941808 662 | vn 1.9304e-08 0.205342 -0.97869 663 | vn 2.15056e-08 -0.0662397 -0.997804 664 | vn 0.349835 0.403546 -0.845438 665 | vn 0.360047 0.336859 -0.869996 666 | vn 0.37428 0.205791 -0.904193 667 | vn 0.381752 -0.0663697 -0.921879 668 | vn 0.646802 0.404096 -0.646802 669 | vn 0.665655 0.337351 -0.665655 670 | vn 0.691923 0.20612 -0.691923 671 | vn 0.705543 -0.0664796 -0.705542 672 | vn 0.845438 0.403546 -0.349835 673 | vn 0.869996 0.336859 -0.360047 674 | vn 0.904193 0.205791 -0.37428 675 | vn 0.921879 -0.0663697 -0.381752 676 | vn 0.900182 -0.435513 -1.50883e-08 677 | vn 0.729611 -0.683863 -9.71212e-09 678 | vn 0.693951 -0.720022 -9.54282e-09 679 | vn 0.79395 -0.607984 2.6277e-08 680 | vn 0.831437 -0.43618 0.344179 681 | vn 0.673512 -0.684665 0.278594 682 | vn 0.640399 -0.720924 0.264874 683 | vn 0.732949 -0.608996 0.303166 684 | vn 0.636092 -0.436777 0.636092 685 | vn 0.514965 -0.685289 0.514965 686 | vn 0.489651 -0.721446 0.489651 687 | vn 0.560555 -0.609554 0.560555 688 | vn 0.344179 -0.43618 0.831437 689 | vn 0.278594 -0.684665 0.673512 690 | vn 0.264874 -0.720924 0.640399 691 | vn 0.303166 -0.608996 0.732949 692 | vn 1.18057e-08 -0.435513 0.900182 693 | vn -4.75784e-09 -0.683863 0.729611 694 | vn 9.10217e-09 -0.720022 0.693951 695 | vn -2.68996e-08 -0.607984 0.79395 696 | vn -0.344179 -0.43618 0.831437 697 | vn -0.278594 -0.684665 0.673512 698 | vn -0.264874 -0.720924 0.640399 699 | vn -0.303166 -0.608996 0.732949 700 | vn -0.636092 -0.436777 0.636092 701 | vn -0.514965 -0.685289 0.514965 702 | vn -0.489651 -0.721446 0.489651 703 | vn -0.560555 -0.609554 0.560555 704 | vn -0.831437 -0.43618 0.344179 705 | vn -0.673512 -0.684665 0.278595 706 | vn -0.640399 -0.720924 0.264874 707 | vn -0.732949 -0.608996 0.303166 708 | vn -0.900182 -0.435513 -7.54414e-09 709 | vn -0.729611 -0.683863 -7.28409e-09 710 | vn -0.693951 -0.720022 4.77141e-09 711 | vn -0.79395 -0.607983 -2.6277e-08 712 | vn -0.831437 -0.43618 -0.344179 713 | vn -0.673512 -0.684665 -0.278594 714 | vn -0.640399 -0.720924 -0.264874 715 | vn -0.732949 -0.608996 -0.303166 716 | vn -0.636092 -0.436777 -0.636092 717 | vn -0.514965 -0.685289 -0.514965 718 | vn -0.489651 -0.721446 -0.489651 719 | vn -0.560555 -0.609554 -0.560555 720 | vn -0.344179 -0.43618 -0.831437 721 | vn -0.278594 -0.684665 -0.673512 722 | vn -0.264874 -0.720924 -0.640399 723 | vn -0.303166 -0.608996 -0.732949 724 | vn -1.18057e-08 -0.435513 -0.900182 725 | vn 4.75784e-09 -0.683863 -0.729611 726 | vn -9.10217e-09 -0.720022 -0.693951 727 | vn 2.68996e-08 -0.607984 -0.79395 728 | vn 0.344179 -0.43618 -0.831437 729 | vn 0.278594 -0.684665 -0.673512 730 | vn 0.264874 -0.720924 -0.640399 731 | vn 0.303167 -0.608996 -0.732949 732 | vn 0.636092 -0.436777 -0.636092 733 | vn 0.514965 -0.685289 -0.514965 734 | vn 0.489651 -0.721446 -0.489651 735 | vn 0.560555 -0.609554 -0.560555 736 | vn 0.831437 -0.43618 -0.344179 737 | vn 0.673512 -0.684665 -0.278595 738 | vn 0.640399 -0.720924 -0.264874 739 | vn 0.732949 -0.608996 -0.303166 740 | vn 0.62386 -0.781536 3.04248e-08 741 | vn 0.177291 -0.984159 -3.28321e-09 742 | vn 0.0492072 -0.998789 1.48326e-09 743 | vn 1.94668e-11 -1 -7.78368e-10 744 | vn 0.576229 -0.781801 0.238217 745 | vn 0.163629 -0.984208 0.0675273 746 | vn 0.0454217 -0.998792 0.0187357 747 | vn 0.440416 -0.782348 0.440416 748 | vn 0.124903 -0.984276 0.124903 749 | vn 0.0346621 -0.998798 0.0346621 750 | vn 0.238217 -0.781801 0.576229 751 | vn 0.0675273 -0.984208 0.163629 752 | vn 0.0187357 -0.998792 0.0454217 753 | vn -3.18434e-08 -0.781536 0.62386 754 | vn 3.33958e-09 -0.984159 0.177291 755 | vn -1.80438e-09 -0.998789 0.0492072 756 | vn -0.238216 -0.781801 0.576229 757 | vn -0.0675273 -0.984208 0.163629 758 | vn -0.0187357 -0.998792 0.0454217 759 | vn -0.440416 -0.782348 0.440416 760 | vn -0.124903 -0.984276 0.124903 761 | vn -0.0346621 -0.998798 0.0346621 762 | vn -0.576229 -0.781801 0.238217 763 | vn -0.163629 -0.984208 0.0675273 764 | vn -0.0454217 -0.998792 0.0187357 765 | vn -0.62386 -0.781536 -3.17476e-08 766 | vn -0.177291 -0.984159 3.13397e-09 767 | vn -0.0492072 -0.998789 -1.33493e-09 768 | vn -0.576229 -0.781801 -0.238217 769 | vn -0.163629 -0.984208 -0.0675273 770 | vn -0.0454217 -0.998792 -0.0187357 771 | vn -0.440416 -0.782348 -0.440416 772 | vn -0.124903 -0.984276 -0.124903 773 | vn -0.0346621 -0.998798 -0.0346621 774 | vn -0.238217 -0.781801 -0.576229 775 | vn -0.0675273 -0.984208 -0.163629 776 | vn -0.0187357 -0.998792 -0.0454217 777 | vn 3.18434e-08 -0.781536 -0.62386 778 | vn -3.28168e-09 -0.984159 -0.177291 779 | vn 1.46144e-09 -0.998789 -0.0492072 780 | vn 0.238217 -0.781801 -0.576229 781 | vn 0.0675273 -0.984208 -0.163629 782 | vn 0.0187357 -0.998792 -0.0454217 783 | vn 0.440416 -0.782348 -0.440416 784 | vn 0.124903 -0.984276 -0.124903 785 | vn 0.0346621 -0.998798 -0.0346621 786 | vn 0.576229 -0.781801 -0.238217 787 | vn 0.163629 -0.984208 -0.0675273 788 | vn 0.0454217 -0.998792 -0.0187357 789 | vn 0.00778619 -0.99997 -0.000215809 790 | vn 0.0391385 -0.999233 -0.000988567 791 | vn 0.179511 -0.983746 -0.00436856 792 | vn 0.6123 -0.790556 -0.0104598 793 | vn 0.986152 -0.165707 -0.00666949 794 | vn 0.00703893 -0.812495 0.582926 795 | vn 0.0361273 -0.837257 0.545614 796 | vn 0.161845 -0.810421 0.563048 797 | vn 0.482365 -0.595148 0.642746 798 | vn 0.73872 -0.114593 0.664199 799 | vn -0.00190867 0.162121 0.986769 800 | vn 0.0027616 0.0171073 0.99985 801 | vn 0.0105326 0.0733989 0.997247 802 | vn -0.0660406 0.130069 0.989303 803 | vn -0.0944272 0.0165946 0.995393 804 | vn -0.009203 0.871509 0.490293 805 | vn -0.0486064 0.840609 0.539457 806 | vn -0.223298 0.802881 0.552739 807 | vn -0.596365 0.559971 0.575135 808 | vn -0.803337 0.0682361 0.591602 809 | vn -0.0105609 0.999944 0.000103364 810 | vn -0.0587986 0.99827 0.000709759 811 | vn -0.28071 0.959787 0.00326876 812 | vn -0.749723 0.661738 0.0042684 813 | vn -0.997351 0.0727144 0.00205923 814 | vn -0.00879197 0.871493 -0.49033 815 | vn -0.0464937 0.841178 -0.538756 816 | vn -0.217909 0.806807 -0.549161 817 | vn -0.597291 0.560026 -0.574121 818 | vn -0.804 0.0629127 -0.591291 819 | vn -0.00180555 0.161691 -0.98684 820 | vn 0.00203087 0.014555 -0.999892 821 | vn 0.00921499 0.0600698 -0.998152 822 | vn -0.0593333 0.113865 -0.991723 823 | vn -0.0868992 0.0122903 -0.996141 824 | vn 0.00641779 -0.812379 -0.583094 825 | vn 0.0337833 -0.837512 -0.545373 826 | vn 0.157112 -0.811947 -0.56219 827 | vn 0.484407 -0.589365 -0.646528 828 | vn 0.73887 -0.10132 -0.666187 829 | vn 0.946512 0.32265 -0.0033571 830 | vn 0.82583 0.56387 -0.00745213 831 | vn 0.650011 0.759893 -0.00693681 832 | vn 0.532429 0.846458 -0.00524544 833 | vn 0.725608 0.259351 0.637362 834 | vn 0.645945 0.461988 0.607719 835 | vn 0.531614 0.63666 0.558615 836 | vn 0.424964 0.681717 0.59554 837 | vn -0.0495616 -0.019755 0.998576 838 | vn -0.0378162 -0.0356243 0.99865 839 | vn -0.0379139 -0.0365122 0.998614 840 | vn -0.168854 -0.297946 0.93953 841 | vn -0.742342 -0.299166 0.599523 842 | vn -0.619602 -0.529406 0.579503 843 | vn -0.483708 -0.685761 0.543837 844 | vn -0.445293 -0.794355 0.413176 845 | vn -0.926513 -0.376257 0.00199587 846 | vn -0.75392 -0.656952 0.00431723 847 | vn -0.566224 -0.824244 0.00346105 848 | vn -0.481804 -0.876277 0.00185047 849 | vn -0.744675 -0.294424 -0.598977 850 | vn -0.621949 -0.528114 -0.578165 851 | vn -0.481171 -0.68834 -0.542828 852 | vn -0.438055 -0.797035 -0.415744 853 | vn -0.0443368 -0.0170558 -0.998871 854 | vn -0.0261761 -0.0281665 -0.99926 855 | vn -0.0252939 -0.0283323 -0.999278 856 | vn -0.157482 -0.289392 -0.944167 857 | vn 0.728244 0.25241 -0.637142 858 | vn 0.647055 0.459725 -0.608254 859 | vn 0.522994 0.640657 -0.562171 860 | vn 0.409978 0.682857 -0.604669 861 | vn -0.230787 0.972982 -0.00652338 862 | vn -0.548936 0.835863 -0.00151111 863 | vn -0.875671 0.482807 0.00989278 864 | vn -0.877554 0.479097 0.0190923 865 | vn -0.69619 0.717439 0.024497 866 | vn -0.152878 0.687211 0.71019 867 | vn -0.316721 0.63775 0.702113 868 | vn -0.601067 0.471452 0.64533 869 | vn -0.635889 0.44609 0.6298 870 | vn -0.435746 0.601008 0.670011 871 | vn 0.111112 -0.0850694 0.99016 872 | vn 0.22331 0.00654036 0.974726 873 | vn 0.190097 0.154964 0.969458 874 | vn 0.00527077 0.189482 0.98187 875 | vn -0.0117518 0.246688 0.969024 876 | vn 0.343906 -0.722796 0.599412 877 | vn 0.572489 -0.567656 0.591627 878 | vn 0.787436 -0.256459 0.560512 879 | vn 0.647097 -0.306374 0.698141 880 | vn 0.427528 -0.499343 0.753576 881 | vn 0.410926 -0.911668 0.00128446 882 | vn 0.67152 -0.740986 -0.000899122 883 | vn 0.922026 -0.38706 -0.00725269 884 | vn 0.84691 -0.531556 -0.0138542 885 | vn 0.535925 -0.8442 -0.0105045 886 | vn 0.341188 -0.722822 -0.600931 887 | vn 0.578664 -0.561139 -0.591838 888 | vn 0.784869 -0.25102 -0.566542 889 | vn 0.642681 -0.302257 -0.70399 890 | vn 0.418589 -0.500042 -0.758117 891 | vn 0.115806 -0.0791394 -0.990114 892 | vn 0.232811 0.0125652 -0.972441 893 | vn 0.206662 0.153601 -0.96628 894 | vn 0.0244996 0.161443 -0.986578 895 | vn 0.00338193 0.211115 -0.977455 896 | vn -0.134912 0.687491 -0.713551 897 | vn -0.31954 0.633073 -0.705062 898 | vn -0.603902 0.461442 -0.649903 899 | vn -0.631816 0.437169 -0.640072 900 | vn -0.424306 0.612706 -0.66675 901 | vn -0.4258 0.904753 0.0108049 902 | vn 0.0220472 0.999756 0.00162273 903 | vn 0.999599 0.0258705 0.0115556 904 | vn 0.709585 -0.704553 0.00967183 905 | vn -0.259858 0.791936 0.552549 906 | vn 0.00953916 0.99972 -0.0216718 907 | vn 0.410156 0.332912 -0.849083 908 | vn 0.541523 -0.54862 -0.637 909 | vn 0.0463104 0.455224 0.889172 910 | vn -0.0106883 0.988794 0.148901 911 | vn -0.0443756 0.682947 -0.729118 912 | vn 0.122825 0.00923214 -0.992385 913 | vn 0.481839 -0.180439 0.85748 914 | vn 0.455272 0.736752 0.499925 915 | vn -0.220542 0.907193 -0.358276 916 | vn -0.23592 0.657249 -0.715797 917 | vn 0.728092 -0.685302 -0.0155853 918 | vn 0.888739 0.45811 -0.0166791 919 | vn -0.260097 0.965582 0.000800195 920 | vn -0.371612 0.928378 -0.00441745 921 | vn 0.480166 -0.17836 -0.858853 922 | vn 0.488103 0.716801 -0.497947 923 | vn -0.222004 0.905399 0.361893 924 | vn -0.235405 0.66318 0.710477 925 | vn 0.0587203 0.437704 -0.8972 926 | vn 0.00132612 0.986459 -0.164003 927 | vn -0.0441901 0.681677 0.730317 928 | vn 0.138801 -0.0341896 0.98973 929 | vn -0.25889 0.797206 -0.54538 930 | vn 0.0122703 0.999739 0.0192865 931 | vn 0.39863 0.35489 0.845663 932 | vn 0.537564 -0.5814 0.610737 933 | vn -7.79193e-10 1 6.50944e-09 934 | vn 0.82454 0.565804 1.72913e-05 935 | vn 0.917701 -0.397272 3.35502e-05 936 | vn 0.935269 -0.353939 0.000112842 937 | vn 0.780712 0.624891 7.51916e-05 938 | vn 0.762641 0.565035 0.314825 939 | vn 0.847982 -0.397998 0.350034 940 | vn 0.864141 -0.355261 0.356441 941 | vn 0.720991 0.625625 0.297933 942 | vn 0.583357 0.565165 0.583338 943 | vn 0.648485 -0.398726 0.648448 944 | vn 0.660872 -0.355894 0.660748 945 | vn 0.551862 0.62529 0.55178 946 | vn 0.314824 0.565051 0.762629 947 | vn 0.350045 -0.397976 0.847988 948 | vn 0.356474 -0.3552 0.864153 949 | vn 0.297983 0.625515 0.721067 950 | vn -1.7299e-05 0.565804 0.82454 951 | vn -3.35448e-05 -0.397272 0.917701 952 | vn -0.000112839 -0.353939 0.935269 953 | vn -7.51869e-05 0.624891 0.780712 954 | vn -0.314825 0.565035 0.762641 955 | vn -0.350034 -0.397998 0.847982 956 | vn -0.356441 -0.355261 0.864141 957 | vn -0.297933 0.625625 0.720991 958 | vn -0.583338 0.565165 0.583357 959 | vn -0.648448 -0.398726 0.648485 960 | vn -0.660748 -0.355894 0.660872 961 | vn -0.55178 0.62529 0.551862 962 | vn -0.762629 0.565051 0.314824 963 | vn -0.847988 -0.397976 0.350045 964 | vn -0.864153 -0.3552 0.356474 965 | vn -0.721067 0.625515 0.297983 966 | vn -0.82454 0.565804 -1.72877e-05 967 | vn -0.917701 -0.397272 -3.35262e-05 968 | vn -0.935269 -0.353939 -0.000112839 969 | vn -0.780712 0.624891 -7.51882e-05 970 | vn -0.76264 0.565035 -0.314825 971 | vn -0.847982 -0.397998 -0.350034 972 | vn -0.864141 -0.355261 -0.356441 973 | vn -0.720991 0.625625 -0.297933 974 | vn -0.583357 0.565165 -0.583338 975 | vn -0.648485 -0.398726 -0.648448 976 | vn -0.660872 -0.355894 -0.660748 977 | vn -0.551862 0.62529 -0.55178 978 | vn -0.314824 0.565051 -0.762629 979 | vn -0.350045 -0.397976 -0.847988 980 | vn -0.356474 -0.3552 -0.864153 981 | vn -0.297983 0.625515 -0.721067 982 | vn 1.72918e-05 0.565804 -0.82454 983 | vn 3.35344e-05 -0.397272 -0.917701 984 | vn 0.000112839 -0.353939 -0.935269 985 | vn 7.51869e-05 0.624891 -0.780712 986 | vn 0.314825 0.565035 -0.762641 987 | vn 0.350034 -0.397998 -0.847982 988 | vn 0.356441 -0.355261 -0.864141 989 | vn 0.297933 0.625625 -0.720991 990 | vn 0.583338 0.565165 -0.583357 991 | vn 0.648448 -0.398726 -0.648485 992 | vn 0.660748 -0.355894 -0.660872 993 | vn 0.55178 0.62529 -0.551862 994 | vn 0.762629 0.565051 -0.314824 995 | vn 0.847988 -0.397976 -0.350045 996 | vn 0.864153 -0.3552 -0.356474 997 | vn 0.721067 0.625515 -0.297983 998 | vn 0.236584 0.971611 8.31862e-09 999 | vn 0.173084 0.984907 -1.18677e-09 1000 | vn 0.379703 0.925108 2.44118e-09 1001 | vn 0.526673 0.850068 2.66504e-09 1002 | vn 0.217978 0.971775 0.0902162 1003 | vn 0.15959 0.984977 0.0659615 1004 | vn 0.350498 0.925312 0.14474 1005 | vn 0.48559 0.850653 0.201474 1006 | vn 0.166631 0.971838 0.166631 1007 | vn 0.121908 0.985026 0.121908 1008 | vn 0.267668 0.925585 0.267668 1009 | vn 0.371315 0.851029 0.371315 1010 | vn 0.0902162 0.971775 0.217978 1011 | vn 0.0659615 0.984977 0.15959 1012 | vn 0.14474 0.925312 0.350498 1013 | vn 0.201474 0.850653 0.48559 1014 | vn -8.2649e-09 0.971611 0.236584 1015 | vn 1.37744e-09 0.984907 0.173084 1016 | vn 2.79781e-10 0.925108 0.379703 1017 | vn 2.55497e-09 0.850068 0.526673 1018 | vn -0.0902162 0.971775 0.217978 1019 | vn -0.0659615 0.984977 0.15959 1020 | vn -0.14474 0.925312 0.350498 1021 | vn -0.201474 0.850653 0.48559 1022 | vn -0.166631 0.971838 0.166631 1023 | vn -0.121908 0.985026 0.121908 1024 | vn -0.267668 0.925585 0.267668 1025 | vn -0.371315 0.851029 0.371315 1026 | vn -0.217978 0.971775 0.0902162 1027 | vn -0.15959 0.984977 0.0659615 1028 | vn -0.350498 0.925312 0.14474 1029 | vn -0.48559 0.850653 0.201474 1030 | vn -0.236583 0.971611 -6.23897e-09 1031 | vn -0.173084 0.984907 2.37354e-09 1032 | vn -0.379703 0.925108 -2.44118e-09 1033 | vn -0.526673 0.850068 0 1034 | vn -0.217978 0.971775 -0.0902162 1035 | vn -0.15959 0.984977 -0.0659615 1036 | vn -0.350498 0.925312 -0.14474 1037 | vn -0.48559 0.850653 -0.201474 1038 | vn -0.166631 0.971838 -0.166631 1039 | vn -0.121908 0.985026 -0.121908 1040 | vn -0.267668 0.925585 -0.267668 1041 | vn -0.371315 0.851029 -0.371315 1042 | vn -0.0902162 0.971775 -0.217978 1043 | vn -0.0659615 0.984977 -0.15959 1044 | vn -0.14474 0.925312 -0.350498 1045 | vn -0.201474 0.850653 -0.485589 1046 | vn 6.16189e-09 0.971611 -0.236584 1047 | vn -1.37744e-09 0.984907 -0.173084 1048 | vn -2.79781e-10 0.925108 -0.379703 1049 | vn -2.55497e-09 0.850068 -0.526673 1050 | vn 0.0902162 0.971775 -0.217978 1051 | vn 0.0659615 0.984977 -0.15959 1052 | vn 0.14474 0.925312 -0.350498 1053 | vn 0.201474 0.850653 -0.48559 1054 | vn 0.166631 0.971838 -0.166631 1055 | vn 0.121908 0.985026 -0.121908 1056 | vn 0.267668 0.925585 -0.267668 1057 | vn 0.371315 0.851029 -0.371315 1058 | vn 0.217978 0.971775 -0.0902162 1059 | vn 0.15959 0.984977 -0.0659615 1060 | vn 0.350498 0.925312 -0.14474 1061 | vn 0.48559 0.850653 -0.201474 1062 | 1063 | f 7 6 1 1064 | f 1 2 7 1065 | f 8 7 2 1066 | f 2 3 8 1067 | f 9 8 3 1068 | f 3 4 9 1069 | f 10 9 4 1070 | f 4 5 10 1071 | f 12 11 6 1072 | f 6 7 12 1073 | f 13 12 7 1074 | f 7 8 13 1075 | f 14 13 8 1076 | f 8 9 14 1077 | f 15 14 9 1078 | f 9 10 15 1079 | f 17 16 11 1080 | f 11 12 17 1081 | f 18 17 12 1082 | f 12 13 18 1083 | f 19 18 13 1084 | f 13 14 19 1085 | f 20 19 14 1086 | f 14 15 20 1087 | f 22 21 16 1088 | f 16 17 22 1089 | f 23 22 17 1090 | f 17 18 23 1091 | f 24 23 18 1092 | f 18 19 24 1093 | f 25 24 19 1094 | f 19 20 25 1095 | f 27 26 21 1096 | f 21 22 27 1097 | f 28 27 22 1098 | f 22 23 28 1099 | f 29 28 23 1100 | f 23 24 29 1101 | f 30 29 24 1102 | f 24 25 30 1103 | f 32 31 26 1104 | f 26 27 32 1105 | f 33 32 27 1106 | f 27 28 33 1107 | f 34 33 28 1108 | f 28 29 34 1109 | f 35 34 29 1110 | f 29 30 35 1111 | f 37 36 31 1112 | f 31 32 37 1113 | f 38 37 32 1114 | f 32 33 38 1115 | f 39 38 33 1116 | f 33 34 39 1117 | f 40 39 34 1118 | f 34 35 40 1119 | f 42 41 36 1120 | f 36 37 42 1121 | f 43 42 37 1122 | f 37 38 43 1123 | f 44 43 38 1124 | f 38 39 44 1125 | f 45 44 39 1126 | f 39 40 45 1127 | f 47 46 41 1128 | f 41 42 47 1129 | f 48 47 42 1130 | f 42 43 48 1131 | f 49 48 43 1132 | f 43 44 49 1133 | f 50 49 44 1134 | f 44 45 50 1135 | f 52 51 46 1136 | f 46 47 52 1137 | f 53 52 47 1138 | f 47 48 53 1139 | f 54 53 48 1140 | f 48 49 54 1141 | f 55 54 49 1142 | f 49 50 55 1143 | f 57 56 51 1144 | f 51 52 57 1145 | f 58 57 52 1146 | f 52 53 58 1147 | f 59 58 53 1148 | f 53 54 59 1149 | f 60 59 54 1150 | f 54 55 60 1151 | f 62 61 56 1152 | f 56 57 62 1153 | f 63 62 57 1154 | f 57 58 63 1155 | f 64 63 58 1156 | f 58 59 64 1157 | f 65 64 59 1158 | f 59 60 65 1159 | f 67 66 61 1160 | f 61 62 67 1161 | f 68 67 62 1162 | f 62 63 68 1163 | f 69 68 63 1164 | f 63 64 69 1165 | f 70 69 64 1166 | f 64 65 70 1167 | f 72 71 66 1168 | f 66 67 72 1169 | f 73 72 67 1170 | f 67 68 73 1171 | f 74 73 68 1172 | f 68 69 74 1173 | f 75 74 69 1174 | f 69 70 75 1175 | f 77 76 71 1176 | f 71 72 77 1177 | f 78 77 72 1178 | f 72 73 78 1179 | f 79 78 73 1180 | f 73 74 79 1181 | f 80 79 74 1182 | f 74 75 80 1183 | f 2 1 76 1184 | f 76 77 2 1185 | f 3 2 77 1186 | f 77 78 3 1187 | f 4 3 78 1188 | f 78 79 4 1189 | f 5 4 79 1190 | f 79 80 5 1191 | f 85 10 5 1192 | f 5 81 85 1193 | f 86 85 81 1194 | f 81 82 86 1195 | f 87 86 82 1196 | f 82 83 87 1197 | f 88 87 83 1198 | f 83 84 88 1199 | f 89 15 10 1200 | f 10 85 89 1201 | f 90 89 85 1202 | f 85 86 90 1203 | f 91 90 86 1204 | f 86 87 91 1205 | f 92 91 87 1206 | f 87 88 92 1207 | f 93 20 15 1208 | f 15 89 93 1209 | f 94 93 89 1210 | f 89 90 94 1211 | f 95 94 90 1212 | f 90 91 95 1213 | f 96 95 91 1214 | f 91 92 96 1215 | f 97 25 20 1216 | f 20 93 97 1217 | f 98 97 93 1218 | f 93 94 98 1219 | f 99 98 94 1220 | f 94 95 99 1221 | f 100 99 95 1222 | f 95 96 100 1223 | f 101 30 25 1224 | f 25 97 101 1225 | f 102 101 97 1226 | f 97 98 102 1227 | f 103 102 98 1228 | f 98 99 103 1229 | f 104 103 99 1230 | f 99 100 104 1231 | f 105 35 30 1232 | f 30 101 105 1233 | f 106 105 101 1234 | f 101 102 106 1235 | f 107 106 102 1236 | f 102 103 107 1237 | f 108 107 103 1238 | f 103 104 108 1239 | f 109 40 35 1240 | f 35 105 109 1241 | f 110 109 105 1242 | f 105 106 110 1243 | f 111 110 106 1244 | f 106 107 111 1245 | f 112 111 107 1246 | f 107 108 112 1247 | f 113 45 40 1248 | f 40 109 113 1249 | f 114 113 109 1250 | f 109 110 114 1251 | f 115 114 110 1252 | f 110 111 115 1253 | f 116 115 111 1254 | f 111 112 116 1255 | f 117 50 45 1256 | f 45 113 117 1257 | f 118 117 113 1258 | f 113 114 118 1259 | f 119 118 114 1260 | f 114 115 119 1261 | f 120 119 115 1262 | f 115 116 120 1263 | f 121 55 50 1264 | f 50 117 121 1265 | f 122 121 117 1266 | f 117 118 122 1267 | f 123 122 118 1268 | f 118 119 123 1269 | f 124 123 119 1270 | f 119 120 124 1271 | f 125 60 55 1272 | f 55 121 125 1273 | f 126 125 121 1274 | f 121 122 126 1275 | f 127 126 122 1276 | f 122 123 127 1277 | f 128 127 123 1278 | f 123 124 128 1279 | f 129 65 60 1280 | f 60 125 129 1281 | f 130 129 125 1282 | f 125 126 130 1283 | f 131 130 126 1284 | f 126 127 131 1285 | f 132 131 127 1286 | f 127 128 132 1287 | f 133 70 65 1288 | f 65 129 133 1289 | f 134 133 129 1290 | f 129 130 134 1291 | f 135 134 130 1292 | f 130 131 135 1293 | f 136 135 131 1294 | f 131 132 136 1295 | f 137 75 70 1296 | f 70 133 137 1297 | f 138 137 133 1298 | f 133 134 138 1299 | f 139 138 134 1300 | f 134 135 139 1301 | f 140 139 135 1302 | f 135 136 140 1303 | f 141 80 75 1304 | f 75 137 141 1305 | f 142 141 137 1306 | f 137 138 142 1307 | f 143 142 138 1308 | f 138 139 143 1309 | f 144 143 139 1310 | f 139 140 144 1311 | f 81 5 80 1312 | f 80 141 81 1313 | f 82 81 141 1314 | f 141 142 82 1315 | f 83 82 142 1316 | f 142 143 83 1317 | f 84 83 143 1318 | f 143 144 84 1319 | f 149 88 84 1320 | f 84 145 149 1321 | f 150 149 145 1322 | f 145 146 150 1323 | f 151 150 146 1324 | f 146 147 151 1325 | f 152 151 147 1326 | f 147 148 152 1327 | f 153 92 88 1328 | f 88 149 153 1329 | f 154 153 149 1330 | f 149 150 154 1331 | f 155 154 150 1332 | f 150 151 155 1333 | f 156 155 151 1334 | f 151 152 156 1335 | f 157 96 92 1336 | f 92 153 157 1337 | f 158 157 153 1338 | f 153 154 158 1339 | f 159 158 154 1340 | f 154 155 159 1341 | f 160 159 155 1342 | f 155 156 160 1343 | f 161 100 96 1344 | f 96 157 161 1345 | f 162 161 157 1346 | f 157 158 162 1347 | f 163 162 158 1348 | f 158 159 163 1349 | f 164 163 159 1350 | f 159 160 164 1351 | f 165 104 100 1352 | f 100 161 165 1353 | f 166 165 161 1354 | f 161 162 166 1355 | f 167 166 162 1356 | f 162 163 167 1357 | f 168 167 163 1358 | f 163 164 168 1359 | f 169 108 104 1360 | f 104 165 169 1361 | f 170 169 165 1362 | f 165 166 170 1363 | f 171 170 166 1364 | f 166 167 171 1365 | f 172 171 167 1366 | f 167 168 172 1367 | f 173 112 108 1368 | f 108 169 173 1369 | f 174 173 169 1370 | f 169 170 174 1371 | f 175 174 170 1372 | f 170 171 175 1373 | f 176 175 171 1374 | f 171 172 176 1375 | f 177 116 112 1376 | f 112 173 177 1377 | f 178 177 173 1378 | f 173 174 178 1379 | f 179 178 174 1380 | f 174 175 179 1381 | f 180 179 175 1382 | f 175 176 180 1383 | f 181 120 116 1384 | f 116 177 181 1385 | f 182 181 177 1386 | f 177 178 182 1387 | f 183 182 178 1388 | f 178 179 183 1389 | f 184 183 179 1390 | f 179 180 184 1391 | f 185 124 120 1392 | f 120 181 185 1393 | f 186 185 181 1394 | f 181 182 186 1395 | f 187 186 182 1396 | f 182 183 187 1397 | f 188 187 183 1398 | f 183 184 188 1399 | f 189 128 124 1400 | f 124 185 189 1401 | f 190 189 185 1402 | f 185 186 190 1403 | f 191 190 186 1404 | f 186 187 191 1405 | f 192 191 187 1406 | f 187 188 192 1407 | f 193 132 128 1408 | f 128 189 193 1409 | f 194 193 189 1410 | f 189 190 194 1411 | f 195 194 190 1412 | f 190 191 195 1413 | f 196 195 191 1414 | f 191 192 196 1415 | f 197 136 132 1416 | f 132 193 197 1417 | f 198 197 193 1418 | f 193 194 198 1419 | f 199 198 194 1420 | f 194 195 199 1421 | f 200 199 195 1422 | f 195 196 200 1423 | f 201 140 136 1424 | f 136 197 201 1425 | f 202 201 197 1426 | f 197 198 202 1427 | f 203 202 198 1428 | f 198 199 203 1429 | f 204 203 199 1430 | f 199 200 204 1431 | f 205 144 140 1432 | f 140 201 205 1433 | f 206 205 201 1434 | f 201 202 206 1435 | f 207 206 202 1436 | f 202 203 207 1437 | f 208 207 203 1438 | f 203 204 208 1439 | f 145 84 144 1440 | f 144 205 145 1441 | f 146 145 205 1442 | f 205 206 146 1443 | f 147 146 206 1444 | f 206 207 147 1445 | f 148 147 207 1446 | f 207 208 148 1447 | f 213 152 148 1448 | f 148 209 213 1449 | f 214 213 209 1450 | f 209 210 214 1451 | f 215 214 210 1452 | f 210 211 215 1453 | f 212 215 211 1454 | f 211 212 212 1455 | f 216 156 152 1456 | f 152 213 216 1457 | f 217 216 213 1458 | f 213 214 217 1459 | f 218 217 214 1460 | f 214 215 218 1461 | f 212 218 215 1462 | f 215 212 212 1463 | f 219 160 156 1464 | f 156 216 219 1465 | f 220 219 216 1466 | f 216 217 220 1467 | f 221 220 217 1468 | f 217 218 221 1469 | f 212 221 218 1470 | f 218 212 212 1471 | f 222 164 160 1472 | f 160 219 222 1473 | f 223 222 219 1474 | f 219 220 223 1475 | f 224 223 220 1476 | f 220 221 224 1477 | f 212 224 221 1478 | f 221 212 212 1479 | f 225 168 164 1480 | f 164 222 225 1481 | f 226 225 222 1482 | f 222 223 226 1483 | f 227 226 223 1484 | f 223 224 227 1485 | f 212 227 224 1486 | f 224 212 212 1487 | f 228 172 168 1488 | f 168 225 228 1489 | f 229 228 225 1490 | f 225 226 229 1491 | f 230 229 226 1492 | f 226 227 230 1493 | f 212 230 227 1494 | f 227 212 212 1495 | f 231 176 172 1496 | f 172 228 231 1497 | f 232 231 228 1498 | f 228 229 232 1499 | f 233 232 229 1500 | f 229 230 233 1501 | f 212 233 230 1502 | f 230 212 212 1503 | f 234 180 176 1504 | f 176 231 234 1505 | f 235 234 231 1506 | f 231 232 235 1507 | f 236 235 232 1508 | f 232 233 236 1509 | f 212 236 233 1510 | f 233 212 212 1511 | f 237 184 180 1512 | f 180 234 237 1513 | f 238 237 234 1514 | f 234 235 238 1515 | f 239 238 235 1516 | f 235 236 239 1517 | f 212 239 236 1518 | f 236 212 212 1519 | f 240 188 184 1520 | f 184 237 240 1521 | f 241 240 237 1522 | f 237 238 241 1523 | f 242 241 238 1524 | f 238 239 242 1525 | f 212 242 239 1526 | f 239 212 212 1527 | f 243 192 188 1528 | f 188 240 243 1529 | f 244 243 240 1530 | f 240 241 244 1531 | f 245 244 241 1532 | f 241 242 245 1533 | f 212 245 242 1534 | f 242 212 212 1535 | f 246 196 192 1536 | f 192 243 246 1537 | f 247 246 243 1538 | f 243 244 247 1539 | f 248 247 244 1540 | f 244 245 248 1541 | f 212 248 245 1542 | f 245 212 212 1543 | f 249 200 196 1544 | f 196 246 249 1545 | f 250 249 246 1546 | f 246 247 250 1547 | f 251 250 247 1548 | f 247 248 251 1549 | f 212 251 248 1550 | f 248 212 212 1551 | f 252 204 200 1552 | f 200 249 252 1553 | f 253 252 249 1554 | f 249 250 253 1555 | f 254 253 250 1556 | f 250 251 254 1557 | f 212 254 251 1558 | f 251 212 212 1559 | f 255 208 204 1560 | f 204 252 255 1561 | f 256 255 252 1562 | f 252 253 256 1563 | f 257 256 253 1564 | f 253 254 257 1565 | f 212 257 254 1566 | f 254 212 212 1567 | f 209 148 208 1568 | f 208 255 209 1569 | f 210 209 255 1570 | f 255 256 210 1571 | f 211 210 256 1572 | f 256 257 211 1573 | f 212 211 257 1574 | f 257 212 212 1575 | f 264 263 258 1576 | f 258 259 264 1577 | f 265 264 259 1578 | f 259 260 265 1579 | f 266 265 260 1580 | f 260 261 266 1581 | f 267 266 261 1582 | f 261 262 267 1583 | f 269 268 263 1584 | f 263 264 269 1585 | f 270 269 264 1586 | f 264 265 270 1587 | f 271 270 265 1588 | f 265 266 271 1589 | f 272 271 266 1590 | f 266 267 272 1591 | f 274 273 268 1592 | f 268 269 274 1593 | f 275 274 269 1594 | f 269 270 275 1595 | f 276 275 270 1596 | f 270 271 276 1597 | f 277 276 271 1598 | f 271 272 277 1599 | f 279 278 273 1600 | f 273 274 279 1601 | f 280 279 274 1602 | f 274 275 280 1603 | f 281 280 275 1604 | f 275 276 281 1605 | f 282 281 276 1606 | f 276 277 282 1607 | f 284 283 278 1608 | f 278 279 284 1609 | f 285 284 279 1610 | f 279 280 285 1611 | f 286 285 280 1612 | f 280 281 286 1613 | f 287 286 281 1614 | f 281 282 287 1615 | f 289 288 283 1616 | f 283 284 289 1617 | f 290 289 284 1618 | f 284 285 290 1619 | f 291 290 285 1620 | f 285 286 291 1621 | f 292 291 286 1622 | f 286 287 292 1623 | f 294 293 288 1624 | f 288 289 294 1625 | f 295 294 289 1626 | f 289 290 295 1627 | f 296 295 290 1628 | f 290 291 296 1629 | f 297 296 291 1630 | f 291 292 297 1631 | f 259 258 293 1632 | f 293 294 259 1633 | f 260 259 294 1634 | f 294 295 260 1635 | f 261 260 295 1636 | f 295 296 261 1637 | f 262 261 296 1638 | f 296 297 262 1639 | f 302 267 262 1640 | f 262 298 302 1641 | f 303 302 298 1642 | f 298 299 303 1643 | f 304 303 299 1644 | f 299 300 304 1645 | f 305 304 300 1646 | f 300 301 305 1647 | f 306 272 267 1648 | f 267 302 306 1649 | f 307 306 302 1650 | f 302 303 307 1651 | f 308 307 303 1652 | f 303 304 308 1653 | f 309 308 304 1654 | f 304 305 309 1655 | f 310 277 272 1656 | f 272 306 310 1657 | f 311 310 306 1658 | f 306 307 311 1659 | f 312 311 307 1660 | f 307 308 312 1661 | f 313 312 308 1662 | f 308 309 313 1663 | f 314 282 277 1664 | f 277 310 314 1665 | f 315 314 310 1666 | f 310 311 315 1667 | f 316 315 311 1668 | f 311 312 316 1669 | f 317 316 312 1670 | f 312 313 317 1671 | f 318 287 282 1672 | f 282 314 318 1673 | f 319 318 314 1674 | f 314 315 319 1675 | f 320 319 315 1676 | f 315 316 320 1677 | f 321 320 316 1678 | f 316 317 321 1679 | f 322 292 287 1680 | f 287 318 322 1681 | f 323 322 318 1682 | f 318 319 323 1683 | f 324 323 319 1684 | f 319 320 324 1685 | f 325 324 320 1686 | f 320 321 325 1687 | f 326 297 292 1688 | f 292 322 326 1689 | f 327 326 322 1690 | f 322 323 327 1691 | f 328 327 323 1692 | f 323 324 328 1693 | f 329 328 324 1694 | f 324 325 329 1695 | f 298 262 297 1696 | f 297 326 298 1697 | f 299 298 326 1698 | f 326 327 299 1699 | f 300 299 327 1700 | f 327 328 300 1701 | f 301 300 328 1702 | f 328 329 301 1703 | f 336 335 330 1704 | f 330 331 336 1705 | f 337 336 331 1706 | f 331 332 337 1707 | f 338 337 332 1708 | f 332 333 338 1709 | f 339 338 333 1710 | f 333 334 339 1711 | f 341 340 335 1712 | f 335 336 341 1713 | f 342 341 336 1714 | f 336 337 342 1715 | f 343 342 337 1716 | f 337 338 343 1717 | f 344 343 338 1718 | f 338 339 344 1719 | f 346 345 340 1720 | f 340 341 346 1721 | f 347 346 341 1722 | f 341 342 347 1723 | f 348 347 342 1724 | f 342 343 348 1725 | f 349 348 343 1726 | f 343 344 349 1727 | f 351 350 345 1728 | f 345 346 351 1729 | f 352 351 346 1730 | f 346 347 352 1731 | f 353 352 347 1732 | f 347 348 353 1733 | f 354 353 348 1734 | f 348 349 354 1735 | f 356 355 350 1736 | f 350 351 356 1737 | f 357 356 351 1738 | f 351 352 357 1739 | f 358 357 352 1740 | f 352 353 358 1741 | f 359 358 353 1742 | f 353 354 359 1743 | f 361 360 355 1744 | f 355 356 361 1745 | f 362 361 356 1746 | f 356 357 362 1747 | f 363 362 357 1748 | f 357 358 363 1749 | f 364 363 358 1750 | f 358 359 364 1751 | f 366 365 360 1752 | f 360 361 366 1753 | f 367 366 361 1754 | f 361 362 367 1755 | f 368 367 362 1756 | f 362 363 368 1757 | f 369 368 363 1758 | f 363 364 369 1759 | f 331 330 365 1760 | f 365 366 331 1761 | f 332 331 366 1762 | f 366 367 332 1763 | f 333 332 367 1764 | f 367 368 333 1765 | f 334 333 368 1766 | f 368 369 334 1767 | f 374 339 334 1768 | f 334 370 374 1769 | f 375 374 370 1770 | f 370 371 375 1771 | f 376 375 371 1772 | f 371 372 376 1773 | f 377 376 372 1774 | f 372 373 377 1775 | f 378 344 339 1776 | f 339 374 378 1777 | f 379 378 374 1778 | f 374 375 379 1779 | f 380 379 375 1780 | f 375 376 380 1781 | f 381 380 376 1782 | f 376 377 381 1783 | f 382 349 344 1784 | f 344 378 382 1785 | f 383 382 378 1786 | f 378 379 383 1787 | f 384 383 379 1788 | f 379 380 384 1789 | f 385 384 380 1790 | f 380 381 385 1791 | f 386 354 349 1792 | f 349 382 386 1793 | f 387 386 382 1794 | f 382 383 387 1795 | f 388 387 383 1796 | f 383 384 388 1797 | f 389 388 384 1798 | f 384 385 389 1799 | f 390 359 354 1800 | f 354 386 390 1801 | f 391 390 386 1802 | f 386 387 391 1803 | f 392 391 387 1804 | f 387 388 392 1805 | f 393 392 388 1806 | f 388 389 393 1807 | f 394 364 359 1808 | f 359 390 394 1809 | f 395 394 390 1810 | f 390 391 395 1811 | f 396 395 391 1812 | f 391 392 396 1813 | f 397 396 392 1814 | f 392 393 397 1815 | f 398 369 364 1816 | f 364 394 398 1817 | f 399 398 394 1818 | f 394 395 399 1819 | f 400 399 395 1820 | f 395 396 400 1821 | f 401 400 396 1822 | f 396 397 401 1823 | f 370 334 369 1824 | f 369 398 370 1825 | f 371 370 398 1826 | f 398 399 371 1827 | f 372 371 399 1828 | f 399 400 372 1829 | f 373 372 400 1830 | f 400 401 373 1831 | f 407 402 402 1832 | f 402 403 407 1833 | f 408 407 403 1834 | f 403 404 408 1835 | f 409 408 404 1836 | f 404 405 409 1837 | f 410 409 405 1838 | f 405 406 410 1839 | f 411 402 402 1840 | f 402 407 411 1841 | f 412 411 407 1842 | f 407 408 412 1843 | f 413 412 408 1844 | f 408 409 413 1845 | f 414 413 409 1846 | f 409 410 414 1847 | f 415 402 402 1848 | f 402 411 415 1849 | f 416 415 411 1850 | f 411 412 416 1851 | f 417 416 412 1852 | f 412 413 417 1853 | f 418 417 413 1854 | f 413 414 418 1855 | f 419 402 402 1856 | f 402 415 419 1857 | f 420 419 415 1858 | f 415 416 420 1859 | f 421 420 416 1860 | f 416 417 421 1861 | f 422 421 417 1862 | f 417 418 422 1863 | f 423 402 402 1864 | f 402 419 423 1865 | f 424 423 419 1866 | f 419 420 424 1867 | f 425 424 420 1868 | f 420 421 425 1869 | f 426 425 421 1870 | f 421 422 426 1871 | f 427 402 402 1872 | f 402 423 427 1873 | f 428 427 423 1874 | f 423 424 428 1875 | f 429 428 424 1876 | f 424 425 429 1877 | f 430 429 425 1878 | f 425 426 430 1879 | f 431 402 402 1880 | f 402 427 431 1881 | f 432 431 427 1882 | f 427 428 432 1883 | f 433 432 428 1884 | f 428 429 433 1885 | f 434 433 429 1886 | f 429 430 434 1887 | f 435 402 402 1888 | f 402 431 435 1889 | f 436 435 431 1890 | f 431 432 436 1891 | f 437 436 432 1892 | f 432 433 437 1893 | f 438 437 433 1894 | f 433 434 438 1895 | f 439 402 402 1896 | f 402 435 439 1897 | f 440 439 435 1898 | f 435 436 440 1899 | f 441 440 436 1900 | f 436 437 441 1901 | f 442 441 437 1902 | f 437 438 442 1903 | f 443 402 402 1904 | f 402 439 443 1905 | f 444 443 439 1906 | f 439 440 444 1907 | f 445 444 440 1908 | f 440 441 445 1909 | f 446 445 441 1910 | f 441 442 446 1911 | f 447 402 402 1912 | f 402 443 447 1913 | f 448 447 443 1914 | f 443 444 448 1915 | f 449 448 444 1916 | f 444 445 449 1917 | f 450 449 445 1918 | f 445 446 450 1919 | f 451 402 402 1920 | f 402 447 451 1921 | f 452 451 447 1922 | f 447 448 452 1923 | f 453 452 448 1924 | f 448 449 453 1925 | f 454 453 449 1926 | f 449 450 454 1927 | f 455 402 402 1928 | f 402 451 455 1929 | f 456 455 451 1930 | f 451 452 456 1931 | f 457 456 452 1932 | f 452 453 457 1933 | f 458 457 453 1934 | f 453 454 458 1935 | f 459 402 402 1936 | f 402 455 459 1937 | f 460 459 455 1938 | f 455 456 460 1939 | f 461 460 456 1940 | f 456 457 461 1941 | f 462 461 457 1942 | f 457 458 462 1943 | f 463 402 402 1944 | f 402 459 463 1945 | f 464 463 459 1946 | f 459 460 464 1947 | f 465 464 460 1948 | f 460 461 465 1949 | f 466 465 461 1950 | f 461 462 466 1951 | f 403 402 402 1952 | f 402 463 403 1953 | f 404 403 463 1954 | f 463 464 404 1955 | f 405 404 464 1956 | f 464 465 405 1957 | f 406 405 465 1958 | f 465 466 406 1959 | f 471 410 406 1960 | f 406 467 471 1961 | f 472 471 467 1962 | f 467 468 472 1963 | f 473 472 468 1964 | f 468 469 473 1965 | f 474 473 469 1966 | f 469 470 474 1967 | f 475 414 410 1968 | f 410 471 475 1969 | f 476 475 471 1970 | f 471 472 476 1971 | f 477 476 472 1972 | f 472 473 477 1973 | f 478 477 473 1974 | f 473 474 478 1975 | f 479 418 414 1976 | f 414 475 479 1977 | f 480 479 475 1978 | f 475 476 480 1979 | f 481 480 476 1980 | f 476 477 481 1981 | f 482 481 477 1982 | f 477 478 482 1983 | f 483 422 418 1984 | f 418 479 483 1985 | f 484 483 479 1986 | f 479 480 484 1987 | f 485 484 480 1988 | f 480 481 485 1989 | f 486 485 481 1990 | f 481 482 486 1991 | f 487 426 422 1992 | f 422 483 487 1993 | f 488 487 483 1994 | f 483 484 488 1995 | f 489 488 484 1996 | f 484 485 489 1997 | f 490 489 485 1998 | f 485 486 490 1999 | f 491 430 426 2000 | f 426 487 491 2001 | f 492 491 487 2002 | f 487 488 492 2003 | f 493 492 488 2004 | f 488 489 493 2005 | f 494 493 489 2006 | f 489 490 494 2007 | f 495 434 430 2008 | f 430 491 495 2009 | f 496 495 491 2010 | f 491 492 496 2011 | f 497 496 492 2012 | f 492 493 497 2013 | f 498 497 493 2014 | f 493 494 498 2015 | f 499 438 434 2016 | f 434 495 499 2017 | f 500 499 495 2018 | f 495 496 500 2019 | f 501 500 496 2020 | f 496 497 501 2021 | f 502 501 497 2022 | f 497 498 502 2023 | f 503 442 438 2024 | f 438 499 503 2025 | f 504 503 499 2026 | f 499 500 504 2027 | f 505 504 500 2028 | f 500 501 505 2029 | f 506 505 501 2030 | f 501 502 506 2031 | f 507 446 442 2032 | f 442 503 507 2033 | f 508 507 503 2034 | f 503 504 508 2035 | f 509 508 504 2036 | f 504 505 509 2037 | f 510 509 505 2038 | f 505 506 510 2039 | f 511 450 446 2040 | f 446 507 511 2041 | f 512 511 507 2042 | f 507 508 512 2043 | f 513 512 508 2044 | f 508 509 513 2045 | f 514 513 509 2046 | f 509 510 514 2047 | f 515 454 450 2048 | f 450 511 515 2049 | f 516 515 511 2050 | f 511 512 516 2051 | f 517 516 512 2052 | f 512 513 517 2053 | f 518 517 513 2054 | f 513 514 518 2055 | f 519 458 454 2056 | f 454 515 519 2057 | f 520 519 515 2058 | f 515 516 520 2059 | f 521 520 516 2060 | f 516 517 521 2061 | f 522 521 517 2062 | f 517 518 522 2063 | f 523 462 458 2064 | f 458 519 523 2065 | f 524 523 519 2066 | f 519 520 524 2067 | f 525 524 520 2068 | f 520 521 525 2069 | f 526 525 521 2070 | f 521 522 526 2071 | f 527 466 462 2072 | f 462 523 527 2073 | f 528 527 523 2074 | f 523 524 528 2075 | f 529 528 524 2076 | f 524 525 529 2077 | f 530 529 525 2078 | f 525 526 530 2079 | f 467 406 466 2080 | f 466 527 467 2081 | f 468 467 527 2082 | f 527 528 468 2083 | f 469 468 528 2084 | f 528 529 469 2085 | f 470 469 529 2086 | f 529 530 470 --------------------------------------------------------------------------------