@kite3d/engine 0.17.0 → 0.19.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring.d.ts +1 -1
- package/dist/authoring.js +7 -7
- package/dist/authoring.js.map +1 -1
- package/dist/authoringValidation.d.ts +2 -5
- package/dist/authoringValidation.js +266 -289
- package/dist/authoringValidation.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +722 -905
- package/dist/index.js.map +1 -1
- package/dist/projectFormat.js +70 -80
- package/dist/projectFormat.js.map +1 -1
- package/dist/runtime/createGame.d.ts +1 -1
- package/dist/runtime/index.d.ts +0 -2
- package/dist/runtime/projectFormat.d.ts +7 -12
- package/dist/runtime.js +14086 -15388
- package/dist/runtime.js.map +1 -1
- package/dist/sceneSerialization.js +57 -52
- package/dist/sceneSerialization.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/src/authoring.ts +3 -3
- package/src/authoringValidation.ts +3 -40
- package/src/index.ts +0 -1
- package/src/runtime/createGame.ts +1 -5
- package/src/runtime/index.ts +0 -2
- package/src/runtime/projectFormat.ts +20 -44
- package/src/sceneSerialization.ts +10 -2
- package/dist/plugins/GeneratorComponent.d.ts +0 -40
- package/src/plugins/GeneratorComponent.ts +0 -275
package/dist/index.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EntityComponentPlugin as L, Object3DComponent as oa, Vector3 as F, literalStrings as Ca, Quaternion as C, BufferAttribute as ie, BufferGeometry as ia, Box3 as se, ConvexHull as xe, Mesh as xa, MathUtils as Pe, SphereGeometry as Ia, BoxGeometry as Fa, PlaneGeometry as Va, LineMaterial2 as Ae, Wireframe as Y, WireframeGeometry3 as X, CylinderGeometry as De, Float32BufferAttribute as Da, Object3DWidgetsPlugin as ce, AHelperWidget as Me, Group as Ie, MeshStandardMaterial as Fe, Object3D as Ee, uiFolderContainer as Sa, generateUUID as Ne, AViewerPluginSync as Ce, Matrix4 as Ya, FrameFadePlugin as Se, uiInput as Be, uiMonitor as Le, uiNumber as ne, ThreeSerialization as Ba, TypeSystem as ze, serialize as oe, uiToggle as de, uiConfig as re, copyObject3DUserData as Re, getPartialProps as Ue, setPartialProps as Ge, ThreeViewer as _e, GBufferPlugin as Te, PopmotionPlugin as Oe, GLTFAnimationPlugin as Qe, GLTFMeshOptDecodePlugin as We, KTX2LoadPlugin as qe, KTXLoadPlugin as Ke, PLYLoadPlugin as He, Rhino3dmLoadPlugin as Je, STLLoadPlugin as Ve, USDZLoadPlugin as Ye } from "threepipe";
|
|
1
|
+
import { EntityComponentPlugin as L, Object3DComponent as ja, Vector3 as F, literalStrings as Da, Quaternion as C, BufferAttribute as Za, BufferGeometry as ia, Box3 as $a, ConvexHull as fe, Mesh as ya, MathUtils as pe, SphereGeometry as va, BoxGeometry as Pa, PlaneGeometry as Wa, LineMaterial2 as ge, Wireframe as Y, WireframeGeometry3 as X, CylinderGeometry as me, Float32BufferAttribute as xa, Object3DWidgetsPlugin as ae, AHelperWidget as ue, Group as je, MeshStandardMaterial as ye, Object3D as ke, uiFolderContainer as Ia, generateUUID as we, AViewerPluginSync as xe, Matrix4 as qa, FrameFadePlugin as ve, uiInput as Pe, uiMonitor as Ae, uiNumber as ee, ThreeSerialization as Fa, TypeSystem as Me, serialize as te, uiToggle as be, uiConfig as ie, copyObject3DUserData as De, getPartialProps as Ie, setPartialProps as Fe, ThreeViewer as Ee, GBufferPlugin as Ne, PopmotionPlugin as Ce, GLTFAnimationPlugin as Be, GLTFMeshOptDecodePlugin as Se, KTX2LoadPlugin as Le, KTXLoadPlugin as ze, PLYLoadPlugin as Re, Rhino3dmLoadPlugin as Ue, STLLoadPlugin as Ge, USDZLoadPlugin as _e } from "threepipe";
|
|
3
2
|
export * from "threepipe";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { serializeSceneGltf as _b, serializeSceneGltfDocument as Tb } from "./sceneSerialization.js";
|
|
3
|
+
import { Vec3 as y, Quaternion as na, Box as K, Cylinder as Te, Sphere as se, ConvexPolyhedron as Oe, Trimesh as Qe, Body as N, Shape as q, ConeTwistConstraint as Q, Material as Ea, World as ce, ContactMaterial as ne } from "cannon-es";
|
|
4
|
+
import { installGameHooks as We, runtimeCleanupReport as qe } from "./authoringValidation.js";
|
|
5
|
+
import { authoringQualityReport as Xt, persistenceReport as Zt, publishGameTelemetry as $t, registerGameValidation as ab, semanticSceneSnapshot as eb } from "./authoringValidation.js";
|
|
6
|
+
import { parsePackageJSON as Ke, parsePackageJsonSettingsConfig as He, parseAssetsJSONManifest as Je, createProjectAssetURLModifier as Ve, isDependencyModuleSpecifier as de } from "./projectFormat.js";
|
|
7
|
+
import { REMOVED_GENERATOR_GUIDANCE as bb, assetUrlPrefix as ib, findRemovedGeneratorNodes as sb, removedGeneratorMessage as cb, settingsKey as nb, validateSceneSource as db } from "./projectFormat.js";
|
|
8
|
+
import { RUNTIME_VERSION as rb } from "./version.js";
|
|
9
|
+
import { PROJECT_MIGRATIONS as lb } from "./migrations.js";
|
|
10
|
+
import { serializeSceneGltf as pb, serializeSceneGltfDocument as gb } from "./sceneSerialization.js";
|
|
11
|
+
import { KITE3D_AUTHORING_METADATA_KEY as ub, KITE3D_RUNTIME_METADATA_KEY as jb, RuntimeObjectOwner as yb, getAuthoringMetadata as kb, getRuntimeObjectMetadata as wb, getTrackedRuntimeObjects as xb, isRuntimeObject as vb, setAuthoringMetadata as Pb } from "./authoring.js";
|
|
14
12
|
export * from "uiconfig.js";
|
|
15
13
|
export * from "ts-browser-helpers";
|
|
16
|
-
import { RUNTIME_SPECIFIERS as
|
|
17
|
-
import { extensionMimeTypes as
|
|
18
|
-
import { BACKUPS_DIRECTORY as
|
|
14
|
+
import { RUNTIME_SPECIFIERS as Ib, dependencyImportMap as Fb, projectDependencies as Eb, projectPluginNames as Nb } from "./importMap.js";
|
|
15
|
+
import { extensionMimeTypes as Bb, mimeToExt as Sb, mimeTypeForPath as Lb, typesExts as zb } from "./fileTypes.js";
|
|
16
|
+
import { BACKUPS_DIRECTORY as Ub, CONSOLE_PATH as Gb, DEPLOYS_PATH as _b, JOURNAL_PATH as Tb, KITE3D_DIRECTORY as Ob, KITE3D_SERVER_CLIENT_ID as Qb, RUNNING_DIRECTORY as Wb, STATE_PATH as qb, THUMBS_DIRECTORY as Kb } from "./paths.js";
|
|
19
17
|
(function() {
|
|
20
18
|
var t = "b9H79TebbbeJq9Geueu9Geub9Gbb9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiKLdilevlevlooroowwvwbDDbelve9Weiiviebeoweuec:W;kekr;RiOo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbe8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbdE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UbiY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbl8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbv8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UboE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbra9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbwL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbDK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbqL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbkE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9Wbsa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbzK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbHl79IV9RbODwebcekdQXq:g9sLdbk;3keYu8Jjjjjbcjo9Rgv8Kjjjjbcbhodnalcefae0mbabcbRb:S:kjjbc:GeV86bbavcjdfcbcjdzNjjjb8AdnaiTmbavcjdfadalz:tjjjb8Akabaefhrabcefhwavalfcbcbcjdal9RalcFe0EzNjjjb8Aavavcjdfalz:tjjjbhDcj;abal9UhodndndndndnalTmbaoc;WFbGgecjdaecjd6Ehqcbhkdninakai9pmiaDcjlfcbcjdzNjjjb8Aaqaiak9Rakaqfai6Egxcsfgecl4cifcd4hmadakal2fhPdndndndndnaec9WGgsTmbcbhzcehHaPhOawhAxekdnaxTmbcbhAcehHaPhCinaDaAfRbbhXaDcjlfheaChoaxhQinaeaoRbbgLaX9RgXcetaX;acr4786bbaoalfhoaecefheaLhXaQcufgQmbkaraw9Ram6miawcbamzNjjjbgeTmiaCcefhCaeamfhwaAcefgAal6hHaAal9hmbxvkkaraw9Ram6mvawcbamzNjjjb8AceheinawgXamfhwalaegoSmldnaraw9Ram6mbaocefheawcbamzNjjjb8AaXmekkaoal6hHxekindnaxTmbaDazfRbbhXaDcjlfheaOhoaxhQinaeaoRbbgLaX9RgXcetaX;acr4786bbaoalfhoaecefheaLhXaQcufgQmbkkaraA9Ram6mearaAcbamzNjjjbgKamfgw9RcK6mdcbhYaDcjlfhAinaDcjlfaYfh8AcwhCczhLcehQindndnaQce9hmbcuhoa8ARbbmecbhodninaogecsSmeaecefhoaAaefcefRbbTmbkkcucbaecs6EhoxekaQcetc;:FFFeGhocuaQtcu7cFeGhXcbheinaoaXaAaefRbb9nfhoaecefgecz9hmbkkaoaLaoaL6geEhLaQaCaeEhCaQcetgQcw6mbkdndndndnaCcufPdiebkaKaYco4fgeaeRbbcdciaCclSEaYci4coGtV86bbaCcw9hmeawa8A8Pbb83bbawcwfa8Acwf8Pbb83bbawczfhwxdkaKaYco4fgeaeRbbceaYci4coGtV86bbkdncwaC9TgEmbinawcb86bbawcefhwxbkkcuaCtcu7h8Acbh3aAh5ina5heaEhQcbhoinaeRbbgLa8AcFeGgXaLaX6EaoaCtVhoaecefheaQcufgQmbkawao86bba5aEfh5awcefhwa3aEfg3cz6mbkcbheindnaAaefRbbgoaX6mbawao86bbawcefhwkaecefgecz9hmbkkdnaYczfgYas9pmbaAczfhAaraw9RcL0mekkaYas6meawTmeaOcefhOazcefgzal6hHawhAazalSmixbkkcbhwaHceGTmexikcbhwaHceGmdkaDaPaxcufal2falz:tjjjb8AaxakfhkawmbkcbhoxokcbhoxvkaiTmekcbhoaraw9Ralcaalca0E6mialc8F9nmexdkcbhoaecufca6mdkawcbcaal9RgezNjjjbaefhwkawaDcjdfalz:tjjjbalfab9Rhokavcjof8Kjjjjbaok9heeuaecaaeca0Eabcj;abae9Uc;WFbGgdcjdadcjd6Egdfcufad9Uae2adcl4cifcd4adV2fcefkmbcbabBd:S:kjjbk;rse3u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd:C:kjjbgrc;GeV86bbalc;abfcFecjezNjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgoydbhLaocwfydbhKaoclfydbhYcbh8Adndninalc;abfavcsGcitfgoydlhEdndndnaoydbgoaL9hmbaEaYSmekdnaoaY9hmbaEaK9hmba8Acefh8AxekaoaK9hmeaEaL9hmea8Acdfh8Aka8Ac870mdaXcufhvada8AciGcx2goc:y1jjbfydbaCfcdtfydbhEadaocN1jjbfydbaCfcdtfydbhKadaoc:q1jjbfydbaCfcdtfydbhLcbhodnindnalavcsGcdtfydbaE9hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaEaOSgvaYce9iaYaH9oVgoGh3dndndndndncbcsavEaYaoEgvcs9hmbarce9imbaEaEaAaEcefaASgvEgAcefSmecmcsavEhvkasava8Acdtc;WeGV86bbavcs9hmeaEaA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbkaEhAxdkcPhvasa8AcdtcPV86bbaEhAkavTmbavaH9imekalaXcdtfaEBdbaXcefcsGhXkaOa3fhOalc;abfaQcitfgvaKBdlavaEBdbalc;abfaQcefcsGgvcitfgoaEBdlaoaLBdbavcefhoxikavcufhva8Aclfg8Ac;ab9hmbkkdnadceaKaOScetaYaOSEcx2gvc:q1jjbfydbaCfcdtfydbgLTadavcN1jjbfydbaCfcdtfydbg8AceSGadavc:y1jjbfydbaCfcdtfydbgYcdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhKxdkcuhKaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydbaY9hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaLaOSg8Efh3dndnaKcm0mbaKcefhKxekcbcsa8Aa3SgvEhKa3avfh3kdndnaEcm0mbaEcefhExekcbcsaYa3SgvEhEa3avfh3kc9:cua8EEh8FaEaKcltVhocbhvdndndninavcj1jjbfRbbaocFeGSmeavcefgvcz9hmbxdkka5aLaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeao86bbaecefhekdna8EmbaLaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaLhAkdnaKcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmbaYaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaYhAkalaXcdtfaLBdbaXcefcsGhvdndnaKPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfaYBdbavcefcsGhvkalc;abfaQcitfgoaLBdlaoa8ABdbalc;abfaQcefcsGcitfgoa8ABdlaoaYBdbalc;abfaQcdfcsGcitfgoaYBdlaoaLBdbaQcifhoavhXa3hOkascefhsaocsGhQaCcifgCai6mbkkcbhvaeaP0mbcbhvinaeavfavcj1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd:C:kjjbk:ydewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb:C:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkcbhvaoar0mbaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:dvli99dui99ludnaeTmbcuadcetcuftcu7:Yhvdndncuaicuftcu7:YgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhralcxfIdbhqdndnakJbbbb9GTmbaxhkxekJbbjZar:l:tgkak:maxJbbbb9GEhkJbbjZax:l:tgxax:marJbbbb9GEhrkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEavNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohmxekcjjjj94hmkdndnakJbbj:;akJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;akJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;klld99eud99eudnaeTmbdndncuaicuftcu7:YgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicdfciGcdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk:Hvdxue998Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6mearcearce0EhwaohDinaDc:CuBdbaDclfhDawcufgwmbkaeTmiadcl6mdarcearce0EhqarcdthkalhxcbhminaohDaxhwaqhPinaDaDydbgsawydbgzcL4cFeGc:cufcbazEgzasaz9kEBdbawclfhwaDclfhDaPcufgPmbkaxakfhxamcefgmae9hmbkkaeTmdxekaeTmekavcb9hadcl6gqVhHarcearce0Ehkarcdthrceai9Rhmcbhdindndndnavce9hmbaqmdc:CuhwalhDakhPinawaDydbgscL4cFeGc:cufcbasEgsawas9kEhwaDclfhDaPcufgPmbxdkkc:CuhwaHmbaohDalhPakhsinaDaPydbgzcL4cFeGgxc8Aaxc8A9kEc:cufcbazEBdbaPclfhPaDclfhDascufgsmbkkaqmbcbhDakhsinawhPdnavceSmbaoaDfydbhPkdndnalaDfIdbgOcjjj;8iamaPfgPcLt9R::NJbbbZJbbb:;aOJbbbb9GEMgO:lJbbb9p9DTmbaO:Ohzxekcjjjj94hzkabaDfazcFFFrGaPcKtVBdbaDclfhDascufgsmbkkabarfhbalarfhladcefgdae9hmbkkaocjdf8KjjjjbkFkdCui998Jjjjjbc:Gd9Rgv8Kjjjjbavc:4efcbc;KbzNjjjb8AcbhodnadTmbcbhoaiTmbdnabae9hmbavcuadcdtgoadcFFFFi0Ecbyd:K:kjjbHjjjjbbgeBd:4eavceBd:ydaeabaoz:tjjjb8Akavc:OefcwfcbBdbav9cb83i:Oeavc:Oefaeadaiavc:4efz:njjjbcuaicdtgraicFFFFi0Egwcbyd:K:kjjbHjjjjbbhoavc:4efavyd:ydgDcdtfaoBdbavaDcefgqBd:ydaoavyd:Oegkarz:tjjjbhxavc:4efaqcdtfadci9Ugmcbyd:K:kjjbHjjjjbbgoBdbavaDcdfgrBd:ydaocbamzNjjjbhPavc:4efarcdtfawcbyd:K:kjjbHjjjjbbgsBdbavaDcifgqBd:ydaxhoashrinaralIdbalaoydbgwcwawcw6Ecdtfc;ebfIdbMUdbaoclfhoarclfhraicufgimbkavc:4efaqcdtfcuamcdtadcFFFF970Ecbyd:K:kjjbHjjjjbbgqBdbavaDclfBd:yddnadci6mbamceamce0EhiaehoaqhrinarasaoydbcdtfIdbasaoclfydbcdtfIdbMasaocwfydbcdtfIdbMUdbaocxfhoarclfhraicufgimbkkavc;qbfhzavhoavyd:SehHavyd:WehOcbhwcbhrcbhAcehCinaohXcihQaearci2gLcdtfgocwfydbhdaoydbhDabaAcx2fgiclfaoclfydbgKBdbaiaDBdbaicwfadBdbaParfce86bbazadBdwazaKBdlazaDBdbaqarcdtfcbBdbdnawTmbcihQaXhiinazaQcdtfaiydbgoBdbaQaoaD9haoaK9hGaoad9hGfhQaiclfhiawcufgwmbkkaAcefhAaxaDcdtfgoaoydbcufBdbaxaKcdtfgoaoydbcufBdbaxadcdtfgoaoydbcufBdbcbhwinaOaHaeawaLfcdtfydbcdtgifydbcdtfgKhoakaifgDydbgdhidnadTmbdninaoydbarSmeaoclfhoaicufgiTmdxbkkaoadcdtaKfc98fydbBdbaDaDydbcufBdbkawcefgwci9hmbkdndndnaQTmbcuhrJbbbbhYcbhDavyd:SehKavyd:WehLindndnakazaDcdtfydbcdtgofydbgimbaDcefhDxekaDcs0hwasaofgdIdbh8AadalcbaDcefgDawEcdtfIdbalaxaofydbgwcwawcw6Ecdtfc;ebfIdbMgEUdbaEa8A:thEaicdthiaLaKaofydbcdtfhoinaqaoydbgwcdtfgdaEadIdbMg8AUdba8AaYaYa8A9DgdEhYawaradEhraoclfhoaic98fgimbkkaDaQ9hmbkarcu9hmekaCam9pmeindnaPaCfRbbmbaChrxdkamaCcefgC9hmbxdkkaQczaQcz6EhwazhoaXhzarcu9hmekkavyd:ydhokaocdtavc:4effc98fhrdninaoTmearydbcbyd:G:kjjbH:bjjjbbarc98fhraocufhoxbkkavc:Gdf8Kjjjjbk;UlevucuaicdtgvaicFFFFi0Egocbyd:K:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd:K:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd:K:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavzNjjjb8Aadci9UhwdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbawceawce0EhDabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic:01jjbz:mjjjbkQbabaeadaic:C:jjjbz:mjjjbk9DeeuabcFeaicdtzNjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;:kivuo99lu8Jjjjjbcj;Hb9Rgl8Kjjjjbcbhvalc1;Gbfcbc;KbzNjjjb8AalcuadcdtadcFFFFi0Egocbyd:K:kjjbHjjjjbbgrBd19GalceBd;O9Galcwfcbyd:m:kjjbBdbalcb8Pd:e:kjjb83ibalc;W;Gbfcwfcbyd:y:kjjbBdbalcb8Pd:q:kjjb83i;W9Gaicd4hwdndnadmbJFFuFhDJFFuuhqJFFuuhkJFFuFhxJFFuuhmJFFuFhPxekawcdthsaehzincbhiinalaifgHazaifIdbgDaHIdbgxaxaD9EEUdbalc;W;GbfaifgHaDaHIdbgxaxaD9DEUdbaiclfgicx9hmbkazasfhzavcefgvad9hmbkalIdwhqalId;49GhDalIdlhkalId;09GhxalIdbhmalId;W9GhPkdndnadTmbJbbbbJbbjZaPam:tJbbbb:xgPaxak:tgxaxaP9DEgxaDaq:tgDaDax9DEgD:vaDJbbbb9BEhDawcdthsarhHadhzindndnaDaeIdbam:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcv2c;j:KM;jbGhvdndnaDaeclfIdbak:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcq2cM;j:KMeGavVhvdndnaDaecwfIdbaq:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaHavaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcC2c:KM;j:KdGVBdbaeasfheaHclfhHazcufgzmbkalcbcj;GbzNjjjbhiarhHadheinaiaHydbgzcFrGcx2fgvavydbcefBdbaiazcq4cFrGcx2fgvavydlcefBdlaiazcC4cFrGcx2fgzazydwcefBdwaHclfhHaecufgembxdkkalcbcj;GbzNjjjb8AkcbhHcbhzcbhecbhvinalaHfgiydbhsaiazBdbaicwfgwydbhOawavBdbaiclfgiydbhwaiaeBdbasazfhzaOavfhvawaefheaHcxfgHcj;Gb9hmbkcbhialaocbyd:K:kjjbHjjjjbbgzBd:m9GdnadTmbabhHinaHaiBdbaHclfhHadaicefgi9hmbkadTmbabhiadhHinalaraiydbgecdtfydbcFrGcx2fgvavydbgvcefBdbazavcdtfaeBdbaiclfhiaHcufgHmbkazhiadhHinalaraiydbgecdtfydbcq4cFrGcx2fgvavydlgvcefBdlabavcdtfaeBdbaiclfhiaHcufgHmbkabhiadhHinalaraiydbgecdtfydbcC4cFrGcx2fgvavydwgvcefBdwazavcdtfaeBdbaiclfhiaHcufgHmbkadTmbcbhiinabazydbcdtfaiBdbazclfhzadaicefgi9hmbkkclhidninaic98Smealc1;Gbfaifydbcbyd:G:kjjbH:bjjjbbaic98fhixbkkalcj;Hbf8Kjjjjbk9teiucbcbyd:O:kjjbgeabcifc98GfgbBd:O:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:O:kjjbgeabcrfc94GfgbBd:O:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:O:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:O:kjjbfgdBd:O:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:6ddbcjwk:Cdb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:FFuuFFuuFFuuFFuFFFuFFFuFbc:Cqkzebbbebbbdbbb8WWbb", a = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
|
|
21
19
|
if (typeof WebAssembly != "object")
|
|
@@ -26,137 +24,137 @@ import { BACKUPS_DIRECTORY as ei, CONSOLE_PATH as ti, DEPLOYS_PATH as bi, JOURNA
|
|
|
26
24
|
e = m.instance, e.exports.__wasm_call_ctors(), e.exports.meshopt_encodeVertexVersion(0), e.exports.meshopt_encodeIndexVersion(1);
|
|
27
25
|
});
|
|
28
26
|
function s(m) {
|
|
29
|
-
for (var
|
|
30
|
-
var
|
|
31
|
-
|
|
27
|
+
for (var d = new Uint8Array(m.length), c = 0; c < m.length; ++c) {
|
|
28
|
+
var n = m.charCodeAt(c);
|
|
29
|
+
d[c] = n > 96 ? n - 97 : n > 64 ? n - 39 : n + 4;
|
|
32
30
|
}
|
|
33
31
|
for (var r = 0, c = 0; c < m.length; ++c)
|
|
34
|
-
|
|
35
|
-
return
|
|
32
|
+
d[r++] = d[c] < 60 ? a[d[c]] : (d[c] - 60) * 64 + d[++c];
|
|
33
|
+
return d.buffer.slice(0, r);
|
|
36
34
|
}
|
|
37
35
|
function i(m) {
|
|
38
36
|
if (!m)
|
|
39
37
|
throw new Error("Assertion failed");
|
|
40
38
|
}
|
|
41
|
-
function
|
|
39
|
+
function o(m) {
|
|
42
40
|
return new Uint8Array(m.buffer, m.byteOffset, m.byteLength);
|
|
43
41
|
}
|
|
44
|
-
function l(m,
|
|
45
|
-
var r = e.exports.sbrk, h = r(
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
new Uint8Array(
|
|
51
|
-
for (var A = 0; A <
|
|
52
|
-
|
|
53
|
-
return [
|
|
54
|
-
}
|
|
55
|
-
function
|
|
56
|
-
var r = e.exports.sbrk, h = r(c * 4), f = r(c *
|
|
57
|
-
|
|
42
|
+
function l(m, d, c, n) {
|
|
43
|
+
var r = e.exports.sbrk, h = r(d.length * 4), f = r(c * 4), p = new Uint8Array(e.exports.memory.buffer), u = o(d);
|
|
44
|
+
p.set(u, h), n && n(h, h, d.length, c);
|
|
45
|
+
var k = m(f, h, d.length, c);
|
|
46
|
+
p = new Uint8Array(e.exports.memory.buffer);
|
|
47
|
+
var w = new Uint32Array(c);
|
|
48
|
+
new Uint8Array(w.buffer).set(p.subarray(f, f + c * 4)), u.set(p.subarray(h, h + d.length * 4)), r(h - r(0));
|
|
49
|
+
for (var A = 0; A < d.length; ++A)
|
|
50
|
+
d[A] = w[d[A]];
|
|
51
|
+
return [w, k];
|
|
52
|
+
}
|
|
53
|
+
function g(m, d, c, n) {
|
|
54
|
+
var r = e.exports.sbrk, h = r(c * 4), f = r(c * n), p = new Uint8Array(e.exports.memory.buffer);
|
|
55
|
+
p.set(o(d), f), m(h, f, c, n), p = new Uint8Array(e.exports.memory.buffer);
|
|
58
56
|
var u = new Uint32Array(c);
|
|
59
|
-
return new Uint8Array(u.buffer).set(
|
|
57
|
+
return new Uint8Array(u.buffer).set(p.subarray(h, h + c * 4)), r(h - r(0)), u;
|
|
60
58
|
}
|
|
61
|
-
function j(m,
|
|
62
|
-
var h = e.exports.sbrk, f = h(
|
|
63
|
-
u.set(
|
|
64
|
-
var
|
|
65
|
-
return
|
|
59
|
+
function j(m, d, c, n, r) {
|
|
60
|
+
var h = e.exports.sbrk, f = h(d), p = h(n * r), u = new Uint8Array(e.exports.memory.buffer);
|
|
61
|
+
u.set(o(c), p);
|
|
62
|
+
var k = m(f, d, p, n, r), w = new Uint8Array(k);
|
|
63
|
+
return w.set(u.subarray(f, f + k)), h(f - h(0)), w;
|
|
66
64
|
}
|
|
67
65
|
function P(m) {
|
|
68
|
-
for (var
|
|
69
|
-
var
|
|
70
|
-
|
|
66
|
+
for (var d = 0, c = 0; c < m.length; ++c) {
|
|
67
|
+
var n = m[c];
|
|
68
|
+
d = d < n ? n : d;
|
|
71
69
|
}
|
|
72
|
-
return
|
|
70
|
+
return d;
|
|
73
71
|
}
|
|
74
|
-
function
|
|
75
|
-
if (i(
|
|
72
|
+
function x(m, d) {
|
|
73
|
+
if (i(d == 2 || d == 4), d == 4)
|
|
76
74
|
return new Uint32Array(m.buffer, m.byteOffset, m.byteLength / 4);
|
|
77
75
|
var c = new Uint16Array(m.buffer, m.byteOffset, m.byteLength / 2);
|
|
78
76
|
return new Uint32Array(c);
|
|
79
77
|
}
|
|
80
|
-
function
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
var A = new Uint8Array(c *
|
|
84
|
-
return A.set(
|
|
78
|
+
function D(m, d, c, n, r, h, f) {
|
|
79
|
+
var p = e.exports.sbrk, u = p(c * n), k = p(c * h), w = new Uint8Array(e.exports.memory.buffer);
|
|
80
|
+
w.set(o(d), k), m(u, c, n, r, k, f);
|
|
81
|
+
var A = new Uint8Array(c * n);
|
|
82
|
+
return A.set(w.subarray(u, u + c * n)), p(u - p(0)), A;
|
|
85
83
|
}
|
|
86
84
|
return {
|
|
87
85
|
ready: b,
|
|
88
86
|
supported: !0,
|
|
89
|
-
reorderMesh: function(m,
|
|
90
|
-
var
|
|
91
|
-
return l(e.exports.meshopt_optimizeVertexFetchRemap, m, P(m) + 1,
|
|
87
|
+
reorderMesh: function(m, d, c) {
|
|
88
|
+
var n = d ? c ? e.exports.meshopt_optimizeVertexCacheStrip : e.exports.meshopt_optimizeVertexCache : void 0;
|
|
89
|
+
return l(e.exports.meshopt_optimizeVertexFetchRemap, m, P(m) + 1, n);
|
|
92
90
|
},
|
|
93
|
-
reorderPoints: function(m,
|
|
94
|
-
return i(m instanceof Float32Array), i(m.length %
|
|
91
|
+
reorderPoints: function(m, d) {
|
|
92
|
+
return i(m instanceof Float32Array), i(m.length % d == 0), i(d >= 3), g(e.exports.meshopt_spatialSortRemap, m, m.length / d, d * 4);
|
|
95
93
|
},
|
|
96
|
-
encodeVertexBuffer: function(m,
|
|
94
|
+
encodeVertexBuffer: function(m, d, c) {
|
|
97
95
|
i(c > 0 && c <= 256), i(c % 4 == 0);
|
|
98
|
-
var
|
|
99
|
-
return j(e.exports.meshopt_encodeVertexBuffer,
|
|
96
|
+
var n = e.exports.meshopt_encodeVertexBufferBound(d, c);
|
|
97
|
+
return j(e.exports.meshopt_encodeVertexBuffer, n, m, d, c);
|
|
100
98
|
},
|
|
101
|
-
encodeIndexBuffer: function(m,
|
|
102
|
-
i(c == 2 || c == 4), i(
|
|
103
|
-
var
|
|
104
|
-
return j(e.exports.meshopt_encodeIndexBuffer, r,
|
|
99
|
+
encodeIndexBuffer: function(m, d, c) {
|
|
100
|
+
i(c == 2 || c == 4), i(d % 3 == 0);
|
|
101
|
+
var n = x(m, c), r = e.exports.meshopt_encodeIndexBufferBound(d, P(n) + 1);
|
|
102
|
+
return j(e.exports.meshopt_encodeIndexBuffer, r, n, d, 4);
|
|
105
103
|
},
|
|
106
|
-
encodeIndexSequence: function(m,
|
|
104
|
+
encodeIndexSequence: function(m, d, c) {
|
|
107
105
|
i(c == 2 || c == 4);
|
|
108
|
-
var
|
|
109
|
-
return j(e.exports.meshopt_encodeIndexSequence, r,
|
|
106
|
+
var n = x(m, c), r = e.exports.meshopt_encodeIndexSequenceBound(d, P(n) + 1);
|
|
107
|
+
return j(e.exports.meshopt_encodeIndexSequence, r, n, d, 4);
|
|
110
108
|
},
|
|
111
|
-
encodeGltfBuffer: function(m,
|
|
109
|
+
encodeGltfBuffer: function(m, d, c, n) {
|
|
112
110
|
var r = {
|
|
113
111
|
ATTRIBUTES: this.encodeVertexBuffer,
|
|
114
112
|
TRIANGLES: this.encodeIndexBuffer,
|
|
115
113
|
INDICES: this.encodeIndexSequence
|
|
116
114
|
};
|
|
117
|
-
return i(r[
|
|
115
|
+
return i(r[n]), r[n](m, d, c);
|
|
118
116
|
},
|
|
119
|
-
encodeFilterOct: function(m,
|
|
120
|
-
return i(c == 4 || c == 8), i(
|
|
117
|
+
encodeFilterOct: function(m, d, c, n) {
|
|
118
|
+
return i(c == 4 || c == 8), i(n >= 1 && n <= 16), D(e.exports.meshopt_encodeFilterOct, m, d, c, n, 16);
|
|
121
119
|
},
|
|
122
|
-
encodeFilterQuat: function(m,
|
|
123
|
-
return i(c == 8), i(
|
|
120
|
+
encodeFilterQuat: function(m, d, c, n) {
|
|
121
|
+
return i(c == 8), i(n >= 4 && n <= 16), D(e.exports.meshopt_encodeFilterQuat, m, d, c, n, 16);
|
|
124
122
|
},
|
|
125
|
-
encodeFilterExp: function(m,
|
|
126
|
-
i(c > 0 && c % 4 == 0), i(
|
|
123
|
+
encodeFilterExp: function(m, d, c, n, r) {
|
|
124
|
+
i(c > 0 && c % 4 == 0), i(n >= 1 && n <= 24);
|
|
127
125
|
var h = {
|
|
128
126
|
Separate: 0,
|
|
129
127
|
SharedVector: 1,
|
|
130
128
|
SharedComponent: 2
|
|
131
129
|
};
|
|
132
|
-
return
|
|
130
|
+
return D(e.exports.meshopt_encodeFilterExp, m, d, c, n, c, r ? h[r] : 1);
|
|
133
131
|
}
|
|
134
132
|
};
|
|
135
133
|
})();
|
|
136
|
-
var
|
|
134
|
+
var Ye = (function() {
|
|
137
135
|
var t = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;d8Yqdbk:yzeHu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhlaicefhodnadTmbalc;WFbGglcjdalcjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxdndndndnalc9WGgmTmbcbhPcehsawcjdfhzaohHinaraH9Rax6midnaraHaxfgo9RcK6mbczhlcbhOinalgic9WfgAawcj;cbffhldndndndndnaHaAco4fRbbaOcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgAco4gCaCciSgCE86bbawcj;cbfaifglcGfaoclfaCfgCRbbaAcl4ciGgXaXciSgXE86bbalcVfaCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc7faCaXfgCRbbaAciGgAaAciSgAE86bbalctfaCaAfgCRbbaoRbegAco4gXaXciSgXE86bbalc91faCaXfgCRbbaAcl4ciGgXaXciSgXE86bbalc4faCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc93faCaXfgCRbbaAciGgAaAciSgAE86bbalc94faCaAfgCRbbaoRbdgAco4gXaXciSgXE86bbalc95faCaXfgCRbbaAcl4ciGgXaXciSgXE86bbalc96faCaXfgCRbbaAcd4ciGgXaXciSgXE86bbalc97faCaXfgCRbbaAciGgAaAciSgAE86bbalc98faCaAfgARbbaoRbigoco4gCaCciSgCE86bbalc99faAaCfgARbbaocl4ciGgCaCciSgCE86bbalc9:faAaCfgARbbaocd4ciGgCaCciSgCE86bbalcufaAaCfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgAcl4gCaCcsSgCE86bbawcj;cbfaifglcGfaocwfaCfgCRbbaAcsGgAaAcsSgAE86bbalcVfaCaAfgARbbaoRbegCcl4gXaXcsSgXE86bbalc7faAaXfgARbbaCcsGgCaCcsSgCE86bbalctfaAaCfgARbbaoRbdgCcl4gXaXcsSgXE86bbalc91faAaXfgARbbaCcsGgCaCcsSgCE86bbalc4faAaCfgARbbaoRbigCcl4gXaXcsSgXE86bbalc93faAaXfgARbbaCcsGgCaCcsSgCE86bbalc94faAaCfgARbbaoRblgCcl4gXaXcsSgXE86bbalc95faAaXfgARbbaCcsGgCaCcsSgCE86bbalc96faAaCfgARbbaoRbvgCcl4gXaXcsSgXE86bbalc97faAaXfgARbbaCcsGgCaCcsSgCE86bbalc98faAaCfgARbbaoRbogCcl4gXaXcsSgXE86bbalc99faAaXfgARbbaCcsGgCaCcsSgCE86bbalc9:faAaCfgARbbaoRbrgocl4gCaCcsSgCE86bbalcufaAaCfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaOcdfhOaiczfhlarao9RcL0mekkaiam6miaoTmidnakTmbawaPfRbbhOawcj;cbfhlazhiakhAinaialRbbgHce4cbaHceG9R7aOfgO86bbaiadfhialcefhlaAcufgAmbkkazcefhzaPcefgPad6hsaohHaPad9hmexvkkcbhoasceGmdxikaoaxad2fhXdnakTmbcbhmcehsawcjdfhCinarao9Rax6miaoTmdaoaxfhoawamfRbbhOawcj;cbfhlaChiakhAinaialRbbgHce4cbaHceG9R7aOfgO86bbaiadfhialcefhlaAcufgAmbkaCcefhCamcefgmad6hsamad9hmbkaXhoxikcbhlcehsinarao9Rax6mdaoTmeaoaxfhoalcefglad6hsadal9hmbkaXhoxdkcbhoasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekcbc99arao9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;xzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfalaDcu7gPcl4fcsGcitfgsydlhzasydbhHdnaDcsGgDak9pmbavaiaPfcsGcdtfydbaxaDEhsaDThDdndnadcd9hmbabarcetfgPaH87ebaPcdfaz87ebaPclfas87ebxekabarcdtfgPaHBdbaPclfazBdbaPcwfasBdbkaxaDfhxavc;abfalcitfgPasBdbaPazBdlavaicdtfasBdbavc;abfalcefcsGglcitfgPaHBdbaPasBdlaiaDfhialcefhlxdkdndnaDcsSmbamaDfaDc987fcefhmxekaocefhDao8SbbgscFeGhPdndnascu9mmbaDhoxekaocvfhoaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhokaPce4cbaPceG9R7amfhmkdndnadcd9hmbabarcetfgDaH87ebaDcdfaz87ebaDclfam87ebxekabarcdtfgDaHBdbaDclfazBdbaDcwfamBdbkavc;abfalcitfgDamBdbaDazBdlavaicdtfamBdbavc;abfalcefcsGglcitfgDaHBdbaDamBdlaicefhialcefhlxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHcdfaD87ebaHclfas87ebxekabarcdtfgHaxBdbaHclfaDBdbaHcwfasBdbkavaicdtfaxBdbavc;abfalcitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfalcefcsGcitfgHasBdbaHaDBdlavaiaPfcsGgicdtfasBdbavc;abfalcdfcsGglcitfgDaxBdbaDasBdlalcefhlaiaOfhiazaOfhxxekaxcbaoRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbaocefhDxekaocdfhDao8SbegPcFeGhsdnaPcu9kmbaocofhAascFbGhscrhodninaD8SbbgPcFbGaotasVhsaPcu9kmeaDcefhDaocrfgoc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbgocFeGhPdnaocu9kmbaDcvfhzaPcFbGhPcrhodninas8SbbgDcFbGaotaPVhPaDcu9kmeascefhsaocrfgoc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashoxekascefhoas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninao8SbbgscFbGaDtaPVhPascu9kmeaocefhoaDcrfgDc8J9hmbkaOhoxekaocefhokaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDcdfaz87ebaDclfaO87ebxekabarcdtfgDaABdbaDclfazBdbaDcwfaOBdbkavc;abfalcitfgDazBdbaDaABdlavaicdtfaABdbavc;abfalcefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfalcdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiarcifgrae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabaiavcdfciGfcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabaiavcufciGfcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabaiavciGfcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb", a = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;b9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;e8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincbhHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAcd0hHalhOaAcefgAclSmdxekkcbhlaHceGTmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;tzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfalaDcu7gPcl4fcsGcitfgsydlhzasydbhHdnaDcsGgDak9pmbavaiaPfcsGcdtfydbaxaDEhsaDThDdndnadcd9hmbabarcetfgPaH87ebaPcdfaz87ebaPclfas87ebxekabarcdtfgPaHBdbaPclfazBdbaPcwfasBdbkaxaDfhxavc;abfalcitfgPasBdbaPazBdlavaicdtfasBdbavc;abfalcefcsGglcitfgPaHBdbaPasBdlaiaDfhialcefhlxdkdndnaDcsSmbamaDfaDc987fcefhmxekaocefhDao8SbbgscFeGhPdndnascu9mmbaDhoxekaocvfhoaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhokaPce4cbaPceG9R7amfhmkdndnadcd9hmbabarcetfgDaH87ebaDcdfaz87ebaDclfam87ebxekabarcdtfgDaHBdbaDclfazBdbaDcwfamBdbkavc;abfalcitfgDamBdbaDazBdlavaicdtfamBdbavc;abfalcefcsGglcitfgDaHBdbaDamBdlaicefhialcefhlxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHcdfaD87ebaHclfas87ebxekabarcdtfgHaxBdbaHclfaDBdbaHcwfasBdbkavaicdtfaxBdbavc;abfalcitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfalcefcsGcitfgHasBdbaHaDBdlavaiaPfcsGgicdtfasBdbavc;abfalcdfcsGglcitfgDaxBdbaDasBdlalcefhlaiaOfhiazaOfhxxekaxcbaoRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbaocefhDxekaocdfhDao8SbegPcFeGhsdnaPcu9kmbaocofhAascFbGhscrhodninaD8SbbgPcFbGaotasVhsaPcu9kmeaDcefhDaocrfgoc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbgocFeGhPdnaocu9kmbaDcvfhzaPcFbGhPcrhodninas8SbbgDcFbGaotaPVhPaDcu9kmeascefhsaocrfgoc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashoxekascefhoas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninao8SbbgscFbGaDtaPVhPascu9kmeaocefhoaDcrfgDc8J9hmbkaOhoxekaocefhokaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDcdfaz87ebaDclfaO87ebxekabarcdtfgDaABdbaDclfazBdbaDcwfaOBdbkavc;abfalcitfgDazBdbaDaABdlavaicdtfaABdbavc;abfalcefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfalcdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiarcifgrae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnaval9pmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb", e = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 3, 2, 0, 0, 5, 3, 1, 0, 1, 12, 1, 0, 10, 22, 2, 12, 0, 65, 0, 65, 0, 65, 0, 252, 10, 0, 0, 11, 7, 0, 65, 0, 253, 15, 26, 11]), b = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
|
|
138
136
|
if (typeof WebAssembly != "object")
|
|
139
137
|
return {
|
|
140
138
|
supported: !1
|
|
141
139
|
};
|
|
142
|
-
var s = WebAssembly.validate(e) ? a : t, i,
|
|
140
|
+
var s = WebAssembly.validate(e) ? a : t, i, o = WebAssembly.instantiate(l(s), {}).then(function(r) {
|
|
143
141
|
i = r.instance, i.exports.__wasm_call_ctors();
|
|
144
142
|
});
|
|
145
143
|
function l(r) {
|
|
146
144
|
for (var h = new Uint8Array(r.length), f = 0; f < r.length; ++f) {
|
|
147
|
-
var
|
|
148
|
-
h[f] =
|
|
145
|
+
var p = r.charCodeAt(f);
|
|
146
|
+
h[f] = p > 96 ? p - 97 : p > 64 ? p - 39 : p + 4;
|
|
149
147
|
}
|
|
150
148
|
for (var u = 0, f = 0; f < r.length; ++f)
|
|
151
149
|
h[u++] = h[f] < 60 ? b[h[f]] : (h[f] - 60) * 64 + h[++f];
|
|
152
150
|
return h.buffer.slice(0, u);
|
|
153
151
|
}
|
|
154
|
-
function
|
|
155
|
-
var A = r.exports.sbrk,
|
|
156
|
-
E.set(
|
|
157
|
-
var
|
|
158
|
-
if (
|
|
159
|
-
throw new Error("Malformed buffer data: " +
|
|
152
|
+
function g(r, h, f, p, u, k, w) {
|
|
153
|
+
var A = r.exports.sbrk, v = p + 3 & -4, M = A(v * u), I = A(k.length), E = new Uint8Array(r.exports.memory.buffer);
|
|
154
|
+
E.set(k, I);
|
|
155
|
+
var B = h(M, p, u, I, k.length);
|
|
156
|
+
if (B == 0 && w && w(M, v, u), f.set(E.subarray(M, M + p * u)), A(M - A(0)), B != 0)
|
|
157
|
+
throw new Error("Malformed buffer data: " + B);
|
|
160
158
|
}
|
|
161
159
|
var j = {
|
|
162
160
|
NONE: "",
|
|
@@ -167,7 +165,7 @@ var ct = (function() {
|
|
|
167
165
|
ATTRIBUTES: "meshopt_decodeVertexBuffer",
|
|
168
166
|
TRIANGLES: "meshopt_decodeIndexBuffer",
|
|
169
167
|
INDICES: "meshopt_decodeIndexSequence"
|
|
170
|
-
},
|
|
168
|
+
}, x = [], D = 0;
|
|
171
169
|
function m(r) {
|
|
172
170
|
var h = {
|
|
173
171
|
object: new Worker(r),
|
|
@@ -175,60 +173,60 @@ var ct = (function() {
|
|
|
175
173
|
requests: {}
|
|
176
174
|
};
|
|
177
175
|
return h.object.onmessage = function(f) {
|
|
178
|
-
var
|
|
179
|
-
h.pending -=
|
|
176
|
+
var p = f.data;
|
|
177
|
+
h.pending -= p.count, h.requests[p.id][p.action](p.value), delete h.requests[p.id];
|
|
180
178
|
}, h;
|
|
181
179
|
}
|
|
182
|
-
function
|
|
183
|
-
for (var h = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(l(s)) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " +
|
|
184
|
-
|
|
185
|
-
for (var u = r; u <
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
function c(r, h, f,
|
|
190
|
-
for (var
|
|
191
|
-
|
|
192
|
-
return new Promise(function(A,
|
|
193
|
-
var
|
|
194
|
-
|
|
180
|
+
function d(r) {
|
|
181
|
+
for (var h = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(l(s)) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + n.name + ";" + g.toString() + n.toString(), f = new Blob([h], { type: "text/javascript" }), p = URL.createObjectURL(f), u = x.length; u < r; ++u)
|
|
182
|
+
x[u] = m(p);
|
|
183
|
+
for (var u = r; u < x.length; ++u)
|
|
184
|
+
x[u].object.postMessage({});
|
|
185
|
+
x.length = r, URL.revokeObjectURL(p);
|
|
186
|
+
}
|
|
187
|
+
function c(r, h, f, p, u) {
|
|
188
|
+
for (var k = x[0], w = 1; w < x.length; ++w)
|
|
189
|
+
x[w].pending < k.pending && (k = x[w]);
|
|
190
|
+
return new Promise(function(A, v) {
|
|
191
|
+
var M = new Uint8Array(f), I = ++D;
|
|
192
|
+
k.pending += r, k.requests[I] = { resolve: A, reject: v }, k.object.postMessage({ id: I, count: r, size: h, source: M, mode: p, filter: u }, [M.buffer]);
|
|
195
193
|
});
|
|
196
194
|
}
|
|
197
|
-
function
|
|
195
|
+
function n(r) {
|
|
198
196
|
var h = r.data;
|
|
199
197
|
if (!h.id)
|
|
200
198
|
return self.close();
|
|
201
199
|
self.ready.then(function(f) {
|
|
202
200
|
try {
|
|
203
|
-
var
|
|
204
|
-
|
|
201
|
+
var p = new Uint8Array(h.count * h.size);
|
|
202
|
+
g(f, f.exports[h.mode], p, h.count, h.size, h.source, f.exports[h.filter]), self.postMessage({ id: h.id, count: h.count, action: "resolve", value: p }, [p.buffer]);
|
|
205
203
|
} catch (u) {
|
|
206
204
|
self.postMessage({ id: h.id, count: h.count, action: "reject", value: u });
|
|
207
205
|
}
|
|
208
206
|
});
|
|
209
207
|
}
|
|
210
208
|
return {
|
|
211
|
-
ready:
|
|
209
|
+
ready: o,
|
|
212
210
|
supported: !0,
|
|
213
211
|
useWorkers: function(r) {
|
|
214
|
-
|
|
212
|
+
d(r);
|
|
215
213
|
},
|
|
216
|
-
decodeVertexBuffer: function(r, h, f,
|
|
217
|
-
|
|
214
|
+
decodeVertexBuffer: function(r, h, f, p, u) {
|
|
215
|
+
g(i, i.exports.meshopt_decodeVertexBuffer, r, h, f, p, i.exports[j[u]]);
|
|
218
216
|
},
|
|
219
|
-
decodeIndexBuffer: function(r, h, f,
|
|
220
|
-
|
|
217
|
+
decodeIndexBuffer: function(r, h, f, p) {
|
|
218
|
+
g(i, i.exports.meshopt_decodeIndexBuffer, r, h, f, p);
|
|
221
219
|
},
|
|
222
|
-
decodeIndexSequence: function(r, h, f,
|
|
223
|
-
|
|
220
|
+
decodeIndexSequence: function(r, h, f, p) {
|
|
221
|
+
g(i, i.exports.meshopt_decodeIndexSequence, r, h, f, p);
|
|
224
222
|
},
|
|
225
|
-
decodeGltfBuffer: function(r, h, f,
|
|
226
|
-
|
|
223
|
+
decodeGltfBuffer: function(r, h, f, p, u, k) {
|
|
224
|
+
g(i, i.exports[P[u]], r, h, f, p, i.exports[j[k]]);
|
|
227
225
|
},
|
|
228
|
-
decodeGltfBufferAsync: function(r, h, f,
|
|
229
|
-
return
|
|
230
|
-
var
|
|
231
|
-
return
|
|
226
|
+
decodeGltfBufferAsync: function(r, h, f, p, u) {
|
|
227
|
+
return x.length > 0 ? c(r, h, f, P[p], j[u]) : o.then(function() {
|
|
228
|
+
var k = new Uint8Array(r * h);
|
|
229
|
+
return g(i, i.exports[P[p]], k, r, h, f, i.exports[j[u]]), k;
|
|
232
230
|
});
|
|
233
231
|
}
|
|
234
232
|
};
|
|
@@ -239,76 +237,76 @@ var ct = (function() {
|
|
|
239
237
|
return {
|
|
240
238
|
supported: !1
|
|
241
239
|
};
|
|
242
|
-
var e, b = WebAssembly.instantiate(s(t), {}).then(function(
|
|
243
|
-
e =
|
|
240
|
+
var e, b = WebAssembly.instantiate(s(t), {}).then(function(d) {
|
|
241
|
+
e = d.instance, e.exports.__wasm_call_ctors();
|
|
244
242
|
});
|
|
245
|
-
function s(
|
|
246
|
-
for (var c = new Uint8Array(
|
|
247
|
-
var r =
|
|
248
|
-
c[
|
|
243
|
+
function s(d) {
|
|
244
|
+
for (var c = new Uint8Array(d.length), n = 0; n < d.length; ++n) {
|
|
245
|
+
var r = d.charCodeAt(n);
|
|
246
|
+
c[n] = r > 96 ? r - 97 : r > 64 ? r - 39 : r + 4;
|
|
249
247
|
}
|
|
250
|
-
for (var h = 0,
|
|
251
|
-
c[h++] = c[
|
|
248
|
+
for (var h = 0, n = 0; n < d.length; ++n)
|
|
249
|
+
c[h++] = c[n] < 60 ? a[c[n]] : (c[n] - 60) * 64 + c[++n];
|
|
252
250
|
return c.buffer.slice(0, h);
|
|
253
251
|
}
|
|
254
|
-
function i(
|
|
255
|
-
if (!
|
|
252
|
+
function i(d) {
|
|
253
|
+
if (!d)
|
|
256
254
|
throw new Error("Assertion failed");
|
|
257
255
|
}
|
|
258
|
-
function
|
|
259
|
-
return new Uint8Array(
|
|
256
|
+
function o(d) {
|
|
257
|
+
return new Uint8Array(d.buffer, d.byteOffset, d.byteLength);
|
|
260
258
|
}
|
|
261
|
-
function l(
|
|
262
|
-
var r = e.exports.sbrk, h = r(c.length * 4), f = r(
|
|
263
|
-
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
var
|
|
267
|
-
new Uint8Array(
|
|
259
|
+
function l(d, c, n) {
|
|
260
|
+
var r = e.exports.sbrk, h = r(c.length * 4), f = r(n * 4), p = new Uint8Array(e.exports.memory.buffer), u = o(c);
|
|
261
|
+
p.set(u, h);
|
|
262
|
+
var k = d(f, h, c.length, n);
|
|
263
|
+
p = new Uint8Array(e.exports.memory.buffer);
|
|
264
|
+
var w = new Uint32Array(n);
|
|
265
|
+
new Uint8Array(w.buffer).set(p.subarray(f, f + n * 4)), u.set(p.subarray(h, h + c.length * 4)), r(h - r(0));
|
|
268
266
|
for (var A = 0; A < c.length; ++A)
|
|
269
|
-
c[A] =
|
|
270
|
-
return [
|
|
267
|
+
c[A] = w[c[A]];
|
|
268
|
+
return [w, k];
|
|
271
269
|
}
|
|
272
|
-
function
|
|
273
|
-
for (var c = 0,
|
|
274
|
-
var r =
|
|
270
|
+
function g(d) {
|
|
271
|
+
for (var c = 0, n = 0; n < d.length; ++n) {
|
|
272
|
+
var r = d[n];
|
|
275
273
|
c = c < r ? r : c;
|
|
276
274
|
}
|
|
277
275
|
return c;
|
|
278
276
|
}
|
|
279
|
-
function j(
|
|
280
|
-
var
|
|
281
|
-
E.set(
|
|
282
|
-
var
|
|
277
|
+
function j(d, c, n, r, h, f, p, u, k) {
|
|
278
|
+
var w = e.exports.sbrk, A = w(4), v = w(n * 4), M = w(h * f), I = w(n * 4), E = new Uint8Array(e.exports.memory.buffer);
|
|
279
|
+
E.set(o(r), M), E.set(o(c), I);
|
|
280
|
+
var B = d(v, I, n, M, h, f, p, u, k, A);
|
|
283
281
|
E = new Uint8Array(e.exports.memory.buffer);
|
|
284
|
-
var R = new Uint32Array(
|
|
285
|
-
|
|
282
|
+
var R = new Uint32Array(B);
|
|
283
|
+
o(R).set(E.subarray(v, v + B * 4));
|
|
286
284
|
var U = new Float32Array(1);
|
|
287
|
-
return
|
|
285
|
+
return o(U).set(E.subarray(A, A + 4)), w(A - w(0)), [R, U[0]];
|
|
288
286
|
}
|
|
289
|
-
function P(
|
|
290
|
-
var
|
|
291
|
-
|
|
292
|
-
var Z =
|
|
293
|
-
|
|
287
|
+
function P(d, c, n, r, h, f, p, u, k, w, A, v) {
|
|
288
|
+
var M = e.exports.sbrk, I = M(4), E = M(n * 4), B = M(h * f), R = M(h * u), U = M(k.length * 4), ta = M(n * 4), S = new Uint8Array(e.exports.memory.buffer);
|
|
289
|
+
S.set(o(r), B), S.set(o(p), R), S.set(o(k), U), S.set(o(c), ta);
|
|
290
|
+
var Z = d(E, ta, n, B, h, f, R, u, U, k.length, w, A, v, I);
|
|
291
|
+
S = new Uint8Array(e.exports.memory.buffer);
|
|
294
292
|
var G = new Uint32Array(Z);
|
|
295
|
-
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
}
|
|
299
|
-
function
|
|
300
|
-
var h = e.exports.sbrk, f = h(
|
|
301
|
-
|
|
302
|
-
var u =
|
|
293
|
+
o(G).set(S.subarray(E, E + Z * 4));
|
|
294
|
+
var da = new Float32Array(1);
|
|
295
|
+
return o(da).set(S.subarray(I, I + 4)), M(I - M(0)), [G, da[0]];
|
|
296
|
+
}
|
|
297
|
+
function x(d, c, n, r) {
|
|
298
|
+
var h = e.exports.sbrk, f = h(n * r), p = new Uint8Array(e.exports.memory.buffer);
|
|
299
|
+
p.set(o(c), f);
|
|
300
|
+
var u = d(f, n, r);
|
|
303
301
|
return h(f - h(0)), u;
|
|
304
302
|
}
|
|
305
|
-
function
|
|
306
|
-
var
|
|
307
|
-
|
|
308
|
-
var I =
|
|
309
|
-
|
|
303
|
+
function D(d, c, n, r, h, f, p, u) {
|
|
304
|
+
var k = e.exports.sbrk, w = k(u * 4), A = k(n * r), v = k(n * f), M = new Uint8Array(e.exports.memory.buffer);
|
|
305
|
+
M.set(o(c), A), h && M.set(o(h), v);
|
|
306
|
+
var I = d(w, A, n, r, v, f, p, u);
|
|
307
|
+
M = new Uint8Array(e.exports.memory.buffer);
|
|
310
308
|
var E = new Uint32Array(I);
|
|
311
|
-
return
|
|
309
|
+
return o(E).set(M.subarray(w, w + I * 4)), k(w - k(0)), E;
|
|
312
310
|
}
|
|
313
311
|
var m = {
|
|
314
312
|
LockBorder: 1
|
|
@@ -319,44 +317,44 @@ var ct = (function() {
|
|
|
319
317
|
// set this to true to be able to use simplifyPoints and simplifyWithAttributes
|
|
320
318
|
// note that these functions are experimental and may change interface/behavior in a way that will require revising calling code
|
|
321
319
|
useExperimentalFeatures: !1,
|
|
322
|
-
compactMesh: function(
|
|
323
|
-
i(
|
|
324
|
-
var c =
|
|
325
|
-
return l(e.exports.meshopt_optimizeVertexFetchRemap, c,
|
|
326
|
-
},
|
|
327
|
-
simplify: function(
|
|
328
|
-
i(
|
|
329
|
-
for (var
|
|
330
|
-
|
|
331
|
-
var
|
|
332
|
-
return
|
|
333
|
-
},
|
|
334
|
-
simplifyWithAttributes: function(
|
|
335
|
-
i(this.useExperimentalFeatures), i(
|
|
336
|
-
for (var
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
-
return
|
|
340
|
-
},
|
|
341
|
-
getScale: function(
|
|
342
|
-
return i(
|
|
343
|
-
},
|
|
344
|
-
simplifyPoints: function(
|
|
345
|
-
return i(this.useExperimentalFeatures), i(
|
|
320
|
+
compactMesh: function(d) {
|
|
321
|
+
i(d instanceof Uint32Array || d instanceof Int32Array || d instanceof Uint16Array || d instanceof Int16Array), i(d.length % 3 == 0);
|
|
322
|
+
var c = d.BYTES_PER_ELEMENT == 4 ? d : new Uint32Array(d);
|
|
323
|
+
return l(e.exports.meshopt_optimizeVertexFetchRemap, c, g(d) + 1);
|
|
324
|
+
},
|
|
325
|
+
simplify: function(d, c, n, r, h, f) {
|
|
326
|
+
i(d instanceof Uint32Array || d instanceof Int32Array || d instanceof Uint16Array || d instanceof Int16Array), i(d.length % 3 == 0), i(c instanceof Float32Array), i(c.length % n == 0), i(n >= 3), i(r >= 0 && r <= d.length), i(r % 3 == 0), i(h >= 0 && h <= 1);
|
|
327
|
+
for (var p = 0, u = 0; u < (f ? f.length : 0); ++u)
|
|
328
|
+
p |= m[f[u]];
|
|
329
|
+
var k = d.BYTES_PER_ELEMENT == 4 ? d : new Uint32Array(d), w = j(e.exports.meshopt_simplify, k, d.length, c, c.length / n, n * 4, r, h, p);
|
|
330
|
+
return w[0] = d instanceof Uint32Array ? w[0] : new d.constructor(w[0]), w;
|
|
331
|
+
},
|
|
332
|
+
simplifyWithAttributes: function(d, c, n, r, h, f, p, u, k) {
|
|
333
|
+
i(this.useExperimentalFeatures), i(d instanceof Uint32Array || d instanceof Int32Array || d instanceof Uint16Array || d instanceof Int16Array), i(d.length % 3 == 0), i(c instanceof Float32Array), i(c.length % n == 0), i(n >= 3), i(r instanceof Float32Array), i(r.length % h == 0), i(h >= 0), i(p >= 0 && p <= d.length), i(p % 3 == 0), i(u >= 0 && u <= 1), i(Array.isArray(f)), i(h >= f.length), i(f.length <= 16);
|
|
334
|
+
for (var w = 0, A = 0; A < (k ? k.length : 0); ++A)
|
|
335
|
+
w |= m[k[A]];
|
|
336
|
+
var v = d.BYTES_PER_ELEMENT == 4 ? d : new Uint32Array(d), M = P(e.exports.meshopt_simplifyWithAttributes, v, d.length, c, c.length / n, n * 4, r, h * 4, new Float32Array(f), p, u, w);
|
|
337
|
+
return M[0] = d instanceof Uint32Array ? M[0] : new d.constructor(M[0]), M;
|
|
338
|
+
},
|
|
339
|
+
getScale: function(d, c) {
|
|
340
|
+
return i(d instanceof Float32Array), i(d.length % c == 0), i(c >= 3), x(e.exports.meshopt_simplifyScale, d, d.length / c, c * 4);
|
|
341
|
+
},
|
|
342
|
+
simplifyPoints: function(d, c, n, r, h, f) {
|
|
343
|
+
return i(this.useExperimentalFeatures), i(d instanceof Float32Array), i(d.length % c == 0), i(c >= 3), i(n >= 0 && n <= d.length / c), r ? (i(r instanceof Float32Array), i(r.length % h == 0), i(h >= 3), i(d.length / c == r.length / h), D(e.exports.meshopt_simplifyPoints, d, d.length / c, c * 4, r, h * 4, f, n)) : D(e.exports.meshopt_simplifyPoints, d, d.length / c, c * 4, void 0, 0, 0, n);
|
|
346
344
|
}
|
|
347
345
|
};
|
|
348
346
|
})();
|
|
349
|
-
function
|
|
347
|
+
function Xe(t) {
|
|
350
348
|
const a = [], e = [];
|
|
351
349
|
for (const [b, s] of Object.entries(t))
|
|
352
|
-
|
|
350
|
+
$e(s) && a.push({ name: b, value: s }), at(s) && e.push({ name: b, value: s });
|
|
353
351
|
return { plugins: a, components: e };
|
|
354
352
|
}
|
|
355
|
-
async function
|
|
353
|
+
async function Ze(t, a) {
|
|
356
354
|
const e = { plugins: [], components: [] }, b = t.getPlugin(L);
|
|
357
355
|
if (!b) throw new Error("EntityComponentPlugin must be added before project scripts");
|
|
358
356
|
for (const s of a) {
|
|
359
|
-
const i =
|
|
357
|
+
const i = Xe(s);
|
|
360
358
|
e.plugins.push(...i.plugins), e.components.push(...i.components);
|
|
361
359
|
}
|
|
362
360
|
for (const s of e.components) {
|
|
@@ -367,13 +365,13 @@ async function ot(t, a) {
|
|
|
367
365
|
t.getPlugin(s.value) || await t.addPlugin(s.value);
|
|
368
366
|
return e;
|
|
369
367
|
}
|
|
370
|
-
function
|
|
368
|
+
function $e(t) {
|
|
371
369
|
return typeof t == "function" && typeof t.PluginType == "string";
|
|
372
370
|
}
|
|
373
|
-
function
|
|
371
|
+
function at(t) {
|
|
374
372
|
return typeof t == "function" && typeof t.ComponentType == "string";
|
|
375
373
|
}
|
|
376
|
-
const
|
|
374
|
+
const et = ["world", "screen", "viewport"], ma = class ma extends ja {
|
|
377
375
|
constructor() {
|
|
378
376
|
super(), this.enabled = !0, this.htmlData = "<div>Hello World</div>", this.width = -1, this.height = -1, this.scrollable = !1, this.interactable = !0, this.visible = !0, this.appendToBody = !1, this.positionMode = "world", this.offsetX = 0, this.offsetY = 0, this.zIndex = 1e3, this._worldPosition = new F(), this._objectUpdate = (a) => {
|
|
379
377
|
if (a.source === "HtmlUiComponent") return;
|
|
@@ -409,9 +407,9 @@ const ht = ["world", "screen", "viewport"], ka = class ka extends oa {
|
|
|
409
407
|
var e, b;
|
|
410
408
|
this.element && (this.element.style.zIndex = `${a}`, (b = (e = this.object).setDirty) == null || b.call(e, { source: "HtmlUiComponent" }));
|
|
411
409
|
}), this.onStateChange("appendToBody", (a) => {
|
|
412
|
-
var b, s, i,
|
|
410
|
+
var b, s, i, o;
|
|
413
411
|
if (!this.element) return;
|
|
414
|
-
this.element.parentNode && this.element.parentNode.removeChild(this.element), (a ? document.body : ((s = (b = this.ctx) == null ? void 0 : b.viewer) == null ? void 0 : s.container) || document.body).appendChild(this.element), (
|
|
412
|
+
this.element.parentNode && this.element.parentNode.removeChild(this.element), (a ? document.body : ((s = (b = this.ctx) == null ? void 0 : b.viewer) == null ? void 0 : s.container) || document.body).appendChild(this.element), (o = (i = this.object).setDirty) == null || o.call(i, { source: "HtmlUiComponent" });
|
|
415
413
|
});
|
|
416
414
|
}
|
|
417
415
|
init(a, e) {
|
|
@@ -442,9 +440,9 @@ const ht = ["world", "screen", "viewport"], ka = class ka extends oa {
|
|
|
442
440
|
}
|
|
443
441
|
}
|
|
444
442
|
_updateWorldPosition() {
|
|
445
|
-
var
|
|
443
|
+
var o, l, g, j, P;
|
|
446
444
|
this.object.getWorldPosition(this._worldPosition);
|
|
447
|
-
const a = (
|
|
445
|
+
const a = (g = (l = (o = this.ctx) == null ? void 0 : o.viewer) == null ? void 0 : l.scene) == null ? void 0 : g.mainCamera;
|
|
448
446
|
if (!a) return;
|
|
449
447
|
const e = (P = (j = this.ctx) == null ? void 0 : j.viewer) == null ? void 0 : P.canvas;
|
|
450
448
|
if (!e) return;
|
|
@@ -494,7 +492,7 @@ const ht = ["world", "screen", "viewport"], ka = class ka extends oa {
|
|
|
494
492
|
this.visible = !1;
|
|
495
493
|
}
|
|
496
494
|
};
|
|
497
|
-
|
|
495
|
+
ma.ComponentType = "HtmlUiComponent", ma.StateProperties = [
|
|
498
496
|
"enabled",
|
|
499
497
|
{
|
|
500
498
|
key: "htmlData",
|
|
@@ -511,7 +509,7 @@ ka.ComponentType = "HtmlUiComponent", ka.StateProperties = [
|
|
|
511
509
|
"interactable",
|
|
512
510
|
{
|
|
513
511
|
key: "positionMode",
|
|
514
|
-
type:
|
|
512
|
+
type: Da(et)
|
|
515
513
|
},
|
|
516
514
|
"offsetX",
|
|
517
515
|
"offsetY",
|
|
@@ -519,201 +517,24 @@ ka.ComponentType = "HtmlUiComponent", ka.StateProperties = [
|
|
|
519
517
|
"visible",
|
|
520
518
|
"appendToBody"
|
|
521
519
|
];
|
|
522
|
-
let
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
const
|
|
526
|
-
constructor() {
|
|
527
|
-
super(...arguments), this.module = "", this.params = {}, this.runRevision = 0;
|
|
528
|
-
}
|
|
529
|
-
static configureViewer(a, e) {
|
|
530
|
-
ga.set(a, {
|
|
531
|
-
base: typeof e.base == "string" ? new URL(e.base) : e.base,
|
|
532
|
-
onError: e.onError,
|
|
533
|
-
pending: /* @__PURE__ */ new Set()
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
static async waitForViewer(a) {
|
|
537
|
-
const e = ga.get(a);
|
|
538
|
-
for (; e != null && e.pending.size; ) await Promise.all([...e.pending]);
|
|
539
|
-
}
|
|
540
|
-
init(a, e) {
|
|
541
|
-
super.init(a, e);
|
|
542
|
-
const b = () => {
|
|
543
|
-
this.run().catch((s) => kt(this.ctx.viewer, s));
|
|
544
|
-
};
|
|
545
|
-
this.onStateChange("module", b), this.onStateChange("params", b), b();
|
|
546
|
-
}
|
|
547
|
-
async run() {
|
|
548
|
-
const a = this.ctx.viewer, e = ga.get(a);
|
|
549
|
-
if (!e) throw new Error("Generator viewer is not configured");
|
|
550
|
-
const b = ++this.runRevision, s = ft({
|
|
551
|
-
node: this.object,
|
|
552
|
-
params: this.params,
|
|
553
|
-
viewer: a,
|
|
554
|
-
module: this.module,
|
|
555
|
-
base: e.base,
|
|
556
|
-
revision: ++lt,
|
|
557
|
-
isCurrent: () => b === this.runRevision
|
|
558
|
-
}).then(() => {
|
|
559
|
-
b === this.runRevision && a.setDirty(this);
|
|
560
|
-
}).finally(() => e.pending.delete(s));
|
|
561
|
-
e.pending.add(s), await s;
|
|
562
|
-
}
|
|
563
|
-
async bake() {
|
|
564
|
-
var i;
|
|
565
|
-
await this.run();
|
|
566
|
-
const a = this.object, e = a.children.filter((n) => n.userData.kite3dGenerated === !0), b = {
|
|
567
|
-
module: this.module,
|
|
568
|
-
params: JSON.parse(JSON.stringify(this.params)),
|
|
569
|
-
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
570
|
-
};
|
|
571
|
-
for (const n of e) pt(n);
|
|
572
|
-
this.ctx.ecp.removeComponent(a, this.uuid);
|
|
573
|
-
const s = ma(a);
|
|
574
|
-
return (s == null ? void 0 : s.role) === "generator" && !s.sourceId && he(a, {
|
|
575
|
-
role: "direct",
|
|
576
|
-
id: s.id,
|
|
577
|
-
...s.allowCameraInside !== void 0 ? { allowCameraInside: s.allowCameraInside } : {}
|
|
578
|
-
}), a.userData.kite3dBakedFrom = b, a._sChildren = [...a.children], (i = a.setDirty) == null || i.call(a, { change: "userData.kite3dBakedFrom", source: "kite3d bake" }), e.length;
|
|
579
|
-
}
|
|
580
|
-
destroy() {
|
|
581
|
-
return this.runRevision += 1, me(this.object), super.destroy();
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
wa.ComponentType = "Generator", wa.StateProperties = ["module", "params"];
|
|
585
|
-
let sa = wa;
|
|
586
|
-
async function ft({
|
|
587
|
-
node: t,
|
|
588
|
-
params: a,
|
|
589
|
-
viewer: e,
|
|
590
|
-
module: b,
|
|
591
|
-
base: s,
|
|
592
|
-
revision: i = 0,
|
|
593
|
-
isCurrent: n
|
|
594
|
-
}) {
|
|
595
|
-
if (me(t), !b) return [];
|
|
596
|
-
const l = gt(t), p = ut(b, s);
|
|
597
|
-
i && p.searchParams.set("kite3d-generator", String(i));
|
|
598
|
-
const j = await yt(p.href);
|
|
599
|
-
if (typeof j.default != "function")
|
|
600
|
-
throw new Error(`Generator module must have a default generate function: ${b}`);
|
|
601
|
-
const P = new Set(t.children), k = await j.default({
|
|
602
|
-
node: t,
|
|
603
|
-
params: a,
|
|
604
|
-
viewer: e,
|
|
605
|
-
engine: ve
|
|
606
|
-
}), M = jt(k);
|
|
607
|
-
for (const [o, c] of M.entries())
|
|
608
|
-
c.parent !== t && (Xa(c, l.id, o), t.add(c));
|
|
609
|
-
const m = t.children.filter((o) => !P.has(o));
|
|
610
|
-
if (n && !n()) {
|
|
611
|
-
for (const o of m) ue(o);
|
|
612
|
-
return [];
|
|
613
|
-
}
|
|
614
|
-
return m.forEach((o, c) => Xa(o, l.id, c)), m;
|
|
615
|
-
}
|
|
616
|
-
function me(t) {
|
|
617
|
-
for (const a of [...t.children])
|
|
618
|
-
a.userData.kite3dGenerated === !0 && ue(a);
|
|
619
|
-
}
|
|
620
|
-
function Xa(t, a, e = 0) {
|
|
621
|
-
let b = 0;
|
|
622
|
-
t.traverse((s) => {
|
|
623
|
-
s.userData.kite3dGenerated = !0, s.userData.excludeFromExport = !0, a && (s.userData.kite3dAuthoring = {
|
|
624
|
-
role: "generator",
|
|
625
|
-
id: `${a}:preview:${e}:${b++}`,
|
|
626
|
-
sourceId: a
|
|
627
|
-
});
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
function pt(t) {
|
|
631
|
-
t.traverse((a) => {
|
|
632
|
-
delete a.userData.kite3dGenerated, delete a.userData.excludeFromExport;
|
|
633
|
-
const e = ma(a);
|
|
634
|
-
(e == null ? void 0 : e.role) === "generator" && e.sourceId && delete a.userData.kite3dAuthoring;
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
function gt(t) {
|
|
638
|
-
const a = ma(t);
|
|
639
|
-
if ((a == null ? void 0 : a.role) === "generator" && !a.sourceId) return a;
|
|
640
|
-
const e = typeof t.userData.gltfUUID == "string" && t.userData.gltfUUID.trim() ? t.userData.gltfUUID.trim() : (a == null ? void 0 : a.id) || mt(t);
|
|
641
|
-
return he(t, { role: "generator", id: e }), ma(t);
|
|
642
|
-
}
|
|
643
|
-
function mt(t) {
|
|
644
|
-
var e;
|
|
645
|
-
const a = [];
|
|
646
|
-
for (let b = t; b != null && b.parent; b = b.parent) {
|
|
647
|
-
const s = b.parent.children.indexOf(b);
|
|
648
|
-
if (a.push(`${b.name || b.type}:${s}`), (e = b.parent.userData) != null && e.rootSceneModelRoot) break;
|
|
649
|
-
}
|
|
650
|
-
return `generator:${a.reverse().join("/")}`;
|
|
651
|
-
}
|
|
652
|
-
function ue(t) {
|
|
653
|
-
t.removeFromParent();
|
|
654
|
-
const a = /* @__PURE__ */ new Set();
|
|
655
|
-
t.traverse((e) => {
|
|
656
|
-
const b = e;
|
|
657
|
-
Ma(b.geometry, a);
|
|
658
|
-
const s = Array.isArray(b.material) ? b.material : [b.material];
|
|
659
|
-
for (const i of s)
|
|
660
|
-
if (!(!i || typeof i != "object")) {
|
|
661
|
-
for (const n of Object.values(i))
|
|
662
|
-
n && typeof n == "object" && "isTexture" in n && Ma(n, a);
|
|
663
|
-
Ma(i, a);
|
|
664
|
-
}
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
function Ma(t, a) {
|
|
668
|
-
var e;
|
|
669
|
-
!t || typeof t != "object" || a.has(t) || (a.add(t), (e = t.dispose) == null || e.call(t));
|
|
670
|
-
}
|
|
671
|
-
function ut(t, a) {
|
|
672
|
-
if (!t || t.startsWith("/") || /^[a-z][a-z\d+.-]*:/i.test(t))
|
|
673
|
-
throw new Error(`Generator module must be a project-relative path: ${t}`);
|
|
674
|
-
const e = new URL(t, a);
|
|
675
|
-
if (e.origin !== a.origin)
|
|
676
|
-
throw new Error(`Generator module must be same-origin: ${e.href}`);
|
|
677
|
-
return e;
|
|
678
|
-
}
|
|
679
|
-
function jt(t) {
|
|
680
|
-
if (!t) return [];
|
|
681
|
-
const a = Array.isArray(t) ? t : [t], e = [];
|
|
682
|
-
for (const b of a) {
|
|
683
|
-
if (!(b != null && b.isObject3D))
|
|
684
|
-
throw new Error("Generator output must be an Object3D, an array of Object3D values, or undefined");
|
|
685
|
-
e.push(b);
|
|
686
|
-
}
|
|
687
|
-
return e;
|
|
688
|
-
}
|
|
689
|
-
async function yt(t) {
|
|
690
|
-
return import(
|
|
691
|
-
/* @vite-ignore */
|
|
692
|
-
t
|
|
693
|
-
);
|
|
694
|
-
}
|
|
695
|
-
function kt(t, a) {
|
|
696
|
-
var b;
|
|
697
|
-
const e = (b = ga.get(t)) == null ? void 0 : b.onError;
|
|
698
|
-
e ? e(a) : console.error("[kite3d] Generator error", a);
|
|
699
|
-
}
|
|
700
|
-
const wt = new F(), fa = new F(), vt = new C();
|
|
701
|
-
function ua(t) {
|
|
702
|
-
const a = Pt(t);
|
|
520
|
+
let Aa = ma;
|
|
521
|
+
const tt = new F(), ha = new F(), bt = new C();
|
|
522
|
+
function fa(t) {
|
|
523
|
+
const a = st(t);
|
|
703
524
|
if (a.length === 0) return null;
|
|
704
525
|
if (a.length === 1)
|
|
705
|
-
return
|
|
526
|
+
return Ka(a[0]);
|
|
706
527
|
let e;
|
|
707
528
|
const b = [];
|
|
708
529
|
for (; e = a.pop(); )
|
|
709
|
-
b.push(
|
|
710
|
-
return
|
|
530
|
+
b.push(ct(Ka(e)));
|
|
531
|
+
return it(b);
|
|
711
532
|
}
|
|
712
|
-
function
|
|
533
|
+
function Ka(t) {
|
|
713
534
|
const a = t.geometry.clone();
|
|
714
|
-
return t.updateMatrixWorld(), t.matrixWorld.decompose(
|
|
535
|
+
return t.updateMatrixWorld(), t.matrixWorld.decompose(tt, bt, ha), a.scale(ha.x, ha.y, ha.z), a;
|
|
715
536
|
}
|
|
716
|
-
function
|
|
537
|
+
function it(t) {
|
|
717
538
|
let a = 0;
|
|
718
539
|
for (let s = 0; s < t.length; s++) {
|
|
719
540
|
const i = t[s].attributes.position;
|
|
@@ -724,24 +545,24 @@ function xt(t) {
|
|
|
724
545
|
for (let s = 0; s < t.length; s++) {
|
|
725
546
|
const i = t[s].attributes.position;
|
|
726
547
|
if (i && i.itemSize === 3)
|
|
727
|
-
for (let
|
|
728
|
-
e[b++] = i.getX(
|
|
548
|
+
for (let o = 0; o < i.count; o++)
|
|
549
|
+
e[b++] = i.getX(o), e[b++] = i.getY(o), e[b++] = i.getZ(o);
|
|
729
550
|
}
|
|
730
|
-
return new ia().setAttribute("position", new
|
|
551
|
+
return new ia().setAttribute("position", new Za(e, 3));
|
|
731
552
|
}
|
|
732
|
-
function
|
|
553
|
+
function oe(t) {
|
|
733
554
|
const a = t.attributes.position, e = new Float32Array(a.count * 3);
|
|
734
555
|
for (let b = 0; b < a.count; b++)
|
|
735
556
|
e[b * 3] = a.getX(b), e[b * 3 + 1] = a.getY(b), e[b * 3 + 2] = a.getZ(b);
|
|
736
557
|
return e;
|
|
737
558
|
}
|
|
738
|
-
function
|
|
559
|
+
function st(t) {
|
|
739
560
|
const a = [];
|
|
740
561
|
return t.traverse(function(e) {
|
|
741
562
|
e.isMesh && a.push(e);
|
|
742
563
|
}), a;
|
|
743
564
|
}
|
|
744
|
-
function
|
|
565
|
+
function la(t, a) {
|
|
745
566
|
switch (a) {
|
|
746
567
|
case "x":
|
|
747
568
|
return t.x;
|
|
@@ -752,85 +573,85 @@ function pa(t, a) {
|
|
|
752
573
|
}
|
|
753
574
|
throw new Error(`Unexpected component ${a}`);
|
|
754
575
|
}
|
|
755
|
-
function
|
|
576
|
+
function ct(t, a = 1e-4) {
|
|
756
577
|
a = Math.max(a, Number.EPSILON);
|
|
757
578
|
const e = {}, b = t.getIndex(), s = t.getAttribute("position"), i = b ? b.count : s.count;
|
|
758
|
-
let
|
|
759
|
-
const l = [],
|
|
579
|
+
let o = 0;
|
|
580
|
+
const l = [], g = [], j = Math.log10(1 / a), P = Math.pow(10, j);
|
|
760
581
|
for (let m = 0; m < i; m++) {
|
|
761
|
-
const
|
|
582
|
+
const d = b ? b.getX(m) : m;
|
|
762
583
|
let c = "";
|
|
763
|
-
c += `${~~(s.getX(
|
|
584
|
+
c += `${~~(s.getX(d) * P)},`, c += `${~~(s.getY(d) * P)},`, c += `${~~(s.getZ(d) * P)},`, c in e ? l.push(e[c]) : (g.push(s.getX(d)), g.push(s.getY(d)), g.push(s.getZ(d)), e[c] = o, l.push(o), o++);
|
|
764
585
|
}
|
|
765
|
-
const
|
|
766
|
-
new Float32Array(
|
|
586
|
+
const x = new Za(
|
|
587
|
+
new Float32Array(g),
|
|
767
588
|
s.itemSize,
|
|
768
589
|
s.normalized
|
|
769
|
-
),
|
|
770
|
-
return
|
|
590
|
+
), D = new ia();
|
|
591
|
+
return D.setAttribute("position", x), D.setIndex(l), D;
|
|
771
592
|
}
|
|
772
|
-
const
|
|
593
|
+
const Ha = Math.PI / 2;
|
|
773
594
|
var _ = /* @__PURE__ */ ((t) => (t.BOX = "Box", t.CYLINDER = "Cylinder", t.SPHERE = "Sphere", t.HULL = "ConvexPolyhedron", t.MESH = "Trimesh", t))(_ || {});
|
|
774
|
-
const
|
|
595
|
+
const re = function(t, a = {}) {
|
|
775
596
|
let e;
|
|
776
597
|
if (a.type === "Box")
|
|
777
|
-
return
|
|
598
|
+
return Va(t);
|
|
778
599
|
if (a.type === "Cylinder")
|
|
779
|
-
return
|
|
600
|
+
return gt(t, a);
|
|
780
601
|
if (a.type === "Sphere")
|
|
781
|
-
return
|
|
602
|
+
return jt(t, a);
|
|
782
603
|
if (a.type === "ConvexPolyhedron")
|
|
783
|
-
return
|
|
604
|
+
return ft(t);
|
|
784
605
|
if (a.type === "Trimesh")
|
|
785
|
-
return e =
|
|
606
|
+
return e = fa(t), e ? yt(e) : null;
|
|
786
607
|
if (a.type)
|
|
787
608
|
throw new Error(`[CANNON.getShapeParameters] Invalid type "${a.type}".`);
|
|
788
|
-
if (e =
|
|
609
|
+
if (e = fa(t), !e) return null;
|
|
789
610
|
switch (e.type) {
|
|
790
611
|
case "BoxGeometry":
|
|
791
612
|
case "BoxBufferGeometry":
|
|
792
|
-
return
|
|
613
|
+
return Ja(e);
|
|
793
614
|
case "CylinderGeometry":
|
|
794
615
|
case "CylinderBufferGeometry":
|
|
795
|
-
return
|
|
616
|
+
return pt(e);
|
|
796
617
|
case "PlaneGeometry":
|
|
797
618
|
case "PlaneBufferGeometry":
|
|
798
|
-
return
|
|
619
|
+
return mt(e);
|
|
799
620
|
case "SphereGeometry":
|
|
800
621
|
case "SphereBufferGeometry":
|
|
801
|
-
return
|
|
622
|
+
return ut(e);
|
|
802
623
|
case "TubeGeometry":
|
|
803
624
|
case "BufferGeometry":
|
|
804
|
-
return
|
|
625
|
+
return Va(t);
|
|
805
626
|
default:
|
|
806
627
|
return console.warn(
|
|
807
628
|
'Unrecognized geometry: "%s". Using bounding box as shape.',
|
|
808
629
|
e.type
|
|
809
|
-
),
|
|
630
|
+
), Ja(e);
|
|
810
631
|
}
|
|
811
|
-
},
|
|
812
|
-
if (e = e ||
|
|
632
|
+
}, nt = function(t, a = {}, e) {
|
|
633
|
+
if (e = e || re(t, a), !e)
|
|
813
634
|
return null;
|
|
814
|
-
const { type: b, params: s, offset: i, orientation:
|
|
635
|
+
const { type: b, params: s, offset: i, orientation: o } = e;
|
|
815
636
|
let l;
|
|
816
|
-
return b === "Box" ? l =
|
|
637
|
+
return b === "Box" ? l = dt(s) : b === "Cylinder" ? l = ot(s) : b === "Sphere" ? l = rt(s) : b === "ConvexPolyhedron" ? l = ht(s) : l = lt(s), {
|
|
817
638
|
shape: l,
|
|
818
639
|
offset: i,
|
|
819
|
-
orientation:
|
|
640
|
+
orientation: o
|
|
820
641
|
};
|
|
821
642
|
};
|
|
822
|
-
function
|
|
643
|
+
function dt(t) {
|
|
823
644
|
const { x: a, y: e, z: b } = t;
|
|
824
645
|
return new K(new y(a || 0.025, e || 0.025, b || 0.025));
|
|
825
646
|
}
|
|
826
|
-
function
|
|
827
|
-
const { radiusTop: a, radiusBottom: e, height: b, segments: s } = t, i = new
|
|
647
|
+
function ot(t) {
|
|
648
|
+
const { radiusTop: a, radiusBottom: e, height: b, segments: s } = t, i = new Te(a, e, b, s);
|
|
828
649
|
return i.radiusTop = e, i.radiusBottom = e, i.height = b, i.numSegments = s, i;
|
|
829
650
|
}
|
|
830
|
-
function
|
|
831
|
-
return new
|
|
651
|
+
function rt(t) {
|
|
652
|
+
return new se(t.radius);
|
|
832
653
|
}
|
|
833
|
-
function
|
|
654
|
+
function ht(t) {
|
|
834
655
|
const { faces: a, vertices: e } = t, b = [];
|
|
835
656
|
for (let i = 0; i < e.length; i += 3)
|
|
836
657
|
b.push(new y(
|
|
@@ -838,20 +659,20 @@ function Et(t) {
|
|
|
838
659
|
e[i + 1],
|
|
839
660
|
e[i + 2]
|
|
840
661
|
));
|
|
841
|
-
return new
|
|
662
|
+
return new Oe({
|
|
842
663
|
faces: a,
|
|
843
664
|
vertices: b
|
|
844
665
|
});
|
|
845
666
|
}
|
|
846
|
-
function
|
|
667
|
+
function lt(t) {
|
|
847
668
|
const { vertices: a, indices: e } = t;
|
|
848
|
-
return new
|
|
669
|
+
return new Qe(
|
|
849
670
|
a,
|
|
850
671
|
e
|
|
851
672
|
);
|
|
852
673
|
}
|
|
853
|
-
function
|
|
854
|
-
if (!
|
|
674
|
+
function Ja(t) {
|
|
675
|
+
if (!oe(t).length) return null;
|
|
855
676
|
t.computeBoundingBox();
|
|
856
677
|
const e = t.boundingBox;
|
|
857
678
|
return {
|
|
@@ -863,10 +684,10 @@ function ae(t) {
|
|
|
863
684
|
}
|
|
864
685
|
};
|
|
865
686
|
}
|
|
866
|
-
function
|
|
687
|
+
function Va(t) {
|
|
867
688
|
const a = t.clone();
|
|
868
689
|
a.quaternion.set(0, 0, 0, 1), a.updateMatrixWorld();
|
|
869
|
-
const e = new
|
|
690
|
+
const e = new $a().setFromObject(a);
|
|
870
691
|
if (!isFinite(e.min.lengthSq())) return null;
|
|
871
692
|
const b = e.translate(a.position.negate()).getCenter(new F());
|
|
872
693
|
return {
|
|
@@ -879,8 +700,8 @@ function ee(t) {
|
|
|
879
700
|
offset: b.lengthSq() ? new y(b.x, b.y, b.z) : void 0
|
|
880
701
|
};
|
|
881
702
|
}
|
|
882
|
-
function
|
|
883
|
-
const a =
|
|
703
|
+
function ft(t) {
|
|
704
|
+
const a = fa(t);
|
|
884
705
|
if (!a) return null;
|
|
885
706
|
const e = 1e-4;
|
|
886
707
|
for (let i = 0; i < a.attributes.position.count; i++)
|
|
@@ -890,7 +711,7 @@ function Ct(t) {
|
|
|
890
711
|
a.attributes.position.getY(i) + (Math.random() - 0.5) * e,
|
|
891
712
|
a.attributes.position.getZ(i) + (Math.random() - 0.5) * e
|
|
892
713
|
);
|
|
893
|
-
const [b, s] =
|
|
714
|
+
const [b, s] = kt(new fe().setFromObject(new ya(a)));
|
|
894
715
|
return {
|
|
895
716
|
type: "ConvexPolyhedron",
|
|
896
717
|
params: {
|
|
@@ -899,7 +720,7 @@ function Ct(t) {
|
|
|
899
720
|
}
|
|
900
721
|
};
|
|
901
722
|
}
|
|
902
|
-
function
|
|
723
|
+
function pt(t) {
|
|
903
724
|
const a = t.parameters;
|
|
904
725
|
return {
|
|
905
726
|
type: "Cylinder",
|
|
@@ -909,25 +730,25 @@ function St(t) {
|
|
|
909
730
|
height: a.height,
|
|
910
731
|
segments: a.radialSegments
|
|
911
732
|
},
|
|
912
|
-
orientation: new
|
|
733
|
+
orientation: new na().setFromEuler(pe.degToRad(-90), 0, 0, "XYZ").normalize()
|
|
913
734
|
};
|
|
914
735
|
}
|
|
915
|
-
function
|
|
916
|
-
const e = ["x", "y", "z"], b = a.cylinderAxis || "y", s = e.splice(e.indexOf(b), 1) && e, i = new
|
|
736
|
+
function gt(t, a) {
|
|
737
|
+
const e = ["x", "y", "z"], b = a.cylinderAxis || "y", s = e.splice(e.indexOf(b), 1) && e, i = new $a().setFromObject(t);
|
|
917
738
|
if (!isFinite(i.min.lengthSq())) return null;
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
),
|
|
739
|
+
const o = i.max[b] - i.min[b], l = 0.5 * Math.max(
|
|
740
|
+
la(i.max, s[0]) - la(i.min, s[0]),
|
|
741
|
+
la(i.max, s[1]) - la(i.min, s[1])
|
|
742
|
+
), g = b === "y" ? Ha : 0, j = b === "z" ? Ha : 0;
|
|
922
743
|
return {
|
|
923
744
|
type: "Cylinder",
|
|
924
745
|
params: {
|
|
925
746
|
radiusTop: l,
|
|
926
747
|
radiusBottom: l,
|
|
927
|
-
height:
|
|
748
|
+
height: o,
|
|
928
749
|
segments: 12
|
|
929
750
|
},
|
|
930
|
-
orientation: new
|
|
751
|
+
orientation: new na().setFromEuler(g, j, 0, "XYZ").normalize(),
|
|
931
752
|
offset: new y(
|
|
932
753
|
(i.max.x + i.min.x) / 2,
|
|
933
754
|
(i.max.y + i.min.y) / 2,
|
|
@@ -935,7 +756,7 @@ function Bt(t, a) {
|
|
|
935
756
|
)
|
|
936
757
|
};
|
|
937
758
|
}
|
|
938
|
-
function
|
|
759
|
+
function mt(t) {
|
|
939
760
|
t.computeBoundingBox();
|
|
940
761
|
const a = t.boundingBox;
|
|
941
762
|
return {
|
|
@@ -947,19 +768,19 @@ function Lt(t) {
|
|
|
947
768
|
}
|
|
948
769
|
};
|
|
949
770
|
}
|
|
950
|
-
function
|
|
771
|
+
function ut(t) {
|
|
951
772
|
return {
|
|
952
773
|
type: "Sphere",
|
|
953
774
|
params: { radius: t.parameters.radius }
|
|
954
775
|
};
|
|
955
776
|
}
|
|
956
|
-
function
|
|
777
|
+
function jt(t, a) {
|
|
957
778
|
if (a.sphereRadius)
|
|
958
779
|
return {
|
|
959
780
|
type: "Sphere",
|
|
960
781
|
params: { radius: a.sphereRadius }
|
|
961
782
|
};
|
|
962
|
-
const e =
|
|
783
|
+
const e = fa(t);
|
|
963
784
|
if (!e) return null;
|
|
964
785
|
e.computeBoundingSphere();
|
|
965
786
|
const b = e.boundingSphere;
|
|
@@ -971,8 +792,8 @@ function Rt(t, a) {
|
|
|
971
792
|
// : undefined,
|
|
972
793
|
};
|
|
973
794
|
}
|
|
974
|
-
function
|
|
975
|
-
const a =
|
|
795
|
+
function yt(t) {
|
|
796
|
+
const a = oe(t);
|
|
976
797
|
if (!a.length) return null;
|
|
977
798
|
const e = new Uint32Array(a.length);
|
|
978
799
|
for (let b = 0; b < a.length; b++)
|
|
@@ -985,35 +806,35 @@ function Ut(t) {
|
|
|
985
806
|
}
|
|
986
807
|
};
|
|
987
808
|
}
|
|
988
|
-
function
|
|
989
|
-
const a = t.faces.map((
|
|
809
|
+
function kt(t) {
|
|
810
|
+
const a = t.faces.map((o) => {
|
|
990
811
|
const l = [];
|
|
991
|
-
let
|
|
812
|
+
let g = o.edge;
|
|
992
813
|
do {
|
|
993
|
-
const j =
|
|
994
|
-
P >= 0 && l.push(P),
|
|
995
|
-
} while (
|
|
814
|
+
const j = g.head(), P = t.vertices.indexOf(j);
|
|
815
|
+
P >= 0 && l.push(P), g = g.next;
|
|
816
|
+
} while (g !== o.edge);
|
|
996
817
|
return l;
|
|
997
818
|
}), e = Array.from(new Set(a.flat())).sort(), b = [];
|
|
998
|
-
for (let
|
|
819
|
+
for (let o = 0; o < e.length; o++)
|
|
999
820
|
b.push(
|
|
1000
|
-
t.vertices[e[
|
|
1001
|
-
t.vertices[e[
|
|
1002
|
-
t.vertices[e[
|
|
821
|
+
t.vertices[e[o]].point.x,
|
|
822
|
+
t.vertices[e[o]].point.y,
|
|
823
|
+
t.vertices[e[o]].point.z
|
|
1003
824
|
);
|
|
1004
825
|
const s = /* @__PURE__ */ new Map();
|
|
1005
|
-
for (let
|
|
1006
|
-
s.set(e[
|
|
826
|
+
for (let o = 0; o < e.length; o++)
|
|
827
|
+
s.set(e[o], o);
|
|
1007
828
|
const i = [];
|
|
1008
|
-
for (let
|
|
829
|
+
for (let o = 0; o < a.length; o++)
|
|
1009
830
|
i.push([
|
|
1010
|
-
s.get(a[
|
|
1011
|
-
s.get(a[
|
|
1012
|
-
s.get(a[
|
|
831
|
+
s.get(a[o][0]),
|
|
832
|
+
s.get(a[o][1]),
|
|
833
|
+
s.get(a[o][2])
|
|
1013
834
|
]);
|
|
1014
835
|
return [b, i];
|
|
1015
836
|
}
|
|
1016
|
-
const
|
|
837
|
+
const wt = ["static", "dynamic", "kinematic"], ua = class ua extends ja {
|
|
1017
838
|
constructor() {
|
|
1018
839
|
super(), this.mass = 1, this.type = "dynamic", this.isTrigger = !1, this.material = new T(), this._objectUpdate = (a) => {
|
|
1019
840
|
if (a.source === "Cannon3DBodyComponent" || a.source === "CannonPhysicsPlugin") return;
|
|
@@ -1056,7 +877,7 @@ const _t = ["static", "dynamic", "kinematic"], va = class va extends oa {
|
|
|
1056
877
|
super.init(a, e);
|
|
1057
878
|
const b = this.ctx.plugin(z);
|
|
1058
879
|
this.body = new N(), this.body.material = this.material, this.body.mass = this.mass, this.body.type = this._typeToCannon(this.type), this.body.isTrigger = this.isTrigger, this.updateMassProperties(), this.resetTransform(), a.addEventListener("objectUpdate", this._objectUpdate), b.addBody(this), a.traverseModels && a.traverseModels((s) => {
|
|
1059
|
-
L.GetComponents(s,
|
|
880
|
+
L.GetComponents(s, sa).forEach((i) => {
|
|
1060
881
|
this.addShape(i, !1);
|
|
1061
882
|
});
|
|
1062
883
|
}, { widgets: !1, visible: !1 }), this.shapeRefs.length && this.refreshShapes();
|
|
@@ -1084,44 +905,44 @@ const _t = ["static", "dynamic", "kinematic"], va = class va extends oa {
|
|
|
1084
905
|
b !== -1 && (a.bodyRef === this && (a.bodyRef = void 0), this.shapeRefs.splice(b, 1), e && this.refreshShapes());
|
|
1085
906
|
}
|
|
1086
907
|
refreshShapes(a = !0) {
|
|
1087
|
-
var
|
|
908
|
+
var o, l;
|
|
1088
909
|
let e = !1;
|
|
1089
|
-
for (const
|
|
1090
|
-
if (!this.shapeRefs.find((j) => j.result.shape ===
|
|
1091
|
-
const j = this.body.shapes.indexOf(
|
|
1092
|
-
j !== -1 && (this.body.shapes.splice(j, 1), this.body.shapeOffsets.splice(j, 1), this.body.shapeOrientations.splice(j, 1),
|
|
910
|
+
for (const g of this.body.shapes)
|
|
911
|
+
if (!this.shapeRefs.find((j) => j.result.shape === g)) {
|
|
912
|
+
const j = this.body.shapes.indexOf(g);
|
|
913
|
+
j !== -1 && (this.body.shapes.splice(j, 1), this.body.shapeOffsets.splice(j, 1), this.body.shapeOrientations.splice(j, 1), g.body = null, e = !0);
|
|
1093
914
|
}
|
|
1094
915
|
const b = this.object;
|
|
1095
916
|
b.updateMatrixWorld(!0);
|
|
1096
917
|
const s = b.getWorldPosition(new F()), i = b.getWorldQuaternion(new C());
|
|
1097
|
-
for (const
|
|
1098
|
-
if (!this.body.shapes.includes(
|
|
1099
|
-
const j =
|
|
918
|
+
for (const g of this.shapeRefs)
|
|
919
|
+
if (!this.body.shapes.includes(g.result.shape)) {
|
|
920
|
+
const j = g.result.shape;
|
|
1100
921
|
this.body.shapes.push(j);
|
|
1101
|
-
const P = new y(),
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
if (b !==
|
|
1105
|
-
|
|
1106
|
-
const m =
|
|
922
|
+
const P = new y(), x = new na();
|
|
923
|
+
g.result.offset && (P.x += g.result.offset.x, P.y += g.result.offset.y, P.z += g.result.offset.z), g.result.orientation && (x.x = g.result.orientation.x, x.y = g.result.orientation.y, x.z = g.result.orientation.z, x.w = g.result.orientation.w);
|
|
924
|
+
const D = g.object;
|
|
925
|
+
if (b !== D) {
|
|
926
|
+
D.updateMatrixWorld(!0);
|
|
927
|
+
const m = D.getWorldPosition(new F());
|
|
1107
928
|
P.x += m.x - s.x, P.y += m.y - s.y, P.z += m.z - s.z;
|
|
1108
|
-
const c =
|
|
1109
|
-
|
|
929
|
+
const c = D.getWorldQuaternion(new C()).multiply(i.invert());
|
|
930
|
+
x.x = c.x, x.y = c.y, x.z = c.z, x.w = c.w;
|
|
1110
931
|
}
|
|
1111
|
-
this.body.shapeOffsets.push(P), this.body.shapeOrientations.push(
|
|
932
|
+
this.body.shapeOffsets.push(P), this.body.shapeOrientations.push(x), j.body = this.body, e = !0;
|
|
1112
933
|
}
|
|
1113
|
-
a && e && (this.updateMassProperties(), this.updateBoundingRadius(), this.body.aabbNeedsUpdate = !0, (l = (
|
|
934
|
+
a && e && (this.updateMassProperties(), this.updateBoundingRadius(), this.body.aabbNeedsUpdate = !0, (l = (o = this.object).setDirty) == null || l.call(o, { source: "Cannon3DBodyComponent" }));
|
|
1114
935
|
}
|
|
1115
936
|
};
|
|
1116
|
-
|
|
937
|
+
ua.ComponentType = "Cannon3DBodyComponent", ua.StateProperties = ["mass", {
|
|
1117
938
|
key: "type",
|
|
1118
|
-
type:
|
|
939
|
+
type: Da(wt)
|
|
1119
940
|
}, "isTrigger", "material"];
|
|
1120
|
-
let
|
|
1121
|
-
function
|
|
941
|
+
let pa = ua;
|
|
942
|
+
function xt() {
|
|
1122
943
|
const a = new y(), e = new y(), b = new y();
|
|
1123
|
-
new
|
|
1124
|
-
const s = new
|
|
944
|
+
new na();
|
|
945
|
+
const s = new va(1), i = new Pa(1, 1, 1), o = new Wa(10, 10, 10, 10), l = new ge({
|
|
1125
946
|
color: 65280,
|
|
1126
947
|
linewidth: 3,
|
|
1127
948
|
// in world units with size attenuation, pixels otherwise
|
|
@@ -1135,98 +956,98 @@ function Tt() {
|
|
|
1135
956
|
depthWrite: !1,
|
|
1136
957
|
allowOverride: !1
|
|
1137
958
|
});
|
|
1138
|
-
l.userData.renderToGBuffer = !1, l.userData.renderToDepth = !1,
|
|
1139
|
-
function
|
|
1140
|
-
const
|
|
959
|
+
l.userData.renderToGBuffer = !1, l.userData.renderToDepth = !1, o.translate(0, 0, 1e-4);
|
|
960
|
+
function g(c) {
|
|
961
|
+
const n = new ia(), r = [];
|
|
1141
962
|
for (let f = 0; f < c.vertices.length; f++) {
|
|
1142
|
-
const
|
|
1143
|
-
r.push(
|
|
963
|
+
const p = c.vertices[f];
|
|
964
|
+
r.push(p.x, p.y, p.z);
|
|
1144
965
|
}
|
|
1145
|
-
|
|
966
|
+
n.setAttribute("position", new xa(r, 3));
|
|
1146
967
|
const h = [];
|
|
1147
968
|
for (let f = 0; f < c.faces.length; f++) {
|
|
1148
|
-
const
|
|
1149
|
-
for (let
|
|
1150
|
-
const
|
|
1151
|
-
h.push(u,
|
|
969
|
+
const p = c.faces[f], u = p[0];
|
|
970
|
+
for (let k = 1; k < p.length - 1; k++) {
|
|
971
|
+
const w = p[k], A = p[k + 1];
|
|
972
|
+
h.push(u, w, A);
|
|
1152
973
|
}
|
|
1153
974
|
}
|
|
1154
|
-
return
|
|
975
|
+
return n.setIndex(h), n.computeBoundingSphere(), n.computeVertexNormals(), n;
|
|
1155
976
|
}
|
|
1156
977
|
function j(c) {
|
|
1157
|
-
const
|
|
978
|
+
const n = new ia(), r = [], h = a, f = e, p = b;
|
|
1158
979
|
for (let u = 0; u < c.indices.length / 3; u++)
|
|
1159
|
-
c.getTriangleVertices(u, h, f,
|
|
1160
|
-
return
|
|
980
|
+
c.getTriangleVertices(u, h, f, p), r.push(h.x, h.y, h.z), r.push(f.x, f.y, f.z), r.push(p.x, p.y, p.z);
|
|
981
|
+
return n.setAttribute("position", new xa(r, 3)), n.computeBoundingSphere(), n.computeVertexNormals(), n;
|
|
1161
982
|
}
|
|
1162
983
|
function P(c) {
|
|
1163
|
-
const
|
|
1164
|
-
for (let
|
|
1165
|
-
for (let u = 0; u < c.data[
|
|
1166
|
-
const
|
|
1167
|
-
f.push(
|
|
984
|
+
const n = new ia(), r = c.elementSize || 1, h = c.data.flatMap((p, u) => p.flatMap((k, w) => [u * r, w * r, k])), f = [];
|
|
985
|
+
for (let p = 0; p < c.data.length - 1; p++)
|
|
986
|
+
for (let u = 0; u < c.data[p].length - 1; u++) {
|
|
987
|
+
const k = c.data[p].length, w = p * k + u;
|
|
988
|
+
f.push(w + 1, w + k, w + k + 1), f.push(w + k, w + 1, w);
|
|
1168
989
|
}
|
|
1169
|
-
return
|
|
990
|
+
return n.setIndex(f), n.setAttribute("position", new xa(h, 3)), n.computeBoundingSphere(), n.computeVertexNormals(), n;
|
|
1170
991
|
}
|
|
1171
|
-
function
|
|
1172
|
-
let
|
|
1173
|
-
const { SPHERE: r, BOX: h, PLANE: f, CYLINDER:
|
|
992
|
+
function x(c) {
|
|
993
|
+
let n = new ya();
|
|
994
|
+
const { SPHERE: r, BOX: h, PLANE: f, CYLINDER: p, CONVEXPOLYHEDRON: u, TRIMESH: k, HEIGHTFIELD: w } = q.types;
|
|
1174
995
|
switch (c.type) {
|
|
1175
996
|
case r: {
|
|
1176
|
-
|
|
997
|
+
n = new Y(new X(s), l);
|
|
1177
998
|
break;
|
|
1178
999
|
}
|
|
1179
1000
|
case h: {
|
|
1180
|
-
|
|
1001
|
+
n = new Y(new X(i), l);
|
|
1181
1002
|
break;
|
|
1182
1003
|
}
|
|
1183
1004
|
case f: {
|
|
1184
|
-
|
|
1005
|
+
n = new Y(new X(o), l);
|
|
1185
1006
|
break;
|
|
1186
1007
|
}
|
|
1187
|
-
case
|
|
1188
|
-
const A = new
|
|
1008
|
+
case p: {
|
|
1009
|
+
const A = new me(
|
|
1189
1010
|
c.radiusTop,
|
|
1190
1011
|
c.radiusBottom,
|
|
1191
1012
|
c.height,
|
|
1192
1013
|
c.numSegments
|
|
1193
1014
|
);
|
|
1194
|
-
|
|
1015
|
+
n = new Y(new X(A), l), c.geometryId = A.id;
|
|
1195
1016
|
break;
|
|
1196
1017
|
}
|
|
1197
1018
|
case u: {
|
|
1198
|
-
const A =
|
|
1199
|
-
|
|
1019
|
+
const A = g(c);
|
|
1020
|
+
n = new Y(new X(A), l), c.geometryId = A.id;
|
|
1200
1021
|
break;
|
|
1201
1022
|
}
|
|
1202
|
-
case
|
|
1023
|
+
case k: {
|
|
1203
1024
|
const A = j(c);
|
|
1204
|
-
|
|
1025
|
+
n = new Y(new X(A), l), c.geometryId = A.id;
|
|
1205
1026
|
break;
|
|
1206
1027
|
}
|
|
1207
|
-
case
|
|
1028
|
+
case w: {
|
|
1208
1029
|
const A = P(c);
|
|
1209
|
-
|
|
1030
|
+
n = new Y(new X(A), l), c.geometryId = A.id;
|
|
1210
1031
|
break;
|
|
1211
1032
|
}
|
|
1212
1033
|
}
|
|
1213
|
-
return
|
|
1034
|
+
return n;
|
|
1214
1035
|
}
|
|
1215
|
-
function
|
|
1216
|
-
const { SPHERE: r, BOX: h, PLANE: f, CYLINDER:
|
|
1217
|
-
switch (
|
|
1036
|
+
function D(c, n) {
|
|
1037
|
+
const { SPHERE: r, BOX: h, PLANE: f, CYLINDER: p, CONVEXPOLYHEDRON: u, TRIMESH: k, HEIGHTFIELD: w } = q.types;
|
|
1038
|
+
switch (n.type) {
|
|
1218
1039
|
case r: {
|
|
1219
|
-
const { radius: A } =
|
|
1040
|
+
const { radius: A } = n;
|
|
1220
1041
|
c.scale.set(A * 1, A * 1, A * 1);
|
|
1221
1042
|
break;
|
|
1222
1043
|
}
|
|
1223
1044
|
case h: {
|
|
1224
|
-
c.scale.copy(
|
|
1045
|
+
c.scale.copy(n.halfExtents), c.scale.multiplyScalar(2);
|
|
1225
1046
|
break;
|
|
1226
1047
|
}
|
|
1227
1048
|
case f:
|
|
1228
1049
|
break;
|
|
1229
|
-
case
|
|
1050
|
+
case p: {
|
|
1230
1051
|
c.scale.set(1, 1, 1);
|
|
1231
1052
|
break;
|
|
1232
1053
|
}
|
|
@@ -1234,38 +1055,38 @@ function Tt() {
|
|
|
1234
1055
|
c.scale.set(1, 1, 1);
|
|
1235
1056
|
break;
|
|
1236
1057
|
}
|
|
1237
|
-
case
|
|
1238
|
-
c.scale.copy(
|
|
1058
|
+
case k: {
|
|
1059
|
+
c.scale.copy(n.scale).multiplyScalar(1);
|
|
1239
1060
|
break;
|
|
1240
1061
|
}
|
|
1241
|
-
case
|
|
1062
|
+
case w: {
|
|
1242
1063
|
c.scale.set(1, 1, 1);
|
|
1243
1064
|
break;
|
|
1244
1065
|
}
|
|
1245
1066
|
}
|
|
1246
1067
|
}
|
|
1247
|
-
function m(c,
|
|
1068
|
+
function m(c, n) {
|
|
1248
1069
|
if (!c) return !1;
|
|
1249
1070
|
const { geometry: r } = c;
|
|
1250
|
-
return r instanceof
|
|
1071
|
+
return r instanceof va && n.type === q.types.SPHERE || r instanceof Pa && n.type === q.types.BOX || r instanceof Wa && n.type === q.types.PLANE || // geometry.id === (shape as ComplexShape).geometryId && shape.type === Shape.types.BOX ||
|
|
1251
1072
|
// geometry.id === (shape as ComplexShape).geometryId && shape.type === Shape.types.SPHERE ||
|
|
1252
1073
|
// geometry.id === (shape as ComplexShape).geometryId && shape.type === Shape.types.PLANE ||
|
|
1253
|
-
r.id ===
|
|
1074
|
+
r.id === n.geometryId && n.type === q.types.CONVEXPOLYHEDRON || r.id === n.geometryId && n.type === q.types.TRIMESH || r.id === n.geometryId && n.type === q.types.HEIGHTFIELD;
|
|
1254
1075
|
}
|
|
1255
|
-
function
|
|
1256
|
-
return m(c,
|
|
1076
|
+
function d(c, n) {
|
|
1077
|
+
return m(c, n) || (c = x(n)), c && D(c, n), c;
|
|
1257
1078
|
}
|
|
1258
1079
|
return {
|
|
1259
|
-
createConvexPolyhedronGeometry:
|
|
1080
|
+
createConvexPolyhedronGeometry: g,
|
|
1260
1081
|
createTrimeshGeometry: j,
|
|
1261
1082
|
createHeightfieldGeometry: P,
|
|
1262
|
-
createMesh:
|
|
1263
|
-
scaleMesh:
|
|
1083
|
+
createMesh: x,
|
|
1084
|
+
scaleMesh: D,
|
|
1264
1085
|
typeMatch: m,
|
|
1265
|
-
updateMesh:
|
|
1086
|
+
updateMesh: d
|
|
1266
1087
|
};
|
|
1267
1088
|
}
|
|
1268
|
-
const
|
|
1089
|
+
const vt = xt(), Ma = {
|
|
1269
1090
|
autoBox: _.BOX,
|
|
1270
1091
|
autoCylinder: _.CYLINDER,
|
|
1271
1092
|
autoSphere: _.SPHERE,
|
|
@@ -1277,14 +1098,14 @@ const Ot = Tt(), Na = {
|
|
|
1277
1098
|
convex: _.HULL,
|
|
1278
1099
|
trimesh: _.MESH
|
|
1279
1100
|
// plane: ShapeType.PLANE,
|
|
1280
|
-
},
|
|
1101
|
+
}, Pt = Object.keys(Ma), At = {
|
|
1281
1102
|
box: { x: 1, y: 1, z: 1 },
|
|
1282
1103
|
sphere: { radius: 1 },
|
|
1283
1104
|
cylinder: { radiusTop: 1, radiusBottom: 1, height: 1, segments: 8 },
|
|
1284
1105
|
convex: { vertices: new Float32Array([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 0, 0, -1]), faces: [[0, 1, 2, 3], [4, 0, 3], [4, 3, 2], [4, 2, 1], [4, 1, 0]] },
|
|
1285
1106
|
trimesh: { vertices: new Float32Array([1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1]), indices: new Uint32Array([0, 1, 2, 0, 3, 1, 0, 2, 3, 1, 3, 2]) }
|
|
1286
1107
|
// not for auto
|
|
1287
|
-
}, H = class H extends
|
|
1108
|
+
}, H = class H extends ja {
|
|
1288
1109
|
constructor() {
|
|
1289
1110
|
super(), this.result = H.EmptyResult, this.type = "autoBox", this.params = null, this._needsUpdate = !1, this.objectUpdate = (a) => {
|
|
1290
1111
|
}, this.childadded = (a) => {
|
|
@@ -1294,16 +1115,16 @@ const Ot = Tt(), Na = {
|
|
|
1294
1115
|
}, this.preFrame = () => {
|
|
1295
1116
|
this._needsUpdate && (this._needsUpdate = !1, this.refreshShape());
|
|
1296
1117
|
}, this.onStateChange("type", () => {
|
|
1297
|
-
const a =
|
|
1118
|
+
const a = At[this.type];
|
|
1298
1119
|
if (a) {
|
|
1299
1120
|
const e = {};
|
|
1300
1121
|
Object.entries(a).forEach(([b, s]) => {
|
|
1301
1122
|
e[b] = s.slice ? s.slice() : s;
|
|
1302
1123
|
}), this.params = {
|
|
1303
|
-
type:
|
|
1124
|
+
type: Ma[this.type],
|
|
1304
1125
|
params: e,
|
|
1305
1126
|
offset: new y(),
|
|
1306
|
-
orientation: new
|
|
1127
|
+
orientation: new na()
|
|
1307
1128
|
};
|
|
1308
1129
|
} else
|
|
1309
1130
|
this.params = null;
|
|
@@ -1313,30 +1134,30 @@ const Ot = Tt(), Na = {
|
|
|
1313
1134
|
// static IsCompatible(_object: IObject3D) { return true }
|
|
1314
1135
|
init(a, e) {
|
|
1315
1136
|
super.init(a, e), this.refreshShape(!1);
|
|
1316
|
-
const b = L.GetComponentInParent(a,
|
|
1137
|
+
const b = L.GetComponentInParent(a, pa);
|
|
1317
1138
|
b && b.addShape(this), this.object.addEventListener("objectUpdate", this.objectUpdate), this.object.addEventListener("childadded", this.childadded), this.object.addEventListener("childremoved", this.childremoved), this.ctx.viewer.addEventListener("preFrame", this.preFrame);
|
|
1318
1139
|
}
|
|
1319
1140
|
destroy() {
|
|
1320
1141
|
return this.bodyRef && (this.bodyRef.removeShape(this, !1), this.bodyRef = void 0), this.object.removeEventListener("objectUpdate", this.objectUpdate), this.ctx.viewer.removeEventListener("preFrame", this.preFrame), this.result = H.EmptyResult, super.destroy();
|
|
1321
1142
|
}
|
|
1322
1143
|
refreshShape(a = !0) {
|
|
1323
|
-
var s, i,
|
|
1144
|
+
var s, i, o;
|
|
1324
1145
|
if (this.object.__cannonShapes || (this.object.__cannonShapes = []), this.result) {
|
|
1325
1146
|
const l = this.object.__cannonShapes.indexOf(this.result);
|
|
1326
1147
|
l !== -1 && this.object.__cannonShapes.splice(l, 1);
|
|
1327
1148
|
}
|
|
1328
|
-
const e =
|
|
1329
|
-
b ? this.result =
|
|
1149
|
+
const e = Ma[this.type], b = this.params ?? (e ? re(this.object, { type: e }) : null);
|
|
1150
|
+
b ? this.result = nt(this.object, void 0, b) : this.result = H.EmptyResult, this.object.__cannonShapes.includes(this.result) || this.object.__cannonShapes.push(this.result), a && this.bodyRef && this.bodyRef.refreshShapes(), (i = (s = this.object).setDirty) == null || i.call(s), (o = this.ctx.plugin(ae)) == null || o.refreshObject(this.object);
|
|
1330
1151
|
}
|
|
1331
1152
|
};
|
|
1332
1153
|
H.ComponentType = "Cannon3DShapeComponent", H.StateProperties = [{
|
|
1333
1154
|
key: "type",
|
|
1334
|
-
type:
|
|
1155
|
+
type: Da(Pt)
|
|
1335
1156
|
}], H.EmptyResult = { shape: new K(new y(0.025, 0.025, 0.025)) };
|
|
1336
|
-
let
|
|
1337
|
-
class
|
|
1157
|
+
let sa = H;
|
|
1158
|
+
class ga extends ue {
|
|
1338
1159
|
constructor(a) {
|
|
1339
|
-
super(a, !1), this.autoUpgradeChildren = !1, this._shapes = [], this._meshes = /* @__PURE__ */ new WeakMap(), this._gp = new
|
|
1160
|
+
super(a, !1), this.autoUpgradeChildren = !1, this._shapes = [], this._meshes = /* @__PURE__ */ new WeakMap(), this._gp = new je(), this.attach(a), this.add(this._gp), this.visible = !1;
|
|
1340
1161
|
}
|
|
1341
1162
|
update() {
|
|
1342
1163
|
var s;
|
|
@@ -1348,34 +1169,34 @@ class ya extends Me {
|
|
|
1348
1169
|
const a = ((s = this.object) == null ? void 0 : s.__cannonShapes) || [], e = a.filter((i) => !this._shapes.includes(i)), b = this._shapes.filter((i) => !a.includes(i));
|
|
1349
1170
|
if (!(!e.length && !b.length)) {
|
|
1350
1171
|
for (const i of b) {
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1172
|
+
const o = this._meshes.get(i.shape);
|
|
1173
|
+
o && (this._gp.remove(o), o.geometry.dispose(), o.material.dispose(), this._meshes.delete(i.shape));
|
|
1353
1174
|
}
|
|
1354
1175
|
this._shapes = [];
|
|
1355
1176
|
for (const i of a) {
|
|
1356
|
-
const
|
|
1357
|
-
l !==
|
|
1177
|
+
const o = this._meshes.get(i.shape), l = vt.updateMesh(o, i.shape);
|
|
1178
|
+
l !== o && l && (this._gp.add(l), o && (o.removeFromParent(), o.geometry.dispose(), o.material.dispose()), this._meshes.set(i.shape, l)), l && (i.offset && l.position.set(i.offset.x, i.offset.y, i.offset.z), i.orientation && l.quaternion.set(i.orientation.x, i.orientation.y, i.orientation.z, i.orientation.w)), this._shapes.push(i);
|
|
1358
1179
|
}
|
|
1359
1180
|
}
|
|
1360
1181
|
}
|
|
1361
1182
|
dispose() {
|
|
1362
1183
|
this._shapes = [], this.children.forEach((a) => {
|
|
1363
|
-
a instanceof
|
|
1184
|
+
a instanceof ya && (a.geometry.dispose(), a.material.dispose());
|
|
1364
1185
|
}), super.dispose();
|
|
1365
1186
|
}
|
|
1366
1187
|
static Check(a) {
|
|
1367
|
-
return !!L.GetComponentData(a,
|
|
1188
|
+
return !!L.GetComponentData(a, sa);
|
|
1368
1189
|
}
|
|
1369
1190
|
static Create(a) {
|
|
1370
|
-
return new
|
|
1191
|
+
return new ga(a);
|
|
1371
1192
|
}
|
|
1372
1193
|
}
|
|
1373
|
-
var
|
|
1374
|
-
for (var s = b > 1 ? void 0 : b ?
|
|
1375
|
-
(
|
|
1194
|
+
var Mt = Object.getOwnPropertyDescriptor, Dt = (t, a, e, b) => {
|
|
1195
|
+
for (var s = b > 1 ? void 0 : b ? Mt(a, e) : a, i = t.length - 1, o; i >= 0; i--)
|
|
1196
|
+
(o = t[i]) && (s = o(s) || s);
|
|
1376
1197
|
return s;
|
|
1377
1198
|
};
|
|
1378
|
-
let
|
|
1199
|
+
let ca = class extends ja {
|
|
1379
1200
|
constructor() {
|
|
1380
1201
|
super(), this.scale = 1, this.angle = Math.PI / 4, this.angleShoulders = Math.PI / 2, this.twistAngle = Math.PI / 8, this.mass = 1, this.autoCreateOnInit = !0, this.hideRagdollMeshes = !1, this.material = new T(), this._bodies = [], this._constraints = [], this._parts = null, this._ragdollConstraints = null, this._cannon = null, this._meshes = [], this._meshContainer = null, this._visualMaterial = null, this._lastObjectPosition = new F(), this._lastObjectQuaternion = new C(), this._initialized = !1, this._isActive = !1, this._characterMeshes = [], this._boneMap = /* @__PURE__ */ new Map(), this._initialBoneQuats = /* @__PURE__ */ new Map(), this._initialBoneWorldQuats = /* @__PURE__ */ new Map(), this._initialBodyQuats = /* @__PURE__ */ new Map(), this._boneNames = {
|
|
1381
1202
|
head: ["Head", "mixamorigHead", "head"],
|
|
@@ -1412,7 +1233,7 @@ let na = class extends oa {
|
|
|
1412
1233
|
}
|
|
1413
1234
|
init(t, a) {
|
|
1414
1235
|
var e;
|
|
1415
|
-
super.init(t, a), this._cannon = this.ctx.plugin(z), this._removeRagdoll(), this._visualMaterial || (this._visualMaterial = new
|
|
1236
|
+
super.init(t, a), this._cannon = this.ctx.plugin(z), this._removeRagdoll(), this._visualMaterial || (this._visualMaterial = new ye({ color: 8947848 })), this._meshContainer || (this._meshContainer = new ke(), this._meshContainer.name = `RagdollMeshes_${this.object.uuid}`, (e = this.ctx.viewer) == null || e.scene.add(this._meshContainer)), this._findCharacterMeshes(), this._buildBoneMap(), this.autoCreateOnInit && (this._createRagdoll(), this._deactivateBodies()), this._updateMeshVisibility();
|
|
1416
1237
|
}
|
|
1417
1238
|
destroy() {
|
|
1418
1239
|
var t;
|
|
@@ -1439,22 +1260,22 @@ let na = class extends oa {
|
|
|
1439
1260
|
const t = (e, b) => {
|
|
1440
1261
|
const s = this._findBone(b);
|
|
1441
1262
|
if (!s) return;
|
|
1442
|
-
const i = s.name,
|
|
1443
|
-
if (!
|
|
1263
|
+
const i = s.name, o = this._initialBodyQuats.get(e), l = this._initialBoneWorldQuats.get(i);
|
|
1264
|
+
if (!o || !l)
|
|
1444
1265
|
return;
|
|
1445
|
-
const
|
|
1266
|
+
const g = new C(
|
|
1446
1267
|
e.quaternion.x,
|
|
1447
1268
|
e.quaternion.y,
|
|
1448
1269
|
e.quaternion.z,
|
|
1449
1270
|
e.quaternion.w
|
|
1450
|
-
), j =
|
|
1271
|
+
), j = o.clone().invert(), x = g.clone().multiply(j).clone().multiply(l);
|
|
1451
1272
|
if (s.parent) {
|
|
1452
|
-
const
|
|
1453
|
-
s.parent.getWorldQuaternion(
|
|
1454
|
-
const
|
|
1455
|
-
s.quaternion.copy(
|
|
1273
|
+
const D = new C();
|
|
1274
|
+
s.parent.getWorldQuaternion(D);
|
|
1275
|
+
const d = D.clone().invert().clone().multiply(x);
|
|
1276
|
+
s.quaternion.copy(d);
|
|
1456
1277
|
} else
|
|
1457
|
-
s.quaternion.copy(
|
|
1278
|
+
s.quaternion.copy(x);
|
|
1458
1279
|
}, a = this._findBone(this._boneNames.hips);
|
|
1459
1280
|
if (a && this._parts.pelvis) {
|
|
1460
1281
|
if (this._tempWorldPos.set(
|
|
@@ -1526,111 +1347,111 @@ let na = class extends oa {
|
|
|
1526
1347
|
}
|
|
1527
1348
|
_createRagdoll() {
|
|
1528
1349
|
if (!this._cannon) return;
|
|
1529
|
-
const t = this.scale, a = this.angle, e = this.angleShoulders, b = this.twistAngle, s = 0.5 * t, i = 0.4 * t,
|
|
1350
|
+
const t = this.scale, a = this.angle, e = this.angleShoulders, b = this.twistAngle, s = 0.5 * t, i = 0.4 * t, o = 0.4 * t, l = 0.2 * t, g = 0.2 * t, j = 0.1 * t, P = 0.25 * t, x = 0.6 * t, D = 0.4 * t, m = 0.5 * t, d = 0.2 * t, c = 0.2 * t, n = 0.5 * t, r = new se(P), h = new K(
|
|
1530
1351
|
new y(i * 0.5, l * 0.5, l * 0.5)
|
|
1531
1352
|
), f = new K(
|
|
1532
|
-
new y(
|
|
1533
|
-
),
|
|
1534
|
-
new y(s * 0.5,
|
|
1353
|
+
new y(o * 0.5, g * 0.5, g * 0.5)
|
|
1354
|
+
), p = new K(
|
|
1355
|
+
new y(s * 0.5, x * 0.5, g * 0.5)
|
|
1535
1356
|
), u = new K(
|
|
1536
|
-
new y(s * 0.5,
|
|
1357
|
+
new y(s * 0.5, D * 0.5, g * 0.5)
|
|
1358
|
+
), k = new K(
|
|
1359
|
+
new y(d * 0.5, m * 0.5, g * 0.5)
|
|
1537
1360
|
), w = new K(
|
|
1538
|
-
new y(
|
|
1539
|
-
), v = new
|
|
1540
|
-
|
|
1541
|
-
), A = this.object.getWorldPosition(new F()), x = this.object.getWorldQuaternion(new C()), D = (O) => {
|
|
1542
|
-
const ba = O.clone().applyQuaternion(x);
|
|
1361
|
+
new y(c * 0.5, n * 0.5, g * 0.5)
|
|
1362
|
+
), A = this.object.getWorldPosition(new F()), v = this.object.getWorldQuaternion(new C()), M = (O) => {
|
|
1363
|
+
const ba = O.clone().applyQuaternion(v);
|
|
1543
1364
|
return new y(
|
|
1544
1365
|
A.x + ba.x,
|
|
1545
1366
|
A.y + ba.y,
|
|
1546
1367
|
A.z + ba.z
|
|
1547
1368
|
);
|
|
1548
1369
|
}, I = (O, ba = !1) => {
|
|
1549
|
-
var
|
|
1550
|
-
let
|
|
1370
|
+
var Qa;
|
|
1371
|
+
let ka;
|
|
1551
1372
|
if (ba)
|
|
1552
|
-
|
|
1373
|
+
ka = new va(P, 16, 16);
|
|
1553
1374
|
else {
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1375
|
+
const wa = O.shapes[0];
|
|
1376
|
+
ka = new Pa(
|
|
1377
|
+
wa.halfExtents.x * 2,
|
|
1378
|
+
wa.halfExtents.y * 2,
|
|
1379
|
+
wa.halfExtents.z * 2
|
|
1559
1380
|
);
|
|
1560
1381
|
}
|
|
1561
|
-
const
|
|
1562
|
-
return
|
|
1382
|
+
const ra = new ya(ka, this._visualMaterial);
|
|
1383
|
+
return ra.position.set(O.position.x, O.position.y, O.position.z), (Qa = this._meshContainer) == null || Qa.add(ra), this._meshes.push(ra), ra;
|
|
1563
1384
|
}, E = new N({
|
|
1564
1385
|
mass: this.mass,
|
|
1565
|
-
position:
|
|
1386
|
+
position: M(new F(s / 2, n / 2, 0)),
|
|
1566
1387
|
material: this.material
|
|
1567
|
-
}),
|
|
1388
|
+
}), B = new N({
|
|
1568
1389
|
mass: this.mass,
|
|
1569
|
-
position:
|
|
1390
|
+
position: M(new F(-s / 2, n / 2, 0)),
|
|
1570
1391
|
material: this.material
|
|
1571
1392
|
});
|
|
1572
|
-
E.addShape(
|
|
1393
|
+
E.addShape(w), B.addShape(w), E.quaternion.set(v.x, v.y, v.z, v.w), B.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(E, B), I(E), I(B);
|
|
1573
1394
|
const R = new N({
|
|
1574
1395
|
mass: this.mass,
|
|
1575
|
-
position:
|
|
1396
|
+
position: M(new F(s / 2, n + m / 2, 0)),
|
|
1576
1397
|
material: this.material
|
|
1577
1398
|
}), U = new N({
|
|
1578
1399
|
mass: this.mass,
|
|
1579
|
-
position:
|
|
1400
|
+
position: M(new F(-s / 2, n + m / 2, 0)),
|
|
1580
1401
|
material: this.material
|
|
1581
1402
|
});
|
|
1582
|
-
R.addShape(
|
|
1583
|
-
const ta =
|
|
1403
|
+
R.addShape(k), U.addShape(k), R.quaternion.set(v.x, v.y, v.z, v.w), U.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(R, U), I(R), I(U);
|
|
1404
|
+
const ta = n + m + D / 2, S = new N({
|
|
1584
1405
|
mass: this.mass,
|
|
1585
|
-
position:
|
|
1406
|
+
position: M(new F(0, ta, 0)),
|
|
1586
1407
|
material: this.material
|
|
1587
1408
|
});
|
|
1588
|
-
|
|
1589
|
-
const Z = ta +
|
|
1409
|
+
S.addShape(u), S.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(S), I(S);
|
|
1410
|
+
const Z = ta + D / 2 + x / 2, G = new N({
|
|
1590
1411
|
mass: this.mass,
|
|
1591
|
-
position:
|
|
1412
|
+
position: M(new F(0, Z, 0)),
|
|
1592
1413
|
material: this.material
|
|
1593
1414
|
});
|
|
1594
|
-
G.addShape(
|
|
1595
|
-
const
|
|
1415
|
+
G.addShape(p), G.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(G), I(G);
|
|
1416
|
+
const da = Z + x / 2 + P + j, $ = new N({
|
|
1596
1417
|
mass: this.mass,
|
|
1597
|
-
position:
|
|
1418
|
+
position: M(new F(0, da, 0)),
|
|
1598
1419
|
material: this.material
|
|
1599
1420
|
});
|
|
1600
|
-
$.addShape(r), $.quaternion.set(
|
|
1601
|
-
const
|
|
1421
|
+
$.addShape(r), $.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push($), I($, !0);
|
|
1422
|
+
const oa = Z + x / 2, J = new N({
|
|
1602
1423
|
mass: this.mass,
|
|
1603
|
-
position:
|
|
1424
|
+
position: M(new F(s / 2 + i / 2, oa, 0)),
|
|
1604
1425
|
material: this.material
|
|
1605
1426
|
}), V = new N({
|
|
1606
1427
|
mass: this.mass,
|
|
1607
|
-
position:
|
|
1428
|
+
position: M(new F(-s / 2 - i / 2, oa, 0)),
|
|
1608
1429
|
material: this.material
|
|
1609
1430
|
});
|
|
1610
|
-
J.addShape(h), V.addShape(h), J.quaternion.set(
|
|
1431
|
+
J.addShape(h), V.addShape(h), J.quaternion.set(v.x, v.y, v.z, v.w), V.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(J, V), I(J), I(V);
|
|
1611
1432
|
const aa = new N({
|
|
1612
1433
|
mass: this.mass,
|
|
1613
|
-
position:
|
|
1614
|
-
s / 2 + i +
|
|
1615
|
-
|
|
1434
|
+
position: M(new F(
|
|
1435
|
+
s / 2 + i + o / 2,
|
|
1436
|
+
oa,
|
|
1616
1437
|
0
|
|
1617
1438
|
)),
|
|
1618
1439
|
material: this.material
|
|
1619
1440
|
}), ea = new N({
|
|
1620
1441
|
mass: this.mass,
|
|
1621
|
-
position:
|
|
1622
|
-
-s / 2 - i -
|
|
1623
|
-
|
|
1442
|
+
position: M(new F(
|
|
1443
|
+
-s / 2 - i - o / 2,
|
|
1444
|
+
oa,
|
|
1624
1445
|
0
|
|
1625
1446
|
)),
|
|
1626
1447
|
material: this.material
|
|
1627
1448
|
});
|
|
1628
|
-
aa.addShape(f), ea.addShape(f), aa.quaternion.set(
|
|
1449
|
+
aa.addShape(f), ea.addShape(f), aa.quaternion.set(v.x, v.y, v.z, v.w), ea.quaternion.set(v.x, v.y, v.z, v.w), this._bodies.push(aa, ea), I(aa), I(ea), this._parts = {
|
|
1629
1450
|
lowerLeftLeg: E,
|
|
1630
|
-
lowerRightLeg:
|
|
1451
|
+
lowerRightLeg: B,
|
|
1631
1452
|
upperLeftLeg: R,
|
|
1632
1453
|
upperRightLeg: U,
|
|
1633
|
-
pelvis:
|
|
1454
|
+
pelvis: S,
|
|
1634
1455
|
upperBody: G,
|
|
1635
1456
|
head: $,
|
|
1636
1457
|
upperLeftArm: J,
|
|
@@ -1640,98 +1461,98 @@ let na = class extends oa {
|
|
|
1640
1461
|
};
|
|
1641
1462
|
for (const O of this._bodies)
|
|
1642
1463
|
this._cannon.world.addBody(O);
|
|
1643
|
-
const
|
|
1464
|
+
const Ba = new Q($, G, {
|
|
1644
1465
|
pivotA: new y(0, -P - j / 2, 0),
|
|
1645
|
-
pivotB: new y(0,
|
|
1466
|
+
pivotB: new y(0, x / 2, 0),
|
|
1646
1467
|
axisA: y.UNIT_Y,
|
|
1647
1468
|
axisB: y.UNIT_Y,
|
|
1648
1469
|
angle: a,
|
|
1649
1470
|
twistAngle: b
|
|
1650
1471
|
});
|
|
1651
|
-
this._constraints.push(
|
|
1652
|
-
const
|
|
1653
|
-
pivotA: new y(0,
|
|
1472
|
+
this._constraints.push(Ba);
|
|
1473
|
+
const Sa = new Q(E, R, {
|
|
1474
|
+
pivotA: new y(0, n / 2, 0),
|
|
1654
1475
|
pivotB: new y(0, -m / 2, 0),
|
|
1655
1476
|
axisA: y.UNIT_Y,
|
|
1656
1477
|
axisB: y.UNIT_Y,
|
|
1657
1478
|
angle: a,
|
|
1658
1479
|
twistAngle: b
|
|
1659
|
-
}),
|
|
1660
|
-
pivotA: new y(0,
|
|
1480
|
+
}), La = new Q(B, U, {
|
|
1481
|
+
pivotA: new y(0, n / 2, 0),
|
|
1661
1482
|
pivotB: new y(0, -m / 2, 0),
|
|
1662
1483
|
axisA: y.UNIT_Y,
|
|
1663
1484
|
axisB: y.UNIT_Y,
|
|
1664
1485
|
angle: a,
|
|
1665
1486
|
twistAngle: b
|
|
1666
1487
|
});
|
|
1667
|
-
this._constraints.push(
|
|
1668
|
-
const
|
|
1488
|
+
this._constraints.push(Sa, La);
|
|
1489
|
+
const za = new Q(R, S, {
|
|
1669
1490
|
pivotA: new y(0, m / 2, 0),
|
|
1670
|
-
pivotB: new y(s / 2, -
|
|
1491
|
+
pivotB: new y(s / 2, -D / 2, 0),
|
|
1671
1492
|
axisA: y.UNIT_Y,
|
|
1672
1493
|
axisB: y.UNIT_Y,
|
|
1673
1494
|
angle: a,
|
|
1674
1495
|
twistAngle: b
|
|
1675
|
-
}),
|
|
1496
|
+
}), Ra = new Q(U, S, {
|
|
1676
1497
|
pivotA: new y(0, m / 2, 0),
|
|
1677
|
-
pivotB: new y(-s / 2, -
|
|
1498
|
+
pivotB: new y(-s / 2, -D / 2, 0),
|
|
1678
1499
|
axisA: y.UNIT_Y,
|
|
1679
1500
|
axisB: y.UNIT_Y,
|
|
1680
1501
|
angle: a,
|
|
1681
1502
|
twistAngle: b
|
|
1682
1503
|
});
|
|
1683
|
-
this._constraints.push(
|
|
1684
|
-
const
|
|
1685
|
-
pivotA: new y(0,
|
|
1686
|
-
pivotB: new y(0, -
|
|
1504
|
+
this._constraints.push(za, Ra);
|
|
1505
|
+
const Ua = new Q(S, G, {
|
|
1506
|
+
pivotA: new y(0, D / 2, 0),
|
|
1507
|
+
pivotB: new y(0, -x / 2, 0),
|
|
1687
1508
|
axisA: y.UNIT_Y,
|
|
1688
1509
|
axisB: y.UNIT_Y,
|
|
1689
1510
|
angle: a,
|
|
1690
1511
|
twistAngle: b
|
|
1691
1512
|
});
|
|
1692
|
-
this._constraints.push(
|
|
1693
|
-
const
|
|
1694
|
-
pivotA: new y(s / 2,
|
|
1513
|
+
this._constraints.push(Ua);
|
|
1514
|
+
const Ga = new Q(G, J, {
|
|
1515
|
+
pivotA: new y(s / 2, x / 2, 0),
|
|
1695
1516
|
pivotB: new y(-i / 2, 0, 0),
|
|
1696
1517
|
axisA: y.UNIT_Z,
|
|
1697
1518
|
axisB: y.UNIT_Z,
|
|
1698
1519
|
angle: e,
|
|
1699
1520
|
twistAngle: b
|
|
1700
|
-
}),
|
|
1701
|
-
pivotA: new y(-s / 2,
|
|
1521
|
+
}), _a = new Q(G, V, {
|
|
1522
|
+
pivotA: new y(-s / 2, x / 2, 0),
|
|
1702
1523
|
pivotB: new y(i / 2, 0, 0),
|
|
1703
1524
|
axisA: y.UNIT_Z,
|
|
1704
1525
|
axisB: y.UNIT_Z,
|
|
1705
1526
|
angle: e,
|
|
1706
1527
|
twistAngle: b
|
|
1707
1528
|
});
|
|
1708
|
-
this._constraints.push(
|
|
1709
|
-
const
|
|
1710
|
-
pivotA: new y(-
|
|
1529
|
+
this._constraints.push(Ga, _a);
|
|
1530
|
+
const Ta = new Q(aa, J, {
|
|
1531
|
+
pivotA: new y(-o / 2, 0, 0),
|
|
1711
1532
|
pivotB: new y(i / 2, 0, 0),
|
|
1712
1533
|
axisA: y.UNIT_Z,
|
|
1713
1534
|
axisB: y.UNIT_Z,
|
|
1714
1535
|
angle: a,
|
|
1715
1536
|
twistAngle: b
|
|
1716
|
-
}),
|
|
1717
|
-
pivotA: new y(
|
|
1537
|
+
}), Oa = new Q(ea, V, {
|
|
1538
|
+
pivotA: new y(o / 2, 0, 0),
|
|
1718
1539
|
pivotB: new y(-i / 2, 0, 0),
|
|
1719
1540
|
axisA: y.UNIT_Z,
|
|
1720
1541
|
axisB: y.UNIT_Z,
|
|
1721
1542
|
angle: a,
|
|
1722
1543
|
twistAngle: b
|
|
1723
1544
|
});
|
|
1724
|
-
this._constraints.push(
|
|
1725
|
-
neckJoint:
|
|
1726
|
-
leftKneeJoint:
|
|
1727
|
-
rightKneeJoint:
|
|
1728
|
-
leftHipJoint:
|
|
1729
|
-
rightHipJoint:
|
|
1730
|
-
spineJoint:
|
|
1731
|
-
leftShoulder:
|
|
1732
|
-
rightShoulder:
|
|
1733
|
-
leftElbowJoint:
|
|
1734
|
-
rightElbowJoint:
|
|
1545
|
+
this._constraints.push(Ta, Oa), this._ragdollConstraints = {
|
|
1546
|
+
neckJoint: Ba,
|
|
1547
|
+
leftKneeJoint: Sa,
|
|
1548
|
+
rightKneeJoint: La,
|
|
1549
|
+
leftHipJoint: za,
|
|
1550
|
+
rightHipJoint: Ra,
|
|
1551
|
+
spineJoint: Ua,
|
|
1552
|
+
leftShoulder: Ga,
|
|
1553
|
+
rightShoulder: _a,
|
|
1554
|
+
leftElbowJoint: Ta,
|
|
1555
|
+
rightElbowJoint: Oa
|
|
1735
1556
|
};
|
|
1736
1557
|
for (const O of this._constraints)
|
|
1737
1558
|
this._cannon.world.addConstraint(O);
|
|
@@ -1753,52 +1574,52 @@ let na = class extends oa {
|
|
|
1753
1574
|
* Reset the ragdoll to its initial position relative to the object
|
|
1754
1575
|
*/
|
|
1755
1576
|
resetPosition() {
|
|
1756
|
-
var
|
|
1577
|
+
var n, r;
|
|
1757
1578
|
if (!this._parts) return;
|
|
1758
|
-
const t = this.object.getWorldPosition(new F()), a = this.scale, e = 0.5 * a, b = 0.5 * a, s = 0.5 * a, i = 0.4 * a,
|
|
1579
|
+
const t = this.object.getWorldPosition(new F()), a = this.scale, e = 0.5 * a, b = 0.5 * a, s = 0.5 * a, i = 0.4 * a, o = 0.6 * a, l = 0.25 * a, g = 0.1 * a, j = 0.4 * a, P = 0.4 * a, x = (h, f) => {
|
|
1759
1580
|
h.position.copy(f), h.velocity.set(0, 0, 0), h.angularVelocity.set(0, 0, 0), h.quaternion.set(0, 0, 0, 1);
|
|
1760
1581
|
};
|
|
1761
|
-
|
|
1582
|
+
x(this._parts.lowerLeftLeg, new y(
|
|
1762
1583
|
t.x + e / 2,
|
|
1763
1584
|
t.y + b / 2,
|
|
1764
1585
|
t.z
|
|
1765
|
-
)),
|
|
1586
|
+
)), x(this._parts.lowerRightLeg, new y(
|
|
1766
1587
|
t.x - e / 2,
|
|
1767
1588
|
t.y + b / 2,
|
|
1768
1589
|
t.z
|
|
1769
|
-
)),
|
|
1590
|
+
)), x(this._parts.upperLeftLeg, new y(
|
|
1770
1591
|
t.x + e / 2,
|
|
1771
1592
|
t.y + b + s / 2,
|
|
1772
1593
|
t.z
|
|
1773
|
-
)),
|
|
1594
|
+
)), x(this._parts.upperRightLeg, new y(
|
|
1774
1595
|
t.x - e / 2,
|
|
1775
1596
|
t.y + b + s / 2,
|
|
1776
1597
|
t.z
|
|
1777
1598
|
));
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1780
|
-
const m =
|
|
1781
|
-
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1784
|
-
const c = m +
|
|
1785
|
-
|
|
1599
|
+
const D = t.y + b + s + i / 2;
|
|
1600
|
+
x(this._parts.pelvis, new y(t.x, D, t.z));
|
|
1601
|
+
const m = D + i / 2 + o / 2;
|
|
1602
|
+
x(this._parts.upperBody, new y(t.x, m, t.z));
|
|
1603
|
+
const d = m + o / 2 + l + g;
|
|
1604
|
+
x(this._parts.head, new y(t.x, d, t.z));
|
|
1605
|
+
const c = m + o / 2;
|
|
1606
|
+
x(this._parts.upperLeftArm, new y(
|
|
1786
1607
|
t.x + e / 2 + j / 2,
|
|
1787
1608
|
c,
|
|
1788
1609
|
t.z
|
|
1789
|
-
)),
|
|
1610
|
+
)), x(this._parts.upperRightArm, new y(
|
|
1790
1611
|
t.x - e / 2 - j / 2,
|
|
1791
1612
|
c,
|
|
1792
1613
|
t.z
|
|
1793
|
-
)),
|
|
1614
|
+
)), x(this._parts.lowerLeftArm, new y(
|
|
1794
1615
|
t.x + e / 2 + j + P / 2,
|
|
1795
1616
|
c,
|
|
1796
1617
|
t.z
|
|
1797
|
-
)),
|
|
1618
|
+
)), x(this._parts.lowerRightArm, new y(
|
|
1798
1619
|
t.x - e / 2 - j - P / 2,
|
|
1799
1620
|
c,
|
|
1800
1621
|
t.z
|
|
1801
|
-
)), (r = (
|
|
1622
|
+
)), (r = (n = this.object).setDirty) == null || r.call(n, { source: "CannonRagdollComponent" });
|
|
1802
1623
|
}
|
|
1803
1624
|
/**
|
|
1804
1625
|
* Apply an impulse to all bodies
|
|
@@ -1919,14 +1740,14 @@ let na = class extends oa {
|
|
|
1919
1740
|
_findClosestBody(t) {
|
|
1920
1741
|
let a = null, e = 1 / 0;
|
|
1921
1742
|
for (const b of this._bodies) {
|
|
1922
|
-
const s = b.position.x - t.x, i = b.position.y - t.y,
|
|
1743
|
+
const s = b.position.x - t.x, i = b.position.y - t.y, o = b.position.z - t.z, l = s * s + i * i + o * o;
|
|
1923
1744
|
l < e && (e = l, a = b);
|
|
1924
1745
|
}
|
|
1925
1746
|
return a;
|
|
1926
1747
|
}
|
|
1927
1748
|
};
|
|
1928
|
-
|
|
1929
|
-
|
|
1749
|
+
ca.ComponentType = "CannonRagdollComponent";
|
|
1750
|
+
ca.StateProperties = [
|
|
1930
1751
|
"scale",
|
|
1931
1752
|
"angle",
|
|
1932
1753
|
"angleShoulders",
|
|
@@ -1935,37 +1756,37 @@ na.StateProperties = [
|
|
|
1935
1756
|
"autoCreateOnInit",
|
|
1936
1757
|
"hideRagdollMeshes"
|
|
1937
1758
|
];
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
],
|
|
1941
|
-
var
|
|
1942
|
-
for (var s = b > 1 ? void 0 : b ?
|
|
1943
|
-
(
|
|
1944
|
-
return b && s &&
|
|
1759
|
+
ca = Dt([
|
|
1760
|
+
Ia("Ragdoll")
|
|
1761
|
+
], ca);
|
|
1762
|
+
var It = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, W = (t, a, e, b) => {
|
|
1763
|
+
for (var s = b > 1 ? void 0 : b ? Ft(a, e) : a, i = t.length - 1, o; i >= 0; i--)
|
|
1764
|
+
(o = t[i]) && (s = (b ? o(a, e, s) : o(s)) || s);
|
|
1765
|
+
return b && s && It(a, e, s), s;
|
|
1945
1766
|
};
|
|
1946
|
-
let T = class extends
|
|
1767
|
+
let T = class extends Ea {
|
|
1947
1768
|
constructor() {
|
|
1948
|
-
super(...arguments), this.uuid =
|
|
1769
|
+
super(...arguments), this.uuid = we();
|
|
1949
1770
|
}
|
|
1950
1771
|
};
|
|
1951
1772
|
W([
|
|
1952
|
-
|
|
1773
|
+
Pe()
|
|
1953
1774
|
], T.prototype, "name", 2);
|
|
1954
1775
|
W([
|
|
1955
|
-
|
|
1776
|
+
Ae()
|
|
1956
1777
|
], T.prototype, "uuid", 2);
|
|
1957
1778
|
W([
|
|
1958
|
-
|
|
1779
|
+
ee()
|
|
1959
1780
|
], T.prototype, "friction", 2);
|
|
1960
1781
|
W([
|
|
1961
|
-
|
|
1782
|
+
ee()
|
|
1962
1783
|
], T.prototype, "restitution", 2);
|
|
1963
1784
|
T = W([
|
|
1964
|
-
|
|
1785
|
+
Ia("Cannon Material")
|
|
1965
1786
|
], T);
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1787
|
+
Fa.MakeSerializable(Ea, "CannonMaterial", ["friction", "restitution"]);
|
|
1788
|
+
Fa.MakeSerializable(T, "CannonMaterial", ["name", "uuid", "friction", "restitution"]);
|
|
1789
|
+
Fa.MakeSerializable(ne, "CannonContactMaterial", [
|
|
1969
1790
|
/* 'materials', */
|
|
1970
1791
|
"friction",
|
|
1971
1792
|
"restitution",
|
|
@@ -1974,7 +1795,7 @@ Ba.MakeSerializable(pe, "CannonContactMaterial", [
|
|
|
1974
1795
|
"frictionEquationStiffness",
|
|
1975
1796
|
"frictionEquationRelaxation"
|
|
1976
1797
|
]);
|
|
1977
|
-
|
|
1798
|
+
Me.AddClass({
|
|
1978
1799
|
key: "CannonMaterial",
|
|
1979
1800
|
getId(t) {
|
|
1980
1801
|
return t.uuid;
|
|
@@ -1987,7 +1808,7 @@ ze.AddClass({
|
|
|
1987
1808
|
},
|
|
1988
1809
|
ctor: T
|
|
1989
1810
|
});
|
|
1990
|
-
let z = class extends
|
|
1811
|
+
let z = class extends xe {
|
|
1991
1812
|
// @uiButton('Make Root Bodies')
|
|
1992
1813
|
// makeRootBodies = () => {
|
|
1993
1814
|
// this._viewer?.scene.modelRoot.children.forEach((child) => {
|
|
@@ -2011,16 +1832,16 @@ let z = class extends Ce {
|
|
|
2011
1832
|
// // this._viewer?.setDirty()
|
|
2012
1833
|
// }
|
|
2013
1834
|
constructor(t = !0, a = !1) {
|
|
2014
|
-
super(), this._world = new
|
|
1835
|
+
super(), this._world = new ce(), this.enabled = !0, this.running = !0, this.nextSteps = 0, this.stepPhysics = {
|
|
2015
1836
|
stepCount: 100,
|
|
2016
1837
|
delta: 0.1,
|
|
2017
1838
|
step: () => {
|
|
2018
1839
|
this.nextSteps = this.stepPhysics.stepCount;
|
|
2019
1840
|
}
|
|
2020
|
-
}, this.defaultMaterial = new T("default"), this.dependencies = [L], this._v1 = new F(), this._v2 = new F(), this._s2 = new F(), this._q1 = new C(), this._q2 = new C(), this._m1 = new
|
|
1841
|
+
}, this.defaultMaterial = new T("default"), this.dependencies = [L], this._v1 = new F(), this._v2 = new F(), this._s2 = new F(), this._q1 = new C(), this._q2 = new C(), this._m1 = new qa(), this._m2 = new qa(), this.frameFadeToggled = !1, this._preFrame = (b) => {
|
|
2021
1842
|
const s = this._viewer;
|
|
2022
1843
|
if (!s || this.isDisabled()) return;
|
|
2023
|
-
const i = s.getPlugin(
|
|
1844
|
+
const i = s.getPlugin(ve);
|
|
2024
1845
|
if (!this.running)
|
|
2025
1846
|
if (this.nextSteps > 0) this.running = !0;
|
|
2026
1847
|
else {
|
|
@@ -2038,25 +1859,25 @@ let z = class extends Ce {
|
|
|
2038
1859
|
console.error("[CannonPhysicsPlugin] Error stepping physics world"), console.error(l);
|
|
2039
1860
|
}
|
|
2040
1861
|
this._dirty = !1;
|
|
2041
|
-
let
|
|
1862
|
+
let o = !1;
|
|
2042
1863
|
for (const l of this.bodyComponents.values()) {
|
|
2043
1864
|
if (l.mass === 0) continue;
|
|
2044
|
-
const
|
|
2045
|
-
|
|
1865
|
+
const g = l.object, j = l.body;
|
|
1866
|
+
g && (o = !1, g.updateWorldMatrix(!0, !1), g.getWorldPosition(this._v2), g.getWorldQuaternion(this._q2), g.getWorldScale(this._s2), this._v1.copy(j.position), !o && this._v2.manhattanDistanceTo(this._v1) > 0 && (o = !0), this._q1.copy(j.quaternion), !o && this._q2.angleTo(this._q1) > 0 && (o = !0), o && (this._m1.compose(this._v1, this._q1, this._s2), g.parent ? (this._m2.copy(g.parent.matrixWorld).invert(), this._m2.multiply(this._m1), this._m2.decompose(this._v1, this._q1, this._s2), g.position.copy(this._v1), g.quaternion.copy(this._q1), g.setDirty && g.setDirty({ change: "transform", source: "CannonPhysicsPlugin" })) : console.error("[CannonPhysicsPlugin] Mesh has no parent, cannot set world transform", g)));
|
|
2046
1867
|
}
|
|
2047
|
-
this._dirty =
|
|
1868
|
+
this._dirty = o, s.setDirty(), s.renderManager.resetShadows(), this.nextSteps > 0 && (this.running = !1, this.nextSteps = 0);
|
|
2048
1869
|
}, this._onRemove = [], this._objectAdd = (b) => {
|
|
2049
|
-
var l,
|
|
1870
|
+
var l, g;
|
|
2050
1871
|
const s = b.object;
|
|
2051
|
-
((l = s == null ? void 0 : s.userData) == null ? void 0 : l.physicsMass) === void 0 || !((
|
|
1872
|
+
((l = s == null ? void 0 : s.userData) == null ? void 0 : l.physicsMass) === void 0 || !((g = this._viewer) != null && g.getPlugin(L)) || L.GetComponentData(s, this.componentTypes.body);
|
|
2052
1873
|
}, this._objectRemove = (b) => {
|
|
2053
1874
|
var i;
|
|
2054
1875
|
const s = b.object;
|
|
2055
1876
|
(i = s == null ? void 0 : s.userData) != null && i.physicsMass;
|
|
2056
1877
|
}, this.componentTypes = {
|
|
2057
|
-
body:
|
|
2058
|
-
shape:
|
|
2059
|
-
ragdoll:
|
|
1878
|
+
body: pa,
|
|
1879
|
+
shape: sa,
|
|
1880
|
+
ragdoll: ca
|
|
2060
1881
|
}, this.bodyComponents = /* @__PURE__ */ new Set(), this.cannonBodies = /* @__PURE__ */ new WeakMap(), this.enabled = t, this.running = a, this.defaultMaterial.friction = 0, this.defaultMaterial.restitution = 0, this._world.defaultMaterial = this.defaultMaterial, this._world.defaultContactMaterial.materials = [this.defaultMaterial, this.defaultMaterial];
|
|
2061
1882
|
const e = {};
|
|
2062
1883
|
this._world.addEventListener("beginContact", (b) => {
|
|
@@ -2088,10 +1909,10 @@ let z = class extends Ce {
|
|
|
2088
1909
|
a && this._onRemove.push(a), Object.values(this.componentTypes).forEach((e) => {
|
|
2089
1910
|
var b;
|
|
2090
1911
|
(b = t.getPlugin(L)) == null || b.addComponentType(e);
|
|
2091
|
-
}), t.object3dManager.getObjects().forEach((e) => this._objectAdd({ object: e })), t.object3dManager.addEventListener("objectAdd", this._objectAdd), t.object3dManager.addEventListener("objectRemove", this._objectRemove), t.forPlugin(
|
|
2092
|
-
e.helpers.push(
|
|
1912
|
+
}), t.object3dManager.getObjects().forEach((e) => this._objectAdd({ object: e })), t.object3dManager.addEventListener("objectAdd", this._objectAdd), t.object3dManager.addEventListener("objectRemove", this._objectRemove), t.forPlugin(ae, (e) => {
|
|
1913
|
+
e.helpers.push(ga);
|
|
2093
1914
|
}, (e) => {
|
|
2094
|
-
const b = e.helpers.indexOf(
|
|
1915
|
+
const b = e.helpers.indexOf(ga);
|
|
2095
1916
|
b >= 0 && e.helpers.splice(b, 1);
|
|
2096
1917
|
});
|
|
2097
1918
|
}
|
|
@@ -2112,29 +1933,29 @@ z.PluginType = "CannonPhysicsPlugin";
|
|
|
2112
1933
|
z.CannonTypes = {
|
|
2113
1934
|
Body: N,
|
|
2114
1935
|
Shape: q,
|
|
2115
|
-
World:
|
|
2116
|
-
Material:
|
|
2117
|
-
ContactMaterial:
|
|
1936
|
+
World: ce,
|
|
1937
|
+
Material: Ea,
|
|
1938
|
+
ContactMaterial: ne
|
|
2118
1939
|
};
|
|
2119
1940
|
W([
|
|
2120
|
-
|
|
2121
|
-
|
|
1941
|
+
te(),
|
|
1942
|
+
be()
|
|
2122
1943
|
], z.prototype, "enabled", 2);
|
|
2123
1944
|
W([
|
|
2124
|
-
|
|
1945
|
+
be("Running", (t) => ({ onChange: () => {
|
|
2125
1946
|
} }))
|
|
2126
1947
|
], z.prototype, "running", 2);
|
|
2127
1948
|
W([
|
|
2128
|
-
|
|
1949
|
+
ie()
|
|
2129
1950
|
], z.prototype, "stepPhysics", 2);
|
|
2130
1951
|
W([
|
|
2131
|
-
|
|
2132
|
-
|
|
1952
|
+
ie(),
|
|
1953
|
+
te()
|
|
2133
1954
|
], z.prototype, "defaultMaterial", 2);
|
|
2134
1955
|
z = W([
|
|
2135
|
-
|
|
1956
|
+
Ia("Physics")
|
|
2136
1957
|
], z);
|
|
2137
|
-
const
|
|
1958
|
+
const Et = ["visible", "name", "position", "quaternion", "scale"], Nt = ["name"], Ct = [
|
|
2138
1959
|
"position",
|
|
2139
1960
|
"quaternion",
|
|
2140
1961
|
"scale",
|
|
@@ -2144,7 +1965,7 @@ const Vt = ["visible", "name", "position", "quaternion", "scale"], Yt = ["name"]
|
|
|
2144
1965
|
"frustumCulled",
|
|
2145
1966
|
"renderOrder"
|
|
2146
1967
|
];
|
|
2147
|
-
class
|
|
1968
|
+
class Bt {
|
|
2148
1969
|
constructor(a, e) {
|
|
2149
1970
|
this.viewer = a, this.onError = e, this.cache = /* @__PURE__ */ new Map(), this.pending = /* @__PURE__ */ new Set(), this.onProcessRaw = (b) => {
|
|
2150
1971
|
const s = b.data;
|
|
@@ -2159,37 +1980,37 @@ class Zt {
|
|
|
2159
1980
|
async loadObjectDependencies(a) {
|
|
2160
1981
|
if (!a.traverse) return;
|
|
2161
1982
|
const e = [], b = /* @__PURE__ */ new Set();
|
|
2162
|
-
a.traverse((
|
|
2163
|
-
e.push(
|
|
2164
|
-
const l =
|
|
1983
|
+
a.traverse((o) => {
|
|
1984
|
+
e.push(o);
|
|
1985
|
+
const l = o.material;
|
|
2165
1986
|
l && (Array.isArray(l) ? l : [l]).forEach((j) => (j == null ? void 0 : j.isMaterial) && b.add(j));
|
|
2166
1987
|
});
|
|
2167
1988
|
const s = [];
|
|
2168
|
-
for (const
|
|
2169
|
-
if (!this.isEmbeddedReference(
|
|
2170
|
-
if (
|
|
2171
|
-
s.push(
|
|
1989
|
+
for (const o of e) {
|
|
1990
|
+
if (!this.isEmbeddedReference(o)) continue;
|
|
1991
|
+
if (o._loadingPromise) {
|
|
1992
|
+
s.push(o._loadingPromise.then(() => {
|
|
2172
1993
|
}));
|
|
2173
1994
|
continue;
|
|
2174
1995
|
}
|
|
2175
|
-
|
|
2176
|
-
const l = this.loadReference(
|
|
2177
|
-
|
|
1996
|
+
o.userData.sProperties.length || (o.userData.sProperties = [...Et]), o._sChildren || (o._sChildren = []);
|
|
1997
|
+
const l = this.loadReference(o);
|
|
1998
|
+
o._loadingPromise = l, s.push(l);
|
|
2178
1999
|
}
|
|
2179
|
-
for (const
|
|
2180
|
-
if (!this.isEmbeddedReference(
|
|
2181
|
-
if (
|
|
2182
|
-
s.push(
|
|
2000
|
+
for (const o of b) {
|
|
2001
|
+
if (!this.isEmbeddedReference(o)) continue;
|
|
2002
|
+
if (o._loadingPromise) {
|
|
2003
|
+
s.push(o._loadingPromise.then(() => {
|
|
2183
2004
|
}));
|
|
2184
2005
|
continue;
|
|
2185
2006
|
}
|
|
2186
|
-
|
|
2187
|
-
const l = this.loadReference(
|
|
2188
|
-
|
|
2007
|
+
o.userData.sProperties.length || (o.userData.sProperties = [...Nt]);
|
|
2008
|
+
const l = this.loadReference(o);
|
|
2009
|
+
o._loadingPromise = l, s.push(l);
|
|
2189
2010
|
}
|
|
2190
2011
|
if (!s.length) return;
|
|
2191
|
-
const i = Promise.allSettled(s).then((
|
|
2192
|
-
for (const l of
|
|
2012
|
+
const i = Promise.allSettled(s).then((o) => {
|
|
2013
|
+
for (const l of o)
|
|
2193
2014
|
l.status === "rejected" && this.onError(l.reason);
|
|
2194
2015
|
});
|
|
2195
2016
|
a._loadingPromise = i, this.track(i), await i;
|
|
@@ -2224,24 +2045,24 @@ class Zt {
|
|
|
2224
2045
|
updateObject(a, e) {
|
|
2225
2046
|
var l;
|
|
2226
2047
|
if (e._sChildren)
|
|
2227
|
-
for (const
|
|
2228
|
-
e._sChildren.includes(
|
|
2229
|
-
for (const
|
|
2230
|
-
const j =
|
|
2048
|
+
for (const g of [...e.children])
|
|
2049
|
+
e._sChildren.includes(g) || g.removeFromParent();
|
|
2050
|
+
for (const g of a.children) {
|
|
2051
|
+
const j = he(g);
|
|
2231
2052
|
j.userData.excludeFromExport = !0, e.add(j);
|
|
2232
2053
|
}
|
|
2233
2054
|
const b = e.userData.sProperties, s = e.name, i = e.visible;
|
|
2234
|
-
for (const
|
|
2235
|
-
if (b.includes(
|
|
2236
|
-
const j = a[
|
|
2237
|
-
j && P && j.isVector3 || j && P && j.isQuaternion ? P.copy(j) : j !== void 0 && Object.assign(e, { [
|
|
2055
|
+
for (const g of Ct) {
|
|
2056
|
+
if (b.includes(g)) continue;
|
|
2057
|
+
const j = a[g], P = e[g];
|
|
2058
|
+
j && P && j.isVector3 || j && P && j.isQuaternion ? P.copy(j) : j !== void 0 && Object.assign(e, { [g]: j });
|
|
2238
2059
|
}
|
|
2239
|
-
const
|
|
2240
|
-
e.userData = {},
|
|
2060
|
+
const o = e.userData;
|
|
2061
|
+
e.userData = {}, De(e.userData, a.userData, ["uuid", "sProperties"]), Object.assign(e.userData, o), e.name = s, e.visible = i, e.userData.uuid = e.uuid, e.userData.sProperties = b, (l = e.setDirty) == null || l.call(e, { source: "RuntimeNestedAssetLoader" });
|
|
2241
2062
|
}
|
|
2242
2063
|
updateMaterial(a, e) {
|
|
2243
|
-
const b = e.userData.sProperties, s =
|
|
2244
|
-
e.setValues(a), e.name = i,
|
|
2064
|
+
const b = e.userData.sProperties, s = Ie(e, b), i = e.name;
|
|
2065
|
+
e.setValues(a), e.name = i, Fe(s, e), e.userData.uuid = e.uuid, e.userData.sProperties = b;
|
|
2245
2066
|
}
|
|
2246
2067
|
track(a) {
|
|
2247
2068
|
this.pending.add(a);
|
|
@@ -2249,38 +2070,38 @@ class Zt {
|
|
|
2249
2070
|
a.then(e, e);
|
|
2250
2071
|
}
|
|
2251
2072
|
}
|
|
2252
|
-
function
|
|
2073
|
+
function he(t) {
|
|
2253
2074
|
const a = t.clone(!1), e = t, b = a;
|
|
2254
2075
|
b._tpRootPath = e._tpRootPath, b._tpRootUid = e._tpRootUid || t.uuid, delete a.userData.cloneParent;
|
|
2255
|
-
for (const s of t.children) a.add(
|
|
2076
|
+
for (const s of t.children) a.add(he(s));
|
|
2256
2077
|
return a;
|
|
2257
2078
|
}
|
|
2258
|
-
function
|
|
2259
|
-
return
|
|
2079
|
+
function qt(t) {
|
|
2080
|
+
return le(t, !0);
|
|
2260
2081
|
}
|
|
2261
|
-
function
|
|
2262
|
-
return
|
|
2082
|
+
function Kt(t) {
|
|
2083
|
+
return le(t, !1);
|
|
2263
2084
|
}
|
|
2264
|
-
async function
|
|
2085
|
+
async function le({
|
|
2265
2086
|
base: t,
|
|
2266
2087
|
canvas: a,
|
|
2267
2088
|
onError: e,
|
|
2268
2089
|
fileRevisions: b = {},
|
|
2269
2090
|
moduleRevision: s
|
|
2270
2091
|
}, i) {
|
|
2271
|
-
const
|
|
2272
|
-
let l,
|
|
2092
|
+
const o = _t(e);
|
|
2093
|
+
let l, g, j, P;
|
|
2273
2094
|
try {
|
|
2274
|
-
const
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
]),
|
|
2278
|
-
packageJson:
|
|
2095
|
+
const x = Ut(t), [D, m] = await Promise.all([
|
|
2096
|
+
Xa(new URL("package.json", x)),
|
|
2097
|
+
Xa(new URL("assets.json", x))
|
|
2098
|
+
]), d = Ke(D), c = await He(d), n = Je(m), r = {
|
|
2099
|
+
packageJson: d,
|
|
2279
2100
|
config: c,
|
|
2280
|
-
assetsManifest:
|
|
2281
|
-
mainScene:
|
|
2101
|
+
assetsManifest: n,
|
|
2102
|
+
mainScene: d.mainScene
|
|
2282
2103
|
}, h = new L(!1), f = new z(!0, !1);
|
|
2283
|
-
L.AddObjectUiConfig = !1, window.MeshoptDecoder =
|
|
2104
|
+
L.AddObjectUiConfig = !1, window.MeshoptDecoder = Ye, l = new Ee({
|
|
2284
2105
|
canvas: a,
|
|
2285
2106
|
...c.viewer,
|
|
2286
2107
|
assetManager: {
|
|
@@ -2289,113 +2110,113 @@ async function we({
|
|
|
2289
2110
|
},
|
|
2290
2111
|
plugins: [
|
|
2291
2112
|
h,
|
|
2292
|
-
new
|
|
2113
|
+
new Ne(),
|
|
2293
2114
|
f,
|
|
2294
|
-
new
|
|
2295
|
-
new
|
|
2296
|
-
new
|
|
2297
|
-
new
|
|
2298
|
-
new
|
|
2299
|
-
new
|
|
2300
|
-
new
|
|
2301
|
-
new
|
|
2302
|
-
new
|
|
2115
|
+
new Ce(),
|
|
2116
|
+
new Be(),
|
|
2117
|
+
new Se(!1),
|
|
2118
|
+
new Le(),
|
|
2119
|
+
new ze(),
|
|
2120
|
+
new Re(),
|
|
2121
|
+
new Ue(),
|
|
2122
|
+
new Ge(),
|
|
2123
|
+
new _e()
|
|
2303
2124
|
]
|
|
2304
|
-
}), l.timeline.endTime = 0, P =
|
|
2305
|
-
const
|
|
2306
|
-
l.assetManager.importer.addURLModifier(
|
|
2307
|
-
const u = new URL(r.mainScene,
|
|
2308
|
-
if (!(
|
|
2125
|
+
}), l.timeline.endTime = 0, P = We(), h.addComponentType(Aa);
|
|
2126
|
+
const p = Ve(x, n);
|
|
2127
|
+
l.assetManager.importer.addURLModifier(p), j = () => l == null ? void 0 : l.assetManager.importer.removeURLModifier(p), g = new Bt(l, o), await Lt(l, r, x, b, s), await St(l, r, x, b, s);
|
|
2128
|
+
const u = new URL(r.mainScene, x).href, k = await l.load(u, { importAsModelRoot: !0 });
|
|
2129
|
+
if (!(k != null && k.isObject3D))
|
|
2309
2130
|
throw new Error(`The main scene did not load as an Object3D: ${u}`);
|
|
2310
|
-
if (await
|
|
2131
|
+
if (await g.loadObjectDependencies(k), await g.waitForPending(), i) {
|
|
2311
2132
|
l.timeline.reset(), l.timeline.start(), h.start(), f.running = !0;
|
|
2312
|
-
const
|
|
2133
|
+
const M = Na("main.js", x, b, s), I = await Ca(M.href);
|
|
2313
2134
|
if (I.main !== void 0) {
|
|
2314
2135
|
if (typeof I.main != "function")
|
|
2315
2136
|
throw new Error('main.js export "main" must be a function');
|
|
2316
2137
|
await I.main({ viewer: l });
|
|
2317
2138
|
}
|
|
2318
2139
|
}
|
|
2319
|
-
const
|
|
2320
|
-
let A = !1,
|
|
2140
|
+
const w = l;
|
|
2141
|
+
let A = !1, v;
|
|
2321
2142
|
return {
|
|
2322
|
-
viewer:
|
|
2143
|
+
viewer: w,
|
|
2323
2144
|
project: r,
|
|
2324
2145
|
registerGameValidation: P.registerGameValidation,
|
|
2325
2146
|
publishGameTelemetry: P.publishGameTelemetry,
|
|
2326
2147
|
runGameValidation: P.runGameValidation,
|
|
2327
2148
|
dispose() {
|
|
2328
|
-
return A || (A = !0, h.stop(), f.running = !1,
|
|
2149
|
+
return A || (A = !0, h.stop(), f.running = !1, w.timeline.stop(), v = qe(w), g == null || g.dispose(), j == null || j(), P == null || P.dispose(), w.dispose()), v;
|
|
2329
2150
|
}
|
|
2330
2151
|
};
|
|
2331
|
-
} catch (
|
|
2332
|
-
throw
|
|
2152
|
+
} catch (x) {
|
|
2153
|
+
throw g == null || g.dispose(), j == null || j(), P == null || P.dispose(), l == null || l.dispose(), o(x), x;
|
|
2333
2154
|
}
|
|
2334
2155
|
}
|
|
2335
|
-
async function
|
|
2336
|
-
const { config: i, packageJson:
|
|
2156
|
+
async function St(t, a, e, b, s) {
|
|
2157
|
+
const { config: i, packageJson: o } = a;
|
|
2337
2158
|
for (const l of i.plugins) {
|
|
2338
2159
|
if (l.active === !1) continue;
|
|
2339
|
-
const
|
|
2160
|
+
const g = zt(l, o, e, b, s), j = await Ca(g), P = Rt(j, l);
|
|
2340
2161
|
t.getPlugin(P) || await t.addPlugin(P, ...l.params || []);
|
|
2341
2162
|
}
|
|
2342
2163
|
}
|
|
2343
|
-
async function
|
|
2344
|
-
const { config: i, packageJson:
|
|
2345
|
-
for (const
|
|
2346
|
-
if (
|
|
2347
|
-
const j =
|
|
2348
|
-
l.push(await
|
|
2349
|
-
}
|
|
2350
|
-
await
|
|
2164
|
+
async function Lt(t, a, e, b, s) {
|
|
2165
|
+
const { config: i, packageJson: o } = a, l = [];
|
|
2166
|
+
for (const g of i.scripts) {
|
|
2167
|
+
if (g.active === !1) continue;
|
|
2168
|
+
const j = de(g.import, o) ? g.import : Na(g.import, e, b, s).href;
|
|
2169
|
+
l.push(await Ca(j));
|
|
2170
|
+
}
|
|
2171
|
+
await Ze(t, l);
|
|
2351
2172
|
}
|
|
2352
|
-
function
|
|
2353
|
-
return
|
|
2173
|
+
function zt(t, a, e, b, s) {
|
|
2174
|
+
return de(t.import, a) ? t.import : Na(t.import, e, b, s).href;
|
|
2354
2175
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const s =
|
|
2357
|
-
return
|
|
2176
|
+
function Na(t, a, e, b) {
|
|
2177
|
+
const s = Gt(new URL(t, a), a), i = t.replace(/^\.\//, ""), o = e[i];
|
|
2178
|
+
return o && s.searchParams.set("v", o), b && s.searchParams.set("r", b), s;
|
|
2358
2179
|
}
|
|
2359
|
-
function
|
|
2180
|
+
function Rt(t, a) {
|
|
2360
2181
|
const e = a.className || "default", b = t[e];
|
|
2361
|
-
if (
|
|
2182
|
+
if (Ya(b)) return b;
|
|
2362
2183
|
if (!a.className) {
|
|
2363
|
-
const s = Object.values(t).filter(
|
|
2184
|
+
const s = Object.values(t).filter(Ya);
|
|
2364
2185
|
if (s.length === 1) return s[0];
|
|
2365
2186
|
}
|
|
2366
2187
|
throw new Error(`Cannot find plugin export "${e}" in ${a.import}`);
|
|
2367
2188
|
}
|
|
2368
|
-
function
|
|
2189
|
+
function Ya(t) {
|
|
2369
2190
|
return typeof t == "function" && typeof t.PluginType == "string";
|
|
2370
2191
|
}
|
|
2371
|
-
async function
|
|
2192
|
+
async function Ca(t) {
|
|
2372
2193
|
return import(
|
|
2373
2194
|
/* @vite-ignore */
|
|
2374
2195
|
t
|
|
2375
2196
|
);
|
|
2376
2197
|
}
|
|
2377
|
-
async function
|
|
2198
|
+
async function Xa(t) {
|
|
2378
2199
|
const a = await fetch(t);
|
|
2379
2200
|
if (!a.ok) throw new Error(`Failed to fetch ${t.href}: ${a.status} ${a.statusText}`);
|
|
2380
2201
|
return a.text();
|
|
2381
2202
|
}
|
|
2382
|
-
function
|
|
2203
|
+
function Ut(t) {
|
|
2383
2204
|
if (!t.endsWith("/")) throw new Error('createGame base must end in "/"');
|
|
2384
2205
|
const a = new URL(t);
|
|
2385
2206
|
if (!a.protocol.startsWith("http")) throw new Error("createGame base must be an absolute HTTP(S) URL");
|
|
2386
2207
|
return a;
|
|
2387
2208
|
}
|
|
2388
|
-
function
|
|
2209
|
+
function Gt(t, a) {
|
|
2389
2210
|
if (t.origin !== a.origin)
|
|
2390
2211
|
throw new Error(`Project modules must be same-origin: ${t.href}`);
|
|
2391
2212
|
return t;
|
|
2392
2213
|
}
|
|
2393
|
-
function
|
|
2214
|
+
function _t(t) {
|
|
2394
2215
|
return (a) => {
|
|
2395
2216
|
console.error("[kite3d] Runtime error", a), t == null || t(a);
|
|
2396
2217
|
};
|
|
2397
2218
|
}
|
|
2398
|
-
const
|
|
2219
|
+
const Ht = {
|
|
2399
2220
|
plugins: [
|
|
2400
2221
|
{
|
|
2401
2222
|
import: "threepipe",
|
|
@@ -2671,76 +2492,72 @@ const fb = {
|
|
|
2671
2492
|
viewer: {}
|
|
2672
2493
|
};
|
|
2673
2494
|
export {
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2495
|
+
Ub as BACKUPS_DIRECTORY,
|
|
2496
|
+
Gb as CONSOLE_PATH,
|
|
2497
|
+
pa as Cannon3DBodyComponent,
|
|
2498
|
+
sa as Cannon3DShapeComponent,
|
|
2499
|
+
ga as Cannon3DShapeHelper,
|
|
2679
2500
|
T as CannonMaterial2,
|
|
2680
2501
|
z as CannonPhysicsPlugin,
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
ii as JOURNAL_PATH,
|
|
2502
|
+
ca as CannonRagdollComponent,
|
|
2503
|
+
_b as DEPLOYS_PATH,
|
|
2504
|
+
Aa as HtmlUiComponent,
|
|
2505
|
+
Tb as JOURNAL_PATH,
|
|
2686
2506
|
ub as KITE3D_AUTHORING_METADATA_KEY,
|
|
2687
|
-
|
|
2507
|
+
Ob as KITE3D_DIRECTORY,
|
|
2688
2508
|
jb as KITE3D_RUNTIME_METADATA_KEY,
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2509
|
+
Qb as KITE3D_SERVER_CLIENT_ID,
|
|
2510
|
+
lb as PROJECT_MIGRATIONS,
|
|
2511
|
+
bb as REMOVED_GENERATOR_GUIDANCE,
|
|
2512
|
+
Wb as RUNNING_DIRECTORY,
|
|
2513
|
+
Ib as RUNTIME_SPECIFIERS,
|
|
2514
|
+
rb as RUNTIME_VERSION,
|
|
2515
|
+
Bt as RuntimeNestedAssetLoader,
|
|
2695
2516
|
yb as RuntimeObjectOwner,
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
kb as
|
|
2710
|
-
wb as
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2517
|
+
qb as STATE_PATH,
|
|
2518
|
+
Kb as THUMBS_DIRECTORY,
|
|
2519
|
+
ib as assetUrlPrefix,
|
|
2520
|
+
Xt as authoringQualityReport,
|
|
2521
|
+
At as cannonShapeTypeParams,
|
|
2522
|
+
Pt as cannonShapeTypes,
|
|
2523
|
+
qt as createGame,
|
|
2524
|
+
Ve as createProjectAssetURLModifier,
|
|
2525
|
+
Kt as createStoppedGame,
|
|
2526
|
+
Fb as dependencyImportMap,
|
|
2527
|
+
Ht as emptyProjectSettings,
|
|
2528
|
+
Bb as extensionMimeTypes,
|
|
2529
|
+
sb as findRemovedGeneratorNodes,
|
|
2530
|
+
kb as getAuthoringMetadata,
|
|
2531
|
+
wb as getRuntimeObjectMetadata,
|
|
2532
|
+
xb as getTrackedRuntimeObjects,
|
|
2533
|
+
We as installGameHooks,
|
|
2534
|
+
at as isComponentType,
|
|
2535
|
+
de as isDependencyModuleSpecifier,
|
|
2536
|
+
$e as isPluginType,
|
|
2715
2537
|
vb as isRuntimeObject,
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
$b as typesExts,
|
|
2741
|
-
ht as uiPositionMode,
|
|
2742
|
-
Sb as updateProjectGeneratorState,
|
|
2743
|
-
Bb as validateSceneSource,
|
|
2744
|
-
nt as walkScriptExports
|
|
2538
|
+
Sb as mimeToExt,
|
|
2539
|
+
Lb as mimeTypeForPath,
|
|
2540
|
+
Je as parseAssetsJSONManifest,
|
|
2541
|
+
Ke as parsePackageJSON,
|
|
2542
|
+
He as parsePackageJsonSettingsConfig,
|
|
2543
|
+
Zt as persistenceReport,
|
|
2544
|
+
wt as physicsBodyType,
|
|
2545
|
+
Eb as projectDependencies,
|
|
2546
|
+
Nb as projectPluginNames,
|
|
2547
|
+
$t as publishGameTelemetry,
|
|
2548
|
+
ab as registerGameValidation,
|
|
2549
|
+
Ze as registerScripts,
|
|
2550
|
+
cb as removedGeneratorMessage,
|
|
2551
|
+
qe as runtimeCleanupReport,
|
|
2552
|
+
eb as semanticSceneSnapshot,
|
|
2553
|
+
pb as serializeSceneGltf,
|
|
2554
|
+
gb as serializeSceneGltfDocument,
|
|
2555
|
+
Pb as setAuthoringMetadata,
|
|
2556
|
+
nb as settingsKey,
|
|
2557
|
+
Ma as typeToCannon,
|
|
2558
|
+
zb as typesExts,
|
|
2559
|
+
et as uiPositionMode,
|
|
2560
|
+
db as validateSceneSource,
|
|
2561
|
+
Xe as walkScriptExports
|
|
2745
2562
|
};
|
|
2746
2563
|
//# sourceMappingURL=index.js.map
|