diff --git a/package.json b/package.json index af323bba6..9b1a11227 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "devDependencies": { "@babel/preset-env": "^7.23.9", "@babel/preset-typescript": "^7.23.3", - "@babylonjs/core": "^6.42.0", - "@babylonjs/gui": "^6.42.0", + "@babylonjs/core": "^6.43.0", + "@babylonjs/gui": "^6.43.0", "@babylonjs/havok": "^1.3.1", - "@babylonjs/loaders": "^6.42.0", + "@babylonjs/loaders": "^6.43.0", "@jest/types": "^29.6.3", "@types/jest": "^29.5.12", "@types/seedrandom": "^3.0.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9c738c04..28f08dad4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,17 +12,17 @@ devDependencies: specifier: ^7.23.3 version: 7.23.3(@babel/core@7.23.9) '@babylonjs/core': - specifier: ^6.42.0 - version: 6.42.0 + specifier: ^6.43.0 + version: 6.43.0 '@babylonjs/gui': - specifier: ^6.42.0 - version: 6.42.0(@babylonjs/core@6.42.0) + specifier: ^6.43.0 + version: 6.43.0(@babylonjs/core@6.43.0) '@babylonjs/havok': specifier: ^1.3.1 version: 1.3.1 '@babylonjs/loaders': - specifier: ^6.42.0 - version: 6.42.0(@babylonjs/core@6.42.0)(babylonjs-gltf2interface@6.42.0) + specifier: ^6.43.0 + version: 6.43.0(@babylonjs/core@6.43.0)(babylonjs-gltf2interface@6.43.0) '@jest/types': specifier: ^29.6.3 version: 29.6.3 @@ -79,7 +79,7 @@ devDependencies: version: 14.1.1 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + version: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) jest-transform-stub: specifier: ^2.0.0 version: 2.0.0 @@ -118,7 +118,7 @@ devDependencies: version: 9.5.1(typescript@5.3.3)(webpack@5.90.1) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@20.11.17)(typescript@5.3.3) + version: 10.9.2(@types/node@20.11.18)(typescript@5.3.3) ts-shader-loader: specifier: ^2.0.2 version: 2.0.2 @@ -232,7 +232,7 @@ packages: dependencies: '@babel/compat-data': 7.23.5 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.22.3 + browserslist: 4.23.0 lru-cache: 5.1.1 semver: 6.3.1 dev: true @@ -1309,7 +1309,7 @@ packages: babel-plugin-polyfill-corejs2: 0.4.8(@babel/core@7.23.9) babel-plugin-polyfill-corejs3: 0.9.0(@babel/core@7.23.9) babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.23.9) - core-js-compat: 3.35.1 + core-js-compat: 3.36.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -1387,16 +1387,16 @@ packages: to-fast-properties: 2.0.0 dev: true - /@babylonjs/core@6.42.0: - resolution: {integrity: sha512-HNffInqQilrjrbKzjUv1iW5XdN31G8rw/FT5Lk/IlD6wK9vwSjxXaFUn5qCTCNUkGhU8gzpyxHrhsFtpy1X1yA==} + /@babylonjs/core@6.43.0: + resolution: {integrity: sha512-pLFvvtC26TeICUcF0YjuuQqvCahJwPlATXnJkvBzMWXXxUE0Y5rI8L28iScu2WKy975605KdccJI5VL2NG7sUQ==} dev: true - /@babylonjs/gui@6.42.0(@babylonjs/core@6.42.0): - resolution: {integrity: sha512-CkzIvGHIFTM5vQK2IWigimKx19Imx2PnLKXDa6Q1shCQMk4TvuuLJ71fBhGToSiTrWngdcwI9tolQSktZlkpHw==} + /@babylonjs/gui@6.43.0(@babylonjs/core@6.43.0): + resolution: {integrity: sha512-iYsB7uyC40w0QkFGcPw8jAzE26jsgTFvWHTVKPSZxjQ5cG2RQEeK3aD8l+GvWauSc2qPB0wMOsvkAtusdy1g7g==} peerDependencies: '@babylonjs/core': ^6.0.0 dependencies: - '@babylonjs/core': 6.42.0 + '@babylonjs/core': 6.43.0 dev: true /@babylonjs/havok@1.3.1: @@ -1405,14 +1405,14 @@ packages: '@types/emscripten': 1.39.10 dev: true - /@babylonjs/loaders@6.42.0(@babylonjs/core@6.42.0)(babylonjs-gltf2interface@6.42.0): - resolution: {integrity: sha512-lbc5SsE4znUVyM+IA4mgmSCKT7GI/6Trf5+zgXGBN6INbBbMgfoRw01/fj6RSxZrDtrCYWE9a2xyw5fogaxoWA==} + /@babylonjs/loaders@6.43.0(@babylonjs/core@6.43.0)(babylonjs-gltf2interface@6.43.0): + resolution: {integrity: sha512-+cgw4NDchjc/5dZYGzOEhJU+9++ygYlA+ChybE5yvF+yUDWZ7fGXnEXMFImXeFELjk5RRK1NS3H3YvPe7A+Rug==} peerDependencies: '@babylonjs/core': ^6.0.0 babylonjs-gltf2interface: ^6.0.0 dependencies: - '@babylonjs/core': 6.42.0 - babylonjs-gltf2interface: 6.42.0 + '@babylonjs/core': 6.43.0 + babylonjs-gltf2interface: 6.43.0 dev: true /@bcoe/v8-coverage@0.2.3: @@ -1536,7 +1536,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1557,14 +1557,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1592,7 +1592,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 jest-mock: 29.7.0 dev: true @@ -1619,7 +1619,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.11.17 + '@types/node': 20.11.18 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1652,7 +1652,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.22 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1740,7 +1740,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.17 + '@types/node': 20.11.18 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -1754,8 +1754,8 @@ packages: '@jridgewell/trace-mapping': 0.3.22 dev: true - /@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + /@jridgewell/resolve-uri@3.1.2: + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} dev: true @@ -1778,14 +1778,14 @@ packages: /@jridgewell/trace-mapping@0.3.22: resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} dependencies: - '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jridgewell/trace-mapping@0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 dev: true @@ -2265,26 +2265,26 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/bonjour@3.5.13: resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/connect-history-api-fallback@1.5.4: resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} dependencies: '@types/express-serve-static-core': 4.17.43 - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/emscripten@1.39.10: @@ -2316,7 +2316,7 @@ packages: /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -2334,7 +2334,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/html-minifier-terser@6.1.0: @@ -2348,7 +2348,7 @@ packages: /@types/http-proxy@1.17.14: resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/istanbul-lib-coverage@2.0.6: @@ -2397,15 +2397,15 @@ packages: /@types/node-forge@1.3.11: resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/node@15.14.9: resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==} dev: true - /@types/node@20.11.17: - resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==} + /@types/node@20.11.18: + resolution: {integrity: sha512-ABT5VWnnYneSBcNWYSCuR05M826RoMyMSGiFivXGx6ZUIsXb9vn4643IEwkg2zbEOSgAiSogtapN2fgc4mAPlw==} dependencies: undici-types: 5.26.5 dev: true @@ -2450,7 +2450,7 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/serve-index@1.9.4: @@ -2464,13 +2464,13 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/sockjs@0.3.36: resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/stack-utils@2.0.3: @@ -2487,7 +2487,7 @@ packages: /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 dev: true /@types/yargs-parser@21.0.3: @@ -3041,7 +3041,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 get-intrinsic: 1.2.4 is-string: 1.0.7 dev: true @@ -3057,7 +3057,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-array-method-boxes-properly: 1.0.0 is-string: 1.0.7 dev: true @@ -3068,7 +3068,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-errors: 1.3.0 es-shim-unscopables: 1.0.2 dev: true @@ -3079,7 +3079,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-shim-unscopables: 1.0.2 dev: true @@ -3089,7 +3089,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-shim-unscopables: 1.0.2 dev: true @@ -3100,7 +3100,7 @@ packages: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -3192,7 +3192,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.9) - core-js-compat: 3.35.1 + core-js-compat: 3.36.0 transitivePeerDependencies: - supports-color dev: true @@ -3245,8 +3245,8 @@ packages: hasBin: true dev: true - /babylonjs-gltf2interface@6.42.0: - resolution: {integrity: sha512-JbAn+AK+0VPN6V9MNd2GGktYPP36CwKRv8E+KXhS7NqqudMrN1TKZ+RaqboGi+ICk5JeqbSBCkzCHLMbkrCltg==} + /babylonjs-gltf2interface@6.43.0: + resolution: {integrity: sha512-+orCb4giE41Ysl8d2ZOeYCRBsT6FnmDwkW9+sHcEACUEpdtFeTShZ+ckucDAB/Ia2e3ah9F2hADbGA/8TfFngg==} dev: true /balanced-match@1.0.2: @@ -3357,15 +3357,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.22.3: - resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==} + /browserslist@4.23.0: + resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001587 - electron-to-chromium: 1.4.667 + electron-to-chromium: 1.4.670 node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.22.3) + update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true /bs-logger@0.2.6: @@ -3811,10 +3811,10 @@ packages: is-what: 3.14.1 dev: true - /core-js-compat@3.35.1: - resolution: {integrity: sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==} + /core-js-compat@3.36.0: + resolution: {integrity: sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==} dependencies: - browserslist: 4.22.3 + browserslist: 4.23.0 dev: true /core-util-is@1.0.3: @@ -3826,7 +3826,7 @@ packages: engines: {node: '>= 0.4.0'} dev: true - /create-jest@29.7.0(@types/node@20.11.17)(ts-node@10.9.2): + /create-jest@29.7.0(@types/node@20.11.18)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3835,7 +3835,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -4152,8 +4152,8 @@ packages: jake: 10.8.7 dev: true - /electron-to-chromium@1.4.667: - resolution: {integrity: sha512-66L3pLlWhTNVUhnmSA5+qDM3fwnXsM6KAqE36e2w4KN0g6pkEtlT5bs41FQtQwVwKnfhNBXiWRLPs30HSxd7Kw==} + /electron-to-chromium@1.4.670: + resolution: {integrity: sha512-hcijYOWjOtjKrKPtNA6tuLlA/bTLO3heFG8pQA6mLpq7dRydSWicXova5lyxDzp1iVJaYhK7J2OQlGE52KYn7A==} dev: true /emittery@0.13.1: @@ -4238,14 +4238,16 @@ packages: resolution: {integrity: sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw==} dev: true - /es-abstract@1.22.3: - resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + /es-abstract@1.22.4: + resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 arraybuffer.prototype.slice: 1.0.3 available-typed-arrays: 1.0.6 call-bind: 1.0.7 + es-define-property: 1.0.0 + es-errors: 1.3.0 es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 @@ -4858,7 +4860,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 functions-have-names: 1.2.3 dev: true @@ -5836,9 +5838,9 @@ packages: engines: {node: '>= 8.0.0'} dev: true - /isbinaryfile@5.0.0: - resolution: {integrity: sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==} - engines: {node: '>= 14.0.0'} + /isbinaryfile@5.0.2: + resolution: {integrity: sha512-GvcjojwonMjWbTkfMpnVHVqXW/wKMYDfEpY94/8zy8HFMOqb/VL6oeONq9v87q4ttVlaTLnGXnJD4B5B1OTGIg==} + engines: {node: '>= 18.0.0'} dev: true /isexe@2.0.0: @@ -5946,7 +5948,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -5967,7 +5969,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.11.17)(ts-node@10.9.2): + /jest-cli@29.7.0(@types/node@20.11.18)(ts-node@10.9.2): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -5981,10 +5983,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + create-jest: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + jest-config: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -5995,7 +5997,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@20.11.17)(ts-node@10.9.2): + /jest-config@29.7.0(@types/node@20.11.18)(ts-node@10.9.2): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -6010,7 +6012,7 @@ packages: '@babel/core': 7.23.9 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 babel-jest: 29.7.0(@babel/core@7.23.9) chalk: 4.1.2 ci-info: 3.9.0 @@ -6030,7 +6032,7 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@20.11.17)(typescript@5.3.3) + ts-node: 10.9.2(@types/node@20.11.18)(typescript@5.3.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -6071,7 +6073,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -6087,7 +6089,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.11.17 + '@types/node': 20.11.18 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -6138,7 +6140,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 jest-util: 29.7.0 dev: true @@ -6193,7 +6195,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -6224,7 +6226,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -6280,7 +6282,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -6305,7 +6307,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.17 + '@types/node': 20.11.18 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -6317,7 +6319,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -6326,13 +6328,13 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.11.18 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@20.11.17)(ts-node@10.9.2): + /jest@29.7.0(@types/node@20.11.18)(ts-node@10.9.2): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -6345,7 +6347,7 @@ packages: '@jest/core': 29.7.0(ts-node@10.9.2) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + jest-cli: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -6753,7 +6755,7 @@ packages: deep-extend: 0.6.0 ejs: 3.1.9 globby: 11.1.0 - isbinaryfile: 5.0.0 + isbinaryfile: 5.0.2 mem-fs: 2.3.0 minimatch: 7.4.6 multimatch: 5.0.0 @@ -7390,7 +7392,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 dev: true /object.groupby@1.0.2: @@ -7399,7 +7401,7 @@ packages: array.prototype.filter: 1.0.3 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 es-errors: 1.3.0 dev: true @@ -7409,7 +7411,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 dev: true /obuf@1.1.2: @@ -7776,7 +7778,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.35 - ts-node: 10.9.2(@types/node@20.11.17)(typescript@5.3.3) + ts-node: 10.9.2(@types/node@20.11.18)(typescript@5.3.3) yaml: 1.10.2 dev: true @@ -8695,14 +8697,14 @@ packages: spdx-license-ids: 3.0.17 dev: true - /spdx-exceptions@2.4.0: - resolution: {integrity: sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==} + /spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} dev: true /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: - spdx-exceptions: 2.4.0 + spdx-exceptions: 2.5.0 spdx-license-ids: 3.0.17 dev: true @@ -8818,7 +8820,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 dev: true /string.prototype.trimend@1.0.7: @@ -8826,7 +8828,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 dev: true /string.prototype.trimstart@1.0.7: @@ -8834,7 +8836,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.22.4 dev: true /string_decoder@0.10.31: @@ -9108,7 +9110,7 @@ packages: babel-jest: 29.7.0(@babel/core@7.23.9) bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.11.17)(ts-node@10.9.2) + jest: 29.7.0(@types/node@20.11.18)(ts-node@10.9.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -9134,7 +9136,7 @@ packages: webpack: 5.90.1(webpack-cli@5.1.4) dev: true - /ts-node@10.9.2(@types/node@20.11.17)(typescript@5.3.3): + /ts-node@10.9.2(@types/node@20.11.18)(typescript@5.3.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -9153,7 +9155,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.17 + '@types/node': 20.11.18 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -9458,13 +9460,13 @@ packages: engines: {node: '>=8'} dev: true - /update-browserslist-db@1.0.13(browserslist@4.22.3): + /update-browserslist-db@1.0.13(browserslist@4.23.0): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.22.3 + browserslist: 4.23.0 escalade: 3.1.2 picocolors: 1.0.0 dev: true @@ -9732,7 +9734,7 @@ packages: '@webassemblyjs/wasm-parser': 1.11.6 acorn: 8.11.3 acorn-import-assertions: 1.9.0(acorn@8.11.3) - browserslist: 4.22.3 + browserslist: 4.23.0 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 es-module-lexer: 1.4.1 diff --git a/src/asset/character/Falling Idle.fbx b/src/asset/character/Falling Idle.fbx new file mode 100644 index 000000000..dbee96d22 Binary files /dev/null and b/src/asset/character/Falling Idle.fbx differ diff --git a/src/asset/character/Falling.fbx b/src/asset/character/Falling.fbx new file mode 100644 index 000000000..c7ede1e22 Binary files /dev/null and b/src/asset/character/Falling.fbx differ diff --git a/src/asset/character/Idle.fbx b/src/asset/character/Idle.fbx new file mode 100644 index 000000000..59c683d06 Binary files /dev/null and b/src/asset/character/Idle.fbx differ diff --git a/src/asset/character/Running Jump.fbx b/src/asset/character/Running Jump.fbx new file mode 100644 index 000000000..a1e795ef4 Binary files /dev/null and b/src/asset/character/Running Jump.fbx differ diff --git a/src/asset/character/Running.fbx b/src/asset/character/Running.fbx new file mode 100644 index 000000000..97c9ea0cd Binary files /dev/null and b/src/asset/character/Running.fbx differ diff --git a/src/asset/character/Samba Dancing.fbx b/src/asset/character/Samba Dancing.fbx new file mode 100644 index 000000000..38e1ce0a1 Binary files /dev/null and b/src/asset/character/Samba Dancing.fbx differ diff --git a/src/asset/character/Swimming.fbx b/src/asset/character/Swimming.fbx new file mode 100644 index 000000000..ef920b48d Binary files /dev/null and b/src/asset/character/Swimming.fbx differ diff --git a/src/asset/character/Treading Water.fbx b/src/asset/character/Treading Water.fbx new file mode 100644 index 000000000..5d6587ab8 Binary files /dev/null and b/src/asset/character/Treading Water.fbx differ diff --git a/src/asset/character/Walking Backwards.fbx b/src/asset/character/Walking Backwards.fbx new file mode 100644 index 000000000..7152414bd Binary files /dev/null and b/src/asset/character/Walking Backwards.fbx differ diff --git a/src/asset/character/Walking.fbx b/src/asset/character/Walking.fbx new file mode 100644 index 000000000..aa5c1b4b0 Binary files /dev/null and b/src/asset/character/Walking.fbx differ diff --git a/src/asset/character/YBot.glb b/src/asset/character/YBot.glb new file mode 100644 index 000000000..d5ca935e7 Binary files /dev/null and b/src/asset/character/YBot.glb differ diff --git a/src/asset/character.glb b/src/asset/character/character.glb similarity index 50% rename from src/asset/character.glb rename to src/asset/character/character.glb index fd1874a42..b5c221fca 100644 Binary files a/src/asset/character.glb and b/src/asset/character/character.glb differ diff --git a/src/html/helmetOverlay.html b/src/html/helmetOverlay.html index 5c7e6b6cd..c8c999f48 100644 --- a/src/html/helmetOverlay.html +++ b/src/html/helmetOverlay.html @@ -3,4 +3,7 @@

+
+
+
\ No newline at end of file diff --git a/src/styles/helmetOverlay/helmetOverlay.scss b/src/styles/helmetOverlay/helmetOverlay.scss index da3f1a784..46fd9d079 100644 --- a/src/styles/helmetOverlay/helmetOverlay.scss +++ b/src/styles/helmetOverlay/helmetOverlay.scss @@ -26,6 +26,8 @@ font-family: Nasalization, sans-serif; + @import "targetHelper.scss"; + #bodyData { position: absolute; bottom: 0; diff --git a/src/styles/helmetOverlay/targetHelper.scss b/src/styles/helmetOverlay/targetHelper.scss new file mode 100644 index 000000000..1779de2d9 --- /dev/null +++ b/src/styles/helmetOverlay/targetHelper.scss @@ -0,0 +1,29 @@ +#targetHelper { + position: absolute; + bottom: 50px; + right: 10px; + border: 1px solid white; + width: 70px; + height: 70px; + border-radius: 100%; + backdrop-filter: blur(10px); + background: rgba(0, 0, 0, 0.7); + display: none; + + #targetDot { + position: relative; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 10px; + height: 10px; + border-radius: 100%; + background: white; + border: 1px solid white; + box-shadow: 0 0 10px white; + + &.behind { + background: rgba(255, 255, 255, 0.1); + } + } +} \ No newline at end of file diff --git a/src/ts/assets.ts b/src/ts/assets.ts index f7e82d8d5..ccc6363b1 100644 --- a/src/ts/assets.ts +++ b/src/ts/assets.ts @@ -46,7 +46,7 @@ import spaceship from "../asset/spaceship/spaceship2.glb"; import shipCarrier from "../asset/spacestation/shipcarrier.glb"; import banana from "../asset/banana/banana.glb"; import endeavorSpaceship from "../asset/spaceship/endeavour.glb"; -import character from "../asset/character.glb"; +import character from "../asset/character/character.glb"; import rock from "../asset/rock.glb"; import landingPad from "../asset/landingpad.glb"; diff --git a/src/ts/planets/telluricPlanet/telluricPlanetModel.ts b/src/ts/planets/telluricPlanet/telluricPlanetModel.ts index c21edac8f..2952d8515 100644 --- a/src/ts/planets/telluricPlanet/telluricPlanetModel.ts +++ b/src/ts/planets/telluricPlanet/telluricPlanetModel.ts @@ -99,7 +99,7 @@ export class TelluricPlanetModel implements PlanetModel { if (this.isSatelliteOfGas || this.isSatelliteOfTelluric) { const minRadius = this.parentBody?.radius ?? 0; orbitRadius = minRadius * clamp(normalRandom(2.0, 0.3, this.rng, GenerationSteps.ORBIT), 1.2, 3.0); - orbitRadius += this.radius * clamp(normalRandom(2, 1, this.rng, GenerationSteps.ORBIT), 1, 20); + orbitRadius += minRadius * clamp(normalRandom(10, 4, this.rng, GenerationSteps.ORBIT), 1, 50); orbitRadius += 2.0 * Math.max(0, minRadius - getPeriapsis(orbitRadius, orbitalP)); } else if (parentBody) orbitRadius += parentBody.radius * 1.5; @@ -111,6 +111,11 @@ export class TelluricPlanetModel implements PlanetModel { isPlaneAlignedWithParent: isOrbitalPlaneAlignedWithParent }; + if(this.isSatelliteOfTelluric || this.isSatelliteOfGas) { + // Tidal locking for moons + this.physicalProperties.rotationPeriod = this.orbit.period; + } + if (this.isSatelliteOfTelluric) { this.physicalProperties.pressure = Math.max(normalRandom(0.01, 0.01, this.rng, GenerationSteps.PRESSURE), 0); } diff --git a/src/ts/planets/telluricPlanet/terrain/instancePatch/instancePatch.ts b/src/ts/planets/telluricPlanet/terrain/instancePatch/instancePatch.ts index bfa738fae..b5f7a7def 100644 --- a/src/ts/planets/telluricPlanet/terrain/instancePatch/instancePatch.ts +++ b/src/ts/planets/telluricPlanet/terrain/instancePatch/instancePatch.ts @@ -19,7 +19,7 @@ import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector"; import { Mesh } from "@babylonjs/core/Meshes/mesh"; import { InstancedMesh } from "@babylonjs/core/Meshes/instancedMesh"; import { IPatch } from "./iPatch"; -import { createSquareMatrixBuffer, decomposeModelMatrix } from "./matrixBuffer"; +import { decomposeModelMatrix } from "./matrixBuffer"; import { TransformNode } from "@babylonjs/core/Meshes/transformNode"; export class InstancePatch implements IPatch { @@ -55,23 +55,15 @@ export class InstancePatch implements IPatch { instance.dispose(); } this.instances.length = 0; - this.baseMesh.dispose(); this.baseMesh = null; } - public static CreateSquare(parent: TransformNode, position: Vector3, size: number, resolution: number) { - const buffer = createSquareMatrixBuffer(position, size, resolution); - return new InstancePatch(parent, buffer); - } - public createInstances(baseMesh: TransformNode): void { this.clearInstances(); if (!(baseMesh instanceof Mesh)) { throw new Error("Tried to create instances from a non-mesh object. Try using HierarchyInstancePatch instead if you want to use a TransformNode."); } - this.baseMesh = baseMesh.clone(); - this.baseMesh.makeGeometryUnique(); - this.baseMesh.isVisible = false; + this.baseMesh = baseMesh as Mesh; for (let i = 0; i < this.positions.length; i++) { const instance = this.baseMesh.createInstance(`instance${i}`); @@ -87,17 +79,16 @@ export class InstancePatch implements IPatch { } public setEnabled(enabled: boolean) { - if (this.baseMesh === null) return; - this.baseMesh.setEnabled(enabled); + for(const instance of this.instances) { + instance.setEnabled(enabled); + } } public getNbInstances(): number { - if (this.baseMesh === null) return 0; - return this.baseMesh.instances.length; + return this.instances.length; } public dispose() { this.clearInstances(); - if (this.baseMesh !== null) this.baseMesh.dispose(); } } diff --git a/src/ts/planets/telluricPlanet/terrain/instancePatch/thinInstancePatch.ts b/src/ts/planets/telluricPlanet/terrain/instancePatch/thinInstancePatch.ts index c5239fb38..b26a4dbea 100644 --- a/src/ts/planets/telluricPlanet/terrain/instancePatch/thinInstancePatch.ts +++ b/src/ts/planets/telluricPlanet/terrain/instancePatch/thinInstancePatch.ts @@ -19,8 +19,7 @@ import { Mesh } from "@babylonjs/core/Meshes/mesh"; import "@babylonjs/core/Meshes/thinInstanceMesh"; import { TransformNode } from "@babylonjs/core/Meshes/transformNode"; import { IPatch } from "./iPatch"; -import { applyTransformationToBuffer, createSquareMatrixBuffer } from "./matrixBuffer"; -import { Vector3 } from "@babylonjs/core/Maths/math.vector"; +import { applyTransformationToBuffer } from "./matrixBuffer"; import { Observer } from "@babylonjs/core"; export class ThinInstancePatch implements IPatch { @@ -37,11 +36,6 @@ export class ThinInstancePatch implements IPatch { this.matrixBuffer = applyTransformationToBuffer(parent.computeWorldMatrix(), this.rawMatrixBuffer); } - public static CreateSquare(parent: TransformNode, position: Vector3, size: number, resolution: number) { - const buffer = createSquareMatrixBuffer(position, size, resolution); - return new ThinInstancePatch(parent, buffer); - } - public clearInstances(): void { if (this.baseMesh === null) return; this.parent.onAfterWorldMatrixUpdateObservable.remove(this.parentObserver); @@ -83,11 +77,7 @@ export class ThinInstancePatch implements IPatch { public setEnabled(enabled: boolean) { if (this.baseMesh === null) return; - if (enabled) { - this.baseMesh.thinInstanceCount = this.matrixBuffer.length / 16; - } else { - this.baseMesh.thinInstanceCount = 0; - } + this.baseMesh.setEnabled(enabled); } public dispose() { diff --git a/src/ts/postProcesses/oceanPostProcess.ts b/src/ts/postProcesses/oceanPostProcess.ts index 066450d53..ff9d12dea 100644 --- a/src/ts/postProcesses/oceanPostProcess.ts +++ b/src/ts/postProcesses/oceanPostProcess.ts @@ -50,8 +50,8 @@ export class OceanPostProcess extends UberPostProcess implements ObjectPostProce depthModifier: 0.0015, alphaModifier: 0.0025, specularPower: 1.0, - smoothness: 0.9, - waveBlendingSharpness: 0.1, + smoothness: 0.8, + waveBlendingSharpness: 0.5, time: 0 }; diff --git a/src/ts/spacelegs/characterControls.ts b/src/ts/spacelegs/characterControls.ts index 1e7756fd2..73b883562 100644 --- a/src/ts/spacelegs/characterControls.ts +++ b/src/ts/spacelegs/characterControls.ts @@ -116,16 +116,16 @@ export class CharacterControls implements Controls { this.character = Assets.CreateCharacterInstance(); setRotationQuaternion(this.character, Quaternion.Identity()); - const walkAnim = scene.getAnimationGroupByName("Walking"); - if (walkAnim === null) throw new Error("'Walking' animation not found"); + const walkAnim = scene.getAnimationGroupByName("WalkingForward"); + if (walkAnim === null) throw new Error("'WalkingForward' animation not found"); const walkBackAnim = scene.getAnimationGroupByName("WalkingBackwards"); if (walkBackAnim === null) throw new Error("'WalkingBackwards' animation not found"); - const idleAnim = scene.getAnimationGroupByName("Idle"); - if (idleAnim === null) throw new Error("'Idle' animation not found"); + const idleAnim = scene.getAnimationGroupByName("WalkingIdle"); + if (idleAnim === null) throw new Error("'WalkingIdle' animation not found"); - const sambaAnim = scene.getAnimationGroupByName("SambaDancing"); + const sambaAnim = scene.getAnimationGroupByName("Samba"); if (sambaAnim === null) throw new Error("'Samba' animation not found"); const runningAnim = scene.getAnimationGroupByName("Running"); @@ -134,8 +134,8 @@ export class CharacterControls implements Controls { const fallingIdleAnim = scene.getAnimationGroupByName("FallingIdle"); if (fallingIdleAnim === null) throw new Error("'FallingIdle' animation not found"); - const skyDivingAnim = scene.getAnimationGroupByName("Skydiving"); - if (skyDivingAnim === null) throw new Error("'Skydiving' animation not found"); + const skyDivingAnim = scene.getAnimationGroupByName("SkyDiving"); + if (skyDivingAnim === null) throw new Error("'SkyDiving' animation not found"); const swimmingIdleAnim = scene.getAnimationGroupByName("SwimmingIdle"); if (swimmingIdleAnim === null) throw new Error("'SwimmingIdle' animation not found"); @@ -153,7 +153,6 @@ export class CharacterControls implements Controls { this.runningAnim = new AnimationGroupWrapper("running", runningAnim, 0, true); this.fallingIdleAnim = new AnimationGroupWrapper("fallingIdle", fallingIdleAnim, 0, true); this.skyDivingAnim = new AnimationGroupWrapper("skydiving", skyDivingAnim, 0, true); - this.skyDivingAnim.group.speedRatio = 1.5; this.swimmingIdleAnim = new AnimationGroupWrapper("swimming", swimmingIdleAnim, 0, true); this.swimmingForwardAnim = new AnimationGroupWrapper("swimmingForward", swimmingForwardAnim, 0, true); this.jumpingAnim = new AnimationGroupWrapper("jumping", jumpingAnim, 0, false); @@ -262,11 +261,22 @@ export class CharacterControls implements Controls { // Rotation if ((keyboard.isPressed("q") || keyboard.isPressed("a")) && (isMoving)) { - this.character.rotate(Vector3.Up(), this.characterRotationSpeed * deltaTime); - this.thirdPersonCamera.alpha += this.characterRotationSpeed * deltaTime; + const dtheta = this.characterRotationSpeed * deltaTime; + this.character.rotate(Vector3.Up(), dtheta); + this.thirdPersonCamera.alpha += dtheta; + + const cameraPosition = this.thirdPersonCamera.target; + cameraPosition.applyRotationQuaternionInPlace(Quaternion.RotationAxis(Vector3.Up(), -dtheta)); + this.thirdPersonCamera.target = cameraPosition; + } else if (keyboard.isPressed("d") && (isMoving)) { - this.character.rotate(Vector3.Up(), -this.characterRotationSpeed * deltaTime); - this.thirdPersonCamera.alpha -= this.characterRotationSpeed * deltaTime; + const dtheta = this.characterRotationSpeed * deltaTime; + this.character.rotate(Vector3.Up(), -dtheta); + this.thirdPersonCamera.alpha -= dtheta; + + const cameraPosition = this.thirdPersonCamera.target; + cameraPosition.applyRotationQuaternionInPlace(Quaternion.RotationAxis(Vector3.Up(), dtheta)); + this.thirdPersonCamera.target = cameraPosition; } let weightSum = 0; diff --git a/src/ts/spaceship/spaceship.ts b/src/ts/spaceship/spaceship.ts index 3fceab106..370ea39dc 100644 --- a/src/ts/spaceship/spaceship.ts +++ b/src/ts/spaceship/spaceship.ts @@ -39,6 +39,7 @@ import { WarpTunnel } from "../utils/warpTunnel"; import { Quaternion } from "@babylonjs/core/Maths/math"; import { LandingPad } from "../landingPad/landingPad"; import { PhysicsEngineV2 } from "@babylonjs/core/Physics/v2"; +import { HyperSpaceTunnel } from "../utils/hyperSpaceTunnel"; enum ShipState { FLYING, @@ -72,6 +73,7 @@ export class Spaceship implements Transformable { }; readonly warpTunnel: WarpTunnel; + readonly hyperSpaceTunnel: HyperSpaceTunnel; private readonly scene: Scene; @@ -119,6 +121,9 @@ export class Spaceship implements Transformable { } this.warpTunnel = new WarpTunnel(this.getTransform(), scene); + this.hyperSpaceTunnel = new HyperSpaceTunnel(this.getTransform().getDirection(Axis.Z), scene); + this.hyperSpaceTunnel.setParent(this.getTransform()); + this.hyperSpaceTunnel.setEnabled(false); this.scene = scene; } diff --git a/src/ts/starSystem/starSystemView.ts b/src/ts/starSystem/starSystemView.ts index de94a8cba..7fa29d7e2 100644 --- a/src/ts/starSystem/starSystemView.ts +++ b/src/ts/starSystem/starSystemView.ts @@ -104,7 +104,12 @@ export class StarSystemView { if (e.key === "b") this.helmetOverlay.setVisibility(!this.helmetOverlay.isVisible()); if (e.key === "t") { - this.ui.setTarget(this.getStarSystem().getClosestToScreenCenterOrbitalObject()); + const closestObjectToCenter = this.getStarSystem().getClosestToScreenCenterOrbitalObject(); + this.ui.setTarget(closestObjectToCenter); + if(closestObjectToCenter !== null) this.helmetOverlay.setTarget(closestObjectToCenter.getTransform()); + else { + this.helmetOverlay.setTarget(null); + } } if (e.key === "g") { @@ -244,7 +249,7 @@ export class StarSystemView { this.bodyEditor.update(nearestCelestialBody, starSystem.postProcessManager, this.scene); - this.helmetOverlay.update(nearestOrbitalObject); + this.helmetOverlay.update(nearestOrbitalObject, this.scene.getActiveController().getTransform()); this.orbitRenderer.update(); } diff --git a/src/ts/ui/bodyEditor/panels/generalPanel.ts b/src/ts/ui/bodyEditor/panels/generalPanel.ts index 117a6a840..8510e7127 100644 --- a/src/ts/ui/bodyEditor/panels/generalPanel.ts +++ b/src/ts/ui/bodyEditor/panels/generalPanel.ts @@ -39,8 +39,8 @@ export class GeneralPanel extends EditorPanel { let axialTiltX = stripAxisFromQuaternion(getRotationQuaternion(body.getTransform()), Axis.Y).toEulerAngles().x; let axialTiltZ = stripAxisFromQuaternion(getRotationQuaternion(body.getTransform()), Axis.Y).toEulerAngles().z; - //TODO: do not hardcode here - const power = 1.4; + + const power = 2.0; this.sliders = [ new Slider("axialTiltX", document.getElementById("axialTiltX") as HTMLElement, -180, 180, Math.round((180 * axialTiltX) / Math.PI), (val: number) => { diff --git a/src/ts/ui/helmetOverlay.ts b/src/ts/ui/helmetOverlay.ts index da4e6a1db..5d5f9d713 100644 --- a/src/ts/ui/helmetOverlay.ts +++ b/src/ts/ui/helmetOverlay.ts @@ -18,17 +18,27 @@ import overlayHTML from "../../html/helmetOverlay.html"; import { OrbitalObject } from "../architecture/orbitalObject"; import { parseSpeed } from "../utils/parseToStrings"; +import { TransformNode } from "@babylonjs/core/Meshes"; +import { Vector3 } from "@babylonjs/core/Maths/math.vector"; +import { Matrix } from "@babylonjs/core/Maths/math"; export class HelmetOverlay { private parentNode: HTMLElement; private bodyNamePlate: HTMLElement; + private targetHelper: HTMLElement; + private targetDot: HTMLElement; + private currentTarget: TransformNode | null = null; + constructor() { if (document.querySelector("#helmetOverlay") === null) { document.body.insertAdjacentHTML("beforeend", overlayHTML); } this.parentNode = document.getElementById("helmetOverlay") as HTMLElement; this.bodyNamePlate = document.getElementById("bodyName") as HTMLElement; + + this.targetHelper = document.getElementById("targetHelper") as HTMLElement; + this.targetDot = document.getElementById("targetDot") as HTMLElement; } public setVisibility(visible: boolean) { @@ -39,8 +49,35 @@ export class HelmetOverlay { return this.parentNode.style.visibility === "visible"; } - public update(currentBody: OrbitalObject) { + public setTarget(target: TransformNode | null) { + if (target === null || this.currentTarget === target) { + this.targetHelper.style.display = "none"; + } else { + this.targetHelper.style.display = "block"; + } + + if(this.currentTarget === target) { + this.currentTarget = null; + return; + } + + this.currentTarget = target; + } + + public update(currentBody: OrbitalObject, currentControls: TransformNode) { this.bodyNamePlate.innerText = currentBody.name; + + if (this.currentTarget !== null) { + const directionWorld = this.currentTarget.getAbsolutePosition().subtract(currentControls.getAbsolutePosition()).normalize(); + const directionLocal = Vector3.TransformNormal(directionWorld, Matrix.Invert(currentControls.getWorldMatrix())); + + // set class of targetDot based on sign of directionLocal.z + this.targetDot.className = directionLocal.z > 0 ? "targetDot" : "targetDot behind"; + + // set top and left of targetDot based on direction2D (use %) + this.targetDot.style.top = `${50 - 50 * directionLocal.y}%`; + this.targetDot.style.left = `${50 - 50 * directionLocal.x}%`; + } } displaySpeed(shipInternalThrottle: number, shipTargetThrottle: number, speed: number) { diff --git a/src/ts/utils/hyperSpaceTunnel.ts b/src/ts/utils/hyperSpaceTunnel.ts new file mode 100644 index 000000000..e9a7f129e --- /dev/null +++ b/src/ts/utils/hyperSpaceTunnel.ts @@ -0,0 +1,194 @@ +import { Scene } from "@babylonjs/core/scene"; +import { Color4 } from "@babylonjs/core/Maths/math.color"; +import { Vector3 } from "@babylonjs/core/Maths/math.vector"; +import { MeshBuilder } from "@babylonjs/core/Meshes/meshBuilder"; +import { getForwardDirection, rotate } from "../uberCore/transforms/basicTransform"; +import { LinesMesh, TransformNode } from "@babylonjs/core/Meshes"; +import { Mesh } from "@babylonjs/core/Meshes/mesh"; +import { ShaderMaterial } from "@babylonjs/core/Materials/shaderMaterial"; + +import warpConeFragment from "../../shaders/warpConeMaterial/fragment.glsl"; +import warpConeVertex from "../../shaders/warpConeMaterial/vertex.glsl"; +import { Effect } from "@babylonjs/core/Materials/effect"; +import { Assets } from "../assets"; +import { Transformable } from "../architecture/transformable"; + +/** + * @see https://playground.babylonjs.com/#W9LE0U#28 + */ +export class HyperSpaceTunnel implements Transformable { + maxNbDrops = 1000; + maxLineSize = 12.0; + positiveDepth = 600.0; + negativeDepth = 100.0; + radius = 50; + minSpeed = 200.0; + maxSpeed = 400.0; + + drops: [Vector3, Vector3][] = []; + speeds: number[] = []; + colors: [Color4, Color4][] = []; + deltaSpeed: number; + + private parent: TransformNode | null = null; + + readonly direction: Vector3; + readonly v1: Vector3; + readonly v2: Vector3; + + readonly spaceLines: LinesMesh; + readonly warpCone: Mesh; + + private throttle = 1; + + private diameterTop = 20; + private diameterBottom = 100; + + constructor(direction: Vector3, scene: Scene) { + this.deltaSpeed = this.maxSpeed - this.minSpeed; + + this.direction = direction; + + // find two orthogonal vectors to the direction vector (see https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process) + const v1 = new Vector3(Math.random(), Math.random(), Math.random()).normalize(); + v1.subtractInPlace(this.direction.scale(this.direction.dot(v1))).normalize(); + + const v2 = Vector3.Cross(this.direction, v1).normalize(); + + this.v1 = v1; + this.v2 = v2; + + for (let d = 0; d < this.maxNbDrops; d++) { + this.drops.push(this.getRandomStartingPositions()); + + const color0 = new Color4(1.0, 1.0, 0.7, 1.0); + const color1 = new Color4(1.0, 1.0, 0.7, 1.0); + this.colors.push([color0, color1]); + + this.speeds.push(this.minSpeed + this.deltaSpeed * Math.random()); + } + + const rain = MeshBuilder.CreateLineSystem( + "rain", + { + lines: this.drops, + updatable: true, + //useVertexAlpha: true, + colors: this.colors + }, + scene + ); + + this.spaceLines = rain; + this.warpCone = MeshBuilder.CreateCylinder( + "cone", + { + diameterTop: this.diameterTop, + diameterBottom: this.diameterBottom, + height: this.positiveDepth + this.negativeDepth, + cap: Mesh.NO_CAP, + sideOrientation: Mesh.BACKSIDE + }, + scene + ); + this.warpCone.parent = this.parent; + this.warpCone.rotation.x = Math.PI / 2; + this.warpCone.position.z = this.positiveDepth / 2; + this.warpCone.bakeCurrentTransformIntoVertices(); + this.warpCone.visibility = 0.5; + + Effect.ShadersStore["warpConeMaterialFragmentShader"] = warpConeFragment; + Effect.ShadersStore["warpConeMaterialVertexShader"] = warpConeVertex; + const warpConeMaterial = new ShaderMaterial("warpConeMaterial", scene, "warpConeMaterial", { + attributes: ["position", "uv"], + uniforms: ["worldViewProjection", "time"], + samplers: ["warpNoise"] + }); + warpConeMaterial.setTexture("warpNoise", Assets.WARP_NOISE); + + this.warpCone.material = warpConeMaterial; + + let clock = 0.0; + scene.registerBeforeRender(() => { + const deltaTime = scene.getEngine().getDeltaTime() / 1000; + clock += deltaTime; + + warpConeMaterial.setFloat("time", clock); + this.rainFalls(deltaTime); + + MeshBuilder.CreateLineSystem("rain", { lines: this.drops, instance: rain }); + + if (this.parent === null) return; + + this.spaceLines.position = this.parent.getAbsolutePosition(); + this.warpCone.position = this.parent.getAbsolutePosition(); + + const targetForward = getForwardDirection(this.parent); + const currentForward = getForwardDirection(this.getTransform()); + + if (targetForward.equalsWithEpsilon(currentForward, 0.001)) return; + + const rotationAxis = Vector3.Cross(currentForward, targetForward); + const angle = Math.acos(Vector3.Dot(currentForward, targetForward)); + + const theta = angle; //Math.min(0.3 * deltaTime, angle); + + rotate(this.spaceLines, rotationAxis, theta); + rotate(this.warpCone, rotationAxis, theta); + }); + } + + private getRandomStartingPositions(): [Vector3, Vector3] { + const theta = Math.random() * Math.PI * 2; + const radiusScaling = 1 + (Math.random() * 2 - 1) * 0.5; + + const p0 = new Vector3(Math.cos(theta), Math.sin(theta), 0).scale((radiusScaling * this.diameterTop) / 2); + const p1 = new Vector3(Math.cos(theta), Math.sin(theta), 0).scale((radiusScaling * this.diameterBottom) / 2); + p0.addInPlace(this.direction.scale(this.positiveDepth)); + p1.subtractInPlace(this.direction.scale(this.negativeDepth)); + + const direction = p1.subtract(p0).normalize(); + + const lineSize = this.maxLineSize * Math.random(); + + const point0 = p0; + const point1 = point0.add(direction.scale(lineSize)); + + return [point0, point1]; + } + + setParent(parent: TransformNode) { + this.parent = parent; + } + + setEnabled(enabled: boolean) { + this.spaceLines.setEnabled(enabled); + this.warpCone.setEnabled(enabled); + } + + getTransform(): TransformNode { + return this.spaceLines; + } + + rainFalls(deltaTime: number) { + for (let d = 0; d < this.maxNbDrops; d++) { + const drop = this.drops[d]; + const speed = this.speeds[d] * this.throttle; + const direction = drop[0].subtract(drop[1]).normalize(); + drop[0].subtractInPlace(direction.scale(speed * deltaTime)); + drop[1].subtractInPlace(direction.scale(speed * deltaTime)); + + if (drop[0].dot(this.direction) < -this.negativeDepth) { + const [point0, point1] = this.getRandomStartingPositions(); + + drop[0].copyFrom(point0); + drop[1].copyFrom(point1); + } + } + } + + dispose() { + this.spaceLines.dispose(); + this.warpCone.dispose(); + } +} \ No newline at end of file