2 Commits
Author SHA1 Message Date
Lncvrt 4cbe29b777 Update icon 2026-02-12 19:57:12 -07:00
Lncvrt fa6020f1ea 1.5.0 2026-02-12 19:51:45 -07:00
324 changed files with 17058 additions and 9158 deletions

No files matched your search

+13 -13
View File
@@ -5,33 +5,33 @@
"": { "": {
"name": "berry-dash-ultimate", "name": "berry-dash-ultimate",
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.9.6", "@tauri-apps/cli": "2.10.0",
}, },
}, },
}, },
"packages": { "packages": {
"@tauri-apps/cli": ["@tauri-apps/cli@2.9.6", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.9.6", "@tauri-apps/cli-darwin-x64": "2.9.6", "@tauri-apps/cli-linux-arm-gnueabihf": "2.9.6", "@tauri-apps/cli-linux-arm64-gnu": "2.9.6", "@tauri-apps/cli-linux-arm64-musl": "2.9.6", "@tauri-apps/cli-linux-riscv64-gnu": "2.9.6", "@tauri-apps/cli-linux-x64-gnu": "2.9.6", "@tauri-apps/cli-linux-x64-musl": "2.9.6", "@tauri-apps/cli-win32-arm64-msvc": "2.9.6", "@tauri-apps/cli-win32-ia32-msvc": "2.9.6", "@tauri-apps/cli-win32-x64-msvc": "2.9.6" }, "bin": { "tauri": "tauri.js" } }, "sha512-3xDdXL5omQ3sPfBfdC8fCtDKcnyV7OqyzQgfyT5P3+zY6lcPqIYKQBvUasNvppi21RSdfhy44ttvJmftb0PCDw=="], "@tauri-apps/cli": ["@tauri-apps/cli@2.10.0", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.10.0", "@tauri-apps/cli-darwin-x64": "2.10.0", "@tauri-apps/cli-linux-arm-gnueabihf": "2.10.0", "@tauri-apps/cli-linux-arm64-gnu": "2.10.0", "@tauri-apps/cli-linux-arm64-musl": "2.10.0", "@tauri-apps/cli-linux-riscv64-gnu": "2.10.0", "@tauri-apps/cli-linux-x64-gnu": "2.10.0", "@tauri-apps/cli-linux-x64-musl": "2.10.0", "@tauri-apps/cli-win32-arm64-msvc": "2.10.0", "@tauri-apps/cli-win32-ia32-msvc": "2.10.0", "@tauri-apps/cli-win32-x64-msvc": "2.10.0" }, "bin": { "tauri": "tauri.js" } }, "sha512-ZwT0T+7bw4+DPCSWzmviwq5XbXlM0cNoleDKOYPFYqcZqeKY31KlpoMW/MOON/tOFBPgi31a2v3w9gliqwL2+Q=="],
"@tauri-apps/cli-darwin-arm64": ["@tauri-apps/cli-darwin-arm64@2.9.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gf5no6N9FCk1qMrti4lfwP77JHP5haASZgVbBgpZG7BUepB3fhiLCXGUK8LvuOjP36HivXewjg72LTnPDScnQQ=="], "@tauri-apps/cli-darwin-arm64": ["@tauri-apps/cli-darwin-arm64@2.10.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-avqHD4HRjrMamE/7R/kzJPcAJnZs0IIS+1nkDP5b+TNBn3py7N2aIo9LIpy+VQq0AkN8G5dDpZtOOBkmWt/zjA=="],
"@tauri-apps/cli-darwin-x64": ["@tauri-apps/cli-darwin-x64@2.9.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-oWh74WmqbERwwrwcueJyY6HYhgCksUc6NT7WKeXyrlY/FPmNgdyQAgcLuTSkhRFuQ6zh4Np1HZpOqCTpeZBDcw=="], "@tauri-apps/cli-darwin-x64": ["@tauri-apps/cli-darwin-x64@2.10.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-keDmlvJRStzVFjZTd0xYkBONLtgBC9eMTpmXnBXzsHuawV2q9PvDo2x6D5mhuoMVrJ9QWjgaPKBBCFks4dK71Q=="],
"@tauri-apps/cli-linux-arm-gnueabihf": ["@tauri-apps/cli-linux-arm-gnueabihf@2.9.6", "", { "os": "linux", "cpu": "arm" }, "sha512-/zde3bFroFsNXOHN204DC2qUxAcAanUjVXXSdEGmhwMUZeAQalNj5cz2Qli2elsRjKN/hVbZOJj0gQ5zaYUjSg=="], "@tauri-apps/cli-linux-arm-gnueabihf": ["@tauri-apps/cli-linux-arm-gnueabihf@2.10.0", "", { "os": "linux", "cpu": "arm" }, "sha512-e5u0VfLZsMAC9iHaOEANumgl6lfnJx0Dtjkd8IJpysZ8jp0tJ6wrIkto2OzQgzcYyRCKgX72aKE0PFgZputA8g=="],
"@tauri-apps/cli-linux-arm64-gnu": ["@tauri-apps/cli-linux-arm64-gnu@2.9.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-pvbljdhp9VOo4RnID5ywSxgBs7qiylTPlK56cTk7InR3kYSTJKYMqv/4Q/4rGo/mG8cVppesKIeBMH42fw6wjg=="], "@tauri-apps/cli-linux-arm64-gnu": ["@tauri-apps/cli-linux-arm64-gnu@2.10.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-YrYYk2dfmBs5m+OIMCrb+JH/oo+4FtlpcrTCgiFYc7vcs6m3QDd1TTyWu0u01ewsCtK2kOdluhr/zKku+KP7HA=="],
"@tauri-apps/cli-linux-arm64-musl": ["@tauri-apps/cli-linux-arm64-musl@2.9.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-02TKUndpodXBCR0oP//6dZWGYcc22Upf2eP27NvC6z0DIqvkBBFziQUcvi2n6SrwTRL0yGgQjkm9K5NIn8s6jw=="], "@tauri-apps/cli-linux-arm64-musl": ["@tauri-apps/cli-linux-arm64-musl@2.10.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-GUoPdVJmrJRIXFfW3Rkt+eGK9ygOdyISACZfC/bCSfOnGt8kNdQIQr5WRH9QUaTVFIwxMlQyV3m+yXYP+xhSVA=="],
"@tauri-apps/cli-linux-riscv64-gnu": ["@tauri-apps/cli-linux-riscv64-gnu@2.9.6", "", { "os": "linux", "cpu": "none" }, "sha512-fmp1hnulbqzl1GkXl4aTX9fV+ubHw2LqlLH1PE3BxZ11EQk+l/TmiEongjnxF0ie4kV8DQfDNJ1KGiIdWe1GvQ=="], "@tauri-apps/cli-linux-riscv64-gnu": ["@tauri-apps/cli-linux-riscv64-gnu@2.10.0", "", { "os": "linux", "cpu": "none" }, "sha512-JO7s3TlSxshwsoKNCDkyvsx5gw2QAs/Y2GbR5UE2d5kkU138ATKoPOtxn8G1fFT1aDW4LH0rYAAfBpGkDyJJnw=="],
"@tauri-apps/cli-linux-x64-gnu": ["@tauri-apps/cli-linux-x64-gnu@2.9.6", "", { "os": "linux", "cpu": "x64" }, "sha512-vY0le8ad2KaV1PJr+jCd8fUF9VOjwwQP/uBuTJvhvKTloEwxYA/kAjKK9OpIslGA9m/zcnSo74czI6bBrm2sYA=="], "@tauri-apps/cli-linux-x64-gnu": ["@tauri-apps/cli-linux-x64-gnu@2.10.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Uvh4SUUp4A6DVRSMWjelww0GnZI3PlVy7VS+DRF5napKuIehVjGl9XD0uKoCoxwAQBLctvipyEK+pDXpJeoHng=="],
"@tauri-apps/cli-linux-x64-musl": ["@tauri-apps/cli-linux-x64-musl@2.9.6", "", { "os": "linux", "cpu": "x64" }, "sha512-TOEuB8YCFZTWVDzsO2yW0+zGcoMiPPwcUgdnW1ODnmgfwccpnihDRoks+ABT1e3fHb1ol8QQWsHSCovb3o2ENQ=="], "@tauri-apps/cli-linux-x64-musl": ["@tauri-apps/cli-linux-x64-musl@2.10.0", "", { "os": "linux", "cpu": "x64" }, "sha512-AP0KRK6bJuTpQ8kMNWvhIpKUkQJfcPFeba7QshOQZjJ8wOS6emwTN4K5g/d3AbCMo0RRdnZWwu67MlmtJyxC1Q=="],
"@tauri-apps/cli-win32-arm64-msvc": ["@tauri-apps/cli-win32-arm64-msvc@2.9.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-ujmDGMRc4qRLAnj8nNG26Rlz9klJ0I0jmZs2BPpmNNf0gM/rcVHhqbEkAaHPTBVIrtUdf7bGvQAD2pyIiUrBHQ=="], "@tauri-apps/cli-win32-arm64-msvc": ["@tauri-apps/cli-win32-arm64-msvc@2.10.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-97DXVU3dJystrq7W41IX+82JEorLNY+3+ECYxvXWqkq7DBN6FsA08x/EFGE8N/b0LTOui9X2dvpGGoeZKKV08g=="],
"@tauri-apps/cli-win32-ia32-msvc": ["@tauri-apps/cli-win32-ia32-msvc@2.9.6", "", { "os": "win32", "cpu": "ia32" }, "sha512-S4pT0yAJgFX8QRCyKA1iKjZ9Q/oPjCZf66A/VlG5Yw54Nnr88J1uBpmenINbXxzyhduWrIXBaUbEY1K80ZbpMg=="], "@tauri-apps/cli-win32-ia32-msvc": ["@tauri-apps/cli-win32-ia32-msvc@2.10.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-EHyQ1iwrWy1CwMalEm9z2a6L5isQ121pe7FcA2xe4VWMJp+GHSDDGvbTv/OPdkt2Lyr7DAZBpZHM6nvlHXEc4A=="],
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.9.6", "", { "os": "win32", "cpu": "x64" }, "sha512-ldWuWSSkWbKOPjQMJoYVj9wLHcOniv7diyI5UAJ4XsBdtaFB0pKHQsqw/ItUma0VXGC7vB4E9fZjivmxur60aw=="], "@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.10.0", "", { "os": "win32", "cpu": "x64" }, "sha512-NTpyQxkpzGmU6ceWBTY2xRIEaS0ZLbVx1HE1zTA3TY/pV3+cPoPPOs+7YScr4IMzXMtOw7tLw5LEXo5oIG3qaQ=="],
} }
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "berry-dash-ultimate", "name": "berry-dash-ultimate",
"private": true, "private": true,
"version": "1.4.0", "version": "1.5.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"tauri": "tauri" "tauri": "tauri"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.9.6" "@tauri-apps/cli": "2.10.0"
} }
} }
+3 -3
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "berry-dash-ultimate" name = "berry-dash-ultimate"
version = "1.4.0" version = "1.5.0"
authors = ["Lncvrt"] authors = ["Lncvrt"]
edition = "2024" edition = "2024"
@@ -9,9 +9,9 @@ name = "berry_dash_ultimate_lib"
crate-type = ["staticlib", "cdylib", "rlib"] crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies] [build-dependencies]
tauri-build = { version = "2.5.3", features = [] } tauri-build = { version = "2.5.5", features = [] }
[dependencies] [dependencies]
tauri = { version = "2.9.5", features = [] } tauri = { version = "2.10.2", features = [] }
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149" serde_json = "1.0.149"
@@ -15,7 +15,8 @@
android:launchMode="singleTask" android:launchMode="singleTask"
android:label="@string/main_activity_title" android:label="@string/main_activity_title"
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"> android:exported="true"
android:stopWithTask="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Berry Dash Ultimate", "productName": "Berry Dash Ultimate",
"version": "1.4.0", "version": "1.5.0",
"identifier": "xyz.lncvrt.bonoise-bdu", "identifier": "xyz.lncvrt.bonoise-bdu",
"build": { "build": {
"frontendDist": "../src" "frontendDist": "../src"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

+1 -1
View File
@@ -1,2 +1,2 @@
var gdjs;(function(s){const o=new s.Logger("CustomRuntimeObject");class h extends s.RuntimeObject{constructor(t,e){super(t,e);this._isUntransformedHitBoxesDirty=!0;this._untransformedHitBoxes=[];this._unrotatedAABB={min:[0,0],max:[0,0]};this._innerArea=null;this._isInnerAreaFollowingParentSize=!1;this._scaleX=1;this._scaleY=1;this._flippedX=!1;this._flippedY=!1;this.opacity=255;this._customCenter=null;this._localTransformation=new s.AffineTransformation;this._localInverseTransformation=new s.AffineTransformation;this._isLocalTransformationDirty=!0;this._type=e.type,this._instanceContainer=new s.CustomRuntimeObjectInstanceContainer(t,this),this._renderer=this._createRender(),this._initializeFromObjectData(e)}_initializeFromObjectData(t){const e=this._runtimeScene.getGame().getEventsBasedObjectData(t.type);if(!e){o.error(`A CustomRuntimeObject was initialized (or re-initialized) from object data referring to an non existing events based object data with type "${t.type}".`);return}const i=this.getRuntimeScene().getGame().getEventsBasedObjectVariantData(t.type,t.variant);if(!i){o.error(`Unknown variant "${t.variant}" for object "${t.type}".`);return}this._isInnerAreaFollowingParentSize=e.isInnerAreaFollowingParentSize,i.instances.length>0&&(this._innerArea||(this._innerArea={min:[0,0,0],max:[0,0,0]}),this._innerArea.min[0]=i.areaMinX,this._innerArea.min[1]=i.areaMinY,this._innerArea.min[2]=i.areaMinZ,this._innerArea.max[0]=i.areaMaxX,this._innerArea.max[1]=i.areaMaxY,this._innerArea.max[2]=i.areaMaxZ),this._instanceContainer.loadFrom(t,i)}reinitialize(t){super.reinitialize(t),this._reinitializeContentFromObjectData(t),this.onCreated()}_reinitializeContentFromObjectData(t){this._reinitializeRenderer(),this._instanceContainer._unloadContent(),this._initializeFromObjectData(t)}updateFromObjectData(t,e){const i=this.getAnimator();if(i&&i.updateFromObjectData(t.animatable||[],e.animatable||[]),t.variant!==e.variant){const n=this.getWidth(),r=this.getHeight(),a=t.isInnerAreaFollowingParentSize&&this._instanceContainer._initialInnerArea&&this._innerArea&&(this._instanceContainer._initialInnerArea.min[0]!==this._innerArea.min[0]||this._instanceContainer._initialInnerArea.min[1]!==this._innerArea.min[1]||this._instanceContainer._initialInnerArea.max[0]!==this._innerArea.max[0]||this._instanceContainer._initialInnerArea.max[1]!==this._innerArea.max[1]);this._reinitializeContentFromObjectData(e),this.onCreated(),a&&(this.setWidth(n),this.setHeight(r))}return!0}getNetworkSyncData(t){const e=this.getAnimator(),i={...super.getNetworkSyncData(t),ifx:this.isFlippedX(),ify:this.isFlippedY(),sx:this._scaleX,sy:this._scaleY,op:this.opacity};return e&&(i.anim=e.getNetworkSyncData()),this._customCenter&&(i.cc=this._customCenter),i}updateFromNetworkSyncData(t,e){if(super.updateFromNetworkSyncData(t,e),t.ifx!==void 0&&this.flipX(t.ifx),t.ify!==void 0&&this.flipY(t.ify),t.sx!==void 0&&this.setScaleX(Math.abs(t.sx)),t.sy!==void 0&&this.setScaleY(Math.abs(t.sy)),t.op!==void 0&&this.setOpacity(t.op),t.anim){const i=this.getAnimator();i&&i.updateFromNetworkSyncData(t.anim)}t.cc&&this.setRotationCenter(t.cc[0],t.cc[1]),(t.ifx!==void 0||t.ify!==void 0||t.sx!==void 0||t.sy!==void 0||t.anim!==void 0||t.cc!==void 0)&&this.onChildrenLocationChanged()}extraInitializationFromInitialInstance(t){const e=this.getAnimator();if(t.numberProperties)for(let i=0,n=t.numberProperties.length;i<n;++i){const r=t.numberProperties[i];e&&r.name==="animation"&&e.setAnimationIndex(r.value)}t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),this.setOpacity(t.opacity===void 0?255:t.opacity),this.flipX(!!t.flippedX),this.flipY(!!t.flippedY)}onDeletedFromScene(){this.onDestroy(this._runtimeScene),super.onDeletedFromScene(),this._instanceContainer.onDeletedFromScene(this._runtimeScene)}onDestroyed(){this._instanceContainer._destroy(),super.onDestroyed()}update(t){this._instanceContainer._updateObjectsPreEvents(),this.doStepPreEvents(this._instanceContainer);const e=this.getRuntimeScene().getProfiler();e&&e.begin(this.type),this.doStepPostEvents(this._instanceContainer),e&&e.end(this.type)}stepBehaviorsPostEvents(t){super.stepBehaviorsPostEvents(t),this._instanceContainer._stepBehaviorsPostEvents()}onHotReloading(t){}doStepPreEvents(t){}doStepPostEvents(t){}onDestroy(t){}updatePreRender(t){this._instanceContainer._updateObjectsPreRender(),this.getRenderer().ensureUpToDate()}getRenderer(){return this._renderer}getChildrenContainer(){return this._instanceContainer}onChildrenLocationChanged(){this._isUntransformedHitBoxesDirty=!0,this.invalidateHitboxes(),this.getRenderer().update()}updateHitBoxes(){this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes();const t=this.getLocalTransformation();for(let e=0;e<this._untransformedHitBoxes.length;++e){e>=this.hitBoxes.length&&this.hitBoxes.push(new s.Polygon);for(let i=0;i<this._untransformedHitBoxes[e].vertices.length;++i)i>=this.hitBoxes[e].vertices.length&&this.hitBoxes[e].vertices.push([0,0]),t.tLine truncated var gdjs;(function(s){const o=new s.Logger("CustomRuntimeObject");class h extends s.RuntimeObject{constructor(t,e,i){super(t,e,i);this._isUntransformedHitBoxesDirty=!0;this._untransformedHitBoxes=[];this._unrotatedAABB={min:[0,0],max:[0,0]};this._innerArea=null;this._isInnerAreaFollowingParentSize=!1;this._scaleX=1;this._scaleY=1;this._flippedX=!1;this._flippedY=!1;this.opacity=255;this._customCenter=null;this._localTransformation=new s.AffineTransformation;this._localInverseTransformation=new s.AffineTransformation;this._isLocalTransformationDirty=!0;this._type=e.type,this._instanceContainer=new s.CustomRuntimeObjectInstanceContainer(t,this),this._renderer=this._createRender(),this._initializeFromObjectData(e)}_initializeFromObjectData(t){const e=this._runtimeScene.getGame().getEventsBasedObjectData(t.type);if(!e){o.error(`A CustomRuntimeObject was initialized (or re-initialized) from object data referring to an non existing events based object data with type "${t.type}".`);return}const i=this.getRuntimeScene().getGame().getEventsBasedObjectVariantData(t.type,t.variant);if(!i){o.error(`Unknown variant "${t.variant}" for object "${t.type}".`);return}this._isInnerAreaFollowingParentSize=e.isInnerAreaFollowingParentSize,i.instances.length>0&&(this._innerArea||(this._innerArea={min:[0,0,0],max:[0,0,0]}),this._innerArea.min[0]=i.areaMinX,this._innerArea.min[1]=i.areaMinY,this._innerArea.min[2]=i.areaMinZ,this._innerArea.max[0]=i.areaMaxX,this._innerArea.max[1]=i.areaMaxY,this._innerArea.max[2]=i.areaMaxZ),this._instanceContainer.loadFrom(t,i)}reinitialize(t){super.reinitialize(t),this._reinitializeContentFromObjectData(t),this.onCreated()}_reinitializeContentFromObjectData(t){this._reinitializeRenderer(),this._instanceContainer._unloadContent(),this._initializeFromObjectData(t)}updateFromObjectData(t,e){const i=this.getAnimator();if(i&&i.updateFromObjectData(t.animatable||[],e.animatable||[]),t.variant!==e.variant){const n=this.getWidth(),r=this.getHeight(),a=t.isInnerAreaFollowingParentSize&&this._instanceContainer._initialInnerArea&&this._innerArea&&(this._instanceContainer._initialInnerArea.min[0]!==this._innerArea.min[0]||this._instanceContainer._initialInnerArea.min[1]!==this._innerArea.min[1]||this._instanceContainer._initialInnerArea.max[0]!==this._innerArea.max[0]||this._instanceContainer._initialInnerArea.max[1]!==this._innerArea.max[1]);this._reinitializeContentFromObjectData(e),this.onCreated(),a&&(this.setWidth(n),this.setHeight(r))}return!0}getNetworkSyncData(t){const e=this.getAnimator(),i={...super.getNetworkSyncData(t),ifx:this.isFlippedX(),ify:this.isFlippedY(),sx:this._scaleX,sy:this._scaleY,op:this.opacity};return e&&(i.anim=e.getNetworkSyncData()),this._customCenter&&(i.cc=this._customCenter),i}updateFromNetworkSyncData(t,e){if(super.updateFromNetworkSyncData(t,e),t.ifx!==void 0&&this.flipX(t.ifx),t.ify!==void 0&&this.flipY(t.ify),t.sx!==void 0&&this.setScaleX(Math.abs(t.sx)),t.sy!==void 0&&this.setScaleY(Math.abs(t.sy)),t.op!==void 0&&this.setOpacity(t.op),t.anim){const i=this.getAnimator();i&&i.updateFromNetworkSyncData(t.anim)}t.cc&&this.setRotationCenter(t.cc[0],t.cc[1]),(t.ifx!==void 0||t.ify!==void 0||t.sx!==void 0||t.sy!==void 0||t.anim!==void 0||t.cc!==void 0)&&this.onChildrenLocationChanged()}extraInitializationFromInitialInstance(t){const e=this.getAnimator();if(t.numberProperties)for(let i=0,n=t.numberProperties.length;i<n;++i){const r=t.numberProperties[i];e&&r.name==="animation"&&e.setAnimationIndex(r.value)}t.customSize&&(this.setWidth(t.width),this.setHeight(t.height)),this.setOpacity(t.opacity===void 0?255:t.opacity),this.flipX(!!t.flippedX),this.flipY(!!t.flippedY)}onDeletedFromScene(){this.onDestroy(this._runtimeScene),super.onDeletedFromScene(),this._instanceContainer.onDeletedFromScene(this._runtimeScene)}onDestroyed(){this._instanceContainer._destroy(),super.onDestroyed()}update(t){this._instanceContainer._updateObjectsPreEvents(),this.doStepPreEvents(this._instanceContainer);const e=this.getRuntimeScene().getProfiler();e&&e.begin(this.type),this.doStepPostEvents(this._instanceContainer),e&&e.end(this.type)}stepBehaviorsPostEvents(t){super.stepBehaviorsPostEvents(t),this._instanceContainer._stepBehaviorsPostEvents()}onHotReloading(t){}doStepPreEvents(t){}doStepPostEvents(t){}onDestroy(t){}updatePreRender(t){this._instanceContainer._updateObjectsPreRender(),this.getRenderer().ensureUpToDate()}getRenderer(){return this._renderer}getChildrenContainer(){return this._instanceContainer}onChildrenLocationChanged(){this._isUntransformedHitBoxesDirty=!0,this.invalidateHitboxes(),this.getRenderer().update()}updateHitBoxes(){this._isUntransformedHitBoxesDirty&&this._updateUntransformedHitBoxes();const t=this.getLocalTransformation();for(let e=0;e<this._untransformedHitBoxes.length;++e){e>=this.hitBoxes.length&&this.hitBoxes.push(new s.Polygon);for(let i=0;i<this._untransformedHitBoxes[e].vertices.length;++i)i>=this.hitBoxes[e].vertices.length&&this.hitBoxes[e].vertices.push([0,0])Line truncated
//# sourceMappingURL=CustomRuntimeObject.js.map //# sourceMappingURL=CustomRuntimeObject.js.map
+1 -1
View File
@@ -1,2 +1,2 @@
var gdjs;(function(t){class n extends t.CustomRuntimeObject{constructor(e,r){super(e,r)}_createRender(){const e=this._runtimeScene;return new t.CustomRuntimeObject2DRenderer(this,this._instanceContainer,e)}_reinitializeRenderer(){this.getRenderer().reinitialize(this,this.getParent())}getRenderer(){return super.getRenderer()}getRendererObject(){return this.getRenderer().getRendererObject()}}t.CustomRuntimeObject2D=n})(gdjs||(gdjs={})); var gdjs;(function(t){class i extends t.CustomRuntimeObject{constructor(e,r,n){super(e,r,n)}_createRender(){const e=this._runtimeScene;return new t.CustomRuntimeObject2DRenderer(this,this._instanceContainer,e)}_reinitializeRenderer(){this.getRenderer().reinitialize(this,this.getParent())}getRenderer(){return super.getRenderer()}getRendererObject(){return this.getRenderer().getRendererObject()}}t.CustomRuntimeObject2D=i})(gdjs||(gdjs={}));
//# sourceMappingURL=CustomRuntimeObject2D.js.map //# sourceMappingURL=CustomRuntimeObject2D.js.map
+1 -1
View File
@@ -1,2 +1,2 @@
var gdjs;(function(s){class l extends s.RuntimeInstanceContainer{constructor(e,t){super(e.getGame());this._isLoaded=!1;this._initialInnerArea=null;this._parent=e,this._customObject=t,this._runtimeScene=e.getScene(),this._debuggerRenderer=new s.DebuggerRenderer(this)}addLayer(e){if(this._layers.containsKey(e.name))return;const t=new s.RuntimeCustomObjectLayer(e,this);this._layers.put(e.name,t),this._orderedLayers.push(t)}_unloadContent(){this.onDeletedFromScene(this._parent),this._layers.clear(),this._orderedLayers.length=0}createObject(e){const t=super.createObject(e);return this._customObject.onChildrenLocationChanged(),t}loadFrom(e,t){this._setOriginalInnerArea(t);for(let r=0,n=t.objects.length;r<n;++r){const i=t.objects[r];e.childrenContent&&s.CustomRuntimeObjectInstanceContainer.hasChildrenConfigurationOverriding(e,t)?this.registerObject({...i,...e.childrenContent[i.name]}):this.registerObject(i)}if(t.layers.length>0)for(let r=0,n=t.layers.length;r<n;++r)this.addLayer(t.layers[r]);else this.addLayer({name:"",visibility:!0,cameras:[{defaultSize:!0,defaultViewport:!0,height:0,viewportBottom:0,viewportLeft:0,viewportRight:0,viewportTop:0,width:0}],effects:[],ambientLightColorR:0,ambientLightColorG:0,ambientLightColorB:0,isLightingLayer:!1,followBaseLayerCamera:!1});this.createObjectsFrom(t.instances,0,0,0,!0),this._setLayerDefaultZOrders(),this._isLoaded=!0}static hasChildrenConfigurationOverriding(e,t){const r=!t.name&&t.instances.length==0;return e.childrenContent?!t.name||r:!1}_setOriginalInnerArea(e){(e.instances.length>0||this.getGame().isInGameEdition())&&(e._initialInnerArea||(e._initialInnerArea={min:[e.areaMinX,e.areaMinY,e.areaMinZ],max:[e.areaMaxX,e.areaMaxY,e.areaMaxZ]}),this._initialInnerArea=e._initialInnerArea)}onDeletedFromScene(e){if(!this._isLoaded)return;const t=this.getAdhocListOfAllInstances();for(let r=0,n=t.length;r<n;++r)t[r].onDeletedFromScene();this._isLoaded=!1}_destroy(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t)e[t].onDestroyed();super._destroy(),this._onceTriggers=null}_updateObjectsPreRender(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t){const n=e[t],i=n.getRendererObject();i&&(i.visible=!n.isHidden(),i.visible&&this.getGame().getEffectsManager().updatePreRender(n.getRendererEffects(),n)),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(e,this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),n.updatePreRender(this)}}_updateObjectsPreEvents(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t){const n=e[t],i=n.getElapsedTime();if(n.hasNoForces())n.update(this);else{const a=n.getAverageForce(),o=i/1e3;n.setX(n.getX()+a.getX()*o),n.setY(n.getY()+a.getY()*o),n.update(this),n.updateForces(o)}n.updateTimers(i),n.stepBehaviorsPreEvents(this)}this._cacheOrClearRemovedInstances()}getRenderer(){return this._customObject.getRenderer()}getDebuggerRenderer(){return this._debuggerRenderer}getGame(){return this._runtimeScene.getGame()}getScene(){return this._runtimeScene}getOwner(){return this._customObject}getAsyncTasksManager(){return this._runtimeScene.getAsyncTasksManager()}getUnrotatedViewportMinX(){return this._customObject.getInnerAreaMinX()}getUnrotatedViewportMinY(){return this._customObject.getInnerAreaMinY()}getUnrotatedViewportMaxX(){return this._customObject.getInnerAreaMaxX()}getUnrotatedViewportMaxY(){return this._customObject.getInnerAreaMaxY()}getInitialUnrotatedViewportMinX(){return this._initialInnerArea?this._initialInnerArea.min[0]:0}getInitialUnrotatedViewportMinY(){return this._initialInnerArea?this._initialInnerArea.min[1]:0}getInitialUnrotatedViewportMaxX(){return this._initialInnerArea?this._initialInnerArea.max[0]:0}getInitialUnrotatedViewportMaxY(){return this._initialInnerArea?this._initialInnerArea.max[1]:0}_getInitialInnerAreaDepth(){return this._initialInnerArea?this._initialInnerArea.max[2]-this._initialInnerArea.min[2]:0}getViewportWidth(){return this._customObject.getUnscaledWidth()}getViewportHeight(){return this._customObject.getUnscaledHeight()}getViewportOriginX(){return this._customObject.getUnscaledCenterX()}getViewportOriginY(){return this._customObject.getUnscaledCenterY()}onChildrenLocationChanged(){this._customObject.onChildrenLocationChanged()}convertCoords(e,t,r){let n=r||[0,0];return n=this._parent.getLayer(this._customObject.getLayer()).convertCoords(e,t,0,n),this._customObject.applyObjectInverseTransformation(n[0],n[1],n),n}convertInverseCoords(e,t,r){const n=r||[0,0];return this._customObject.applyObjectTransformation(e,t,n),this._parent.getLayer(this._customObject.getLayer()).convertInverseCoords(n[0],n[1],0,n)}getElapsedTime(){return this._customObject.getElapsedTime()}}s.CustomRuntimeObjectInstanceContainer=l})(gdjs||(gdjs={})); var gdjs;(function(s){class l extends s.RuntimeInstanceContainer{constructor(e,t){super(e.getGame());this._isLoaded=!1;this._initialInnerArea=null;this._parent=e,this._customObject=t,this._runtimeScene=e.getScene(),this._debuggerRenderer=new s.DebuggerRenderer(this)}addLayer(e){if(this._layers.containsKey(e.name))return;const t=new s.RuntimeCustomObjectLayer(e,this);this._layers.put(e.name,t),this._orderedLayers.push(t)}_unloadContent(){this.onDeletedFromScene(this._parent),this._layers.clear(),this._orderedLayers.length=0}createObject(e,t){const r=super.createObject(e,t);return this._customObject.onChildrenLocationChanged(),r}loadFrom(e,t){this._setOriginalInnerArea(t);for(let r=0,n=t.objects.length;r<n;++r){const i=t.objects[r];e.childrenContent&&s.CustomRuntimeObjectInstanceContainer.hasChildrenConfigurationOverriding(e,t)?this.registerObject({...i,...e.childrenContent[i.name]}):this.registerObject(i)}if(t.layers.length>0)for(let r=0,n=t.layers.length;r<n;++r)this.addLayer(t.layers[r]);else this.addLayer({name:"",visibility:!0,cameras:[{defaultSize:!0,defaultViewport:!0,height:0,viewportBottom:0,viewportLeft:0,viewportRight:0,viewportTop:0,width:0}],effects:[],ambientLightColorR:0,ambientLightColorG:0,ambientLightColorB:0,isLightingLayer:!1,followBaseLayerCamera:!1});this.createObjectsFrom(t.instances,0,0,0,!0),this._setLayerDefaultZOrders(),this._isLoaded=!0}static hasChildrenConfigurationOverriding(e,t){const r=!t.name&&t.instances.length==0;return e.childrenContent?!t.name||r:!1}_setOriginalInnerArea(e){(e.instances.length>0||this.getGame().isInGameEdition())&&(e._initialInnerArea||(e._initialInnerArea={min:[e.areaMinX,e.areaMinY,e.areaMinZ],max:[e.areaMaxX,e.areaMaxY,e.areaMaxZ]}),this._initialInnerArea=e._initialInnerArea)}onDeletedFromScene(e){if(!this._isLoaded)return;const t=this.getAdhocListOfAllInstances();for(let r=0,n=t.length;r<n;++r)t[r].onDeletedFromScene();this._isLoaded=!1}_destroy(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t)e[t].onDestroyed();super._destroy(),this._onceTriggers=null}_updateObjectsPreRender(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t){const n=e[t],i=n.getRendererObject();i&&(i.visible=!n.isHidden(),i.visible&&this.getGame().getEffectsManager().updatePreRender(n.getRendererEffects(),n)),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(e,this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),n.updatePreRender(this)}}_updateObjectsPreEvents(){const e=this.getAdhocListOfAllInstances();for(let t=0,r=e.length;t<r;++t){const n=e[t],i=n.getElapsedTime();if(n.hasNoForces())n.update(this);else{const a=n.getAverageForce(),o=i/1e3;n.setX(n.getX()+a.getX()*o),n.setY(n.getY()+a.getY()*o),n.update(this),n.updateForces(o)}n.updateTimers(i),n.stepBehaviorsPreEvents(this)}this._cacheOrClearRemovedInstances()}getRenderer(){return this._customObject.getRenderer()}getDebuggerRenderer(){return this._debuggerRenderer}getGame(){return this._runtimeScene.getGame()}getScene(){return this._runtimeScene}getOwner(){return this._customObject}getAsyncTasksManager(){return this._runtimeScene.getAsyncTasksManager()}getUnrotatedViewportMinX(){return this._customObject.getInnerAreaMinX()}getUnrotatedViewportMinY(){return this._customObject.getInnerAreaMinY()}getUnrotatedViewportMaxX(){return this._customObject.getInnerAreaMaxX()}getUnrotatedViewportMaxY(){return this._customObject.getInnerAreaMaxY()}getInitialUnrotatedViewportMinX(){return this._initialInnerArea?this._initialInnerArea.min[0]:0}getInitialUnrotatedViewportMinY(){return this._initialInnerArea?this._initialInnerArea.min[1]:0}getInitialUnrotatedViewportMaxX(){return this._initialInnerArea?this._initialInnerArea.max[0]:0}getInitialUnrotatedViewportMaxY(){return this._initialInnerArea?this._initialInnerArea.max[1]:0}_getInitialInnerAreaDepth(){return this._initialInnerArea?this._initialInnerArea.max[2]-this._initialInnerArea.min[2]:0}getViewportWidth(){return this._customObject.getUnscaledWidth()}getViewportHeight(){return this._customObject.getUnscaledHeight()}getViewportOriginX(){return this._customObject.getUnscaledCenterX()}getViewportOriginY(){return this._customObject.getUnscaledCenterY()}onChildrenLocationChanged(){this._customObject.onChildrenLocationChanged()}convertCoords(e,t,r){let n=r||[0,0];return n=this._parent.getLayer(this._customObject.getLayer()).convertCoords(e,t,0,n),this._customObject.applyObjectInverseTransformation(n[0],n[1],n),n}convertInverseCoords(e,t,r){const n=r||[0,0];return this._customObject.applyObjectTransformation(e,t,n),this._parent.getLayer(this._customObject.getLayer()).convertInverseCoords(n[0],n[1],0,n)}getElapsedTime(){return this._customObject.getElapsedTime()}}s.CustomRuntimeObjectInstanceContainer=l})(gdjs||(gdjs={}));
//# sourceMappingURL=CustomRuntimeObjectInstanceContainer.js.map //# sourceMappingURL=CustomRuntimeObjectInstanceContainer.js.map
Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

@@ -1,2 +1,2 @@
var gdjs;(function(a){let o;(function(e){e[e.None=0]="None",e[e.WindowLeft=1]="WindowLeft",e[e.WindowRight=2]="WindowRight",e[e.Proportional=3]="Proportional",e[e.WindowCenter=4]="WindowCenter"})(o||(o={}));let s;(function(e){e[e.None=0]="None",e[e.WindowTop=1]="WindowTop",e[e.WindowBottom=2]="WindowBottom",e[e.Proportional=3]="Proportional",e[e.WindowCenter=4]="WindowCenter"})(s||(s={}));class W extends a.RuntimeBehavior{constructor(t,i,n){super(t,i,n);this._useLegacyBottomAndRightAnchors=!1;this._hasJustBeenCreated=!0;this._leftEdgeDistance=0;this._rightEdgeDistance=0;this._topEdgeDistance=0;this._bottomEdgeDistance=0;this._oldDrawableX=0;this._oldDrawableY=0;this._oldWidth=0;this._oldHeight=0;this._parentOldMinX=0;this._parentOldMinY=0;this._parentOldMaxX=0;this._parentOldMaxY=0;this._relativeToOriginalWindowSize=!!i.relativeToOriginalWindowSize,this._leftEdgeAnchor=i.leftEdgeAnchor,this._rightEdgeAnchor=i.rightEdgeAnchor,this._topEdgeAnchor=i.topEdgeAnchor,this._bottomEdgeAnchor=i.bottomEdgeAnchor,this._useLegacyBottomAndRightAnchors=i.useLegacyBottomAndRightAnchors===void 0?!0:i.useLegacyBottomAndRightAnchors}updateFromBehaviorData(t,i){return t.leftEdgeAnchor!==i.leftEdgeAnchor&&(this._leftEdgeAnchor=i.leftEdgeAnchor),t.rightEdgeAnchor!==i.rightEdgeAnchor&&(this._rightEdgeAnchor=i.rightEdgeAnchor),t.topEdgeAnchor!==i.topEdgeAnchor&&(this._topEdgeAnchor=i.topEdgeAnchor),t.bottomEdgeAnchor!==i.bottomEdgeAnchor&&(this._bottomEdgeAnchor=i.bottomEdgeAnchor),t.useLegacyTrajectory!==i.useLegacyTrajectory&&(this._useLegacyBottomAndRightAnchors=i.useLegacyBottomAndRightAnchors),t.relativeToOriginalWindowSize===i.relativeToOriginalWindowSize}onActivate(){this._hasJustBeenCreated=!0}doStepPreEvents(t){this._hasJustBeenCreated&&(this._initializeAnchorDistances(t),this._hasJustBeenCreated=!1,this._oldDrawableX=this.owner.getDrawableX(),this._oldDrawableY=this.owner.getDrawableY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight()),this._updateAnchorDistances(t),this._followAnchor(t),this._oldDrawableX=this.owner.getDrawableX(),this._oldDrawableY=this.owner.getDrawableY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight()}_initializeAnchorDistances(t){const i=a.staticArray(a.AnchorRuntimeBehavior.prototype.doStepPreEvents),n=t.getLayer(this.owner.getLayer());this._relativeToOriginalWindowSize?(this._parentOldMinX=t.getInitialUnrotatedViewportMinX(),this._parentOldMinY=t.getInitialUnrotatedViewportMinY(),this._parentOldMaxX=t.getInitialUnrotatedViewportMaxX(),this._parentOldMaxY=t.getInitialUnrotatedViewportMaxY()):(this._parentOldMinX=t.getUnrotatedViewportMinX(),this._parentOldMinY=t.getUnrotatedViewportMinY(),this._parentOldMaxX=t.getUnrotatedViewportMaxX(),this._parentOldMaxY=t.getUnrotatedViewportMaxY());const r=this._parentOldMinX,e=this._parentOldMinY,g=this._parentOldMaxX,l=this._parentOldMaxY,w=(g+r)/2,p=(l+e)/2,E=g-r,f=l-e,h=this._convertInverseCoords(t,n,this.owner.getDrawableX(),this.owner.getDrawableY(),i);this._leftEdgeAnchor===1?this._leftEdgeDistance=h[0]-r:this._leftEdgeAnchor===2?this._leftEdgeDistance=h[0]-g:this._leftEdgeAnchor===3?this._leftEdgeDistance=(h[0]-r)/E:this._leftEdgeAnchor===4&&(this._leftEdgeDistance=h[0]-w),this._topEdgeAnchor===1?this._topEdgeDistance=h[1]-e:this._topEdgeAnchor===2?this._topEdgeDistance=h[1]-l:this._topEdgeAnchor===3?this._topEdgeDistance=(h[1]-e)/f:this._topEdgeAnchor===4&&(this._topEdgeDistance=h[1]-p);const d=this._convertInverseCoords(t,n,this.owner.getDrawableX()+this.owner.getWidth(),this.owner.getDrawableY()+this.owner.getHeight(),i);this._rightEdgeAnchor===1?this._rightEdgeDistance=d[0]-r:this._rightEdgeAnchor===2?this._rightEdgeDistance=d[0]-g:this._rightEdgeAnchor===3?this._rightEdgeDistance=(d[0]-r)/E:this._rightEdgeAnchor===4&&(this._rightEdgeDistance=d[0]-w),this._bottomEdgeAnchor===1?this._bottomEdgeDistance=d[1]-e:this._bottomEdgeAnchor===2?this._bottomEdgeDistance=d[1]-l:this._bottomEdgeAnchor===3?this._bottomEdgeDistance=(d[1]-e)/f:this._bottomEdgeAnchor===4&&(this._bottomEdgeDistance=d[1]-p)}_updateAnchorDistances(t){if(this._oldDrawableX!==this.owner.getDrawableX()||this._oldWidth!==this.owner.getWidth()){const i=this._parentOldMaxX-this._parentOldMinX,n=this.owner.getDrawableX()-this._oldDrawableX;this._leftEdgeAnchor===3?this._leftEdgeDistance+=n/i:this._leftEdgeDistance+=n;const r=n+this.owner.getWidth()-this._oldWidth;this._rightEdgeAnchor===3?this._rightEdgeDistance+=r/i:this._rightEdgeDistance+=r}if(this._oldDrawableY!==this.owner.getDrawableY()||this._oldHeight!==this.owner.getHeight()){const i=this._parentOldMaxY-this._parentOldMinY,n=this.owner.getDrawableY()-this._oldDrawableY;this._topEdgeAnchor===3?this._topEdgeDistance+=n/i:this._topEdgeDistance+=n;const r=n+this.owner.getHeight()-this._oldHeight;this._bottomEdgeAnchor===3?this._bottomEdgeDistance+=r/i:this._bottomEdgeDistance+=r}}_followAnchor(t){let i=t.getUnrotatedViewportMinX(),n=t.getUnrotatedViewportMinY(),r=t.getUnrotatedViewLine truncated var gdjs;(function(a){let o;(function(e){e[e.None=0]="None",e[e.WindowLeft=1]="WindowLeft",e[e.WindowRight=2]="WindowRight",e[e.Proportional=3]="Proportional",e[e.WindowCenter=4]="WindowCenter"})(o||(o={}));let n;(function(e){e[e.None=0]="None",e[e.WindowTop=1]="WindowTop",e[e.WindowBottom=2]="WindowBottom",e[e.Proportional=3]="Proportional",e[e.WindowCenter=4]="WindowCenter"})(n||(n={}));class W extends a.RuntimeBehavior{constructor(t,i,s){super(t,i,s);this._useLegacyBottomAndRightAnchors=!1;this._hasJustBeenCreated=!0;this._leftEdgeDistance=0;this._rightEdgeDistance=0;this._topEdgeDistance=0;this._bottomEdgeDistance=0;this._oldDrawableX=0;this._oldDrawableY=0;this._oldWidth=0;this._oldHeight=0;this._parentOldMinX=0;this._parentOldMinY=0;this._parentOldMaxX=0;this._parentOldMaxY=0;this._relativeToOriginalWindowSize=!!i.relativeToOriginalWindowSize,this._leftEdgeAnchor=i.leftEdgeAnchor,this._rightEdgeAnchor=i.rightEdgeAnchor,this._topEdgeAnchor=i.topEdgeAnchor,this._bottomEdgeAnchor=i.bottomEdgeAnchor,this._useLegacyBottomAndRightAnchors=i.useLegacyBottomAndRightAnchors===void 0?!0:i.useLegacyBottomAndRightAnchors}applyBehaviorOverriding(t){return t.leftEdgeAnchor!==void 0&&(this._leftEdgeAnchor=t.leftEdgeAnchor),t.rightEdgeAnchor!==void 0&&(this._rightEdgeAnchor=t.rightEdgeAnchor),t.topEdgeAnchor!==void 0&&(this._topEdgeAnchor=t.topEdgeAnchor),t.bottomEdgeAnchor!==void 0&&(this._bottomEdgeAnchor=t.bottomEdgeAnchor),t.useLegacyTrajectory!==void 0&&(this._useLegacyBottomAndRightAnchors=t.useLegacyBottomAndRightAnchors),t.relativeToOriginalWindowSize===void 0}onActivate(){this._hasJustBeenCreated=!0}doStepPreEvents(t){this._hasJustBeenCreated&&(this._initializeAnchorDistances(t),this._hasJustBeenCreated=!1,this._oldDrawableX=this.owner.getDrawableX(),this._oldDrawableY=this.owner.getDrawableY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight()),this._updateAnchorDistances(t),this._followAnchor(t),this._oldDrawableX=this.owner.getDrawableX(),this._oldDrawableY=this.owner.getDrawableY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight()}_initializeAnchorDistances(t){const i=a.staticArray(a.AnchorRuntimeBehavior.prototype.doStepPreEvents),s=t.getLayer(this.owner.getLayer());this._relativeToOriginalWindowSize?(this._parentOldMinX=t.getInitialUnrotatedViewportMinX(),this._parentOldMinY=t.getInitialUnrotatedViewportMinY(),this._parentOldMaxX=t.getInitialUnrotatedViewportMaxX(),this._parentOldMaxY=t.getInitialUnrotatedViewportMaxY()):(this._parentOldMinX=t.getUnrotatedViewportMinX(),this._parentOldMinY=t.getUnrotatedViewportMinY(),this._parentOldMaxX=t.getUnrotatedViewportMaxX(),this._parentOldMaxY=t.getUnrotatedViewportMaxY());const r=this._parentOldMinX,e=this._parentOldMinY,g=this._parentOldMaxX,l=this._parentOldMaxY,w=(g+r)/2,p=(l+e)/2,f=g-r,E=l-e,h=this._convertInverseCoords(t,s,this.owner.getDrawableX(),this.owner.getDrawableY(),i);this._leftEdgeAnchor===1?this._leftEdgeDistance=h[0]-r:this._leftEdgeAnchor===2?this._leftEdgeDistance=h[0]-g:this._leftEdgeAnchor===3?this._leftEdgeDistance=(h[0]-r)/f:this._leftEdgeAnchor===4&&(this._leftEdgeDistance=h[0]-w),this._topEdgeAnchor===1?this._topEdgeDistance=h[1]-e:this._topEdgeAnchor===2?this._topEdgeDistance=h[1]-l:this._topEdgeAnchor===3?this._topEdgeDistance=(h[1]-e)/E:this._topEdgeAnchor===4&&(this._topEdgeDistance=h[1]-p);const d=this._convertInverseCoords(t,s,this.owner.getDrawableX()+this.owner.getWidth(),this.owner.getDrawableY()+this.owner.getHeight(),i);this._rightEdgeAnchor===1?this._rightEdgeDistance=d[0]-r:this._rightEdgeAnchor===2?this._rightEdgeDistance=d[0]-g:this._rightEdgeAnchor===3?this._rightEdgeDistance=(d[0]-r)/f:this._rightEdgeAnchor===4&&(this._rightEdgeDistance=d[0]-w),this._bottomEdgeAnchor===1?this._bottomEdgeDistance=d[1]-e:this._bottomEdgeAnchor===2?this._bottomEdgeDistance=d[1]-l:this._bottomEdgeAnchor===3?this._bottomEdgeDistance=(d[1]-e)/E:this._bottomEdgeAnchor===4&&(this._bottomEdgeDistance=d[1]-p)}_updateAnchorDistances(t){if(this._oldDrawableX!==this.owner.getDrawableX()||this._oldWidth!==this.owner.getWidth()){const i=this._parentOldMaxX-this._parentOldMinX,s=this.owner.getDrawableX()-this._oldDrawableX;this._leftEdgeAnchor===3?this._leftEdgeDistance+=s/i:this._leftEdgeDistance+=s;const r=s+this.owner.getWidth()-this._oldWidth;this._rightEdgeAnchor===3?this._rightEdgeDistance+=r/i:this._rightEdgeDistance+=r}if(this._oldDrawableY!==this.owner.getDrawableY()||this._oldHeight!==this.owner.getHeight()){const i=this._parentOldMaxY-this._parentOldMinY,s=this.owner.getDrawableY()-this._oldDrawableY;this._topEdgeAnchor===3?this._topEdgeDistance+=s/i:this._topEdgeDistance+=s;const r=s+this.owner.getHeight()-this._oldHeight;this._bottomEdgeAnchor===3?this._bottomEdgeDistance+=r/i:this._bottomEdgeDistance+=r}}_followAnchor(t){let i=t.getUnrotatedViewportMinX(),s=t.getUnrotatedViewportMinY(),r=t.getUnrotatedViewportMaxX(),e=t.getUnrotatedViewportMaxY();if(this._parentOldMinX===i&&this._parentLine truncated
//# sourceMappingURL=anchorruntimebehavior.js.map //# sourceMappingURL=anchorruntimebehavior.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(i){class r extends i.RuntimeObject{constructor(t,e){super(t,e);this._wrapping=!1;this._opacity=e.content.opacity,this._text=e.content.text,this._tint=i.rgbOrHexToRGBColor(e.content.tint),this._bitmapFontResourceName=e.content.bitmapFontResourceName,this._textureAtlasResourceName=e.content.textureAtlasResourceName,this._scaleX=e.content.scale,this._scaleY=e.content.scale,this._wrappingWidth=0,this._textAlign=e.content.align,this._verticalTextAlignment=e.content.verticalTextAlignment||"top",this._renderer=new i.BitmapTextRuntimeObjectRenderer(this,t),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(t,e){return t.content.opacity!==e.content.opacity&&this.setOpacity(e.content.opacity),t.content.text!==e.content.text&&this.setText(e.content.text),t.content.tint!==e.content.tint&&(this._tint=i.rgbOrHexToRGBColor(e.content.tint),this._renderer.updateTint()),t.content.bitmapFontResourceName!==e.content.bitmapFontResourceName&&this.setBitmapFontResourceName(e.content.bitmapFontResourceName),t.content.textureAtlasResourceName!==e.content.textureAtlasResourceName&&this.setTextureAtlasResourceName(e.content.textureAtlasResourceName),t.content.scale!==e.content.scale&&this.setScale(e.content.scale),t.content.align!==e.content.align&&this.setTextAlignment(e.content.align),t.content.verticalTextAlignment!==e.content.verticalTextAlignment&&this.setVerticalTextAlignment(e.content.verticalTextAlignment),!0}getNetworkSyncData(t){return{...super.getNetworkSyncData(t),text:this._text,opa:this._opacity,tint:this._tint,bfrn:this._bitmapFontResourceName,tarn:this._textureAtlasResourceName,scale:this.getScale(),wwrap:this._wrapping,wwidth:this._wrappingWidth,align:this._textAlign,vta:this._verticalTextAlignment}}updateFromNetworkSyncData(t,e){super.updateFromNetworkSyncData(t,e),this._text!==void 0&&this.setText(t.text),this._opacity!==void 0&&this.setOpacity(t.opa),this._tint!==void 0&&(this._tint=t.tint,this._renderer.updateTint()),this._bitmapFontResourceName!==void 0&&this.setBitmapFontResourceName(t.bfrn),this._textureAtlasResourceName!==void 0&&this.setTextureAtlasResourceName(t.tarn),this._scaleX!==void 0&&this.setScale(t.scale),this._wrapping!==void 0&&this.setWrapping(t.wwrap),this._wrappingWidth!==void 0&&this.setWrappingWidth(t.wwidth),this._textAlign!==void 0&&this.setTextAlignment(t.align),this._verticalTextAlignment!==void 0&&this.setVerticalTextAlignment(t.vta)}extraInitializationFromInitialInstance(t){t.customSize&&(this.setWrappingWidth(t.width),this.setWrapping(!0)),this.setOpacity(t.opacity===void 0?255:t.opacity)}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setText(t){this._text=t,this._renderer.updateTextContent(),this.invalidateHitboxes()}getText(){return this._text}setTint(t){this._tint=i.rgbOrHexToRGBColor(t),this._renderer.updateTint()}getTint(){return this._tint[0]+";"+this._tint[1]+";"+this._tint[2]}getScale(){const t=this.getScaleX(),e=this.getScaleY();return t===e?t:Math.sqrt(t*e)}getScaleX(){return this._scaleX}getScaleY(){return this._scaleY}setScale(t){this.setScaleX(t),this.setScaleY(t)}setScaleX(t){t<0&&(t=0),this._scaleX!==t&&(this._scaleX=t,this._renderer.updateScale(),this.invalidateHitboxes())}setScaleY(t){t<0&&(t=0),this._scaleY!==t&&(this._scaleY=t,this._renderer.updateScale(),this.invalidateHitboxes())}getFontSize(){return this._renderer.getFontSize()}setBitmapFontAndTextureAtlasResourceName(t,e){t&&(this.setBitmapFontResourceName(t),this._renderer.updateFont()),e&&(this.setTextureAtlasResourceName(e),this._renderer.updateFont())}setBitmapFontResourceName(t){this._bitmapFontResourceName=t}getBitmapFontResourceName(){return this._bitmapFontResourceName}setTextureAtlasResourceName(t){this._textureAtlasResourceName=t}getTextureAtlasResourceName(){return this._textureAtlasResourceName}setTextAlignment(t){this._textAlign=t,this._renderer.updateAlignment()}getTextAlignment(){return this._textAlign}setVerticalTextAlignment(t){this._verticalTextAlignment=t,this._renderer.updatePosition()}getVerticalTextAlignment(){return this._verticalTextAlignment}setX(t){super.setX(t),this._renderer.updatePosition()}setY(t){super.setY(t),this._renderer.updatePosition()}setAngle(t){super.setAngle(t),this._renderer.updateAngle()}setOpacity(t){t<0&&(t=0),t>255&&(t=255),this._opacity=t,this._renderer.updateOpacity()}getOpacity(){return this._opacity}setWrappingWidth(t){this._wrappingWidth=t,this._renderer.updateWrappingWidth(),this.invalidateHitboxes()}getWrappingWidth(){return this._wrappingWidth}setWrapping(t){this._wrapping=t,this._renderer.updateWrappingWidth(),this.invalidateHitboxes()}isWrapping(){return this._wrapping}getWidth(){return this._wrapping?this._wrappingWidth:this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}setWidth(t){this.setWrappingWidth(t)}getDrawableY(){return this.getY()-(this._verticalTextAlignment==="center"?this.getHeight()/2:this._verticalTextAlignment==="bottom"?this.getHeight():0)Line truncated var gdjs;(function(i){class r extends i.RuntimeObject{constructor(t,e,n){super(t,e,n);this._wrapping=!1;this._opacity=e.content.opacity,this._text=e.content.text,this._tint=i.rgbOrHexToRGBColor(e.content.tint),this._bitmapFontResourceName=e.content.bitmapFontResourceName,this._textureAtlasResourceName=e.content.textureAtlasResourceName,this._scaleX=e.content.scale,this._scaleY=e.content.scale,this._wrappingWidth=0,this._textAlign=e.content.align,this._verticalTextAlignment=e.content.verticalTextAlignment||"top",this._renderer=new i.BitmapTextRuntimeObjectRenderer(this,t),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(t,e){return t.content.opacity!==e.content.opacity&&this.setOpacity(e.content.opacity),t.content.text!==e.content.text&&this.setText(e.content.text),t.content.tint!==e.content.tint&&(this._tint=i.rgbOrHexToRGBColor(e.content.tint),this._renderer.updateTint()),t.content.bitmapFontResourceName!==e.content.bitmapFontResourceName&&this.setBitmapFontResourceName(e.content.bitmapFontResourceName),t.content.textureAtlasResourceName!==e.content.textureAtlasResourceName&&this.setTextureAtlasResourceName(e.content.textureAtlasResourceName),t.content.scale!==e.content.scale&&this.setScale(e.content.scale),t.content.align!==e.content.align&&this.setTextAlignment(e.content.align),t.content.verticalTextAlignment!==e.content.verticalTextAlignment&&this.setVerticalTextAlignment(e.content.verticalTextAlignment),!0}getNetworkSyncData(t){return{...super.getNetworkSyncData(t),text:this._text,opa:this._opacity,tint:this._tint,bfrn:this._bitmapFontResourceName,tarn:this._textureAtlasResourceName,scale:this.getScale(),wwrap:this._wrapping,wwidth:this._wrappingWidth,align:this._textAlign,vta:this._verticalTextAlignment}}updateFromNetworkSyncData(t,e){super.updateFromNetworkSyncData(t,e),this._text!==void 0&&this.setText(t.text),this._opacity!==void 0&&this.setOpacity(t.opa),this._tint!==void 0&&(this._tint=t.tint,this._renderer.updateTint()),this._bitmapFontResourceName!==void 0&&this.setBitmapFontResourceName(t.bfrn),this._textureAtlasResourceName!==void 0&&this.setTextureAtlasResourceName(t.tarn),this._scaleX!==void 0&&this.setScale(t.scale),this._wrapping!==void 0&&this.setWrapping(t.wwrap),this._wrappingWidth!==void 0&&this.setWrappingWidth(t.wwidth),this._textAlign!==void 0&&this.setTextAlignment(t.align),this._verticalTextAlignment!==void 0&&this.setVerticalTextAlignment(t.vta)}extraInitializationFromInitialInstance(t){t.customSize&&(this.setWrappingWidth(t.width),this.setWrapping(!0)),this.setOpacity(t.opacity===void 0?255:t.opacity)}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setText(t){this._text=t,this._renderer.updateTextContent(),this.invalidateHitboxes()}getText(){return this._text}setTint(t){this._tint=i.rgbOrHexToRGBColor(t),this._renderer.updateTint()}getTint(){return this._tint[0]+";"+this._tint[1]+";"+this._tint[2]}getScale(){const t=this.getScaleX(),e=this.getScaleY();return t===e?t:Math.sqrt(t*e)}getScaleX(){return this._scaleX}getScaleY(){return this._scaleY}setScale(t){this.setScaleX(t),this.setScaleY(t)}setScaleX(t){t<0&&(t=0),this._scaleX!==t&&(this._scaleX=t,this._renderer.updateScale(),this.invalidateHitboxes())}setScaleY(t){t<0&&(t=0),this._scaleY!==t&&(this._scaleY=t,this._renderer.updateScale(),this.invalidateHitboxes())}getFontSize(){return this._renderer.getFontSize()}setBitmapFontAndTextureAtlasResourceName(t,e){t&&(this.setBitmapFontResourceName(t),this._renderer.updateFont()),e&&(this.setTextureAtlasResourceName(e),this._renderer.updateFont())}setBitmapFontResourceName(t){this._bitmapFontResourceName=t}getBitmapFontResourceName(){return this._bitmapFontResourceName}setTextureAtlasResourceName(t){this._textureAtlasResourceName=t}getTextureAtlasResourceName(){return this._textureAtlasResourceName}setTextAlignment(t){this._textAlign=t,this._renderer.updateAlignment()}getTextAlignment(){return this._textAlign}setVerticalTextAlignment(t){this._verticalTextAlignment=t,this._renderer.updatePosition()}getVerticalTextAlignment(){return this._verticalTextAlignment}setX(t){super.setX(t),this._renderer.updatePosition()}setY(t){super.setY(t),this._renderer.updatePosition()}setAngle(t){super.setAngle(t),this._renderer.updateAngle()}setOpacity(t){t<0&&(t=0),t>255&&(t=255),this._opacity=t,this._renderer.updateOpacity()}getOpacity(){return this._opacity}setWrappingWidth(t){this._wrappingWidth=t,this._renderer.updateWrappingWidth(),this.invalidateHitboxes()}getWrappingWidth(){return this._wrappingWidth}setWrapping(t){this._wrapping=t,this._renderer.updateWrappingWidth(),this.invalidateHitboxes()}isWrapping(){return this._wrapping}getWidth(){return this._wrapping?this._wrappingWidth:this._renderer.getWidth()}getHeight(){return this._renderer.getHeight()}setWidth(t){this.setWrappingWidth(t)}getDrawableY(){return this.getY()-(this._verticalTextAlignment==="center"?this.getHeight()/2:this._verticalTextAlignment==="bottom"?this.getHeight(Line truncated
//# sourceMappingURL=bitmaptextruntimeobject.js.map //# sourceMappingURL=bitmaptextruntimeobject.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(o){class m extends o.RuntimeBehavior{constructor(t,e,s){super(t,e,s);this._extraBorder=e.extraBorder||0,this._unseenGraceDistance=e.unseenGraceDistance||0,this._hasBeenOnScreen=!1}updateFromBehaviorData(t,e){return t.extraBorder!==e.extraBorder&&(this._extraBorder=e.extraBorder),t.unseenGraceDistance!==e.unseenGraceDistance&&(this._unseenGraceDistance=e.unseenGraceDistance),!0}doStepPostEvents(t){const e=this.owner.getWidth(),s=this.owner.getHeight(),a=this.owner.getDrawableX()+this.owner.getCenterX(),i=this.owner.getDrawableY()+this.owner.getCenterY(),r=t.getLayer(this.owner.getLayer()),n=Math.sqrt(e*e+s*s)/2,c=r.getCameraX()-r.getCameraWidth()/2,h=r.getCameraX()+r.getCameraWidth()/2,u=r.getCameraY()-r.getCameraHeight()/2,d=r.getCameraY()+r.getCameraHeight()/2;a+n+this._extraBorder<c||a-n-this._extraBorder>h||i+n+this._extraBorder<u||i-n-this._extraBorder>d?this._hasBeenOnScreen?this.owner.deleteFromScene():(a+n+this._unseenGraceDistance<c||a-n-this._unseenGraceDistance>h||i+n+this._unseenGraceDistance<u||i-n-this._unseenGraceDistance>d)&&this.owner.deleteFromScene():this._hasBeenOnScreen=!0}setExtraBorder(t){this._extraBorder=t}getExtraBorder(){return this._extraBorder}setUnseenGraceDistance(t){this._unseenGraceDistance=t}getUnseenGraceDistance(){return this._unseenGraceDistance}hasBeenOnScreen(){return this._hasBeenOnScreen}}o.DestroyOutsideRuntimeBehavior=m,o.registerBehavior("DestroyOutsideBehavior::DestroyOutside",o.DestroyOutsideRuntimeBehavior)})(gdjs||(gdjs={})); var gdjs;(function(o){class B extends o.RuntimeBehavior{constructor(e,n,s){super(e,n,s);this._extraBorder=n.extraBorder||0,this._unseenGraceDistance=n.unseenGraceDistance||0,this._hasBeenOnScreen=!1}applyBehaviorOverriding(e){return e.extraBorder!==void 0&&(this._extraBorder=e.extraBorder),e.unseenGraceDistance!==void 0&&(this._unseenGraceDistance=e.unseenGraceDistance),!0}doStepPostEvents(e){const n=this.owner.getWidth(),s=this.owner.getHeight(),a=this.owner.getDrawableX()+this.owner.getCenterX(),i=this.owner.getDrawableY()+this.owner.getCenterY(),t=e.getLayer(this.owner.getLayer()),r=Math.sqrt(n*n+s*s)/2,c=t.getCameraX()-t.getCameraWidth()/2,h=t.getCameraX()+t.getCameraWidth()/2,u=t.getCameraY()-t.getCameraHeight()/2,d=t.getCameraY()+t.getCameraHeight()/2;a+r+this._extraBorder<c||a-r-this._extraBorder>h||i+r+this._extraBorder<u||i-r-this._extraBorder>d?this._hasBeenOnScreen?this.owner.deleteFromScene():(a+r+this._unseenGraceDistance<c||a-r-this._unseenGraceDistance>h||i+r+this._unseenGraceDistance<u||i-r-this._unseenGraceDistance>d)&&this.owner.deleteFromScene():this._hasBeenOnScreen=!0}setExtraBorder(e){this._extraBorder=e}getExtraBorder(){return this._extraBorder}setUnseenGraceDistance(e){this._unseenGraceDistance=e}getUnseenGraceDistance(){return this._unseenGraceDistance}hasBeenOnScreen(){return this._hasBeenOnScreen}}o.DestroyOutsideRuntimeBehavior=B,o.registerBehavior("DestroyOutsideBehavior::DestroyOutside",o.DestroyOutsideRuntimeBehavior)})(gdjs||(gdjs={}));
//# sourceMappingURL=destroyoutsideruntimebehavior.js.map //# sourceMappingURL=destroyoutsideruntimebehavior.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(l){l.PixiFiltersTools.registerFilterCreator("Glow",new class extends l.PixiFiltersTools.PixiFilterCreator{makePIXIFilter(e,r){return new PIXI.filters.GlowFilter}updatePreRender(e,r){}updateDoubleParameter(e,r,t){const n=e;r==="innerStrength"?n.innerStrength=t:r==="outerStrength"?n.outerStrength=t:r==="distance"&&(n.distance=t)}getDoubleParameter(e,r){const t=e;return r==="innerStrength"?t.innerStrength:r==="outerStrength"?t.outerStrength:r==="distance"?t.distance:0}updateStringParameter(e,r,t){const n=e;r==="color"&&(n.color=l.rgbOrHexStringToNumber(t))}updateColorParameter(e,r,t){const n=e;r==="color"&&(n.color=t)}getColorParameter(e,r){const t=e;return r==="color"?t.color:0}updateBooleanParameter(e,r,t){}getNetworkSyncData(e){const r=e;return{is:r.innerStrength,os:r.outerStrength,d:r.distance,c:r.color}}updateFromNetworkSyncData(e,r){const t=e;t.innerStrength=r.is,t.outerStrength=r.os,t.distance=r.d,t.color=r.c}})})(gdjs||(gdjs={}));
//# sourceMappingURL=glow-pixi-filter.js.map
@@ -0,0 +1,84 @@
/*!
* @pixi/filter-glow - v5.2.1
* Compiled Thu, 31 Aug 2023 09:18:38 UTC
*
* @pixi/filter-glow is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var __filters=function(t,o){"use strict";var i=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,u=`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
uniform float outerStrength;
uniform float innerStrength;
uniform vec4 glowColor;
uniform vec4 filterArea;
uniform vec4 filterClamp;
uniform bool knockout;
uniform float alpha;
const float PI = 3.14159265358979323846264;
const float DIST = __DIST__;
const float ANGLE_STEP_SIZE = min(__ANGLE_STEP_SIZE__, PI * 2.0);
const float ANGLE_STEP_NUM = ceil(PI * 2.0 / ANGLE_STEP_SIZE);
const float MAX_TOTAL_ALPHA = ANGLE_STEP_NUM * DIST * (DIST + 1.0) / 2.0;
void main(void) {
vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);
float totalAlpha = 0.0;
vec2 direction;
vec2 displaced;
vec4 curColor;
for (float angle = 0.0; angle < PI * 2.0; angle += ANGLE_STEP_SIZE) {
direction = vec2(cos(angle), sin(angle)) * px;
for (float curDistance = 0.0; curDistance < DIST; curDistance++) {
displaced = clamp(vTextureCoord + direction *
(curDistance + 1.0), filterClamp.xy, filterClamp.zw);
curColor = texture2D(uSampler, displaced);
totalAlpha += (DIST - curDistance) * curColor.a;
}
}
curColor = texture2D(uSampler, vTextureCoord);
float alphaRatio = (totalAlpha / MAX_TOTAL_ALPHA);
float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * curColor.a;
float innerGlowStrength = min(1.0, innerGlowAlpha);
vec4 innerColor = mix(curColor, glowColor, innerGlowStrength);
float outerGlowAlpha = alphaRatio * outerStrength * (1. - curColor.a);
float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);
if (knockout) {
float resultAlpha = (outerGlowAlpha + innerGlowAlpha) * alpha;
gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);
}
else {
vec4 outerGlowColor = outerGlowStrength * glowColor.rgba * alpha;
gl_FragColor = innerColor + outerGlowColor;
}
}
`;const e=class extends o.Filter{constructor(n){const a=Object.assign({},e.defaults,n),{outerStrength:c,innerStrength:s,color:h,knockout:g,quality:f,alpha:p}=a,r=Math.round(a.distance);super(i,u.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/f/r).toFixed(7)}`).replace(/__DIST__/gi,`${r.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:h,outerStrength:c,innerStrength:s,padding:r,knockout:g,alpha:p})}get color(){return o.utils.rgb2hex(this.uniforms.glowColor)}set color(n){o.utils.hex2rgb(n,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(n){this.uniforms.outerStrength=n}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(n){this.uniforms.innerStrength=n}get knockout(){return this.uniforms.knockout}set knockout(n){this.uniforms.knockout=n}get alpha(){return this.uniforms.alpha}set alpha(n){this.uniforms.alpha=n}};let l=e;return l.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1},t.GlowFilter=l,Object.defineProperty(t,"__esModule",{value:!0}),t}({},PIXI);Object.assign(PIXI.filters,__filters);
@@ -0,0 +1,2 @@
var gdjs;(function(i){const o=new i.Logger("Leaderboards");let B;(function(x){let z;(function(c){let R=!1,j=!0;i.registerRuntimeScenePostEventsCallback(()=>{R=!1}),c.hasPlayerJustClosedLeaderboardView=()=>R;const V=t=>{const e=new jsSHA("SHA-256","TEXT",{encoding:"UTF8"});return e.update(t),e.getHash("B64")},A="https://gd.games";let I=[];const $=12,H=6,W=60*1e3,G=(t,e)=>t.filter(r=>e-r<W),F=()=>{const t=Date.now();return I=G(I,t),I.length>=$},q=()=>{const t=Date.now();I.push(t)};class k{constructor(){this.lastScoreSavingStartedAt=null;this.lastScoreSavingSucceededAt=null;this.lastSavingPromise=null;this._successfulEntries=[];this._currentlySavingScore=null;this._currentlySavingPlayerName=null;this._currentlySavingPlayerId=null;this._lastSavedScore=null;this._lastSavedPlayerName=null;this._lastSavedPlayerId=null;this.lastSavedLeaderboardEntry=null;this.lastSaveError=null;this.hasScoreBeenSaved=!1;this.hasScoreSavingErrored=!1}isSaving(){return!!this.lastSavingPromise&&!this.hasScoreBeenSaved&&!this.hasScoreSavingErrored}_isSameAsLastScore({playerName:e,playerId:r,score:n}){return(!!e&&this._lastSavedPlayerName===e||!!r&&this._lastSavedPlayerId===r)&&this._lastSavedScore===n}_isAlreadySavingThisScore({playerName:e,playerId:r,score:n}){return this.isSaving()?(!!e&&this._currentlySavingPlayerName===e||!!r&&this._currentlySavingPlayerId===r)&&this._currentlySavingScore===n:!1}_wouldExceedPerLeaderboardTentativeRateLimit(){return!!this.lastScoreSavingStartedAt&&Date.now()-this.lastScoreSavingStartedAt<500}_wouldExceedPerLeaderboardSuccessRateLimit(){const e=Date.now();return this._successfulEntries=G(this._successfulEntries,e),this._successfulEntries.length>=H}_recordPerLeaderboardAndGlobalSuccessfulEntry(){const e=Date.now();this._successfulEntries.push(e),q()}startSaving({playerName:e,playerId:r,score:n}){if(this._isAlreadySavingThisScore({playerName:e,playerId:r,score:n}))throw o.warn("There is already a request to save with this player name and this score. Ignoring this one."),new Error("Ignoring this saving request.");if(this._isSameAsLastScore({playerName:e,playerId:r,score:n}))throw o.warn("The player and score to be sent are the same as previous one. Ignoring this one."),this._setError("SAME_AS_PREVIOUS"),new Error("Ignoring this saving request.");if(this._wouldExceedPerLeaderboardTentativeRateLimit())throw o.warn("Last entry was sent too little time ago. Ignoring this one."),this._setError("TOO_FAST"),this.lastScoreSavingStartedAt=Date.now(),new Error("Ignoring this saving request.");if(F())throw o.warn("Rate limit exceeded. Too many entries have been successfully sent recently across all leaderboards. Ignoring this one."),this._setError("GLOBAL_RATE_LIMIT_EXCEEDED"),new Error("Ignoring this saving request.");if(this._wouldExceedPerLeaderboardSuccessRateLimit())throw o.warn("Rate limit exceeded. Too many entries have been successfully sent recently for this leaderboard. Ignoring this one."),this._setError("LEADERBOARD_RATE_LIMIT_EXCEEDED"),new Error("Ignoring this saving request.");let a;const u=new Promise(s=>{a=s});return this.lastScoreSavingStartedAt=Date.now(),this.lastSavingPromise=u,this.hasScoreBeenSaved=!1,this.hasScoreSavingErrored=!1,this._currentlySavingScore=n,e&&(this._currentlySavingPlayerName=e),r&&(this._currentlySavingPlayerId=r),{closeSaving:s=>{if(this._recordPerLeaderboardAndGlobalSuccessfulEntry(),u!==this.lastSavingPromise){o.info("Score saving result received, but another save was launched in the meantime - ignoring the result of this one."),a();return}this.lastScoreSavingSucceededAt=Date.now(),this._lastSavedScore=this._currentlySavingScore,this._lastSavedPlayerName=this._currentlySavingPlayerName,this._lastSavedPlayerId=this._currentlySavingPlayerId,this.lastSavedLeaderboardEntry=s,this.hasScoreBeenSaved=!0,a()},closeSavingWithError:s=>{if(u!==this.lastSavingPromise){o.info("Score saving result received, but another save was launched in the meantime - ignoring the result of this one."),a();return}this._setError(s),a()}}}_setError(e){this.lastSaveError=e,this.hasScoreBeenSaved=!1,this.hasScoreSavingErrored=!0}}let g={},L,l=null,M=!1,w=!1,y=!1,_=null,T=null;const h=document.createElement("div");h.style.backgroundColor="#000000",h.style.display="flex",h.style.height="100%",h.style.width="100%",h.style.justifyContent="center",h.style.alignItems="center",h.style.position="relative",h.style.zIndex="2";const C=document.createElement("img");C.setAttribute("width","50px"),C.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CjxjaXJjbGUgb3BhY2l0eT0nMC4yNScgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iNCI+PC9jaXJjbGU+CjxwYXRoIG9wYWNpdHk9JzAuNzUnIGZpbGw9IiNGRkZGRkYiIGQ9Ik00IDEyYTggOCAwIDAxOC04VjBDNS4zNzMgMCAwIDUuMzczIDAgMTJoNHptMiA1LjI5MUE3Ljk2MiA3Ljk2MiAwIDAxNCAxMkgwYzAgMy4wNDIgMS4xMzUgNS44MjQgMyA3LjkzOGwzLTIuNjQ3eiI+PC9wYXRoPgo8L3N2Zz4=");try{C.animate([{transform:"rotate(Line truncated
//# sourceMappingURL=leaderboardstools.js.map
+21
View File
@@ -0,0 +1,21 @@
/**
* A JavaScript implementation of the SHA family of hashes - defined in FIPS PUB 180-4, FIPS PUB 202,
* and SP 800-185 - as well as the corresponding HMAC implementation as defined in FIPS PUB 198-1.
*
* Copyright 2008-2021 Brian Turek, 1998-2009 Paul Johnston & Contributors
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information
*
* Two ECMAScript polyfill functions carry the following license:
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
* MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
*/
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).jsSHA=r()}(this,function(){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(r,n)},r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="ARRAYBUFFER not supported by this environment",e="UINT8ARRAY not supported by this environment";function o(t,r,n,e){var o,i,u,s=r||[0],h=(n=n||0)>>>3,a=-1===e?3:0;for(o=0;o<t.length;o+=1)i=(u=o+h)>>>2,s.length<=i&&s.push(0),s[i]|=t[o]<<8*(a+e*(u%4));return{value:s,binLen:8*t.length+n}}function i(t,i,u){switch(i){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,r,n){return function(t,r,n,e){var o,i,u,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var h=r||[0],a=(n=n||0)>>>3,f=-1===e?3:0;for(o=0;o<t.length;o+=2){if(i=parseInt(t.substr(o,2),16),isNaN(i))throw new Error("String of HEX type contains invalid characters");for(u=(s=(o>>>1)+a)>>>2;h.length<=u;)h.push(0);h[u]|=i<<8*(f+e*(s%4))}return{value:h,binLen:4*t.length+n}}(t,r,n,u)};case"TEXT":return function(t,r,n){return function(t,r,n,e,o){var i,u,s,h,a,f,c,p,l=0,w=n||[0],d=(e=e||0)>>>3;if("UTF8"===r)for(c=-1===o?3:0,s=0;s<t.length;s+=1)for(u=[],128>(i=t.charCodeAt(s))?u.push(i):2048>i?(u.push(192|i>>>6),u.push(128|63&i)):55296>i||57344<=i?u.push(224|i>>>12,128|i>>>6&63,128|63&i):(s+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(s)),u.push(240|i>>>18,128|i>>>12&63,128|i>>>6&63,128|63&i)),h=0;h<u.length;h+=1){for(a=(f=l+d)>>>2;w.length<=a;)w.push(0);w[a]|=u[h]<<8*(c+o*(f%4)),l+=1}else for(c=-1===o?2:0,p="UTF16LE"===r&&1!==o||"UTF16LE"!==r&&1===o,s=0;s<t.length;s+=1){for(i=t.charCodeAt(s),!0===p&&(i=(h=255&i)<<8|i>>>8),a=(f=l+d)>>>2;w.length<=a;)w.push(0);w[a]|=i<<8*(c+o*(f%4)),l+=2}return{value:w,binLen:8*l+e}}(t,i,r,n,u)};case"B64":return function(t,n,e){return function(t,n,e,o){var i,u,s,h,a,f,c=0,p=n||[0],l=(e=e||0)>>>3,w=-1===o?3:0,d=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==d&&d<t.length)throw new Error("Invalid '=' found in base-64 string");for(i=0;i<t.length;i+=4){for(h=t.substr(i,4),s=0,u=0;u<h.length;u+=1)s|=r.indexOf(h.charAt(u))<<18-6*u;for(u=0;u<h.length-1;u+=1){for(a=(f=c+l)>>>2;p.length<=a;)p.push(0);p[a]|=(s>>>16-8*u&255)<<8*(w+o*(f%4)),c+=1}}return{value:p,binLen:8*c+e}}(t,n,e,u)};case"BYTES":return function(t,r,n){return function(t,r,n,e){var o,i,u,s,h=r||[0],a=(n=n||0)>>>3,f=-1===e?3:0;for(i=0;i<t.length;i+=1)o=t.charCodeAt(i),u=(s=i+a)>>>2,h.length<=u&&h.push(0),h[u]|=o<<8*(f+e*(s%4));return{value:h,binLen:8*t.length+n}}(t,r,n,u)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(n)}return function(t,r,n){return function(t,r,n,e){return o(new Uint8Array(t),r,n,e)}(t,r,n,u)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(e)}return function(t,r,n){return o(t,r,n,u)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function u(t,o,i,u){switch(t){case"HEX":return function(t){return function(t,r,n,e){var o,i,u="0123456789abcdef",s="",h=r/8,a=-1===n?3:0;for(o=0;o<h;o+=1)i=t[o>>>2]>>>8*(a+n*(o%4)),s+=u.charAt(i>>>4&15)+u.charAt(15&i);return e.outputUpper?s.toUpperCase():s}(t,o,i,u)};case"B64":return function(t){return function(t,n,e,o){var i,u,s,h,a,f="",c=n/8,p=-1===e?3:0;for(i=0;i<c;i+=3)for(h=i+1<c?t[i+1>>>2]:0,a=i+2<c?t[i+2>>>2]:0,s=(t[i>>>2]>>>8*(p+e*(i%4))&255)<<16|(h>>>8*(p+e*((i+1)%4))&255)<<8|a>>>8*(p+e*((i+2)%4))&255,u=0;u<4;u+=1)f+=8*i+6*u<=n?r.charAt(s>>>6*(3-u)&63):o.b64Pad;return f}(t,o,i,u)};case"BYTES":return function(t){return function(t,r,n){var e,o,i="",u=r/8,s=-1===n?3:0;for(e=0;e<u;e+=1)o=t[e>>>2]>>>8*(s+n*(e%4))&255,i+=String.fromCharCode(o);return i}(t,o,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error(n)}return function(t){return function(t,r,n){var e,o=r/8,i=new ArrayBuffer(o),u=new Uint8Array(i),s=-1===n?3:0;for(e=0;e<o;e+=1)u[e]=t[e>>>2]>>>8*(s+n*(e%4))&255;return i}(t,o,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error(e)}return function(t){return function(t,r,n){var e,o=r/8,i=-1===n?3:0,u=new Uint8Array(o);for(e=0;e<o;e+=1)u[e]=t[e>>>2]>>>8*(i+n*(e%4))&255;return u}(t,o,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,358452Line truncated
@@ -1,2 +1,2 @@
var gdjs;(function(i){class s extends i.RuntimeObject{constructor(e,t){super(e,t);this.opacity=255;this._objectData=t,this._rBorder=t.rightMargin,this._lBorder=t.leftMargin,this._tBorder=t.topMargin,this._bBorder=t.bottomMargin,this._tiled=t.tiled,this._width=t.width,this._height=t.height,this._renderer=new i.PanelSpriteRuntimeObjectRenderer(this,e,t.texture,t.tiled),this.onCreated()}updateFromObjectData(e,t){this._objectData=t,e.width!==t.width&&this.setWidth(t.width),e.height!==t.height&&this.setHeight(t.height);let r=!1;return e.rightMargin!==t.rightMargin&&(this._rBorder=t.rightMargin,r=!0),e.leftMargin!==t.leftMargin&&(this._lBorder=t.leftMargin,r=!0),e.topMargin!==t.topMargin&&(this._tBorder=t.topMargin,r=!0),e.bottomMargin!==t.bottomMargin&&(this._bBorder=t.bottomMargin,r=!0),e.texture!==t.texture&&(r=!0),r&&this.setTexture(t.texture,this.getRuntimeScene()),e.tiled===t.tiled}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),op:this.getOpacity(),color:this.getColor()}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.op!==void 0&&this.setOpacity(e.op),e.color!==void 0&&this.setColor(e.color)}getRendererObject(){return this._renderer.getRendererObject()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}update(e){this._renderer.ensureUpToDate()}extraInitializationFromInitialInstance(e){e.customSize&&(this.setWidth(e.width),this.setHeight(e.height)),this.setOpacity(e.opacity===void 0?255:e.opacity)}setX(e){super.setX(e),this._renderer.updatePosition()}setY(e){super.setY(e),this._renderer.updatePosition()}setTexture(e,t){this._renderer.setTexture(e,t)}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width!==e&&(this._width=e,this._renderer.updateWidth(),this.invalidateHitboxes())}setHeight(e){this._height!==e&&(this._height=e,this._renderer.updateHeight(),this.invalidateHitboxes())}setSize(e,t){this.setWidth(e),this.setHeight(t)}getOriginalWidth(){return this._objectData.width}getOriginalHeight(){return this._objectData.height}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}setColor(e){this._renderer.setColor(e)}getColor(){return this._renderer.getColor()}getScale(){const e=Math.abs(this.getScaleX()),t=Math.abs(this.getScaleY());return e===t?e:Math.sqrt(e*t)}getScaleX(){return this._width/this._renderer.getTextureWidth()}getScaleY(){return this._height/this._renderer.getTextureHeight()}setScale(e){this.setWidth(this._renderer.getTextureWidth()*e),this.setHeight(this._renderer.getTextureHeight()*e)}setScaleX(e){this.setWidth(this._renderer.getTextureWidth()*e)}setScaleY(e){this.setHeight(this._renderer.getTextureHeight()*e)}}i.PanelSpriteRuntimeObject=s,i.registerObject("PanelSpriteObject::PanelSprite",i.PanelSpriteRuntimeObject)})(gdjs||(gdjs={})); var gdjs;(function(i){class s extends i.RuntimeObject{constructor(e,t,r){super(e,t,r);this.opacity=255;this._objectData=t,this._rBorder=t.rightMargin,this._lBorder=t.leftMargin,this._tBorder=t.topMargin,this._bBorder=t.bottomMargin,this._tiled=t.tiled,this._width=t.width,this._height=t.height,this._renderer=new i.PanelSpriteRuntimeObjectRenderer(this,e,t.texture,t.tiled),this.onCreated()}updateFromObjectData(e,t){this._objectData=t,e.width!==t.width&&this.setWidth(t.width),e.height!==t.height&&this.setHeight(t.height);let r=!1;return e.rightMargin!==t.rightMargin&&(this._rBorder=t.rightMargin,r=!0),e.leftMargin!==t.leftMargin&&(this._lBorder=t.leftMargin,r=!0),e.topMargin!==t.topMargin&&(this._tBorder=t.topMargin,r=!0),e.bottomMargin!==t.bottomMargin&&(this._bBorder=t.bottomMargin,r=!0),e.texture!==t.texture&&(r=!0),r&&this.setTexture(t.texture,this.getRuntimeScene()),e.tiled===t.tiled}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),op:this.getOpacity(),color:this.getColor()}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.op!==void 0&&this.setOpacity(e.op),e.color!==void 0&&this.setColor(e.color)}getRendererObject(){return this._renderer.getRendererObject()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}update(e){this._renderer.ensureUpToDate()}extraInitializationFromInitialInstance(e){e.customSize&&(this.setWidth(e.width),this.setHeight(e.height)),this.setOpacity(e.opacity===void 0?255:e.opacity)}setX(e){super.setX(e),this._renderer.updatePosition()}setY(e){super.setY(e),this._renderer.updatePosition()}setTexture(e,t){this._renderer.setTexture(e,t)}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width!==e&&(this._width=e,this._renderer.updateWidth(),this.invalidateHitboxes())}setHeight(e){this._height!==e&&(this._height=e,this._renderer.updateHeight(),this.invalidateHitboxes())}setSize(e,t){this.setWidth(e),this.setHeight(t)}getOriginalWidth(){return this._objectData.width}getOriginalHeight(){return this._objectData.height}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}setColor(e){this._renderer.setColor(e)}getColor(){return this._renderer.getColor()}getScale(){const e=Math.abs(this.getScaleX()),t=Math.abs(this.getScaleY());return e===t?e:Math.sqrt(e*t)}getScaleX(){return this._width/this._renderer.getTextureWidth()}getScaleY(){return this._height/this._renderer.getTextureHeight()}setScale(e){this.setWidth(this._renderer.getTextureWidth()*e),this.setHeight(this._renderer.getTextureHeight()*e)}setScaleX(e){this.setWidth(this._renderer.getTextureWidth()*e)}setScaleY(e){this.setHeight(this._renderer.getTextureHeight()*e)}}i.PanelSpriteRuntimeObject=s,i.registerObject("PanelSpriteObject::PanelSprite",i.PanelSpriteRuntimeObject)})(gdjs||(gdjs={}));
//# sourceMappingURL=panelspriteruntimeobject.js.map //# sourceMappingURL=panelspriteruntimeobject.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(s){class n{constructor(e){this._obstaclesRBush=new rbush}static getManager(e){return e.pathfindingObstaclesManager||(e.pathfindingObstaclesManager=new s.PathfindingObstaclesManager(e)),e.pathfindingObstaclesManager}addObstacle(e){e.currentRBushAABB?e.currentRBushAABB.updateAABBFromOwner():e.currentRBushAABB=new s.BehaviorRBushAABB(e),this._obstaclesRBush.insert(e.currentRBushAABB)}removeObstacle(e){this._obstaclesRBush.remove(e.currentRBushAABB)}getAllObstaclesAround(e,t,a,r){const i=s.staticObject(n.prototype.getAllObstaclesAround);i.minX=e-a,i.minY=t-a,i.maxX=e+a,i.maxY=t+a;const h=this._obstaclesRBush.search(i);r.length=0,h.forEach(o=>r.push(o.behavior))}}s.PathfindingObstaclesManager=n;class g extends s.RuntimeBehavior{constructor(e,t,a){super(e,t,a);this._oldX=0;this._oldY=0;this._oldWidth=0;this._oldHeight=0;this._registeredInManager=!1;this.currentRBushAABB=null;this._impassable=t.impassable,this._cost=t.cost,this._manager=n.getManager(e)}updateFromBehaviorData(e,t){return e.impassable!==t.impassable&&this.setImpassable(t.impassable),e.cost!==t.cost&&this.setCost(t.cost),!0}onDestroy(){this._manager&&this._registeredInManager&&this._manager.removeObstacle(this)}doStepPreEvents(e){!this.activated()&&this._registeredInManager?(this._manager.removeObstacle(this),this._registeredInManager=!1):this.activated()&&!this._registeredInManager&&(this._manager.addObstacle(this),this._registeredInManager=!0),(this._oldX!==this.owner.getX()||this._oldY!==this.owner.getY()||this._oldWidth!==this.owner.getWidth()||this._oldHeight!==this.owner.getHeight())&&(this._registeredInManager&&(this._manager.removeObstacle(this),this._manager.addObstacle(this)),this._oldX=this.owner.getX(),this._oldY=this.owner.getY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight())}doStepPostEvents(e){}getAABB(){return this.owner.getAABB()}onActivate(){this._registeredInManager||(this._manager.addObstacle(this),this._registeredInManager=!0)}onDeActivate(){!this._registeredInManager||(this._manager.removeObstacle(this),this._registeredInManager=!1)}getCost(){return this._cost}setCost(e){this._cost=e}isImpassable(){return this._impassable}setImpassable(e){this._impassable=e}}s.PathfindingObstacleRuntimeBehavior=g,s.registerBehavior("PathfindingBehavior::PathfindingObstacleBehavior",s.PathfindingObstacleRuntimeBehavior)})(gdjs||(gdjs={})); var gdjs;(function(t){class n{constructor(e){this._obstaclesRBush=new rbush}static getManager(e){return e.pathfindingObstaclesManager||(e.pathfindingObstaclesManager=new t.PathfindingObstaclesManager(e)),e.pathfindingObstaclesManager}addObstacle(e){e.currentRBushAABB?e.currentRBushAABB.updateAABBFromOwner():e.currentRBushAABB=new t.BehaviorRBushAABB(e),this._obstaclesRBush.insert(e.currentRBushAABB)}removeObstacle(e){this._obstaclesRBush.remove(e.currentRBushAABB)}getAllObstaclesAround(e,s,a,r){const i=t.staticObject(n.prototype.getAllObstaclesAround);i.minX=e-a,i.minY=s-a,i.maxX=e+a,i.maxY=s+a;const h=this._obstaclesRBush.search(i);r.length=0,h.forEach(o=>r.push(o.behavior))}}t.PathfindingObstaclesManager=n;class g extends t.RuntimeBehavior{constructor(e,s,a){super(e,s,a);this._oldX=0;this._oldY=0;this._oldWidth=0;this._oldHeight=0;this._registeredInManager=!1;this.currentRBushAABB=null;this._impassable=s.impassable,this._cost=s.cost,this._manager=n.getManager(e)}applyBehaviorOverriding(e){return e.impassable!==void 0&&this.setImpassable(e.impassable),e.cost!==void 0&&this.setCost(e.cost),!0}onDestroy(){this._manager&&this._registeredInManager&&this._manager.removeObstacle(this)}doStepPreEvents(e){!this.activated()&&this._registeredInManager?(this._manager.removeObstacle(this),this._registeredInManager=!1):this.activated()&&!this._registeredInManager&&(this._manager.addObstacle(this),this._registeredInManager=!0),(this._oldX!==this.owner.getX()||this._oldY!==this.owner.getY()||this._oldWidth!==this.owner.getWidth()||this._oldHeight!==this.owner.getHeight())&&(this._registeredInManager&&(this._manager.removeObstacle(this),this._manager.addObstacle(this)),this._oldX=this.owner.getX(),this._oldY=this.owner.getY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight())}doStepPostEvents(e){}getAABB(){return this.owner.getAABB()}onActivate(){this._registeredInManager||(this._manager.addObstacle(this),this._registeredInManager=!0)}onDeActivate(){!this._registeredInManager||(this._manager.removeObstacle(this),this._registeredInManager=!1)}getCost(){return this._cost}setCost(e){this._cost=e}isImpassable(){return this._impassable}setImpassable(e){this._impassable=e}}t.PathfindingObstacleRuntimeBehavior=g,t.registerBehavior("PathfindingBehavior::PathfindingObstacleBehavior",t.PathfindingObstacleRuntimeBehavior)})(gdjs||(gdjs={}));
//# sourceMappingURL=pathfindingobstacleruntimebehavior.js.map //# sourceMappingURL=pathfindingobstacleruntimebehavior.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(l){const p=new l.Logger("Pathfinding behavior");class f extends l.RuntimeBehavior{constructor(e,s,n){super(e,s,n);this._path=[];this._pathFound=!1;this._speed=0;this._angularSpeed=0;this._distanceOnSegment=0;this._totalSegmentDistance=0;this._currentSegment=0;this._reachedEnd=!1;this._movementAngle=0;this._path===void 0||(this._path.length=0),this._allowDiagonals=s.allowDiagonals,this._acceleration=s.acceleration,this._maxSpeed=s.maxSpeed,this._angularMaxSpeed=s.angularMaxSpeed,this._rotateObject=s.rotateObject,this._angleOffset=s.angleOffset,this._cellWidth=s.cellWidth,this._cellHeight=s.cellHeight,this._gridOffsetX=s.gridOffsetX||0,this._gridOffsetY=s.gridOffsetY||0,this._extraBorder=s.extraBorder,this._smoothingMaxCellGap=s.smoothingMaxCellGap||0,this._manager=l.PathfindingObstaclesManager.getManager(e),this._searchContext=new l.PathfindingRuntimeBehavior.SearchContext(this._manager)}updateFromBehaviorData(e,s){return e.allowDiagonals!==s.allowDiagonals&&this.allowDiagonals(s.allowDiagonals),e.acceleration!==s.acceleration&&this.setAcceleration(s.acceleration),e.maxSpeed!==s.maxSpeed&&this.setMaxSpeed(s.maxSpeed),e.angularMaxSpeed!==s.angularMaxSpeed&&this.setAngularMaxSpeed(s.angularMaxSpeed),e.rotateObject!==s.rotateObject&&this.setRotateObject(s.rotateObject),e.angleOffset!==s.angleOffset&&this.setAngleOffset(s.angleOffset),e.cellWidth!==s.cellWidth&&this.setCellWidth(s.cellWidth),e.cellHeight!==s.cellHeight&&this.setCellHeight(s.cellHeight),e.gridOffsetX!==s.gridOffsetX&&(this._gridOffsetX=s.gridOffsetX),e.gridOffsetY!==s.gridOffsetY&&(this._gridOffsetY=s.gridOffsetY),e.extraBorder!==s.extraBorder&&this.setExtraBorder(s.extraBorder),e.smoothingMaxCellGap!==s.smoothingMaxCellGap&&(this._smoothingMaxCellGap=s.smoothingMaxCellGap),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),props:{path:this._path,pf:this._pathFound,sp:this._speed,as:this._angularSpeed,cs:this._currentSegment,tss:this._totalSegmentDistance,re:this._reachedEnd,ma:this._movementAngle,dos:this._distanceOnSegment}}}updateFromNetworkSyncData(e,s){super.updateFromNetworkSyncData(e,s);const n=e.props;n.path!==void 0&&(this._path=n.path),n.pf!==void 0&&(this._pathFound=n.pf),n.sp!==void 0&&(this._speed=n.sp),n.as!==void 0&&(this._angularSpeed=n.as),n.cs!==void 0&&n.cs!==this._currentSegment&&(this._currentSegment=n.cs),n.tss!==void 0&&(this._totalSegmentDistance=n.tss),n.re!==void 0&&(this._reachedEnd=n.re),n.ma!==void 0&&(this._movementAngle=n.ma),n.dos!==void 0&&(this._distanceOnSegment=n.dos)}setCellWidth(e){this._cellWidth=e}getCellWidth(){return this._cellWidth}setCellHeight(e){this._cellHeight=e}getCellHeight(){return this._cellHeight}setGridOffsetX(e){this._gridOffsetX=e}getGridOffsetX(){return this._gridOffsetX}setGridOffsetY(e){this._gridOffsetY=e}getGridOffsetY(){return this._gridOffsetY}setAcceleration(e){this._acceleration=e}getAcceleration(){return this._acceleration}setMaxSpeed(e){this._maxSpeed=e}getMaxSpeed(){return this._maxSpeed}setSpeed(e){this._speed=e}getSpeed(){return this._speed}getMovementAngle(){return this._movementAngle}movementAngleIsAround(e,s){return Math.abs(l.evtTools.common.angleDifference(this._movementAngle,e))<=s}setAngularMaxSpeed(e){this._angularMaxSpeed=e}getAngularMaxSpeed(){return this._angularMaxSpeed}setAngleOffset(e){this._angleOffset=e}getAngleOffset(){return this._angleOffset}setExtraBorder(e){this._extraBorder=e}getExtraBorder(){return this._extraBorder}allowDiagonals(e){this._allowDiagonals=e}diagonalsAllowed(){return this._allowDiagonals}setRotateObject(e){this._rotateObject=e}isObjectRotated(){return this._rotateObject}getNodeX(e){return e<this._path.length?this._path[e][0]:0}getNodeY(e){return e<this._path.length?this._path[e][1]:0}getNextNodeIndex(){return this._currentSegment+1<this._path.length?this._currentSegment+1:this._path.length-1}getNodeCount(){return this._path.length}getNextNodeX(){return this._path.length===0?0:this._currentSegment+1<this._path.length?this._path[this._currentSegment+1][0]:this._path[this._path.length-1][0]}getNextNodeY(){return this._path.length===0?0:this._currentSegment+1<this._path.length?this._path[this._currentSegment+1][1]:this._path[this._path.length-1][1]}getLastNodeX(){return this._path.length<2?0:this._currentSegment<this._path.length-1?this._path[this._currentSegment][0]:this._path[this._path.length-1][0]}getLastNodeY(){return this._path.length<2?0:this._currentSegment<this._path.length-1?this._path[this._currentSegment][1]:this._path[this._path.length-1][1]}getDestinationX(){return this._path.length===0?0:this._path[this._path.length-1][0]}getDestinationY(){return this._path.length===0?0:this._path[this._path.length-1][1]}pathFound(){return this._pathFound}destinationReached(){return this._reachedEnd}moveTo(e,s,n){const t=this.owner,i=Math.round((s-this._gridOffsetX)/this._cellWidth),h=Math.round((n-this._gridOffsetY)/this._cellHeight),r=Math.round((t.getX()-this._gridOffsetX)/this._cellWidth),a=Math.round((t.getY()Line truncated var gdjs;(function(l){const p=new l.Logger("Pathfinding behavior");class f extends l.RuntimeBehavior{constructor(e,s,n){super(e,s,n);this._path=[];this._pathFound=!1;this._speed=0;this._angularSpeed=0;this._distanceOnSegment=0;this._totalSegmentDistance=0;this._currentSegment=0;this._reachedEnd=!1;this._movementAngle=0;this._path===void 0||(this._path.length=0),this._allowDiagonals=s.allowDiagonals,this._acceleration=s.acceleration,this._maxSpeed=s.maxSpeed,this._angularMaxSpeed=s.angularMaxSpeed,this._rotateObject=s.rotateObject,this._angleOffset=s.angleOffset,this._cellWidth=s.cellWidth,this._cellHeight=s.cellHeight,this._gridOffsetX=s.gridOffsetX||0,this._gridOffsetY=s.gridOffsetY||0,this._extraBorder=s.extraBorder,this._smoothingMaxCellGap=s.smoothingMaxCellGap||0,this._manager=l.PathfindingObstaclesManager.getManager(e),this._searchContext=new l.PathfindingRuntimeBehavior.SearchContext(this._manager)}applyBehaviorOverriding(e){return e.allowDiagonals!==void 0&&this.allowDiagonals(e.allowDiagonals),e.acceleration!==void 0&&this.setAcceleration(e.acceleration),e.maxSpeed!==void 0&&this.setMaxSpeed(e.maxSpeed),e.angularMaxSpeed!==void 0&&this.setAngularMaxSpeed(e.angularMaxSpeed),e.rotateObject!==void 0&&this.setRotateObject(e.rotateObject),e.angleOffset!==void 0&&this.setAngleOffset(e.angleOffset),e.cellWidth!==void 0&&this.setCellWidth(e.cellWidth),e.cellHeight!==void 0&&this.setCellHeight(e.cellHeight),e.gridOffsetX!==void 0&&(this._gridOffsetX=e.gridOffsetX),e.gridOffsetY!==void 0&&(this._gridOffsetY=e.gridOffsetY),e.extraBorder!==void 0&&this.setExtraBorder(e.extraBorder),e.smoothingMaxCellGap!==void 0&&(this._smoothingMaxCellGap=e.smoothingMaxCellGap),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),props:{path:this._path,pf:this._pathFound,sp:this._speed,as:this._angularSpeed,cs:this._currentSegment,tss:this._totalSegmentDistance,re:this._reachedEnd,ma:this._movementAngle,dos:this._distanceOnSegment}}}updateFromNetworkSyncData(e,s){super.updateFromNetworkSyncData(e,s);const n=e.props;n.path!==void 0&&(this._path=n.path),n.pf!==void 0&&(this._pathFound=n.pf),n.sp!==void 0&&(this._speed=n.sp),n.as!==void 0&&(this._angularSpeed=n.as),n.cs!==void 0&&n.cs!==this._currentSegment&&(this._currentSegment=n.cs),n.tss!==void 0&&(this._totalSegmentDistance=n.tss),n.re!==void 0&&(this._reachedEnd=n.re),n.ma!==void 0&&(this._movementAngle=n.ma),n.dos!==void 0&&(this._distanceOnSegment=n.dos)}setCellWidth(e){this._cellWidth=e}getCellWidth(){return this._cellWidth}setCellHeight(e){this._cellHeight=e}getCellHeight(){return this._cellHeight}setGridOffsetX(e){this._gridOffsetX=e}getGridOffsetX(){return this._gridOffsetX}setGridOffsetY(e){this._gridOffsetY=e}getGridOffsetY(){return this._gridOffsetY}setAcceleration(e){this._acceleration=e}getAcceleration(){return this._acceleration}setMaxSpeed(e){this._maxSpeed=e}getMaxSpeed(){return this._maxSpeed}setSpeed(e){this._speed=e}getSpeed(){return this._speed}getMovementAngle(){return this._movementAngle}movementAngleIsAround(e,s){return Math.abs(l.evtTools.common.angleDifference(this._movementAngle,e))<=s}setAngularMaxSpeed(e){this._angularMaxSpeed=e}getAngularMaxSpeed(){return this._angularMaxSpeed}setAngleOffset(e){this._angleOffset=e}getAngleOffset(){return this._angleOffset}setExtraBorder(e){this._extraBorder=e}getExtraBorder(){return this._extraBorder}allowDiagonals(e){this._allowDiagonals=e}diagonalsAllowed(){return this._allowDiagonals}setRotateObject(e){this._rotateObject=e}isObjectRotated(){return this._rotateObject}getNodeX(e){return e<this._path.length?this._path[e][0]:0}getNodeY(e){return e<this._path.length?this._path[e][1]:0}getNextNodeIndex(){return this._currentSegment+1<this._path.length?this._currentSegment+1:this._path.length-1}getNodeCount(){return this._path.length}getNextNodeX(){return this._path.length===0?0:this._currentSegment+1<this._path.length?this._path[this._currentSegment+1][0]:this._path[this._path.length-1][0]}getNextNodeY(){return this._path.length===0?0:this._currentSegment+1<this._path.length?this._path[this._currentSegment+1][1]:this._path[this._path.length-1][1]}getLastNodeX(){return this._path.length<2?0:this._currentSegment<this._path.length-1?this._path[this._currentSegment][0]:this._path[this._path.length-1][0]}getLastNodeY(){return this._path.length<2?0:this._currentSegment<this._path.length-1?this._path[this._currentSegment][1]:this._path[this._path.length-1][1]}getDestinationX(){return this._path.length===0?0:this._path[this._path.length-1][0]}getDestinationY(){return this._path.length===0?0:this._path[this._path.length-1][1]}pathFound(){return this._pathFound}destinationReached(){return this._reachedEnd}moveTo(e,s,n){const t=this.owner,i=Math.round((s-this._gridOffsetX)/this._cellWidth),h=Math.round((n-this._gridOffsetY)/this._cellHeight),r=Math.round((t.getX()-this._gridOffsetX)/this._cellWidth),a=Math.round((t.getY()-this._gridOffsetY)/this._cellHeight);if(r==i&&a==h){this._path.length=0,this._path.push([t.getXLine truncated
//# sourceMappingURL=pathfindingruntimebehavior.js.map //# sourceMappingURL=pathfindingruntimebehavior.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(l){class S{constructor(e,t){this.frameTime=0;this.stepped=!1;this.timeScale=1;this._nextJointId=1;this.joints={};this._tempb2Vec2=new Box2D.b2Vec2(0,0);this._tempb2Vec2Sec=new Box2D.b2Vec2(0,0);this._registeredBehaviors=new Set,this.gravityX=t.gravityX,this.gravityY=t.gravityY,this.scaleX=t.scaleX||100,this.scaleY=t.scaleY||100,this.invScaleX=1/this.scaleX,this.invScaleY=1/this.scaleY,this.worldScale=t.worldScale||Math.sqrt(this.scaleX*this.scaleY),this.worldInvScale=1/this.worldScale,this.timeStep=1/60,this.world=new Box2D.b2World(this.b2Vec2(this.gravityX,this.gravityY)),this.world.SetAutoClearForces(!1),this.staticBody=this.world.CreateBody(new Box2D.b2BodyDef),this.contactListener=new Box2D.JSContactListener,this.contactListener.BeginContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactBegin(n),n.onContactBegin(s))},this.contactListener.EndContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const s=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,n=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!s||!n||(s.onContactEnd(n),n.onContactEnd(s))},this.contactListener.PreSolve=function(){},this.contactListener.PostSolve=function(){},this.world.SetContactListener(this.contactListener)}b2Vec2(e,t){const i=this._tempb2Vec2;return i.set_x(e),i.set_y(t),i}static getSharedData(e,t){if(!e.physics2SharedData){const i=e.getInitialSharedDataForBehavior(t);e.physics2SharedData=new l.Physics2SharedData(e,i)}return e.physics2SharedData}addToBehaviorsList(e){this._registeredBehaviors.add(e)}removeFromBehaviorsList(e){this._registeredBehaviors.delete(e)}step(e){for(const i of this._registeredBehaviors)i.contactsStartedThisFrame.length=0,i.contactsEndedThisFrame.length=0;for(const i of this._registeredBehaviors)i.updateBodyFromObject();this.frameTime+=e;let t=Math.max(0,Math.round(this.frameTime/this.timeStep));this.frameTime-=t*this.timeStep,t>5&&(t=5);for(let i=0;i<t;i++)this.world.Step(this.timeStep*this.timeScale,8,10);this.world.ClearForces(),this.stepped=!0;for(const i of this._registeredBehaviors)i.updateObjectFromBody()}clearBodyJoints(e){for(const t in this.joints)this.joints.hasOwnProperty(t)&&(this.joints[t].GetBodyA()===e||this.joints[t].GetBodyB()===e)&&this.removeJoint(t)}addJoint(e){return this.joints[this._nextJointId.toString(10)]=e,this._nextJointId++}getJoint(e){return e=e.toString(10),this.joints.hasOwnProperty(e)?this.joints[e]:null}getJointId(e){for(const t in this.joints)if(this.joints.hasOwnProperty(t)&&this.joints[t]===e)return parseInt(t,10);return 0}removeJoint(e){if(e=e.toString(10),this.joints.hasOwnProperty(e)){const t=this.joints[e];if(t.GetType()===Box2D.e_revoluteJoint||t.GetType()===Box2D.e_prismaticJoint)for(const i in this.joints)this.joints.hasOwnProperty(i)&&this.joints[i].GetType()===Box2D.e_gearJoint&&(Box2D.getPointer(this.joints[i].GetJoint1())===Box2D.getPointer(t)||Box2D.getPointer(this.joints[i].GetJoint2())===Box2D.getPointer(t))&&this.removeJoint(parseInt(i,10));this.world.DestroyJoint(t),delete this.joints[e]}}}l.Physics2SharedData=S,l.registerRuntimeSceneUnloadedCallback(function(x){const e=x.physics2SharedData;e&&e.world&&(Box2D.destroy(e.world),Box2D.destroy(e._tempb2Vec2),Box2D.destroy(e._tempb2Vec2Sec))});const B=class extends l.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this.shapeScale=1;this._body=null;this._objectOldX=0;this._objectOldY=0;this._objectOldAngle=0;this._objectOldWidth=0;this._objectOldHeight=0;this._verticesBuffer=0;this.bodyType=t.bodyType,this.bullet=t.bullet,this.fixedRotation=t.fixedRotation,this.canSleep=t.canSleep,this.shape=t.shape,this.shapeDimensionA=t.shapeDimensionA,this.shapeDimensionB=t.shapeDimensionB,this.shapeOffsetX=t.shapeOffsetX,this.shapeOffsetY=t.shapeOffsetY,this.polygonOrigin=t.polygonOrigin,this.polygon=this.shape==="Polygon"?B.getPolygon(t.vertices):null,this.density=t.density,this.friction=t.friction,this.restitution=t.restitution,this.linearDamping=Math.max(0,t.linearDamping),this.angularDamping=Math.max(0,t.angularDamping),this.gravityScale=t.gravityScale,this.layers=t.layers,this.masks=t.masks,this.contactsStartedThisFrame=[],this.contactsEndedThisFrame=[],this.currentContacts=[],this.currentContacts.length=0,this.destroyedDuringFrameLogic=!1,this._sharedData=S.getSharedData(e.getScene(),t.name),this._sharedData.addToBehaviorsList(this)}b2Vec2(e,t){const i=this._sharedData._tempb2Vec2;return i.set_x(e),i.set_y(t),i}b2Vec2Sec(e,t){const i=this._sharedData._tempb2Vec2Sec;return i.set_x(e),i.set_y(t),i}updateFromBehaviorData(e,t){return e.bullet!==t.bullet&&this.setBullet(t.bullet),e.fixedRotation!==t.fixedRotation&&this.setFixedRotation(t.fixedRotation),e.canSleep!==t.canSleep&&this.setSleepingAllowed(tLine truncated var gdjs;(function(l){class S{constructor(e,t){this.frameTime=0;this.stepped=!1;this.timeScale=1;this._nextJointId=1;this.joints={};this._tempb2Vec2=new Box2D.b2Vec2(0,0);this._tempb2Vec2Sec=new Box2D.b2Vec2(0,0);this._registeredBehaviors=new Set,this.gravityX=t.gravityX,this.gravityY=t.gravityY,this.scaleX=t.scaleX||100,this.scaleY=t.scaleY||100,this.invScaleX=1/this.scaleX,this.invScaleY=1/this.scaleY,this.worldScale=t.worldScale||Math.sqrt(this.scaleX*this.scaleY),this.worldInvScale=1/this.worldScale,this.timeStep=1/60,this.world=new Box2D.b2World(this.b2Vec2(this.gravityX,this.gravityY)),this.world.SetAutoClearForces(!1),this.staticBody=this.world.CreateBody(new Box2D.b2BodyDef),this.contactListener=new Box2D.JSContactListener,this.contactListener.BeginContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const n=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,s=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!n||!s||(n.onContactBegin(s),s.onContactBegin(n))},this.contactListener.EndContact=function(i){const o=Box2D.wrapPointer(i,Box2D.b2Contact);if(o.GetFixtureA().GetBody()===null||o.GetFixtureB().GetBody()===null)return;const n=o.GetFixtureA().GetBody().gdjsAssociatedBehavior,s=o.GetFixtureB().GetBody().gdjsAssociatedBehavior;!n||!s||(n.onContactEnd(s),s.onContactEnd(n))},this.contactListener.PreSolve=function(){},this.contactListener.PostSolve=function(){},this.world.SetContactListener(this.contactListener)}b2Vec2(e,t){const i=this._tempb2Vec2;return i.set_x(e),i.set_y(t),i}static getSharedData(e,t){if(!e.physics2SharedData){const i=e.getInitialSharedDataForBehavior(t);e.physics2SharedData=new l.Physics2SharedData(e,i)}return e.physics2SharedData}addToBehaviorsList(e){this._registeredBehaviors.add(e)}removeFromBehaviorsList(e){this._registeredBehaviors.delete(e)}step(e){for(const i of this._registeredBehaviors)i.contactsStartedThisFrame.length=0,i.contactsEndedThisFrame.length=0;for(const i of this._registeredBehaviors)i.updateBodyFromObject();this.frameTime+=e;let t=Math.max(0,Math.round(this.frameTime/this.timeStep));this.frameTime-=t*this.timeStep,t>5&&(t=5);for(let i=0;i<t;i++)this.world.Step(this.timeStep*this.timeScale,8,10);this.world.ClearForces(),this.stepped=!0;for(const i of this._registeredBehaviors)i.updateObjectFromBody()}clearBodyJoints(e){for(const t in this.joints)this.joints.hasOwnProperty(t)&&(this.joints[t].GetBodyA()===e||this.joints[t].GetBodyB()===e)&&this.removeJoint(t)}addJoint(e){return this.joints[this._nextJointId.toString(10)]=e,this._nextJointId++}getJoint(e){return e=e.toString(10),this.joints.hasOwnProperty(e)?this.joints[e]:null}getJointId(e){for(const t in this.joints)if(this.joints.hasOwnProperty(t)&&this.joints[t]===e)return parseInt(t,10);return 0}removeJoint(e){if(e=e.toString(10),this.joints.hasOwnProperty(e)){const t=this.joints[e];if(t.GetType()===Box2D.e_revoluteJoint||t.GetType()===Box2D.e_prismaticJoint)for(const i in this.joints)this.joints.hasOwnProperty(i)&&this.joints[i].GetType()===Box2D.e_gearJoint&&(Box2D.getPointer(this.joints[i].GetJoint1())===Box2D.getPointer(t)||Box2D.getPointer(this.joints[i].GetJoint2())===Box2D.getPointer(t))&&this.removeJoint(parseInt(i,10));this.world.DestroyJoint(t),delete this.joints[e]}}}l.Physics2SharedData=S,l.registerRuntimeSceneUnloadedCallback(function(x){const e=x.physics2SharedData;e&&e.world&&(Box2D.destroy(e.world),Box2D.destroy(e._tempb2Vec2),Box2D.destroy(e._tempb2Vec2Sec))});const B=class extends l.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this.shapeScale=1;this._body=null;this._objectOldX=0;this._objectOldY=0;this._objectOldAngle=0;this._objectOldWidth=0;this._objectOldHeight=0;this._verticesBuffer=0;this.bodyType=t.bodyType,this.bullet=t.bullet,this.fixedRotation=t.fixedRotation,this.canSleep=t.canSleep,this.shape=t.shape,this.shapeDimensionA=t.shapeDimensionA,this.shapeDimensionB=t.shapeDimensionB,this.shapeOffsetX=t.shapeOffsetX,this.shapeOffsetY=t.shapeOffsetY,this.polygonOrigin=t.polygonOrigin,this.polygon=this.shape==="Polygon"?B.getPolygon(t.vertices):null,this.density=t.density,this.friction=t.friction,this.restitution=t.restitution,this.linearDamping=Math.max(0,t.linearDamping),this.angularDamping=Math.max(0,t.angularDamping),this.gravityScale=t.gravityScale,this.layers=t.layers,this.masks=t.masks,this.contactsStartedThisFrame=[],this.contactsEndedThisFrame=[],this.currentContacts=[],this.currentContacts.length=0,this.destroyedDuringFrameLogic=!1,this._sharedData=S.getSharedData(e.getScene(),t.name),this._sharedData.addToBehaviorsList(this)}b2Vec2(e,t){const i=this._sharedData._tempb2Vec2;return i.set_x(e),i.set_y(t),i}b2Vec2Sec(e,t){const i=this._sharedData._tempb2Vec2Sec;return i.set_x(e),i.set_y(t),i}applyBehaviorOverriding(e){return e.bullet!==void 0&&this.setBullet(e.bullet),e.fixedRotation!==void 0&&this.setFixedRotation(e.fixedRotation),e.canSleep!==void 0&&this.setSleepingAllowed(e.canSleep),e.shaLine truncated
//# sourceMappingURL=physics2runtimebehavior.js.map //# sourceMappingURL=physics2runtimebehavior.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(n){const g=class extends n.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this._ignoreTouchingEdges=!0;this._slopeClimbingFactor=1;this._canGoDownFromJumpthru=!1;this._currentSpeed=0;this._requestedDeltaX=0;this._requestedDeltaY=0;this._lastDeltaY=0;this._currentFallSpeed=0;this._canJump=!1;this._lastDirectionIsLeft=!1;this._leftKey=!1;this._rightKey=!1;this._ladderKey=!1;this._upKey=!1;this._downKey=!1;this._jumpKey=!1;this._jumpKeyHeldSinceJumpStart=!1;this._releasePlatformKey=!1;this._releaseLadderKey=!1;this._clearInputsBetweenFrames=!0;this._ignoreDefaultControlsAsSyncedByNetwork=!1;this._wasLeftKeyPressed=!1;this._wasRightKeyPressed=!1;this._wasLadderKeyPressed=!1;this._wasUpKeyPressed=!1;this._wasDownKeyPressed=!1;this._wasJumpKeyPressed=!1;this._wasReleasePlatformKeyPressed=!1;this._wasReleaseLadderKeyPressed=!1;this._hasReallyMoved=!1;this._hasMovedAtLeastOnePixel=!1;this._gravity=t.gravity,this._maxFallingSpeed=t.maxFallingSpeed,this._ladderClimbingSpeed=t.ladderClimbingSpeed||150,this._acceleration=t.acceleration,this._deceleration=t.deceleration,this._maxSpeed=t.maxSpeed,this._jumpSpeed=t.jumpSpeed,this._canGrabPlatforms=t.canGrabPlatforms||!1,this._canGrabWithoutMoving=t.canGrabWithoutMoving,this._yGrabOffset=t.yGrabOffset||0,this._xGrabTolerance=t.xGrabTolerance||10,this._jumpSustainTime=t.jumpSustainTime||0,this._ignoreDefaultControls=t.ignoreDefaultControls,this._useLegacyTrajectory=t.useLegacyTrajectory===void 0?!0:t.useLegacyTrajectory,this._useRepeatedJump=t.useRepeatedJump===void 0?!0:t.useRepeatedJump,this._canGoDownFromJumpthru=t.canGoDownFromJumpthru,this._slopeMaxAngle=0,this.setSlopeMaxAngle(t.slopeMaxAngle),this._potentialCollidingObjects=[],this._overlappedJumpThru=[],this._manager=n.PlatformObjectsManager.getManager(e),this._falling=new w(this),this._onFloor=new v(this),this._jumping=new j(this),this._grabbingPlatform=new F(this),this._onLadder=new M(this),this._state=this._falling}getNetworkSyncData(e){return this._clearInputsBetweenFrames=!0,this._ignoreDefaultControlsAsSyncedByNetwork=!1,{...super.getNetworkSyncData(e),props:{cs:this._currentSpeed,rdx:this._requestedDeltaX,rdy:this._requestedDeltaY,ldy:this._lastDeltaY,cfs:this._currentFallSpeed,cj:this._canJump,ldl:this._lastDirectionIsLeft,lek:this._wasLeftKeyPressed,rik:this._wasRightKeyPressed,lak:this._wasLadderKeyPressed,upk:this._wasUpKeyPressed,dok:this._wasDownKeyPressed,juk:this._wasJumpKeyPressed,rpk:this._wasReleasePlatformKeyPressed,rlk:this._wasReleaseLadderKeyPressed,jkhsjs:this._jumpKeyHeldSinceJumpStart,sn:this._state.toString(),ssd:this._state.getNetworkSyncData()}}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t);const i=e.props;switch(i.sn){case"Falling":i.sn!==this._state.toString()&&this._setFalling(),this._falling.updateFromNetworkSyncData(i.ssd);break;case"OnFloor":this._onFloor.updateFromNetworkSyncData(i.ssd);break;case"Jumping":i.sn!==this._state.toString()&&this._setJumping(),this._jumping.updateFromNetworkSyncData(i.ssd);break;case"GrabbingPlatform":this._grabbingPlatform.updateFromNetworkSyncData(i.ssd);break;case"OnLadder":i.sn!==this._state.toString()&&this._setOnLadder(),this._onLadder.updateFromNetworkSyncData(i.ssd);break;default:console.error("Unknown state name: "+i.sn+".");break}i.cs!==this._currentSpeed&&(this._currentSpeed=i.cs),i.rdx!==this._requestedDeltaX&&(this._requestedDeltaX=i.rdx),i.rdy!==this._requestedDeltaY&&(this._requestedDeltaY=i.rdy),i.ldy!==this._lastDeltaY&&(this._lastDeltaY=i.ldy),i.cfs!==this._currentFallSpeed&&(this._currentFallSpeed=i.cfs),i.cj!==this._canJump&&(this._canJump=i.cj),i.ldl!==this._lastDirectionIsLeft&&(this._lastDirectionIsLeft=i.ldl),i.lek!==this._leftKey&&(this._leftKey=i.lek),i.rik!==this._rightKey&&(this._rightKey=i.rik),i.lak!==this._ladderKey&&(this._ladderKey=i.lak),i.upk!==this._upKey&&(this._upKey=i.upk),i.dok!==this._downKey&&(this._downKey=i.dok),i.juk!==this._jumpKey&&(this._jumpKey=i.juk),i.rpk!==this._releasePlatformKey&&(this._releasePlatformKey=i.rpk),i.rlk!==this._releaseLadderKey&&(this._releaseLadderKey=i.rlk),i.jkhsjs!==this._jumpKeyHeldSinceJumpStart&&(this._jumpKeyHeldSinceJumpStart=i.jkhsjs),this._clearInputsBetweenFrames=!!t.clearInputs,this._ignoreDefaultControlsAsSyncedByNetwork=!t.keepControl}updateFromBehaviorData(e,t){return e.gravity!==t.gravity&&this.setGravity(t.gravity),e.maxFallingSpeed!==t.maxFallingSpeed&&this.setMaxFallingSpeed(t.maxFallingSpeed),e.acceleration!==t.acceleration&&this.setAcceleration(t.acceleration),e.deceleration!==t.deceleration&&this.setDeceleration(t.deceleration),e.maxSpeed!==t.maxSpeed&&this.setMaxSpeed(t.maxSpeed),e.jumpSpeed!==t.jumpSpeed&&this.setJumpSpeed(t.jumpSpeed),e.canGrabPlatforms!==t.canGrabPlatforms&&this.setCanGrabPlatforms(t.canGrabPlatforms),e.canGrabWithoutMoving!==t.canGrabWithoutMoving&&(this._canGrabWithoutMoving=t.canGrabWithoutMoving),e.yGrabOffset!==t.yGrabOffset&&(this._yGrabOffset=t.yGrabOffset),e.xGrabTolerance!==t.xGrabTolerance&Line truncated var gdjs;(function(l){const g=class extends l.RuntimeBehavior{constructor(e,t,i){super(e,t,i);this._ignoreTouchingEdges=!0;this._slopeClimbingFactor=1;this._canGoDownFromJumpthru=!1;this._currentSpeed=0;this._requestedDeltaX=0;this._requestedDeltaY=0;this._lastDeltaY=0;this._currentFallSpeed=0;this._canJump=!1;this._lastDirectionIsLeft=!1;this._leftKey=!1;this._rightKey=!1;this._ladderKey=!1;this._upKey=!1;this._downKey=!1;this._jumpKey=!1;this._jumpKeyHeldSinceJumpStart=!1;this._releasePlatformKey=!1;this._releaseLadderKey=!1;this._clearInputsBetweenFrames=!0;this._ignoreDefaultControlsAsSyncedByNetwork=!1;this._wasLeftKeyPressed=!1;this._wasRightKeyPressed=!1;this._wasLadderKeyPressed=!1;this._wasUpKeyPressed=!1;this._wasDownKeyPressed=!1;this._wasJumpKeyPressed=!1;this._wasReleasePlatformKeyPressed=!1;this._wasReleaseLadderKeyPressed=!1;this._hasReallyMoved=!1;this._hasMovedAtLeastOnePixel=!1;this._gravity=t.gravity,this._maxFallingSpeed=t.maxFallingSpeed,this._ladderClimbingSpeed=t.ladderClimbingSpeed||150,this._acceleration=t.acceleration,this._deceleration=t.deceleration,this._maxSpeed=t.maxSpeed,this._jumpSpeed=t.jumpSpeed,this._canGrabPlatforms=t.canGrabPlatforms||!1,this._canGrabWithoutMoving=t.canGrabWithoutMoving,this._yGrabOffset=t.yGrabOffset||0,this._xGrabTolerance=t.xGrabTolerance||10,this._jumpSustainTime=t.jumpSustainTime||0,this._ignoreDefaultControls=t.ignoreDefaultControls,this._useLegacyTrajectory=t.useLegacyTrajectory===void 0?!0:t.useLegacyTrajectory,this._useRepeatedJump=t.useRepeatedJump===void 0?!0:t.useRepeatedJump,this._canGoDownFromJumpthru=t.canGoDownFromJumpthru,this._slopeMaxAngle=0,this.setSlopeMaxAngle(t.slopeMaxAngle),this._potentialCollidingObjects=[],this._overlappedJumpThru=[],this._manager=l.PlatformObjectsManager.getManager(e),this._falling=new w(this),this._onFloor=new v(this),this._jumping=new j(this),this._grabbingPlatform=new F(this),this._onLadder=new M(this),this._state=this._falling}getNetworkSyncData(e){return this._clearInputsBetweenFrames=!0,this._ignoreDefaultControlsAsSyncedByNetwork=!1,{...super.getNetworkSyncData(e),props:{cs:this._currentSpeed,rdx:this._requestedDeltaX,rdy:this._requestedDeltaY,ldy:this._lastDeltaY,cfs:this._currentFallSpeed,cj:this._canJump,ldl:this._lastDirectionIsLeft,lek:this._wasLeftKeyPressed,rik:this._wasRightKeyPressed,lak:this._wasLadderKeyPressed,upk:this._wasUpKeyPressed,dok:this._wasDownKeyPressed,juk:this._wasJumpKeyPressed,rpk:this._wasReleasePlatformKeyPressed,rlk:this._wasReleaseLadderKeyPressed,jkhsjs:this._jumpKeyHeldSinceJumpStart,sn:this._state.toString(),ssd:this._state.getNetworkSyncData()}}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t);const i=e.props;switch(i.sn){case"Falling":i.sn!==this._state.toString()&&this._setFalling(),this._falling.updateFromNetworkSyncData(i.ssd);break;case"OnFloor":this._onFloor.updateFromNetworkSyncData(i.ssd);break;case"Jumping":i.sn!==this._state.toString()&&this._setJumping(),this._jumping.updateFromNetworkSyncData(i.ssd);break;case"GrabbingPlatform":this._grabbingPlatform.updateFromNetworkSyncData(i.ssd);break;case"OnLadder":i.sn!==this._state.toString()&&this._setOnLadder(),this._onLadder.updateFromNetworkSyncData(i.ssd);break;default:console.error("Unknown state name: "+i.sn+".");break}i.cs!==this._currentSpeed&&(this._currentSpeed=i.cs),i.rdx!==this._requestedDeltaX&&(this._requestedDeltaX=i.rdx),i.rdy!==this._requestedDeltaY&&(this._requestedDeltaY=i.rdy),i.ldy!==this._lastDeltaY&&(this._lastDeltaY=i.ldy),i.cfs!==this._currentFallSpeed&&(this._currentFallSpeed=i.cfs),i.cj!==this._canJump&&(this._canJump=i.cj),i.ldl!==this._lastDirectionIsLeft&&(this._lastDirectionIsLeft=i.ldl),i.lek!==this._leftKey&&(this._leftKey=i.lek),i.rik!==this._rightKey&&(this._rightKey=i.rik),i.lak!==this._ladderKey&&(this._ladderKey=i.lak),i.upk!==this._upKey&&(this._upKey=i.upk),i.dok!==this._downKey&&(this._downKey=i.dok),i.juk!==this._jumpKey&&(this._jumpKey=i.juk),i.rpk!==this._releasePlatformKey&&(this._releasePlatformKey=i.rpk),i.rlk!==this._releaseLadderKey&&(this._releaseLadderKey=i.rlk),i.jkhsjs!==this._jumpKeyHeldSinceJumpStart&&(this._jumpKeyHeldSinceJumpStart=i.jkhsjs),this._clearInputsBetweenFrames=!!t.clearInputs,this._ignoreDefaultControlsAsSyncedByNetwork=!t.keepControl}applyBehaviorOverriding(e){return e.gravity!==void 0&&this.setGravity(e.gravity),e.maxFallingSpeed!==void 0&&this.setMaxFallingSpeed(e.maxFallingSpeed),e.acceleration!==void 0&&this.setAcceleration(e.acceleration),e.deceleration!==void 0&&this.setDeceleration(e.deceleration),e.maxSpeed!==void 0&&this.setMaxSpeed(e.maxSpeed),e.jumpSpeed!==void 0&&this.setJumpSpeed(e.jumpSpeed),e.canGrabPlatforms!==void 0&&this.setCanGrabPlatforms(e.canGrabPlatforms),e.canGrabWithoutMoving!==void 0&&(this._canGrabWithoutMoving=e.canGrabWithoutMoving),e.yGrabOffset!==void 0&&(this._yGrabOffset=e.yGrabOffset),e.xGrabTolerance!==void 0&&(this._xGrabTolerance=e.xGrabTolerance),e.jumpSustainTime!==void 0&&this.setJumpSustLine truncated
//# sourceMappingURL=platformerobjectruntimebehavior.js.map //# sourceMappingURL=platformerobjectruntimebehavior.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(s){class l{constructor(e){this._platformRBush=new rbush}static getManager(e){return e.platformsObjectsManager||(e.platformsObjectsManager=new s.PlatformObjectsManager(e)),e.platformsObjectsManager}addPlatform(e){e.currentRBushAABB?e.currentRBushAABB.updateAABBFromOwner():e.currentRBushAABB=new s.BehaviorRBushAABB(e),this._platformRBush.insert(e.currentRBushAABB)}removePlatform(e){this._platformRBush.remove(e.currentRBushAABB)}getAllPlatformsAround(e,t,n){const o=e.getWidth(),f=e.getHeight(),d=e.getDrawableX()+e.getCenterX(),m=e.getDrawableY()+e.getCenterY(),a=s.staticObject(l.prototype.getAllPlatformsAround);a.minX=d-o/2-t,a.minY=m-f/2-t,a.maxX=d+o/2+t,a.maxY=m+f/2+t;const c=this._platformRBush.search(a);n.length=0;for(let g=0;g<c.length;g++){const u=c[g].behavior,h=u.owner.getAABB();h.min[0]<=a.maxX&&h.min[1]<=a.maxY&&h.max[0]>=a.minX&&h.max[1]>=a.minY&&n.push(u)}}}s.PlatformObjectsManager=l;const r=class extends s.RuntimeBehavior{constructor(e,t,n){super(e,t,n);this._oldX=0;this._oldY=0;this._oldWidth=0;this._oldHeight=0;this._oldAngle=0;this.currentRBushAABB=null;this._registeredInManager=!1;this._platformType=t.platformType,t.platformType==="Ladder"?this._platformType=r.LADDER:t.platformType==="Jumpthru"?this._platformType=r.JUMPTHRU:this._platformType=r.NORMALPLATFORM,this._canBeGrabbed=t.canBeGrabbed||!1,this._yGrabOffset=t.yGrabOffset||0,this._manager=l.getManager(e)}updateFromBehaviorData(e,t){return e.platformType!==t.platformType&&this.changePlatformType(t.platformType),e.canBeGrabbed!==t.canBeGrabbed&&(this._canBeGrabbed=t.canBeGrabbed),e.yGrabOffset!==t.yGrabOffset&&(this._yGrabOffset=t.yGrabOffset),!0}trackChangesAndUpdateManagerIfNeeded(){!this.activated()&&this._registeredInManager?(this._manager.removePlatform(this),this._registeredInManager=!1):this.activated()&&!this._registeredInManager&&(this._manager.addPlatform(this),this._registeredInManager=!0),(this._oldX!==this.owner.getX()||this._oldY!==this.owner.getY()||this._oldWidth!==this.owner.getWidth()||this._oldHeight!==this.owner.getHeight()||this._oldAngle!==this.owner.getAngle())&&(this._registeredInManager&&(this._manager.removePlatform(this),this._manager.addPlatform(this)),this._oldX=this.owner.getX(),this._oldY=this.owner.getY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight(),this._oldAngle=this.owner.getAngle())}getNetworkSyncData(e){return super.getNetworkSyncData(e)}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),this.trackChangesAndUpdateManagerIfNeeded()}onCreated(){this.trackChangesAndUpdateManagerIfNeeded()}onDestroy(){this._manager&&this._registeredInManager&&this._manager.removePlatform(this)}doStepPreEvents(e){this.trackChangesAndUpdateManagerIfNeeded()}doStepPostEvents(e){}onActivate(){this._registeredInManager||(this._manager.addPlatform(this),this._registeredInManager=!0)}onDeActivate(){!this._registeredInManager||(this._manager.removePlatform(this),this._registeredInManager=!1)}changePlatformType(e){e==="Ladder"?this._platformType=r.LADDER:e==="Jumpthru"?this._platformType=r.JUMPTHRU:this._platformType=r.NORMALPLATFORM}getPlatformType(){return this._platformType}canBeGrabbed(){return this._canBeGrabbed}getYGrabOffset(){return this._yGrabOffset}static isOnPlatformTest(e,t,n){const o=e.getBehavior(n);return o?o.isOnFloorObject(t):!1}};let i=r;i.NORMALPLATFORM=0,i.NORMALPLAFTORM=r.NORMALPLATFORM,i.JUMPTHRU=1,i.LADDER=2,s.PlatformRuntimeBehavior=i,s.registerBehavior("PlatformBehavior::PlatformBehavior",s.PlatformRuntimeBehavior)})(gdjs||(gdjs={})); var gdjs;(function(s){class l{constructor(e){this._platformRBush=new rbush}static getManager(e){return e.platformsObjectsManager||(e.platformsObjectsManager=new s.PlatformObjectsManager(e)),e.platformsObjectsManager}addPlatform(e){e.currentRBushAABB?e.currentRBushAABB.updateAABBFromOwner():e.currentRBushAABB=new s.BehaviorRBushAABB(e),this._platformRBush.insert(e.currentRBushAABB)}removePlatform(e){this._platformRBush.remove(e.currentRBushAABB)}getAllPlatformsAround(e,t,n){const o=e.getWidth(),g=e.getHeight(),f=e.getDrawableX()+e.getCenterX(),m=e.getDrawableY()+e.getCenterY(),a=s.staticObject(l.prototype.getAllPlatformsAround);a.minX=f-o/2-t,a.minY=m-g/2-t,a.maxX=f+o/2+t,a.maxY=m+g/2+t;const c=this._platformRBush.search(a);n.length=0;for(let d=0;d<c.length;d++){const u=c[d].behavior,h=u.owner.getAABB();h.min[0]<=a.maxX&&h.min[1]<=a.maxY&&h.max[0]>=a.minX&&h.max[1]>=a.minY&&n.push(u)}}}s.PlatformObjectsManager=l;const r=class extends s.RuntimeBehavior{constructor(e,t,n){super(e,t,n);this._oldX=0;this._oldY=0;this._oldWidth=0;this._oldHeight=0;this._oldAngle=0;this.currentRBushAABB=null;this._registeredInManager=!1;this._platformType=t.platformType,t.platformType==="Ladder"?this._platformType=r.LADDER:t.platformType==="Jumpthru"?this._platformType=r.JUMPTHRU:this._platformType=r.NORMALPLATFORM,this._canBeGrabbed=t.canBeGrabbed||!1,this._yGrabOffset=t.yGrabOffset||0,this._manager=l.getManager(e)}applyBehaviorOverriding(e){return e.platformType!==void 0&&this.changePlatformType(e.platformType),e.canBeGrabbed!==void 0&&(this._canBeGrabbed=e.canBeGrabbed),e.yGrabOffset!==void 0&&(this._yGrabOffset=e.yGrabOffset),!0}trackChangesAndUpdateManagerIfNeeded(){!this.activated()&&this._registeredInManager?(this._manager.removePlatform(this),this._registeredInManager=!1):this.activated()&&!this._registeredInManager&&(this._manager.addPlatform(this),this._registeredInManager=!0),(this._oldX!==this.owner.getX()||this._oldY!==this.owner.getY()||this._oldWidth!==this.owner.getWidth()||this._oldHeight!==this.owner.getHeight()||this._oldAngle!==this.owner.getAngle())&&(this._registeredInManager&&(this._manager.removePlatform(this),this._manager.addPlatform(this)),this._oldX=this.owner.getX(),this._oldY=this.owner.getY(),this._oldWidth=this.owner.getWidth(),this._oldHeight=this.owner.getHeight(),this._oldAngle=this.owner.getAngle())}getNetworkSyncData(e){return super.getNetworkSyncData(e)}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),this.trackChangesAndUpdateManagerIfNeeded()}onCreated(){this.trackChangesAndUpdateManagerIfNeeded()}onDestroy(){this._manager&&this._registeredInManager&&this._manager.removePlatform(this)}doStepPreEvents(e){this.trackChangesAndUpdateManagerIfNeeded()}doStepPostEvents(e){}onActivate(){this._registeredInManager||(this._manager.addPlatform(this),this._registeredInManager=!0)}onDeActivate(){!this._registeredInManager||(this._manager.removePlatform(this),this._registeredInManager=!1)}changePlatformType(e){e==="Ladder"?this._platformType=r.LADDER:e==="Jumpthru"?this._platformType=r.JUMPTHRU:this._platformType=r.NORMALPLATFORM}getPlatformType(){return this._platformType}canBeGrabbed(){return this._canBeGrabbed}getYGrabOffset(){return this._yGrabOffset}static isOnPlatformTest(e,t,n){const o=e.getBehavior(n);return o?o.isOnFloorObject(t):!1}};let i=r;i.NORMALPLATFORM=0,i.NORMALPLAFTORM=r.NORMALPLATFORM,i.JUMPTHRU=1,i.LADDER=2,s.PlatformRuntimeBehavior=i,s.registerBehavior("PlatformBehavior::PlatformBehavior",s.PlatformRuntimeBehavior)})(gdjs||(gdjs={}));
//# sourceMappingURL=platformruntimebehavior.js.map //# sourceMappingURL=platformruntimebehavior.js.map
@@ -0,0 +1,5 @@
var gdjs;(function(y){const d=new y.Logger("Player Authentication");let m;(function(s){const u=({platform:n,isGameRegistered:t})=>t?{title:"Logging in...",text1:n==="cordova-websocket"?"One moment, we're opening a window for you to log in.":"One moment, we're opening a new page with your web browser for you to log in.",text2:n==="cordova-websocket"?"":"If the window did not open, please check your pop-up blocker and click the button below to try again."}:{title:"Publish your game!",text1:"GDevelop's player accounts are only available for published games.",text2:"Click the button below to learn how to publish your game then try again."};s.computeAuthenticationContainer=function(n){const t=document.createElement("div");t.id="authentication-root-container",t.style.position="relative",t.style.backgroundColor="rgba(14, 6, 45, 0.5)",t.style.opacity="1",t.style.width="100%",t.style.height="100%",t.style.zIndex="2",t.style.pointerEvents="all";const i=document.createElement("div");i.id="authentication-frame-container",i.style.backgroundColor="#FFFFFF",i.style.position="absolute",i.style.top="16px",i.style.bottom="16px",i.style.left="16px",i.style.right="16px",i.style.borderRadius="8px",i.style.boxShadow="0px 4px 4px rgba(0, 0, 0, 0.25)",i.style.padding="16px";const l=document.createElement("div");l.style.cursor="pointer",l.style.display="flex",l.style.justifyContent="right",l.style.alignItems="center",l.style.zIndex="3",r(l,n);const e=document.createElement("img");e.setAttribute("width","15px"),e.setAttribute("src","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB2aWV3Qm94PSIwIDAgOCA4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuODUzNTUgMC4xNDY0NDdDOC4wNDg4MiAwLjM0MTcwOSA4LjA0ODgyIDAuNjU4MjkxIDcuODUzNTUgMC44NTM1NTNMMC44NTM1NTMgNy44NTM1NUMwLjY1ODI5MSA4LjA0ODgyIDAuMzQxNzA5IDguMDQ4ODIgMC4xNDY0NDcgNy44NTM1NUMtMC4wNDg4MTU1IDcuNjU4MjkgLTAuMDQ4ODE1NSA3LjM0MTcxIDAuMTQ2NDQ3IDcuMTQ2NDVMNy4xNDY0NSAwLjE0NjQ0N0M3LjM0MTcxIC0wLjA0ODgxNTUgNy42NTgyOSAtMC4wNDg4MTU1IDcuODUzNTUgMC4xNDY0NDdaIiBmaWxsPSIjMUQxRDI2Ii8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMC4xNDY0NDcgMC4xNDY0NDdDMC4zNDE3MDkgLTAuMDQ4ODE1NSAwLjY1ODI5MSAtMC4wNDg4MTU1IDAuODUzNTUzIDAuMTQ2NDQ3TDcuODUzNTUgNy4xNDY0NUM4LjA0ODgyIDcuMzQxNzEgOC4wNDg4MiA3LjY1ODI5IDcuODUzNTUgNy44NTM1NUM3LjY1ODI5IDguMDQ4ODIgNy4zNDE3MSA4LjA0ODgyIDcuMTQ2NDUgNy44NTM1NUwwLjE0NjQ0NyAwLjg1MzU1M0MtMC4wNDg4MTU1IDAuNjU4MjkxIC0wLjA0ODgxNTUgMC4zNDE3MDkgMC4xNDY0NDcgMC4xNDY0NDdaIiBmaWxsPSIjMUQxRDI2Ii8+Cjwvc3ZnPgo="),l.appendChild(e);const o=document.createElement("div");o.id="authentication-container-loader",o.style.display="flex",o.style.flexDirection="column",o.style.height="100%",o.style.width="100%",o.style.justifyContent="center",o.style.alignItems="center";const c=document.createElement("img");c.setAttribute("width","28px"),c.setAttribute("src","data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iYW5pbWF0ZS1zcGluIC1tbC0xIG1yLTMgaC01IHctNSB0ZXh0LXdoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CjxjaXJjbGUgb3BhY2l0eT0nMC4yNScgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSI0Ij48L2NpcmNsZT4KPHBhdGggb3BhY2l0eT0nMC43NScgZmlsbD0iY3VycmVudENvbG9yIiBkPSJNNCAxMmE4IDggMCAwMTgtOFYwQzUuMzczIDAgMCA1LjM3MyAwIDEyaDR6bTIgNS4yOTFBNy45NjIgNy45NjIgMCAwMTQgMTJIMGMwIDMuMDQyIDEuMTM1IDUuODI0IDMgNy45MzhsMy0yLjY0N3oiPjwvcGF0aD4KPC9zdmc+"),c.style.marginTop="50px";try{c.animate([{transform:"rotate(0deg)"},{transform:"rotate(359deg)"}],{duration:3e3,iterations:1/0})}catch{d.warn("Animation not supported, loader will be fixed.")}o.appendChild(c);const a=document.createElement("div");return a.style.display="flex",a.style.flexDirection="column",a.style.height="100%",a.style.width="100%",a.style.justifyContent="stretch",a.style.alignItems="stretch",a.style.display="none",i.appendChild(l),i.appendChild(o),i.appendChild(a),t.appendChild(i),{rootContainer:t,loaderContainer:o,iframeContainer:a}},s.displayIframeInsideAuthenticationContainer=(n,t,i,l)=>{const e=document.createElement("iframe");e.setAttribute("sandbox","allow-forms allow-modals allow-orientation-lock allow-popups allow-same-origin allow-scripts"),e.addEventListener("load",()=>{n.style.display="flex",t.style.display="none"}),e.addEventListener("loaderror",()=>{s.addAuthenticationUrlToTextsContainer(()=>{n.removeChild(e),n.style.display="none",t.style.display="flex",s.displayIframeInsideAuthenticationContainer(n,t,i,l)},i)}),e.src=l,e.style.flex="1",e.style.border="0",n.appendChild(e)},s.addAuthenticationTextsToLoadingContainer=(n,t,i,l)=>{const e=document.createElement("div");e.id="authentication-container-texts",e.style.display="flex",e.style.flexDirection="column",e.style.width="100%",e.style.justifyContent="center",e.style.alignItems="center",e.style.position="relative",e.style.zIndex="3",e.style.fontSize="11pt",e.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", RLine truncated
Logged as ${e}`,c.style.margin="0px";const a=document.createElement("p");return a.id="changeAccountText",a.innerText="Click here to switch to another account.",a.style.margin="0px",a.style.marginTop="4px",a.style.textDecoration="underline",a.style.cursor="pointer",r(a,n),o.appendChild(c),o.appendChild(a),l.appendChild(o),l},s.computeNotAuthenticatedBanner=function(n,t){const i=s.computeDismissableBanner(t),l=document.createElement("div"),e=document.createElement("p");e.id="loggedText",e.innerHTML="You are not authenticated.",e.style.margin="0px";const o=document.createElement("p");return o.id="changeAccountText",o.innerText="Click here to log in.",o.style.margin="0px",o.style.marginTop="4px",o.style.textDecoration="underline",o.style.cursor="pointer",r(o,n),l.appendChild(e),l.appendChild(o),i.appendChild(l),i},s.displayLoggedInNotification=function(n,t){s.showNotification(n,"authenticated-notification",`<img style="margin-right:4px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgOSA5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNC4xNjY2NyAwQzEuODY2NjcgMCAwIDEuODY2NjcgMCA0LjE2NjY3QzAgNi40NjY2NyAxLjg2NjY3IDguMzMzMzMgNC4xNjY2NyA4LjMzMzMzQzYuNDY2NjcgOC4zMzMzMyA4LjMzMzMzIDYuNDY2NjcgOC4zMzMzMyA0LjE2NjY3QzguMzMzMzMgMS44NjY2NyA2LjQ2NjY3IDAgNC4xNjY2NyAwWk0zLjMzMzMzIDYuMjVMMS4yNSA0LjE2NjY3TDEuODM3NSAzLjU3OTE3TDMuMzMzMzMgNS4wNzA4M0w2LjQ5NTgzIDEuOTA4MzNMNy4wODMzMyAyLjVMMy4zMzMzMyA2LjI1WiIgZmlsbD0iIzAwQ0M4MyIvPgo8L3N2Zz4K" />
Logged as ${t}`,"success")},s.displayLoggedOutNotification=function(n){s.showNotification(n,"authenticated-notification",`<img style="margin-right:4px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgOSA5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNC4xNjY2NyAwQzEuODY2NjcgMCAwIDEuODY2NjcgMCA0LjE2NjY3QzAgNi40NjY2NyAxLjg2NjY3IDguMzMzMzMgNC4xNjY2NyA4LjMzMzMzQzYuNDY2NjcgOC4zMzMzMyA4LjMzMzMzIDYuNDY2NjcgOC4zMzMzMyA0LjE2NjY3QzguMzMzMzMgMS44NjY2NyA2LjQ2NjY3IDAgNC4xNjY2NyAwWk0zLjMzMzMzIDYuMjVMMS4yNSA0LjE2NjY3TDEuODM3NSAzLjU3OTE3TDMuMzMzMzMgNS4wNzA4M0w2LjQ5NTgzIDEuOTA4MzNMNy4wODMzMyAyLjVMMy4zMzMzMyA2LjI1WiIgZmlsbD0iIzAwQ0M4MyIvPgo8L3N2Zz4K" />
Logged out`,"success")},s.displayErrorNotification=function(n){s.showNotification(n,"error-notification","An error occurred while authenticating, please try again.","error")},s.showNotification=function(n,t,i,l){const e=document.createElement("div");e.id=t,e.style.position="absolute",e.style.pointerEvents="all",e.style.backgroundColor=l==="success"?"#0E062D":"red",e.style.top="12px",e.style.right="16px",e.style.padding="6px 32px 6px 6px",e.style.zIndex="1",e.style.display="flex",e.style.flexDirection="row-reverse",e.style.justifyContent="space-between",e.style.alignItems="center",e.style.boxShadow="0px 4px 4px rgba(0, 0, 0, 0.25)",e.style.borderRadius="4px",e.style.fontSize="11pt",e.style.color="#FFFFFF",e.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';try{e.animate([{transform:"translateY(-30px)",opacity:0},{transform:"translateY(0px)",opacity:1}],{duration:700,easing:"ease-out"})}catch{d.warn("Animation not supported, div will be fixed.")}const o=document.createElement("p");o.id="loggedText",o.innerHTML=i,o.style.margin="0px",e.appendChild(o),n.appendChild(e);const c=700,a=5e3;setTimeout(()=>{try{e.animate([{transform:"translateY(0px)",opacity:1},{transform:"translateY(-30px)",opacity:0}],{duration:c,easing:"ease-in"})}catch{d.warn("Animation not supported, div will be fixed.")}},a),setTimeout(()=>{e.remove()},a+c)};const r=function(n,t){n.addEventListener("touchstart",i=>{t()}),n.addEventListener("click",i=>{t()})}})(m=y.playerAuthenticationComponents||(y.playerAuthenticationComponents={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=playerauthenticationcomponents.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(u){const a=new u.Logger("Player Authentication"),g=u.playerAuthenticationComponents;let X;(function(s){let b=null,T=null,v=null,S=!1,C=!1,W=null,y=null,k=null,D=null,h=null,c=null,P=null,x=null,R=null,f=null,m=null;const Y=e=>{N(e)==="games-platform"&&(a.info("Notifying parent window that player authentication is ready."),window.parent.postMessage({id:"playerAuthReady"},"*"),P=setTimeout(()=>{a.info("Removing automatic games platform authentication listener."),O()},3e3))},Z=e=>{N(e)==="games-platform"&&(O(),R=t=>{L({runtimeScene:e,event:t,checkOrigin:!0})},window.addEventListener("message",R,!0))},ee=e=>{const t=e.getGame().getAdditionalOptions();if(t&&t.isPreview){const n=t.playerId,i=t.playerToken,o=t.playerUsername;n&&i&&(a.info(`Automatically logging in the player with ID ${n} as it's a preview.`),F({userId:n,username:o||null,userToken:i}),q(e))}};u.registerRuntimeScenePostEventsCallback(()=>{S=!1}),u.registerFirstRuntimeSceneLoadedCallback(e=>{ee(e),Z(e),Y(e)});const _=e=>`${e}_authenticatedUser`,j=({runtimeGame:e,gameId:t,connectionId:n,authWindowOptions:i})=>{const o="https://gd.games",r=new URLSearchParams;if(r.set("gameId",t),n&&r.set("connectionId",n),e.isUsingGDevelopDevelopmentEnvironment()&&r.set("dev","true"),r.set("allowLoginProviders","true"),i)for(const[d,l]of Object.entries(i))r.set(d,l.toString());return`${o}/auth?${r.toString()}`},N=e=>e.getGame().getRenderer().getElectron()?"electron":te(e)?"web-iframe":typeof cordova!="undefined"?"cordova-websocket":window.parent!==window&&(document.referrer.indexOf("https://gd.games")===0||document.referrer.indexOf("http://localhost:4000")===0)?"games-platform":"web",te=e=>{const t=e.getGame().getAdditionalOptions();return t&&t.isPreview&&t.allowAuthenticationUsingIframeForPreview};s.isAuthenticated=()=>(C||I(),v!==null),s.hasLoggedIn=()=>S,s.getUsername=()=>(C||I(),b||""),s.getUserToken=()=>(C||I(),v||null),s.getUserId=()=>(C||I(),T||"");const V=(e,t,n=0)=>{const o=`${e.isUsingGDevelopDevelopmentEnvironment()?"https://api-dev.gdevelop.io":"https://api.gdevelop.io"}/game/public-game/${t}`;return fetch(o,{method:"HEAD"}).then(r=>r.status!==200?(a.warn(`Error while fetching the game: ${r.status} ${r.statusText}`),r.status===404||n>2?!1:V(e,t,n+1)):!0,r=>(a.error("Error while fetching game:",r),!1))};s.logout=e=>{b=null,v=null,T=null;const t=u.projectData.properties.projectUuid;if(!t){a.error("Missing game id in project properties.");return}window.localStorage.removeItem(_(t)),G(e),s.removeAuthenticationBanner(e);const n=e.getGame().getRenderer().getDomElementContainer();if(!n){w(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}g.displayLoggedOutNotification(n)};const I=()=>{const e=u.projectData.properties.projectUuid;if(!e){a.error("Missing game id in project properties.");return}try{const t=window.localStorage.getItem(_(e));if(!t){C=!0;return}const n=JSON.parse(t);b=n.username,T=n.userId,v=n.userToken,C=!0}catch(t){a.warn("Unable to read authentication details from localStorage. Player authentication will not be available.",t)}},G=e=>{if(s.removeAuthenticationContainer(e),J(),m&&(a.info("Closing authentication websocket connection."),m.close(),m=null),W&&(W.close(),W=null),typeof SafariViewController!="undefined")try{SafariViewController.hide()}catch{a.info("Could not hide login window. Waiting for user to do it.")}},F=({username:e,userId:t,userToken:n})=>{e||a.warn("The authenticated player does not have a username"),b=e,T=t,v=n,S=!0;const i=u.projectData.properties.projectUuid;if(!i){a.error("Missing game id in project properties.");return}try{window.localStorage.setItem(_(i),JSON.stringify({username:b,userId:T,userToken:v}))}catch(o){a.warn("Unable to save the authentication details to localStorage. Player authentication will not be available.",o)}};s.login=({runtimeScene:e,userId:t,username:n,userToken:i})=>{F({userId:t,username:n,userToken:i}),G(e),s.removeAuthenticationBanner(e);const o=e.getGame().getRenderer().getDomElementContainer();if(!o){w(e,"The div element covering the game couldn't be found, the authentication banner cannot be displayed.");return}g.displayLoggedInNotification(o,b||"Anonymous")};const L=function({runtimeScene:e,event:t,checkOrigin:n,onDone:i}){const o=l=>{s.login({runtimeScene:e,userId:l.data.body.userId,username:l.data.body.username,userToken:l.data.body.token}),U(e),i&&i("logged")},r=l=>{F({userId:l.data.body.userId,username:l.data.body.username,userToken:l.data.body.token}),O(),q(e),i&&i("logged")};if(!(n&&!["https://gd.games","http://localhost:4000"].includes(t.origin))){if(!t.data.id)throw new Error("Malformed message");switch(t.data.id){case"authenticationResult":{if(!(t.data.body&&t.data.body.token))throw new Error("Malformed message.");a.info("Received authentication result, logging in player."),o(t);break}case"alreadyAuthenticated":{if(!(t.data.body&&t.data.body.token))throw new Error("Malformed message.");if(a.info("Player is alrLine truncated
//# sourceMappingURL=playerauthenticationtools.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(s){const n=class extends s.RuntimeObject{constructor(e,t){super(e,t);this._scaleX=1;this._scaleY=1;this._blendMode=0;this._flippedX=!1;this._flippedY=!1;this._customCenter=null;this._customCollisionMask=null;this._fillColor=typeof t.fillColor=="string"?s.rgbOrHexStringToNumber(t.fillColor):parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=typeof t.outlineColor=="string"?s.rgbOrHexStringToNumber(t.outlineColor):parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return typeof t.fillColor=="string"&&e.fillColor!==t.fillColor&&this.setFillColor(t.fillColor),typeof e.fillColor!="string"&&typeof t.fillColor!="string"&&(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),typeof t.outlineColor=="string"&&e.outlineColor!==t.outlineColor&&this.setOutlineColor(t.outlineColor),typeof e.outlineColor!="string"&&typeof t.outlineColor!="string"&&(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),e.antialiasing!==t.antialiasing&&this.setAntialiasing(t.antialiasing),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),cbf:this._clearBetweenFrames,aa:this._antialiasing,ac:this._useAbsoluteCoordinates,fc:this._fillColor,oc:this._outlineColor,os:this._outlineSize,fo:this._fillOpacity,oo:this._outlineOpacity,scaleX:this.getScaleX(),scaleY:this.getScaleY(),ifx:this._flippedX,ify:this._flippedY}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.cbf!==void 0&&(this._clearBetweenFrames=e.cbf),e.aa!==void 0&&this.setAntialiasing(e.aa),e.ac!==void 0&&this.setCoordinatesRelative(!e.ac),e.fc!==void 0&&(this._fillColor=e.fc),e.oc!==void 0&&(this._outlineColor=e.oc),e.os!==void 0&&this.setOutlineSize(e.os),e.fo!==void 0&&this.setFillOpacity(e.fo),e.oo!==void 0&&this.setOutlineOpacity(e.oo),e.scaleX!==void 0&&this.setScaleX(e.scaleX),e.scaleY!==void 0&&this.setScaleY(e.scaleY),e.ifx!==void 0&&this.flipX(e.ifx),e.ify!==void 0&&this.flipY(e.ify)}extraInitializationFromInitialInstance(e){this.flipX(!!e.flippedX),this.flipY(!!e.flippedY)}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawFilletRectangle(e,t,i,o,r){this._renderer.drawFilletRectangle(e,t,i,o,r)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawChamferRectangle(e,t,i,o,r){this._renderer.drawChamferRectangle(e,t,i,o,r)}drawTorus(e,t,i,o,r,l){this._renderer.drawTorus(e,t,i,o,r,l)}drawRegularPolygon(e,t,i,o,r){this._renderer.drawRegularPolygon(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,a){this._renderer.drawArc(e,t,i,o,r,l,a)}drawBezierCurve(e,t,i,o,r,l,a,f){this._renderer.drawBezierCurve(e,t,i,o,r,l,a,f)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e){thiLine truncated var gdjs;(function(s){const n=class extends s.RuntimeObject{constructor(e,t,i){super(e,t,i);this._scaleX=1;this._scaleY=1;this._blendMode=0;this._flippedX=!1;this._flippedY=!1;this._customCenter=null;this._customCollisionMask=null;this._fillColor=typeof t.fillColor=="string"?s.rgbOrHexStringToNumber(t.fillColor):parseInt(s.rgbToHex(t.fillColor.r,t.fillColor.g,t.fillColor.b),16),this._outlineColor=typeof t.outlineColor=="string"?s.rgbOrHexStringToNumber(t.outlineColor):parseInt(s.rgbToHex(t.outlineColor.r,t.outlineColor.g,t.outlineColor.b),16),this._fillOpacity=t.fillOpacity,this._outlineOpacity=t.outlineOpacity,this._outlineSize=t.outlineSize,this._useAbsoluteCoordinates=t.absoluteCoordinates,this._clearBetweenFrames=t.clearBetweenFrames,this._antialiasing=t.antialiasing,this._renderer=new s.ShapePainterRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return this._renderer.getRendererObject()}updateFromObjectData(e,t){return typeof t.fillColor=="string"&&e.fillColor!==t.fillColor&&this.setFillColor(t.fillColor),typeof e.fillColor!="string"&&typeof t.fillColor!="string"&&(e.fillColor.r!==t.fillColor.r||e.fillColor.g!==t.fillColor.g||e.fillColor.b!==t.fillColor.b)&&this.setFillColor(""+t.fillColor.r+";"+t.fillColor.g+";"+t.fillColor.b),typeof t.outlineColor=="string"&&e.outlineColor!==t.outlineColor&&this.setOutlineColor(t.outlineColor),typeof e.outlineColor!="string"&&typeof t.outlineColor!="string"&&(e.outlineColor.r!==t.outlineColor.r||e.outlineColor.g!==t.outlineColor.g||e.outlineColor.b!==t.outlineColor.b)&&this.setOutlineColor(""+t.outlineColor.r+";"+t.outlineColor.g+";"+t.outlineColor.b),e.fillOpacity!==t.fillOpacity&&this.setFillOpacity(t.fillOpacity),e.outlineOpacity!==t.outlineOpacity&&this.setOutlineOpacity(t.outlineOpacity),e.outlineSize!==t.outlineSize&&this.setOutlineSize(t.outlineSize),e.absoluteCoordinates!==t.absoluteCoordinates&&(this._useAbsoluteCoordinates=t.absoluteCoordinates,this._renderer.updatePositionX(),this._renderer.updatePositionY(),this._renderer.updateAngle(),this._renderer.updateScaleX(),this._renderer.updateScaleY()),e.clearBetweenFrames!==t.clearBetweenFrames&&(this._clearBetweenFrames=t.clearBetweenFrames),e.antialiasing!==t.antialiasing&&this.setAntialiasing(t.antialiasing),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),cbf:this._clearBetweenFrames,aa:this._antialiasing,ac:this._useAbsoluteCoordinates,fc:this._fillColor,oc:this._outlineColor,os:this._outlineSize,fo:this._fillOpacity,oo:this._outlineOpacity,scaleX:this.getScaleX(),scaleY:this.getScaleY(),ifx:this._flippedX,ify:this._flippedY}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.cbf!==void 0&&(this._clearBetweenFrames=e.cbf),e.aa!==void 0&&this.setAntialiasing(e.aa),e.ac!==void 0&&this.setCoordinatesRelative(!e.ac),e.fc!==void 0&&(this._fillColor=e.fc),e.oc!==void 0&&(this._outlineColor=e.oc),e.os!==void 0&&this.setOutlineSize(e.os),e.fo!==void 0&&this.setFillOpacity(e.fo),e.oo!==void 0&&this.setOutlineOpacity(e.oo),e.scaleX!==void 0&&this.setScaleX(e.scaleX),e.scaleY!==void 0&&this.setScaleY(e.scaleY),e.ifx!==void 0&&this.flipX(e.ifx),e.ify!==void 0&&this.flipY(e.ify)}extraInitializationFromInitialInstance(e){this.flipX(!!e.flippedX),this.flipY(!!e.flippedY)}stepBehaviorsPreEvents(e){this._clearBetweenFrames&&this.clear(),super.stepBehaviorsPreEvents(e)}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}clear(){this._renderer.clear()}getVisibilityAABB(){return this._useAbsoluteCoordinates?null:this.getAABB()}drawRectangle(e,t,i,o){this._renderer.drawRectangle(e,t,i,o)}drawCircle(e,t,i){this._renderer.drawCircle(e,t,i)}drawLine(e,t,i,o,r){this._renderer.drawLine(e,t,i,o,r)}drawLineV2(e,t,i,o,r){this._renderer.drawLineV2(e,t,i,o,r)}drawEllipse(e,t,i,o){this._renderer.drawEllipse(e,t,i,o)}drawFilletRectangle(e,t,i,o,r){this._renderer.drawFilletRectangle(e,t,i,o,r)}drawRoundedRectangle(e,t,i,o,r){this._renderer.drawRoundedRectangle(e,t,i,o,r)}drawChamferRectangle(e,t,i,o,r){this._renderer.drawChamferRectangle(e,t,i,o,r)}drawTorus(e,t,i,o,r,l){this._renderer.drawTorus(e,t,i,o,r,l)}drawRegularPolygon(e,t,i,o,r){this._renderer.drawRegularPolygon(e,t,i,o,r)}drawStar(e,t,i,o,r,l){this._renderer.drawStar(e,t,i,o,r,l)}drawArc(e,t,i,o,r,l,a){this._renderer.drawArc(e,t,i,o,r,l,a)}drawBezierCurve(e,t,i,o,r,l,a,f){this._renderer.drawBezierCurve(e,t,i,o,r,l,a,f)}drawQuadraticCurve(e,t,i,o,r,l){this._renderer.drawQuadraticCurve(e,t,i,o,r,l)}beginFillPath(e,t){this._renderer.beginFillPath(),this._renderer.drawPathMoveTo(e,t)}endFillPath(){this._renderer.endFillPath()}drawPathMoveTo(e,t){this._renderer.drawPathMoveTo(e,t)}drawPathLineTo(e,t){this._renderer.drawPathLineTo(e,t)}drawPathBezierCurveTo(e,t,i,o,r,l){this._renderer.drawPathBezierCurveTo(e,t,i,o,r,l)}drawPathArc(e,t,i,o,r,l){this._renderer.drawPathArc(e,t,i,o,r,l)}drawPathQuadraticCurveTo(e,t,i,o){this._renderer.drawPathQuadraticCurveTo(e,t,i,o)}closePath(){this._renderer.closePath()}setClearBetweenFrames(e)Line truncated
//# sourceMappingURL=shapepainterruntimeobject.js.map //# sourceMappingURL=shapepainterruntimeobject.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(a){const f={text:"text",email:"email",password:"password",number:"number","telephone number":"tel",url:"url",search:"search"},o=(h,t)=>"rgba("+h[0]+","+h[1]+","+h[2]+","+t/255+")";class r{constructor(t,e){this._input=null;this._form=null;this._object=t,this._instanceContainer=e,this._runtimeGame=this._instanceContainer.getGame(),this._createElement()}_createElement(){if(this._input)throw new Error("Tried to recreate an input while it already exists.");this._form=document.createElement("form");const t=this._object.getInputType()==="text area";this._input=document.createElement(t?"textarea":"input"),this._form.style.border="0px",this._form.style.borderRadius="0px",this._form.style.backgroundColor="transparent",this._form.style.position="absolute",this._form.style.pointerEvents="auto",this._form.style.display="none",this._form.style.boxSizing="border-box",this._form.style.textAlign=this._object.getTextAlign(),this._input.autocomplete="off",this._input.style.backgroundColor="white",this._input.style.outline="none",this._input.style.resize="none",this._input.style.border="1px solid black",this._input.style.boxSizing="border-box",this._input.style.borderRadius="0px",this._input.style.width="100%",this._input.style.height="100%",this._input.maxLength=this._object.getMaxLength(),this._input.style.padding=`${this._object.getPaddingY().toFixed(2)}px ${this._object.getPaddingX().toFixed(2)}px`,this._form.appendChild(this._input),this._input.addEventListener("input",()=>{!this._input||this._object.onRendererInputValueChanged(this._input.value)}),this._input.addEventListener("touchstart",()=>{!this._input||document.activeElement!==this._input&&this._input.focus()}),this._form.addEventListener("submit",e=>{e.preventDefault(),this._object.onRendererFormSubmitted()}),this.updateString(),this.updateFont(),this.updatePlaceholder(),this.updateOpacity(),this.updateInputType(),this.updateTextColor(),this.updateFillColorAndOpacity(),this.updateBorderColorAndOpacity(),this.updateBorderWidth(),this.updateDisabled(),this.updateReadOnly(),this.updateSpellCheck(),this.updateTextAlign(),this.updateMaxLength(),this.updatePadding(),this._runtimeGame.getRenderer().getDomElementContainer().appendChild(this._form)}_destroyElement(){this._form&&(this._form.remove(),this._form=null),this._input&&(this._input.remove(),this._input=null)}onScenePaused(){this._destroyElement()}onSceneResumed(){this._input||this._createElement()}onDestroy(){this._destroyElement()}updatePreRender(){if(!this._input||!this._form)return;if(this._object.isHidden()){this._form.style.display="none";return}{let n=this._instanceContainer,s=this._object,b=!0;do{if(!n.getLayer(s.getLayer()).isVisible()||!s.isVisible()){this._form.style.display="none";return}n instanceof a.CustomRuntimeObjectInstanceContainer?(s=n.getOwner(),n=s.getInstanceContainer()):b=!1}while(b)}const t=a.staticArray(r.prototype.updatePreRender),e=this._instanceContainer.getGame(),i=e.getRenderer(),u=this._instanceContainer.getLayer(this._object.getLayer()),p=u.convertInverseCoords(this._object.x,this._object.y,0,t),l=p[0],d=p[1],c=u.convertInverseCoords(this._object.x+this._object.getWidth(),this._object.y+this._object.getHeight(),0,t),_=c[0],m=c[1];if(_<0||m<0||l>e.getGameResolutionWidth()||d>e.getGameResolutionHeight()){this._form.style.display="none";return}t[0]=l,t[1]=d,i.convertCanvasToDomElementContainerCoords(t,t);const g=t[0],y=t[1];t[0]=_,t[1]=m,i.convertCanvasToDomElementContainerCoords(t,t);const x=t[0],j=t[1],C=x-g,T=j-y;this._form.style.left=g+"px",this._form.style.top=y+"px",this._form.style.width=C+"px",this._form.style.height=T+"px",this._form.style.transform="rotate3d(0,0,1,"+this._object.getAngle()%360+"deg)",this._form.style.textAlign=this._object.getTextAlign(),this._input.style.padding=`${this._object.getPaddingY().toFixed(2)}px ${this._object.getPaddingX().toFixed(2)}px`,this._input.style.fontSize=this._object.getFontSize()*i.getCanvasToDomElementContainerHeightScale()+"px",this._form.style.display="initial"}updateString(){!this._input||(this._input.value=this._object.getString())}updatePlaceholder(){!this._input||(this._input.placeholder=this._object.getPlaceholder())}updateFont(){!this._input||(this._input.style.fontFamily=this._instanceContainer.getGame().getFontManager().getFontFamily(this._object.getFontResourceName()))}updateOpacity(){!this._form||(this._form.style.opacity=(this._object.getOpacity()/255).toFixed(3))}updateInputType(){if(!this._input)return;const t=this._input instanceof HTMLTextAreaElement,e=this._object.getInputType()==="text area";t!==e&&(this._destroyElement(),this._createElement());const i=f[this._object.getInputType()]||"text";this._input.setAttribute("type",i)}updateTextColor(){!this._input||(this._input.style.color=o(this._object._getRawTextColor(),255))}updateFillColorAndOpacity(){!this._input||(this._input.style.backgroundColor=o(this._object._getRawFillColor(),this._object.getFillOpacity()))}updateBorderColorAndOpacity(){!this._iLine truncated
//# sourceMappingURL=textinputruntimeobject-pixi-renderer.js.map
@@ -0,0 +1,2 @@
var gdjs;(function(i){const d=["text","email","password","number","telephone number","url","search","text area"],l=["left","center","right"],n=r=>{const e=r.toLowerCase();return d.includes(e)?r:"text"},o=r=>{if(!r)return"left";const e=r.toLowerCase();return l.includes(e)?r:"left"},p=300,h=30,s=(r,e,t)=>Math.max(0,Math.min(e/2-t,r));class g extends i.RuntimeObject{constructor(e,t,u){super(e,t,u);this.opacity=255;this._width=p;this._height=h;this._string=t.content.initialValue,this._placeholder=t.content.placeholder,this._fontResourceName=t.content.fontResourceName,this._fontSize=t.content.fontSize||20,this._inputType=n(t.content.inputType),this._textColor=i.rgbOrHexToRGBColor(t.content.textColor),this._fillColor=i.rgbOrHexToRGBColor(t.content.fillColor),this._fillOpacity=t.content.fillOpacity,this._borderColor=i.rgbOrHexToRGBColor(t.content.borderColor),this._borderOpacity=t.content.borderOpacity,this._borderWidth=t.content.borderWidth,this._disabled=e.getGame().isInGameEdition()?!0:t.content.disabled,this._readOnly=t.content.readOnly,this._spellCheck=t.content.spellCheck!==void 0?t.content.spellCheck:!1,this._textAlign=o(t.content.textAlign),this._maxLength=t.content.maxLength||0,this._paddingX=t.content.paddingX!==void 0?t.content.paddingX:2,this._paddingY=t.content.paddingY!==void 0?t.content.paddingY:1,this._isSubmitted=!1,this._renderer=new i.TextInputRuntimeObjectRenderer(this,e),this.onCreated()}getRendererObject(){return null}updateFromObjectData(e,t){return e.content.initialValue!==t.content.initialValue&&this._string===e.content.initialValue&&this.setString(t.content.initialValue),e.content.placeholder!==t.content.placeholder&&this.setPlaceholder(t.content.placeholder),e.content.fontResourceName!==t.content.fontResourceName&&this.setFontResourceName(t.content.fontResourceName),e.content.fontSize!==t.content.fontSize&&this.setFontSize(t.content.fontSize),e.content.inputType!==t.content.inputType&&this.setInputType(t.content.inputType),e.content.textColor!==t.content.textColor&&this.setTextColor(t.content.textColor),e.content.fillColor!==t.content.fillColor&&this.setFillColor(t.content.fillColor),e.content.fillOpacity!==t.content.fillOpacity&&this.setFillOpacity(t.content.fillOpacity),e.content.borderColor!==t.content.borderColor&&this.setBorderColor(t.content.borderColor),e.content.borderOpacity!==t.content.borderOpacity&&this.setBorderOpacity(t.content.borderOpacity),e.content.borderWidth!==t.content.borderWidth&&this.setBorderWidth(t.content.borderWidth),e.content.disabled!==t.content.disabled&&this.setDisabled(t.content.disabled),e.content.readOnly!==t.content.readOnly&&this.setReadOnly(t.content.readOnly),t.content.spellCheck!==void 0&&e.content.spellCheck!==t.content.spellCheck&&this.setSpellCheck(t.content.spellCheck),t.content.maxLength!==void 0&&e.content.maxLength!==t.content.maxLength&&this.setMaxLength(t.content.maxLength),t.content.textAlign&&e.content.textAlign!==t.content.textAlign&&(this._textAlign=t.content.textAlign),t.content.paddingX!==void 0&&e.content.paddingX!==t.content.paddingX&&this.setPaddingX(t.content.paddingX),t.content.paddingY!==void 0&&e.content.paddingY!==t.content.paddingY&&this.setPaddingY(t.content.paddingY),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),opa:this.getOpacity(),txt:this.getText(),frn:this.getFontResourceName(),fs:this.getFontSize(),place:this.getPlaceholder(),it:this.getInputType(),tc:this.getTextColor(),fc:this.getFillColor(),fo:this.getFillOpacity(),bc:this.getBorderColor(),bo:this.getBorderOpacity(),bw:this.getBorderWidth(),dis:this.isDisabled(),ro:this.isReadOnly(),sc:this.isSpellCheckEnabled()}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.opa!==void 0&&this.setOpacity(e.opa),e.txt!==void 0&&this.setText(e.txt),e.frn!==void 0&&this.setFontResourceName(e.frn),e.fs!==void 0&&this.setFontSize(e.fs),e.place!==void 0&&this.setPlaceholder(e.place),e.it!==void 0&&this.setInputType(e.it),e.tc!==void 0&&this.setTextColor(e.tc),e.fc!==void 0&&this.setFillColor(e.fc),e.fo!==void 0&&this.setFillOpacity(e.fo),e.bc!==void 0&&this.setBorderColor(e.bc),e.bo!==void 0&&this.setBorderOpacity(e.bo),e.bw!==void 0&&this.setBorderWidth(e.bw),e.dis!==void 0&&this.setDisabled(e.dis),e.ro!==void 0&&this.setReadOnly(e.ro),e.sc!==void 0&&this.setSpellCheck(e.sc)}updatePreRender(e){this._isSubmitted=!1,this._renderer.updatePreRender()}extraInitializationFromInitialInstance(e){for(const t of e.stringProperties)t.name==="initialValue"?this.setString(t.value):t.name==="placeholder"&&this.setPlaceholder(t.value);e.customSize&&(this.setWidth(e.width),this.setHeight(e.height),this._renderer.updatePadding()),this.setOpacity(e.opacity===void 0?255:e.opacity)}onScenePaused(e){this._renderer.onScenePaused()}onSceneResumed(e){this._renderer.onSceneResumed()}onDestroyed(){super.onDestroyed(),this._renderer.onDestroy()}setOpacity(e){this.opacity=Math.max(0,Math.min(255,e)),this._renderer.updateOpacity()}getOpacity(){return this.opacity}setSize(eLine truncated
//# sourceMappingURL=textinputruntimeobject.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(s){class n extends s.RuntimeObject{constructor(e,r){super(e,r);this._useGradient=!1;this._gradient=[];this._gradientType="";this.opacity=255;this._wrapping=!1;this._wrappingWidth=100;this._padding=5;this._scaleX=1;this._scaleY=1;const t=r.content;this._characterSize=Math.max(1,t.characterSize),this._fontName=t.font,this._bold=t.bold,this._italic=t.italic,this._underlined=t.underlined,this._color=s.rgbOrHexToRGBColor(t.color),this._str=t.text,this._textAlign=t.textAlignment||"left",this._verticalTextAlignment=t.verticalTextAlignment||"top",this._isOutlineEnabled=t.isOutlineEnabled,this._outlineThickness=t.outlineThickness,this._outlineColor=s.rgbOrHexToRGBColor(t.outlineColor),this._shadow=t.isShadowEnabled,this._shadowColor=s.rgbOrHexToRGBColor(t.shadowColor),this._shadowOpacity=t.shadowOpacity,this._shadowDistance=t.shadowDistance,this._shadowBlur=t.shadowBlurRadius,this._shadowAngle=t.shadowAngle,this._lineHeight=t.lineHeight||0,this._renderer=new s.TextRuntimeObjectRenderer(this,e),this.onCreated()}updateFromObjectData(e,r){const t=e.content,i=r.content;return t.characterSize!==i.characterSize&&this.setCharacterSize(i.characterSize),t.font!==i.font&&this.setFontName(i.font),t.bold!==i.bold&&this.setBold(i.bold),t.italic!==i.italic&&this.setItalic(i.italic),t.color!==i.color&&this.setColor(i.color),t.text!==i.text&&this.setText(i.text),t.textAlignment!==i.textAlignment&&this.setTextAlignment(i.textAlignment),t.verticalTextAlignment!==i.verticalTextAlignment&&this.setVerticalTextAlignment(i.verticalTextAlignment),t.isOutlineEnabled!==i.isOutlineEnabled&&this.setOutlineEnabled(i.isOutlineEnabled),t.outlineThickness!==i.outlineThickness&&this.setOutlineThickness(i.outlineThickness),t.outlineColor!==i.outlineColor&&this.setOutlineColor(i.outlineColor),t.isShadowEnabled!==i.isShadowEnabled&&this.showShadow(i.isShadowEnabled),t.shadowColor!==i.shadowColor&&this.setShadowColor(i.shadowColor),t.shadowOpacity!==i.shadowOpacity&&this.setShadowOpacity(i.shadowOpacity),t.shadowDistance!==i.shadowDistance&&this.setShadowDistance(i.shadowDistance),t.shadowAngle!==i.shadowAngle&&this.setShadowAngle(i.shadowAngle),t.shadowBlurRadius!==i.shadowBlurRadius&&this.setShadowBlurRadius(i.shadowBlurRadius),(t.lineHeight||0)!==(i.lineHeight||0)&&this.setLineHeight(i.lineHeight||0),t.underlined===i.underlined}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),str:this._str,o:this.opacity,cs:this._characterSize,fn:this._fontName,b:this._bold,i:this._italic,u:this._underlined,c:this._color,scale:this.getScale(),ta:this._textAlign,vta:this._verticalTextAlignment,wrap:this._wrapping,wrapw:this._wrappingWidth,oena:this._isOutlineEnabled,ot:this._outlineThickness,oc:this._outlineColor,sh:this._shadow,shc:this._shadowColor,sho:this._shadowOpacity,shd:this._shadowDistance,sha:this._shadowAngle,shb:this._shadowBlur,lh:this._lineHeight,pad:this._padding}}updateFromNetworkSyncData(e,r){super.updateFromNetworkSyncData(e,r),e.str!==void 0&&this.setText(e.str),e.o!==void 0&&this.setOpacity(e.o),e.cs!==void 0&&this.setCharacterSize(e.cs),e.fn!==void 0&&this.setFontName(e.fn),e.b!==void 0&&this.setBold(e.b),e.i!==void 0&&this.setItalic(e.i),e.u!==void 0&&(this._underlined=e.u),e.c!==void 0&&(this._color=e.c),e.scale!==void 0&&this.setScale(e.scale),e.ta!==void 0&&this.setTextAlignment(e.ta),e.vta!==void 0&&this.setVerticalTextAlignment(e.vta),e.wrap!==void 0&&this.setWrapping(e.wrap),e.wrapw!==void 0&&this.setWrappingWidth(e.wrapw),e.oena!==void 0&&this.setOutlineEnabled(e.oena),e.ot!==void 0&&this.setOutlineThickness(e.ot),e.oc!==void 0&&(this._outlineColor=e.oc),e.sh!==void 0&&this.showShadow(e.sh),e.shc!==void 0&&(this._shadowColor=e.shc),e.sho!==void 0&&this.setShadowOpacity(e.sho),e.shd!==void 0&&this.setShadowDistance(e.shd),e.sha!==void 0&&this.setShadowAngle(e.sha),e.shb!==void 0&&this.setShadowBlurRadius(e.shb),e.lh!==void 0&&this.setLineHeight(e.lh),e.pad!==void 0&&this.setPadding(e.pad)}getRendererObject(){return this._renderer.getRendererObject()}updatePreRender(e){this._renderer.ensureUpToDate()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(e){e.customSize?(this.setWrappingWidth(e.width),this.setWrapping(!0)):this.setWrapping(!1),this.setOpacity(e.opacity===void 0?255:e.opacity)}_updateTextPosition(){this.invalidateHitboxes(),this._renderer.updatePosition()}setX(e){super.setX(e),this._updateTextPosition()}setY(e){super.setY(e),this._updateTextPosition()}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}getString(){return this.getText()}setString(e){this.setText(e)}getText(){return this._str}setText(e){e!==this._str&&(this._str=e,this._renderer.updateString(),this._updateTextPosition())}getCharacterSize(){return this._characterSize}setCharacterSize(e){e<=1&&(e=1),this._characterSize=e,this._renderer.updateStyle()}getLineHeight(){Line truncated var gdjs;(function(s){class o extends s.RuntimeObject{constructor(e,r,i){super(e,r,i);this._useGradient=!1;this._gradient=[];this._gradientType="";this.opacity=255;this._wrapping=!1;this._wrappingWidth=100;this._padding=5;this._scaleX=1;this._scaleY=1;const t=r.content;this._characterSize=Math.max(1,t.characterSize),this._fontName=t.font,this._bold=t.bold,this._italic=t.italic,this._underlined=t.underlined,this._color=s.rgbOrHexToRGBColor(t.color),this._str=t.text,this._textAlign=t.textAlignment||"left",this._verticalTextAlignment=t.verticalTextAlignment||"top",this._isOutlineEnabled=t.isOutlineEnabled,this._outlineThickness=t.outlineThickness,this._outlineColor=s.rgbOrHexToRGBColor(t.outlineColor),this._shadow=t.isShadowEnabled,this._shadowColor=s.rgbOrHexToRGBColor(t.shadowColor),this._shadowOpacity=t.shadowOpacity,this._shadowDistance=t.shadowDistance,this._shadowBlur=t.shadowBlurRadius,this._shadowAngle=t.shadowAngle,this._lineHeight=t.lineHeight||0,this._renderer=new s.TextRuntimeObjectRenderer(this,e),this.onCreated()}updateFromObjectData(e,r){const i=e.content,t=r.content;return i.characterSize!==t.characterSize&&this.setCharacterSize(t.characterSize),i.font!==t.font&&this.setFontName(t.font),i.bold!==t.bold&&this.setBold(t.bold),i.italic!==t.italic&&this.setItalic(t.italic),i.color!==t.color&&this.setColor(t.color),i.text!==t.text&&this.setText(t.text),i.textAlignment!==t.textAlignment&&this.setTextAlignment(t.textAlignment),i.verticalTextAlignment!==t.verticalTextAlignment&&this.setVerticalTextAlignment(t.verticalTextAlignment),i.isOutlineEnabled!==t.isOutlineEnabled&&this.setOutlineEnabled(t.isOutlineEnabled),i.outlineThickness!==t.outlineThickness&&this.setOutlineThickness(t.outlineThickness),i.outlineColor!==t.outlineColor&&this.setOutlineColor(t.outlineColor),i.isShadowEnabled!==t.isShadowEnabled&&this.showShadow(t.isShadowEnabled),i.shadowColor!==t.shadowColor&&this.setShadowColor(t.shadowColor),i.shadowOpacity!==t.shadowOpacity&&this.setShadowOpacity(t.shadowOpacity),i.shadowDistance!==t.shadowDistance&&this.setShadowDistance(t.shadowDistance),i.shadowAngle!==t.shadowAngle&&this.setShadowAngle(t.shadowAngle),i.shadowBlurRadius!==t.shadowBlurRadius&&this.setShadowBlurRadius(t.shadowBlurRadius),(i.lineHeight||0)!==(t.lineHeight||0)&&this.setLineHeight(t.lineHeight||0),i.underlined===t.underlined}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),str:this._str,o:this.opacity,cs:this._characterSize,fn:this._fontName,b:this._bold,i:this._italic,u:this._underlined,c:this._color,scale:this.getScale(),ta:this._textAlign,vta:this._verticalTextAlignment,wrap:this._wrapping,wrapw:this._wrappingWidth,oena:this._isOutlineEnabled,ot:this._outlineThickness,oc:this._outlineColor,sh:this._shadow,shc:this._shadowColor,sho:this._shadowOpacity,shd:this._shadowDistance,sha:this._shadowAngle,shb:this._shadowBlur,lh:this._lineHeight,pad:this._padding}}updateFromNetworkSyncData(e,r){super.updateFromNetworkSyncData(e,r),e.str!==void 0&&this.setText(e.str),e.o!==void 0&&this.setOpacity(e.o),e.cs!==void 0&&this.setCharacterSize(e.cs),e.fn!==void 0&&this.setFontName(e.fn),e.b!==void 0&&this.setBold(e.b),e.i!==void 0&&this.setItalic(e.i),e.u!==void 0&&(this._underlined=e.u),e.c!==void 0&&(this._color=e.c),e.scale!==void 0&&this.setScale(e.scale),e.ta!==void 0&&this.setTextAlignment(e.ta),e.vta!==void 0&&this.setVerticalTextAlignment(e.vta),e.wrap!==void 0&&this.setWrapping(e.wrap),e.wrapw!==void 0&&this.setWrappingWidth(e.wrapw),e.oena!==void 0&&this.setOutlineEnabled(e.oena),e.ot!==void 0&&this.setOutlineThickness(e.ot),e.oc!==void 0&&(this._outlineColor=e.oc),e.sh!==void 0&&this.showShadow(e.sh),e.shc!==void 0&&(this._shadowColor=e.shc),e.sho!==void 0&&this.setShadowOpacity(e.sho),e.shd!==void 0&&this.setShadowDistance(e.shd),e.sha!==void 0&&this.setShadowAngle(e.sha),e.shb!==void 0&&this.setShadowBlurRadius(e.shb),e.lh!==void 0&&this.setLineHeight(e.lh),e.pad!==void 0&&this.setPadding(e.pad)}getRendererObject(){return this._renderer.getRendererObject()}updatePreRender(e){this._renderer.ensureUpToDate()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(e){e.customSize?(this.setWrappingWidth(e.width),this.setWrapping(!0)):this.setWrapping(!1),this.setOpacity(e.opacity===void 0?255:e.opacity)}_updateTextPosition(){this.invalidateHitboxes(),this._renderer.updatePosition()}setX(e){super.setX(e),this._updateTextPosition()}setY(e){super.setY(e),this._updateTextPosition()}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}getString(){return this.getText()}setString(e){this.setText(e)}getText(){return this._str}setText(e){e!==this._str&&(this._str=e,this._renderer.updateString(),this._updateTextPosition())}getCharacterSize(){return this._characterSize}setCharacterSize(e){e<=1&&(e=1),this._characterSize=e,this._renderer.updateStyle()}getLineHeighLine truncated
//# sourceMappingURL=textruntimeobject.js.map //# sourceMappingURL=textruntimeobject.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(i){class r extends i.RuntimeObject{constructor(e,t){super(e,t);this._xOffset=0;this._yOffset=0;this.opacity=255;this._objectData=t,this._renderer=new i.TiledSpriteRuntimeObjectRenderer(this,e,t.texture),this._width=0,this._height=0,this.setWidth(t.width),this.setHeight(t.height),this.onCreated()}updateFromObjectData(e,t){return this._objectData=t,e.texture!==t.texture&&this.setTexture(t.texture,this.getRuntimeScene()),e.width!==t.width&&this.setWidth(t.width),e.height!==t.height&&this.setHeight(t.height),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),xo:this.getXOffset(),yo:this.getYOffset(),op:this.getOpacity(),color:this.getColor()}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.xo!==void 0&&this.setXOffset(e.xo),e.yo!==void 0&&this.setYOffset(e.yo),e.op!==void 0&&this.setOpacity(e.op),e.color!==void 0&&this.setColor(e.color)}getRendererObject(){return this._renderer.getRendererObject()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(e){e.customSize&&(this.setWidth(e.width),this.setHeight(e.height)),this.setOpacity(e.opacity===void 0?255:e.opacity)}setX(e){super.setX(e),this._renderer.updatePosition()}setY(e){super.setY(e),this._renderer.updatePosition()}setTexture(e,t){this._renderer.setTexture(e,t)}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width!==e&&(this._width=e,this._renderer.setWidth(e),this.invalidateHitboxes())}setHeight(e){this._height!==e&&(this._height=e,this._renderer.setHeight(e),this.invalidateHitboxes())}setSize(e,t){this.setWidth(e),this.setHeight(t)}getOriginalWidth(){return this._objectData.width}getOriginalHeight(){return this._objectData.height}setXOffset(e){this._xOffset=e,this._renderer.updateXOffset()}setYOffset(e){this._yOffset=e,this._renderer.updateYOffset()}getXOffset(){return this._xOffset}getYOffset(){return this._yOffset}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}setColor(e){this._renderer.setColor(e)}getColor(){return this._renderer.getColor()}getScale(){const e=Math.abs(this.getScaleX()),t=Math.abs(this.getScaleY());return e===t?e:Math.sqrt(e*t)}getScaleX(){return this._width/this._renderer.getTextureWidth()}getScaleY(){return this._height/this._renderer.getTextureHeight()}setScale(e){this.setWidth(this._renderer.getTextureWidth()*e),this.setHeight(this._renderer.getTextureHeight()*e)}setScaleX(e){this.setWidth(this._renderer.getTextureWidth()*e)}setScaleY(e){this.setHeight(this._renderer.getTextureHeight()*e)}}i.TiledSpriteRuntimeObject=r,i.registerObject("TiledSpriteObject::TiledSprite",i.TiledSpriteRuntimeObject)})(gdjs||(gdjs={})); var gdjs;(function(i){class s extends i.RuntimeObject{constructor(e,t,r){super(e,t,r);this._xOffset=0;this._yOffset=0;this.opacity=255;this._objectData=t,this._renderer=new i.TiledSpriteRuntimeObjectRenderer(this,e,t.texture),this._width=0,this._height=0,this.setWidth(t.width),this.setHeight(t.height),this.onCreated()}updateFromObjectData(e,t){return this._objectData=t,e.texture!==t.texture&&this.setTexture(t.texture,this.getRuntimeScene()),e.width!==t.width&&this.setWidth(t.width),e.height!==t.height&&this.setHeight(t.height),!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),xo:this.getXOffset(),yo:this.getYOffset(),op:this.getOpacity(),color:this.getColor()}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.xo!==void 0&&this.setXOffset(e.xo),e.yo!==void 0&&this.setYOffset(e.yo),e.op!==void 0&&this.setOpacity(e.op),e.color!==void 0&&this.setColor(e.color)}getRendererObject(){return this._renderer.getRendererObject()}onDestroyed(){super.onDestroyed(),this._renderer.destroy()}extraInitializationFromInitialInstance(e){e.customSize&&(this.setWidth(e.width),this.setHeight(e.height)),this.setOpacity(e.opacity===void 0?255:e.opacity)}setX(e){super.setX(e),this._renderer.updatePosition()}setY(e){super.setY(e),this._renderer.updatePosition()}setTexture(e,t){this._renderer.setTexture(e,t)}setAngle(e){super.setAngle(e),this._renderer.updateAngle()}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width!==e&&(this._width=e,this._renderer.setWidth(e),this.invalidateHitboxes())}setHeight(e){this._height!==e&&(this._height=e,this._renderer.setHeight(e),this.invalidateHitboxes())}setSize(e,t){this.setWidth(e),this.setHeight(t)}getOriginalWidth(){return this._objectData.width}getOriginalHeight(){return this._objectData.height}setXOffset(e){this._xOffset=e,this._renderer.updateXOffset()}setYOffset(e){this._yOffset=e,this._renderer.updateYOffset()}getXOffset(){return this._xOffset}getYOffset(){return this._yOffset}setOpacity(e){e<0&&(e=0),e>255&&(e=255),this.opacity=e,this._renderer.updateOpacity()}getOpacity(){return this.opacity}setColor(e){this._renderer.setColor(e)}getColor(){return this._renderer.getColor()}getScale(){const e=Math.abs(this.getScaleX()),t=Math.abs(this.getScaleY());return e===t?e:Math.sqrt(e*t)}getScaleX(){return this._width/this._renderer.getTextureWidth()}getScaleY(){return this._height/this._renderer.getTextureHeight()}setScale(e){this.setWidth(this._renderer.getTextureWidth()*e),this.setHeight(this._renderer.getTextureHeight()*e)}setScaleX(e){this.setWidth(this._renderer.getTextureWidth()*e)}setScaleY(e){this.setHeight(this._renderer.getTextureHeight()*e)}}i.TiledSpriteRuntimeObject=s,i.registerObject("TiledSpriteObject::TiledSprite",i.TiledSpriteRuntimeObject)})(gdjs||(gdjs={}));
//# sourceMappingURL=tiledspriteruntimeobject.js.map //# sourceMappingURL=tiledspriteruntimeobject.js.map
@@ -1,2 +1,2 @@
var gdjs;(function(d){const S=new d.Logger("Tween");function h(a){return a.setScaleX&&a.setScaleY&&a.getScaleX&&a.getScaleY}function j(a){return a.setOpacity&&a.getOpacity}function u(a){return a.getZ&&a.setZ}function m(a){return a.setColor&&a.getColor}function O(a){return a.setCharacterSize&&a.getCharacterSize}const g=d.evtTools.common.lerp,T=d.evtTools.common.exponentialInterpolation,_=()=>{},p=a=>e=>a.setNumber(e),v=a=>e=>a.setX(e),C=a=>e=>a.setY(e),R=a=>u(a)?e=>a.setZ(e):()=>{},y=a=>([e,t])=>a.setPosition(e,t),P=a=>e=>a.setAngle(e),X=a=>e=>a.setWidth(e),D=a=>e=>a.setHeight(e),Y=a=>e=>a.setRotationX(e),H=a=>e=>a.setRotationY(e),B=a=>e=>a.setDepth(e),I=(a,e)=>e?([t,o])=>{const r=a.getCenterXInScene(),n=a.getCenterYInScene();a.setScaleX(t),a.setScaleY(o),a.setCenterPositionInScene(r,n)}:([t,o])=>{a.setScaleX(t),a.setScaleY(o)},x=(a,e,t)=>t?o=>{const r=a.getCenterXInScene(),n=a.getCenterYInScene(),i=e?e.getCenterZInScene():0;a.setScale(o),a.setCenterXInScene(r),a.setCenterYInScene(n),e&&e.setCenterZInScene(i)}:o=>a.setScale(o),M=(a,e)=>e?t=>{const o=a.getCenterXInScene();a.setScaleX(t),a.setCenterXInScene(o)}:t=>a.setScaleX(t),V=(a,e)=>e?t=>{const o=a.getCenterYInScene();a.setScaleY(t),a.setCenterYInScene(o)}:t=>a.setScaleY(t),F=a=>e=>a.setOpacity(e),N=a=>e=>a.setCharacterSize(e),A=(a,e)=>t=>{a.updateDoubleParameter(e,t)},k=(a,e)=>([t,o,r])=>{const n=d.evtTools.tween.hslToRgb(t,o,r);a.updateColorParameter(e,d.rgbToHexNumber(n[0],n[1],n[2]))},z=(a,e)=>e?([t,o,r])=>{const n=d.evtTools.tween.hslToRgb(t,o,r);a.setColor(Math.floor(n[0])+";"+Math.floor(n[1])+";"+Math.floor(n[2]))}:([t,o,r])=>{a.setColor(Math.floor(t)+";"+Math.floor(o)+";"+Math.floor(r))},Z=a=>([e,t,o])=>{const r=d.evtTools.tween.hslToRgb(e,t,o);a.setColor(Math.floor(r[0])+";"+Math.floor(r[1])+";"+Math.floor(r[2]))},E=a=>e=>{const t=e.type,o=e.variablePath,r=e.effectName,n=e.propertyName,i=!!e.scaleFromCenterOfObject,s=!!e.useHSLColorTransition;if(t==="objectValue")return _;if(t==="variable"&&o){const l=a.getVariables().getVariableFromPath(o);return l?p(l):()=>{}}if(t==="positionX")return v(a);if(t==="positionY")return C(a);if(t==="position")return y(a);if(t==="positionZ")return R(a);if(t==="width")return X(a);if(t==="height")return D(a);if(t==="depth")return u(a)?B(a):()=>{};if(t==="angle")return P(a);if(t==="rotationX")return u(a)?Y(a):()=>{};if(t==="rotationY")return u(a)?H(a):()=>{};if(t==="scale"){if(!h(a))return()=>{};const l=u(a)?a:null;return x(a,l,i)}if(t==="scaleXY")return h(a)?I(a,i):()=>{};if(t==="scaleX")return h(a)?M(a,i):()=>{};if(t==="scaleY")return h(a)?V(a,i):()=>{};if(t==="opacity")return j(a)?F(a):()=>{};if(t==="characterSize")return O(a)?N(a):()=>{};if(t==="numberEffectProperty"&&r&&n){const l=a.getRendererEffects()[r];return l||S.error(`The object "${a.name}" doesn't have any effect called "${r}"`),A(l,n)}if(t==="colorEffectProperty"&&r&&n){const l=a.getRendererEffects()[r];return l||S.error(`The object "${a.name}" doesn't have any effect called "${r}"`),k(l,n)}return t==="objectColor"?m(a)?z(a,s):()=>{}:t==="objectColorHSL"?m(a)?Z(a):()=>{}:()=>{}};class q extends d.RuntimeBehavior{constructor(e,t,o){super(e,t,o);this._tweens=new d.evtTools.tween.TweenManager;this._isActive=!0}updateFromBehaviorData(e,t){return!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),props:{tweenManager:this._tweens.getNetworkSyncData()}}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.props.tweenManager&&this._tweens.updateFromNetworkSyncData(e.props.tweenManager,o=>this.owner,o=>E(this.owner)(o),o=>o.destroyObjectWhenFinished?()=>this._deleteFromScene():null)}doStepPreEvents(e){this._tweens.step()}_deleteFromScene(){this.owner.deleteFromScene()}addVariableTween(e,t,o,r,n,i,s){this._tweens.addSimpleTween(e,this.owner.getRuntimeScene(),i/1e3,n,g,o,r,p(t),{type:"variable",variable:t,destroyObjectWhenFinished:s},s?()=>this._deleteFromScene():null)}addVariableTween2(e,t,o,r,n,i){this._addVariableTween(e,t,o,r,n/1e3,i,this.owner.getRuntimeScene())}addVariableTween3(e,t,o,r,n,i){this._addVariableTween(e,t,o,r,n,i,this.owner)}_addVariableTween(e,t,o,r,n,i,s){t.getType()==="number"&&this._tweens.addSimpleTween(e,s,n,r,g,t.getValue(),o,p(t),{type:"variable",variable:t,destroyObjectWhenFinished:i},i?()=>this._deleteFromScene():null)}addValueTween(e,t,o,r,n,i,s){this._tweens.addSimpleTween(e,this.owner,n,r,i?T:g,t,o,_,{type:"objectValue",destroyObjectWhenFinished:s},s?()=>this._deleteFromScene():null)}addObjectPositionTween(e,t,o,r,n,i){this._addObjectPositionTween(e,t,o,r,n/1e3,i,this.owner.getRuntimeScene())}addObjectPositionTween2(e,t,o,r,n,i){this._addObjectPositionTween(e,t,o,r,n,i,this.owner)}_addObjectPositionTween(e,t,o,r,n,i,s){this._tweens.addMultiTween(e,s,n,r,g,[this.owner.getX(),this.owner.getY()],[t,o],y(this.owner),{type:"position",destroyObjectWhenFinished:i},i?()=>this._deleteFromScene():null)}addObjectPositionXTween(e,t,o,r,n){this._addObjectPositionXTween(e,t,o,r/1e3,n,this.owner.getRuntimeScene())}addObjeLine truncated var gdjs;(function(d){const S=new d.Logger("Tween");function T(i){return i.setScaleX&&i.setScaleY&&i.getScaleX&&i.getScaleY}function j(i){return i.setOpacity&&i.getOpacity}function u(i){return i.getZ&&i.setZ}function m(i){return i.setColor&&i.getColor}function O(i){return i.setCharacterSize&&i.getCharacterSize}const g=d.evtTools.common.lerp,h=d.evtTools.common.exponentialInterpolation,_=()=>{},p=i=>e=>i.setNumber(e),v=i=>e=>i.setX(e),C=i=>e=>i.setY(e),R=i=>u(i)?e=>i.setZ(e):()=>{},y=i=>([e,t])=>i.setPosition(e,t),P=i=>e=>i.setAngle(e),X=i=>e=>i.setWidth(e),Y=i=>e=>i.setHeight(e),D=i=>e=>i.setRotationX(e),H=i=>e=>i.setRotationY(e),B=i=>e=>i.setDepth(e),I=(i,e)=>e?([t,o])=>{const r=i.getCenterXInScene(),n=i.getCenterYInScene();i.setScaleX(t),i.setScaleY(o),i.setCenterPositionInScene(r,n)}:([t,o])=>{i.setScaleX(t),i.setScaleY(o)},x=(i,e,t)=>t?o=>{const r=i.getCenterXInScene(),n=i.getCenterYInScene(),a=e?e.getCenterZInScene():0;i.setScale(o),i.setCenterXInScene(r),i.setCenterYInScene(n),e&&e.setCenterZInScene(a)}:o=>i.setScale(o),M=(i,e)=>e?t=>{const o=i.getCenterXInScene();i.setScaleX(t),i.setCenterXInScene(o)}:t=>i.setScaleX(t),V=(i,e)=>e?t=>{const o=i.getCenterYInScene();i.setScaleY(t),i.setCenterYInScene(o)}:t=>i.setScaleY(t),F=i=>e=>i.setOpacity(e),N=i=>e=>i.setCharacterSize(e),A=(i,e)=>t=>{i.updateDoubleParameter(e,t)},k=(i,e)=>([t,o,r])=>{const n=d.evtTools.tween.hslToRgb(t,o,r);i.updateColorParameter(e,d.rgbToHexNumber(n[0],n[1],n[2]))},z=(i,e)=>e?([t,o,r])=>{const n=d.evtTools.tween.hslToRgb(t,o,r);i.setColor(Math.floor(n[0])+";"+Math.floor(n[1])+";"+Math.floor(n[2]))}:([t,o,r])=>{i.setColor(Math.floor(t)+";"+Math.floor(o)+";"+Math.floor(r))},Z=i=>([e,t,o])=>{const r=d.evtTools.tween.hslToRgb(e,t,o);i.setColor(Math.floor(r[0])+";"+Math.floor(r[1])+";"+Math.floor(r[2]))},E=i=>e=>{const t=e.type,o=e.variablePath,r=e.effectName,n=e.propertyName,a=!!e.scaleFromCenterOfObject,s=!!e.useHSLColorTransition;if(t==="objectValue")return _;if(t==="variable"&&o){const l=i.getVariables().getVariableFromPath(o);return l?p(l):()=>{}}if(t==="positionX")return v(i);if(t==="positionY")return C(i);if(t==="position")return y(i);if(t==="positionZ")return R(i);if(t==="width")return X(i);if(t==="height")return Y(i);if(t==="depth")return u(i)?B(i):()=>{};if(t==="angle")return P(i);if(t==="rotationX")return u(i)?D(i):()=>{};if(t==="rotationY")return u(i)?H(i):()=>{};if(t==="scale"){if(!T(i))return()=>{};const l=u(i)?i:null;return x(i,l,a)}if(t==="scaleXY")return T(i)?I(i,a):()=>{};if(t==="scaleX")return T(i)?M(i,a):()=>{};if(t==="scaleY")return T(i)?V(i,a):()=>{};if(t==="opacity")return j(i)?F(i):()=>{};if(t==="characterSize")return O(i)?N(i):()=>{};if(t==="numberEffectProperty"&&r&&n){const l=i.getRendererEffects()[r];return l||S.error(`The object "${i.name}" doesn't have any effect called "${r}"`),A(l,n)}if(t==="colorEffectProperty"&&r&&n){const l=i.getRendererEffects()[r];return l||S.error(`The object "${i.name}" doesn't have any effect called "${r}"`),k(l,n)}return t==="objectColor"?m(i)?z(i,s):()=>{}:t==="objectColorHSL"?m(i)?Z(i):()=>{}:()=>{}};class q extends d.RuntimeBehavior{constructor(e,t,o){super(e,t,o);this._tweens=new d.evtTools.tween.TweenManager;this._isActive=!0}applyBehaviorOverriding(e){return!0}getNetworkSyncData(e){return{...super.getNetworkSyncData(e),props:{tweenManager:this._tweens.getNetworkSyncData()}}}updateFromNetworkSyncData(e,t){super.updateFromNetworkSyncData(e,t),e.props.tweenManager&&this._tweens.updateFromNetworkSyncData(e.props.tweenManager,o=>this.owner,o=>E(this.owner)(o),o=>o.destroyObjectWhenFinished?()=>this._deleteFromScene():null)}doStepPreEvents(e){this._tweens.step()}_deleteFromScene(){this.owner.deleteFromScene()}addVariableTween(e,t,o,r,n,a,s){this._tweens.addSimpleTween(e,this.owner.getRuntimeScene(),a/1e3,n,g,o,r,p(t),{type:"variable",variable:t,destroyObjectWhenFinished:s},s?()=>this._deleteFromScene():null)}addVariableTween2(e,t,o,r,n,a){this._addVariableTween(e,t,o,r,n/1e3,a,this.owner.getRuntimeScene())}addVariableTween3(e,t,o,r,n,a){this._addVariableTween(e,t,o,r,n,a,this.owner)}_addVariableTween(e,t,o,r,n,a,s){t.getType()==="number"&&this._tweens.addSimpleTween(e,s,n,r,g,t.getValue(),o,p(t),{type:"variable",variable:t,destroyObjectWhenFinished:a},a?()=>this._deleteFromScene():null)}addValueTween(e,t,o,r,n,a,s){this._tweens.addSimpleTween(e,this.owner,n,r,a?h:g,t,o,_,{type:"objectValue",destroyObjectWhenFinished:s},s?()=>this._deleteFromScene():null)}addObjectPositionTween(e,t,o,r,n,a){this._addObjectPositionTween(e,t,o,r,n/1e3,a,this.owner.getRuntimeScene())}addObjectPositionTween2(e,t,o,r,n,a){this._addObjectPositionTween(e,t,o,r,n,a,this.owner)}_addObjectPositionTween(e,t,o,r,n,a,s){this._tweens.addMultiTween(e,s,n,r,g,[this.owner.getX(),this.owner.getY()],[t,o],y(this.owner),{type:"position",destroyObjectWhenFinished:a},a?()=>this._deleteFromScene():null)}addObjectPositionXTween(e,t,o,r,n){this._addObjectPositionXTween(e,t,o,r/1e3,n,this.owner.getRuntimeScene())}addObjecLine truncated
//# sourceMappingURL=tweenruntimebehavior.js.map //# sourceMappingURL=tweenruntimebehavior.js.map
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Loaded 100 of 324 files, more files were not shown because too many files have changed in this diff. Show more