Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cbe29b777
|
||
|
|
fa6020f1ea
|
||
|
|
45586031e1
|
||
|
|
ff863ba277
|
||
|
|
50bffb7668
|
||
|
|
792c75c2a3
|
No files matched your search
@@ -1,36 +1,37 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "berry-dash-ultimate",
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.9.4",
|
||||
"@tauri-apps/cli": "2.10.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@tauri-apps/cli": ["@tauri-apps/cli@2.9.4", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.9.4", "@tauri-apps/cli-darwin-x64": "2.9.4", "@tauri-apps/cli-linux-arm-gnueabihf": "2.9.4", "@tauri-apps/cli-linux-arm64-gnu": "2.9.4", "@tauri-apps/cli-linux-arm64-musl": "2.9.4", "@tauri-apps/cli-linux-riscv64-gnu": "2.9.4", "@tauri-apps/cli-linux-x64-gnu": "2.9.4", "@tauri-apps/cli-linux-x64-musl": "2.9.4", "@tauri-apps/cli-win32-arm64-msvc": "2.9.4", "@tauri-apps/cli-win32-ia32-msvc": "2.9.4", "@tauri-apps/cli-win32-x64-msvc": "2.9.4" }, "bin": { "tauri": "tauri.js" } }, "sha512-pvylWC9QckrOS9ATWXIXcgu7g2hKK5xTL5ZQyZU/U0n9l88SEFGcWgLQNa8WZmd+wWIOWhkxOFcOl3i6ubDNNw=="],
|
||||
"@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.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-9rHkMVtbMhe0AliVbrGpzMahOBg3rwV46JYRELxR9SN6iu1dvPOaMaiC4cP6M/aD1424ziXnnMdYU06RAH8oIw=="],
|
||||
"@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.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-VT9ymNuT06f5TLjCZW2hfSxbVtZDhORk7CDUDYiq5TiSYQdxkl8MVBy0CCFFcOk4QAkUmqmVUA9r3YZ/N/vPRQ=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "arm" }, "sha512-tTWkEPig+2z3Rk0zqZYfjUYcgD+aSm72wdrIhdYobxbQZOBw0zfn50YtWv+av7bm0SHvv75f0l7JuwgZM1HFow=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-ql6vJ611qoqRYHxkKPnb2vHa27U+YRKRmIpLMMBeZnfFtZ938eao7402AQCH1mO2+/8ioUhbpy9R/ZcLTXVmkg=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-vg7yNn7ICTi6hRrcA/6ff2UpZQP7un3xe3SEld5QM0prgridbKAiXGaCKr3BnUBx/rGXegQlD/wiLcWdiiraSw=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "none" }, "sha512-l8L+3VxNk6yv5T/Z/gv5ysngmIpsai40B9p6NQQyqYqxImqYX37pqREoEBl1YwG7szGnDibpWhidPrWKR59OJA=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "x64" }, "sha512-PepPhCXc/xVvE3foykNho46OmCyx47E/aG676vKTVp+mqin5d+IBqDL6wDKiGNT5OTTxKEyNlCQ81Xs2BQhhqA=="],
|
||||
"@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.4", "", { "os": "linux", "cpu": "x64" }, "sha512-zcd1QVffh5tZs1u1SCKUV/V7RRynebgYUNWHuV0FsIF1MjnULUChEXhAhug7usCDq4GZReMJOoXa6rukEozWIw=="],
|
||||
"@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.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-/7ZhnP6PY04bEob23q8MH/EoDISdmR1wuNm0k9d5HV7TDMd2GGCDa8dPXA4vJuglJKXIfXqxFmZ4L+J+MO42+w=="],
|
||||
"@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.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-1LmAfaC4Cq+3O1Ir1ksdhczhdtFSTIV51tbAGtbV/mr348O+M52A/xwCCXQank0OcdBxy5BctqkMtuZnQvA8uQ=="],
|
||||
"@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.4", "", { "os": "win32", "cpu": "x64" }, "sha512-EdYd4c9wGvtPB95kqtEyY+bUR+k4kRw3IA30mAQ1jPH6z57AftT8q84qwv0RDp6kkEqOBKxeInKfqi4BESYuqg=="],
|
||||
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.10.0", "", { "os": "win32", "cpu": "x64" }, "sha512-NTpyQxkpzGmU6ceWBTY2xRIEaS0ZLbVx1HE1zTA3TY/pV3+cPoPPOs+7YScr4IMzXMtOw7tLw5LEXo5oIG3qaQ=="],
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "berry-dash-ultimate",
|
||||
"private": true,
|
||||
"version": "1.1.0",
|
||||
"version": "1.5.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.9.4"
|
||||
"@tauri-apps/cli": "2.10.0"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "berry-dash-ultimate"
|
||||
version = "1.1.0"
|
||||
version = "1.5.0"
|
||||
authors = ["Lncvrt"]
|
||||
edition = "2024"
|
||||
|
||||
@@ -9,10 +9,9 @@ name = "berry_dash_ultimate_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.5.2", features = [] }
|
||||
tauri-build = { version = "2.5.5", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.9.3", features = [] }
|
||||
tauri = { version = "2.10.2", features = [] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.145"
|
||||
|
||||
serde_json = "1.0.149"
|
||||
@@ -15,7 +15,8 @@
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/main_activity_title"
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:stopWithTask="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@@ -1,18 +1,17 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Berry Dash Ultimate",
|
||||
"version": "1.1.0",
|
||||
"version": "1.5.0",
|
||||
"identifier": "xyz.lncvrt.bonoise-bdu",
|
||||
"build": {
|
||||
"frontendDist": "../src"
|
||||
},
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
"windows": [
|
||||
{
|
||||
"title": "Berry Dash Ultimate",
|
||||
"minWidth": 800,
|
||||
"minHeight": 600,
|
||||
"minWidth": 854,
|
||||
"minHeight": 480,
|
||||
"maximized": true
|
||||
}
|
||||
],
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 687 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 231 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 897 B |
|
After Width: | Height: | Size: 877 B |
|
After Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 749 B |
@@ -1,2 +1,2 @@
|
||||
var gdjs;(function(a){const o=new a.Logger("CustomRuntimeObject");class h extends a.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 a.AffineTransformation;this._localInverseTransformation=new a.AffineTransformation;this._isLocalTransformationDirty=!0;this._type=e.type,this._instanceContainer=new a.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}e.defaultVariant||(e.defaultVariant={...e,name:""});const i=e.defaultVariant.instances.length==0;let n=e.defaultVariant;if(t.variant&&!i)for(let r=0;r<e.variants.length;r++){const s=e.variants[r];if(s.name===t.variant){n=s;break}}this._isInnerAreaFollowingParentSize=e.isInnerAreaFollowingParentSize,n.instances.length>0&&(this._innerArea||(this._innerArea={min:[0,0,0],max:[0,0,0]}),this._innerArea.min[0]=n.areaMinX,this._innerArea.min[1]=n.areaMinY,this._innerArea.min[2]=n.areaMinZ,this._innerArea.max[0]=n.areaMaxX,this._innerArea.max[1]=n.areaMaxY,this._innerArea.max[2]=n.areaMaxZ),this._instanceContainer.loadFrom(t,n)}reinitialize(t){super.reinitialize(t),this._reinitializeRenderer(),this._initializeFromObjectData(t),this.onCreated()}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(),s=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._reinitializeRenderer(),this._initializeFromObjectData(e),this.onCreated(),s&&(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)),t.opacity!==void 0&&this.setOpacity(t.opacity),t.flippedX&&this.flipX(t.flippedX),t.flippedY&&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 a.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.transform(this._untransformLine 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
|
||||
@@ -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
|
||||
@@ -1,2 +1,2 @@
|
||||
var gdjs;(function(o){class l extends o.RuntimeInstanceContainer{constructor(t,n){super();this._isLoaded=!1;this._initialInnerArea=null;this._parent=t,this._customObject=n,this._runtimeScene=t.getScene(),this._debuggerRenderer=new o.DebuggerRenderer(this)}addLayer(t){if(this._layers.containsKey(t.name))return;const n=new o.RuntimeCustomObjectLayer(t,this);this._layers.put(t.name,n),this._orderedLayers.push(n)}createObject(t){const n=super.createObject(t);return this._customObject.onChildrenLocationChanged(),n}loadFrom(t,n){this._isLoaded&&this.onDeletedFromScene(this._parent);const r=!n.name&&n.instances.length==0;this._setOriginalInnerArea(n);for(let e=0,i=n.objects.length;e<i;++e){const s=n.objects[e];t.childrenContent&&(!n.name||r)?this.registerObject({...s,...t.childrenContent[s.name]}):this.registerObject(s)}if(n.layers.length>0)for(let e=0,i=n.layers.length;e<i;++e)this.addLayer(n.layers[e]);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(n.instances,0,0,0,!0),this._setLayerDefaultZOrders(),this._isLoaded=!0}_setOriginalInnerArea(t){t.instances.length>0&&(t._initialInnerArea||(t._initialInnerArea={min:[t.areaMinX,t.areaMinY,t.areaMinZ],max:[t.areaMaxX,t.areaMaxY,t.areaMaxZ]}),this._initialInnerArea=t._initialInnerArea)}onDeletedFromScene(t){if(!this._isLoaded)return;const n=this.getAdhocListOfAllInstances();for(let r=0,e=n.length;r<e;++r)n[r].onDeletedFromScene();this._isLoaded=!1}_destroy(){const t=this.getAdhocListOfAllInstances();for(let n=0,r=t.length;n<r;++n)t[n].onDestroyed();super._destroy(),this._onceTriggers=null}_updateObjectsPreRender(){const t=this.getAdhocListOfAllInstances();for(let n=0,r=t.length;n<r;++n){const e=t[n],i=e.getRendererObject();i&&(i.visible=!e.isHidden(),i.visible&&this.getGame().getEffectsManager().updatePreRender(e.getRendererEffects(),e)),this._debugDrawEnabled&&this._debuggerRenderer.renderDebugDraw(t,this._debugDrawShowHiddenInstances,this._debugDrawShowPointsNames,this._debugDrawShowCustomPoints),e.updatePreRender(this)}}_updateObjectsPreEvents(){const t=this.getAdhocListOfAllInstances();for(let n=0,r=t.length;n<r;++n){const e=t[n],i=e.getElapsedTime();if(e.hasNoForces())e.update(this);else{const s=e.getAverageForce(),a=i/1e3;e.setX(e.getX()+s.getX()*a),e.setY(e.getY()+s.getY()*a),e.update(this),e.updateForces(a)}e.updateTimers(i),e.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}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(t,n,r){let e=r||[0,0];return e=this._parent.getLayer(this._customObject.getLayer()).convertCoords(t,n,0,e),this._customObject.applyObjectInverseTransformation(e[0],e[1],e),e}convertInverseCoords(t,n,r){const e=r||[0,0];return this._customObject.applyObjectTransformation(t,n,e),this._parent.getLayer(this._customObject.getLayer()).convertInverseCoords(e[0],e[1],0,e)}getElapsedTime(){return this._parent.getElapsedTime()}}o.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
|
||||
|
After Width: | Height: | Size: 141 B |
|
After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 158 B |
@@ -1,2 +1,2 @@
|
||||
var gdjs;(function(c){let R;(function(y){const m=45;let d;(function(g){g.getCameraZ=(t,r,a)=>{const o=t.getLayer(r),e=o.getRenderer().getThreeCamera(),n=e?e instanceof THREE.OrthographicCamera?null:e.fov:m;return o.getCameraZ(n,a)},g.setCameraZ=(t,r,a,o)=>{const s=t.getLayer(a),n=s.getRenderer().getThreeCamera(),i=n?n instanceof THREE.OrthographicCamera?null:n.fov:m;s.setCameraZ(r,i,o)},g.getCameraRotationX=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?c.toDegrees(e.rotation.x):0},g.setCameraRotationX=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.x=c.toRad(r))},g.getCameraRotationY=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?c.toDegrees(e.rotation.y):0},g.setCameraRotationY=(t,r,a,o)=>{const n=t.getLayer(a).getRenderer().getThreeCamera();!n||(n.rotation.y=c.toRad(r))},g.turnCameraTowardObject=(t,r,a,o,s)=>{if(!r)return;const e=t.getLayer(a),i=e.getRenderer().getThreeCamera();!i||(s?i.up.set(0,1,0):i.up.set(0,0,1),i.lookAt(r.getCenterXInScene(),-r.getCenterYInScene(),r.getZ?r.getZ():0),e.setCameraRotation(c.toDegrees(-i.rotation.z)))},g.turnCameraTowardPosition=(t,r,a,o,s,e,n)=>{const i=t.getLayer(s),l=i.getRenderer().getThreeCamera();!l||(n?l.up.set(0,1,0):l.up.set(0,0,1),l.lookAt(r,-a,o),i.setCameraRotation(c.toDegrees(-l.rotation.z)))},g.getNearPlane=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e.near:0},g.setNearPlane=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||(n.near=Math.min(Math.max(r,1e-4),n.far),e.setThreeCameraDirty(!0))},g.getFarPlane=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e.far:0},g.setFarPlane=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||(n.far=Math.max(r,n.near),e.setThreeCameraDirty(!0))},g.getFov=(t,r,a)=>{const e=t.getLayer(r).getRenderer().getThreeCamera();return e?e instanceof THREE.OrthographicCamera?0:e.fov:m},g.setFov=(t,r,a,o)=>{const e=t.getLayer(a).getRenderer(),n=e.getThreeCamera();!n||n instanceof THREE.OrthographicCamera||(n.fov=Math.min(Math.max(r,0),180),e.setThreeCameraDirty(!0))}})(d=y.camera||(y.camera={}))})(R=c.scene3d||(c.scene3d={}))})(gdjs||(gdjs={}));
|
||||
var gdjs;(function(g){let R;(function(m){const y=45;let d;(function(o){o.getCameraZ=(r,e,t)=>{const n=r.getLayer(e),a=n.getRenderer().getThreeCamera(),i=a?a instanceof THREE.OrthographicCamera?null:a.fov:y;return n.getCameraZ(i,t)},o.setCameraZ=(r,e,t,n)=>{const s=r.getLayer(t),i=s.getRenderer().getThreeCamera(),l=i?i instanceof THREE.OrthographicCamera?null:i.fov:y;s.setCameraZ(e,l,n)},o.getCameraRotationX=(r,e,t)=>{const a=r.getLayer(e).getRenderer().getThreeCamera();return a?g.toDegrees(a.rotation.x):0},o.setCameraRotationX=(r,e,t,n)=>{const i=r.getLayer(t).getRenderer().getThreeCamera();!i||(i.rotation.x=g.toRad(e))},o.getCameraRotationY=(r,e,t)=>{const a=r.getLayer(e).getRenderer().getThreeCamera();return a?g.toDegrees(a.rotation.y):0},o.setCameraRotationY=(r,e,t,n)=>{const i=r.getLayer(t).getRenderer().getThreeCamera();!i||(i.rotation.y=g.toRad(e))},o.turnCameraTowardObject=(r,e,t,n,s)=>{if(!e)return;const a=r.getLayer(t),l=a.getRenderer().getThreeCamera();!l||(s?l.up.set(0,1,0):l.up.set(0,0,1),l.lookAt(e.getCenterXInScene(),-e.getCenterYInScene(),e.getZ?e.getZ():0),a.setCameraRotation(g.toDegrees(-l.rotation.z)))},o.turnCameraTowardPosition=(r,e,t,n,s,a,i)=>{const l=r.getLayer(s),c=l.getRenderer().getThreeCamera();!c||(i?c.up.set(0,1,0):c.up.set(0,0,1),c.lookAt(e,-t,n),l.setCameraRotation(g.toDegrees(-c.rotation.z)))},o.getNearPlane=(r,e,t)=>r.getLayer(e).getCamera3DNearPlaneDistance(),o.setNearPlane=(r,e,t,n)=>{r.getLayer(t).setCamera3DNearPlaneDistance(e)},o.getFarPlane=(r,e,t)=>r.getLayer(e).getCamera3DFarPlaneDistance(),o.setFarPlane=(r,e,t,n)=>{r.getLayer(t).setCamera3DFarPlaneDistance(e)},o.getFov=(r,e,t)=>r.getLayer(e).getCamera3DFieldOfView(),o.setFov=(r,e,t,n)=>{r.getLayer(t).setCamera3DFieldOfView(e)}})(d=m.camera||(m.camera={}))})(R=g.scene3d||(g.scene3d={}))})(gdjs||(gdjs={}));
|
||||
//# sourceMappingURL=Scene3DTools.js.map
|
||||
@@ -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
|
||||
@@ -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)),t.opacity!==void 0&&this.setOpacity(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)}}iLine 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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(n){class p{constructor(t,o,e,r){this._wasRendered=!1;this._textureWidth=0;this._textureHeight=0;this._object=t;const s=o.getGame().getImageManager().getPIXITexture(e),i=r?PIXI.TilingSprite:PIXI.Sprite;this._spritesContainer=new PIXI.Container,this._wrapperContainer=new PIXI.Container,this._centerSprite=new i(new PIXI.Texture(s.baseTexture)),this._borderSprites=[new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture))],this.setTexture(e,o),this._spritesContainer.removeChildren(),this._spritesContainer.addChild(this._centerSprite);for(let h=0;h<this._borderSprites.length;++h)this._spritesContainer.addChild(this._borderSprites[h]);this._wrapperContainer.addChild(this._spritesContainer),o.getLayer("").getRenderer().addRendererObject(this._wrapperContainer,t.getZOrder())}getRendererObject(){return this._wrapperContainer}ensureUpToDate(){this._spritesContainer.visible&&this._wasRendered&&this._centerSprite.texture.baseTexture.scaleMode!==PIXI.SCALE_MODES.NEAREST&&(this._spritesContainer.cacheAsBitmap=!0),this._wasRendered=!0}updateOpacity(){this._wrapperContainer.alpha=this._object.opacity/255,this._spritesContainer.cacheAsBitmap=!1}updateAngle(){this._wrapperContainer.rotation=n.toRad(this._object.angle)}updatePosition(){this._wrapperContainer.position.x=this._object.x+this._object._width/2,this._wrapperContainer.position.y=this._object.y+this._object._height/2}_updateLocalPositions(){const t=this._object;this._centerSprite.width=Math.max(t._width-t._rBorder-t._lBorder,0),this._centerSprite.height=Math.max(t._height-t._tBorder-t._bBorder,0);let o=t._lBorder,e=t._rBorder;this._centerSprite.width===0&&t._lBorder+t._rBorder>0&&(o=t._width*t._lBorder/(t._lBorder+t._rBorder),e=t._width-o);let r=t._tBorder,s=t._bBorder;this._centerSprite.height===0&&t._tBorder+t._bBorder>0&&(r=t._height*t._tBorder/(t._tBorder+t._bBorder),s=t._height-r),this._borderSprites[0].width=e,this._borderSprites[0].height=Math.max(t._height-r-s,0),this._borderSprites[2].height=r,this._borderSprites[2].width=Math.max(t._width-e-o,0),this._borderSprites[4].width=o,this._borderSprites[4].height=Math.max(t._height-r-s,0),this._borderSprites[6].height=s,this._borderSprites[6].width=Math.max(t._width-e-o,0),this._borderSprites[1].width=e,this._borderSprites[1].height=r,this._borderSprites[3].width=o,this._borderSprites[3].height=r,this._borderSprites[5].width=o,this._borderSprites[5].height=s,this._borderSprites[7].width=e,this._borderSprites[7].height=s,this._wasRendered=!0,this._spritesContainer.cacheAsBitmap=!1;const i=o,h=r,d=t._width-e,_=t._height-s;this._centerSprite.position.x=i,this._centerSprite.position.y=h,this._borderSprites[0].position.x=d,this._borderSprites[0].position.y=h,this._borderSprites[1].position.x=d,this._borderSprites[1].position.y=0,this._borderSprites[2].position.x=i,this._borderSprites[2].position.y=0,this._borderSprites[3].position.x=0,this._borderSprites[3].position.y=0,this._borderSprites[4].position.x=0,this._borderSprites[4].position.y=h,this._borderSprites[5].position.x=0,this._borderSprites[5].position.y=_,this._borderSprites[6].position.x=i,this._borderSprites[6].position.y=_,this._borderSprites[7].position.x=d,this._borderSprites[7].position.y=_}setTexture(t,o){const e=this._object,r=o.getGame().getImageManager().getPIXITexture(t).baseTexture;this._textureWidth=r.width,this._textureHeight=r.height;function s(i){return i.width<0&&(i.width=0),i.height<0&&(i.height=0),i.x<0&&(i.x=0),i.y<0&&(i.y=0),i.x>r.width&&(i.x=r.width),i.y>r.height&&(i.y=r.height),i.x+i.width>r.width&&(i.width=r.width-i.x),i.y+i.height>r.height&&(i.height=r.height-i.y),i}this._centerSprite.texture.destroy(!1),this._centerSprite.texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,e._tBorder,r.width-e._lBorder-e._rBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[0].texture.destroy(!1),this._borderSprites[0].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(r.width-e._rBorder,e._tBorder,e._rBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[2].texture.destroy(!1),this._borderSprites[2].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,0,r.width-e._lBorder-e._rBorder,e._tBorder))),this._borderSprites[4].texture.destroy(!1),this._borderSprites[4].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(0,e._tBorder,e._lBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[6].texture.destroy(!1),this._borderSprites[6].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,r.height-e._bBorder,r.width-e._lBorder-e._rBorder,e._bBorder))),this._borderSprites[1].texture.destroy(!1),this._borderSprites[1].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(r.width-e._rBorder,0,e._rBorder,e._tBorder))),this._borderSLine truncated
|
||||
var gdjs;(function(d){class p{constructor(t,o,e,r){this._wasRendered=!1;this._textureWidth=0;this._textureHeight=0;this._cachedWorldAlpha=255;this._object=t;const s=o.getGame().getImageManager().getPIXITexture(e),i=r?PIXI.TilingSprite:PIXI.Sprite;this._spritesContainer=new PIXI.Container,this._wrapperContainer=new PIXI.Container,this._centerSprite=new i(new PIXI.Texture(s.baseTexture)),this._borderSprites=[new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture)),new i(new PIXI.Texture(s.baseTexture)),new PIXI.Sprite(new PIXI.Texture(s.baseTexture))],this.setTexture(e,o),this._spritesContainer.removeChildren(),this._spritesContainer.addChild(this._centerSprite);for(let h=0;h<this._borderSprites.length;++h)this._spritesContainer.addChild(this._borderSprites[h]);this._wrapperContainer.addChild(this._spritesContainer),o.getLayer("").getRenderer().addRendererObject(this._wrapperContainer,t.getZOrder())}getRendererObject(){return this._wrapperContainer}ensureUpToDate(){this._spritesContainer.visible&&this._wasRendered&&this._centerSprite.texture.baseTexture.scaleMode!==PIXI.SCALE_MODES.NEAREST&&(this._cachedWorldAlpha!==this._spritesContainer.worldAlpha&&(this._spritesContainer.cacheAsBitmap=!1),this._spritesContainer.cacheAsBitmap=!0,this._cachedWorldAlpha=this._spritesContainer.worldAlpha),this._wasRendered=!0}updateOpacity(){this._wrapperContainer.alpha=this._object.opacity/255}updateAngle(){this._wrapperContainer.rotation=d.toRad(this._object.angle)}updatePosition(){this._wrapperContainer.position.x=this._object.x+this._object._width/2,this._wrapperContainer.position.y=this._object.y+this._object._height/2}_updateLocalPositions(){const t=this._object;this._centerSprite.width=Math.max(t._width-t._rBorder-t._lBorder,0),this._centerSprite.height=Math.max(t._height-t._tBorder-t._bBorder,0);let o=t._lBorder,e=t._rBorder;this._centerSprite.width===0&&t._lBorder+t._rBorder>0&&(o=t._width*t._lBorder/(t._lBorder+t._rBorder),e=t._width-o);let r=t._tBorder,s=t._bBorder;this._centerSprite.height===0&&t._tBorder+t._bBorder>0&&(r=t._height*t._tBorder/(t._tBorder+t._bBorder),s=t._height-r),this._borderSprites[0].width=e,this._borderSprites[0].height=Math.max(t._height-r-s,0),this._borderSprites[2].height=r,this._borderSprites[2].width=Math.max(t._width-e-o,0),this._borderSprites[4].width=o,this._borderSprites[4].height=Math.max(t._height-r-s,0),this._borderSprites[6].height=s,this._borderSprites[6].width=Math.max(t._width-e-o,0),this._borderSprites[1].width=e,this._borderSprites[1].height=r,this._borderSprites[3].width=o,this._borderSprites[3].height=r,this._borderSprites[5].width=o,this._borderSprites[5].height=s,this._borderSprites[7].width=e,this._borderSprites[7].height=s,this._wasRendered=!0,this._spritesContainer.cacheAsBitmap=!1;const i=o,h=r,n=t._width-e,_=t._height-s;this._centerSprite.position.x=i,this._centerSprite.position.y=h,this._borderSprites[0].position.x=n,this._borderSprites[0].position.y=h,this._borderSprites[1].position.x=n,this._borderSprites[1].position.y=0,this._borderSprites[2].position.x=i,this._borderSprites[2].position.y=0,this._borderSprites[3].position.x=0,this._borderSprites[3].position.y=0,this._borderSprites[4].position.x=0,this._borderSprites[4].position.y=h,this._borderSprites[5].position.x=0,this._borderSprites[5].position.y=_,this._borderSprites[6].position.x=i,this._borderSprites[6].position.y=_,this._borderSprites[7].position.x=n,this._borderSprites[7].position.y=_}setTexture(t,o){const e=this._object,r=o.getGame().getImageManager().getPIXITexture(t).baseTexture;this._textureWidth=r.width,this._textureHeight=r.height;function s(i){return i.width<0&&(i.width=0),i.height<0&&(i.height=0),i.x<0&&(i.x=0),i.y<0&&(i.y=0),i.x>r.width&&(i.x=r.width),i.y>r.height&&(i.y=r.height),i.x+i.width>r.width&&(i.width=r.width-i.x),i.y+i.height>r.height&&(i.height=r.height-i.y),i}this._centerSprite.texture.destroy(!1),this._centerSprite.texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,e._tBorder,r.width-e._lBorder-e._rBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[0].texture.destroy(!1),this._borderSprites[0].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(r.width-e._rBorder,e._tBorder,e._rBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[2].texture.destroy(!1),this._borderSprites[2].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,0,r.width-e._lBorder-e._rBorder,e._tBorder))),this._borderSprites[4].texture.destroy(!1),this._borderSprites[4].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(0,e._tBorder,e._lBorder,r.height-e._tBorder-e._bBorder))),this._borderSprites[6].texture.destroy(!1),this._borderSprites[6].texture=new PIXI.Texture(r,s(new PIXI.Rectangle(e._lBorder,r.height-e._bBorder,r.width-e._lBorder-e._rBorder,e._bBorder))),this._borderSprites[1].textLine truncated
|
||||
//# sourceMappingURL=panelspriteruntimeobject-pixi-renderer.js.map
|
||||