From 5814e5869719ca64d3feae73d585e0740a0160d6 Mon Sep 17 00:00:00 2001 From: BrandonPacewic Date: Fri, 21 Jun 2024 09:14:50 -0700 Subject: [PATCH] Revert all this madness --- fission/README.md | 4 +- fission/bun.lockb | Bin 299386 -> 274767 bytes fission/package-lock.json | 185 +- fission/package.json | 3 - fission/prettier.config.js | 1 - fission/src/Synthesis.tsx | 269 +- fission/src/Window.d.ts | 4 +- fission/src/aps/APS.ts | 141 +- fission/src/aps/APSDataManagement.ts | 129 +- fission/src/index.css | 86 +- fission/src/main.tsx | 58 +- fission/src/mirabuf/MirabufInstance.ts | 246 +- fission/src/mirabuf/MirabufLoader.ts | 27 +- fission/src/mirabuf/MirabufParser.ts | 461 +- fission/src/mirabuf/MirabufSceneObject.ts | 202 +- fission/src/proto/mirabuf.d.ts | 1958 ++-- fission/src/proto/mirabuf.js | 9150 +++++++++-------- fission/src/samples/JoltExample.tsx | 257 +- fission/src/systems/World.ts | 75 +- fission/src/systems/WorldSystem.ts | 6 +- fission/src/systems/physics/Mechanism.ts | 34 +- fission/src/systems/physics/PhysicsSystem.ts | 827 +- fission/src/systems/scene/SceneObject.ts | 17 +- fission/src/systems/scene/SceneRenderer.ts | 172 +- fission/src/systems/simulation/Brain.ts | 17 +- .../systems/simulation/SimulationSystem.ts | 123 +- .../src/systems/simulation/driver/Driver.ts | 4 +- .../systems/simulation/driver/HingeDriver.ts | 78 +- .../systems/simulation/driver/SliderDriver.ts | 54 +- .../systems/simulation/driver/WheelDriver.ts | 35 +- .../simulation/stimulus/ChassisStimulus.ts | 32 +- .../simulation/stimulus/EncoderStimulus.ts | 13 +- .../simulation/stimulus/HingeStimulus.ts | 36 +- .../simulation/stimulus/SliderStimulus.ts | 27 +- .../systems/simulation/stimulus/Stimulus.ts | 4 +- .../simulation/stimulus/WheelStimulus.ts | 36 +- .../simulation/synthesis_brain/Behavior.ts | 23 +- .../synthesis_brain/SynthesisBrain.ts | 20 +- fission/src/test/MirabufParser.test.ts | 56 +- fission/src/test/PhysicsSystem.test.ts | 128 +- fission/src/test/World.test.ts | 19 +- fission/src/test/aps/APS.test.ts | 18 +- fission/src/test/util/Queue.test.ts | 106 +- fission/src/test/util/Random.test.ts | 20 +- fission/src/test/util/TypeConversions.test.ts | 554 +- fission/src/ui/ModalContext.tsx | 32 +- fission/src/ui/PanelContext.tsx | 26 +- fission/src/ui/ThemeContext.tsx | 80 +- fission/src/ui/ToastContext.tsx | 61 +- fission/src/ui/TooltipContext.tsx | 34 +- fission/src/ui/components/Button.tsx | 25 +- fission/src/ui/components/Checkbox.tsx | 54 +- fission/src/ui/components/Dropdown.tsx | 172 +- fission/src/ui/components/Input.tsx | 63 +- fission/src/ui/components/Label.tsx | 8 +- fission/src/ui/components/LabeledButton.tsx | 27 +- fission/src/ui/components/MainHUD.tsx | 130 +- fission/src/ui/components/Modal.tsx | 129 +- fission/src/ui/components/NumberInput.tsx | 68 - fission/src/ui/components/Panel.tsx | 214 +- fission/src/ui/components/Radio.tsx | 12 +- fission/src/ui/components/Scene.css | 2 +- fission/src/ui/components/Scene.tsx | 70 +- fission/src/ui/components/ScrollView.tsx | 2 +- fission/src/ui/components/SelectButton.tsx | 20 +- fission/src/ui/components/Slider.tsx | 169 +- fission/src/ui/components/Stack.tsx | 75 +- fission/src/ui/components/Toast.tsx | 30 +- fission/src/ui/components/Tooltip.tsx | 5 +- fission/src/ui/components/UserIcon.tsx | 15 +- fission/src/ui/modals/DownloadAssetsModal.tsx | 48 +- fission/src/ui/modals/ExitSynthesisModal.tsx | 11 +- .../src/ui/modals/UpdateAvailableModal.tsx | 7 +- fission/src/ui/modals/ViewModal.tsx | 9 +- .../aether/ConnectToMultiplayerModal.tsx | 5 +- .../modals/configuring/ChangeInputsModal.tsx | 12 +- .../ChooseMultiplayerModeModal.tsx | 8 +- .../ChooseSingleplayerModeModal.tsx | 8 +- .../ui/modals/configuring/DrivetrainModal.tsx | 8 +- .../configuring/PracticeSettingsModal.tsx | 5 +- .../ui/modals/configuring/RoboRIOModal.tsx | 6 +- .../ui/modals/configuring/SettingsModal.tsx | 25 +- .../rio-config/RCConfigEncoderModal.tsx | 24 +- .../rio-config/RCConfigPwmGroupModal.tsx | 33 +- .../theme-editor/ThemeEditorModal.tsx | 177 +- .../ui/modals/mirabuf/ImportMirabufModal.tsx | 126 +- .../modals/spawning/ManageAssembliesModal.tsx | 52 +- .../src/ui/modals/spawning/SpawningModals.tsx | 116 +- fission/src/ui/panels/RobotSwitchPanel.tsx | 22 +- fission/src/ui/panels/SpawnLocationPanel.tsx | 12 +- .../ConfigureGamepiecePickupPanel.tsx | 6 +- .../ConfigureShotTrajectoryPanel.tsx | 6 +- .../configuring/scoring/ScoringZonesPanel.tsx | 45 +- .../configuring/scoring/ZoneConfigPanel.tsx | 42 +- .../ui/panels/information/ScoreboardPanel.tsx | 10 +- .../panels/simulation/DriverStationPanel.tsx | 9 +- fission/src/util/Queue.ts | 55 +- fission/src/util/Random.ts | 16 +- fission/src/util/TypeConversions.ts | 73 +- fission/src/util/Utility.ts | 2 +- fission/src/util/debug/DebugPrint.ts | 46 +- fission/src/util/dom.ts | 18 +- fission/src/util/loading/FileLoading.mjs | 22 +- fission/src/util/loading/JoltAsyncLoader.ts | 10 +- fission/src/util/loading/JoltSyncLoader.ts | 6 +- fission/src/util/threejs/MeshCreation.ts | 132 +- fission/tailwind.config.js | 2 +- 107 files changed, 9349 insertions(+), 9103 deletions(-) delete mode 100644 fission/src/ui/components/NumberInput.tsx diff --git a/fission/README.md b/fission/README.md index 2d8d0f3891..a2fae7aefe 100644 --- a/fission/README.md +++ b/fission/README.md @@ -35,8 +35,8 @@ npm i | `lint` | Runs eslint on the project. | | `lint:fix` | Attempts to fix issues found with eslint. | | `prettier` | Runs prettier on the project as a check. | -| `prettier:fix` | Runs prettier on the project to fix any issues with formating. | -| `format` | Runs `prettier:fix` and `lint:fix`. | +| `prettier:fix` | Runs prettier on the project to fix any issues with formating. **DO NOT USE**, I don't like the current format it uses. | +| `format` | Runs `prettier:fix` and `lint:fix`. **Do not use** for the same reasons as `prettier:fix`. | | `assetpack` | Downloads the assetpack and unzips/installs it in the correct location. | ### Autodesk Platform Services diff --git a/fission/bun.lockb b/fission/bun.lockb index e8363f113e80741874e44186841a572a13d21368..8ca9f4a4ab44ab72622fa81f2e042ca8b100e1fb 100755 GIT binary patch delta 60612 zcmeEvd3;URyZ$~qIpmlsW+8~u8k!J9LO6zsSXlp7uM5(m2)uN@s`aU#i9rbH1K>u0r0lP8(-@6u6*inX>8UXEr>2uI@XHeGNXZFCJJk zCt-^z74^eq7`d5a(i0P*-f|d5N$BZ`aq*eZHy~pv=%$ZhFyB@1l(|~J0KE+KQ;?-0 zyQ7v$kXs?kLS|+pCyhio@oC9v=?RAM4)T@D0r5muMrK@Uf^pBO96beIgYFMLA#r3{ zR%(3WdFU+2!zX2C1dmEeP22%{W!Sr*a5gYLBO`Ol_(bDrKb1cnlI4ud8Z|00-7u08 z6BEP3ni*%{m%|<$L4uB+f?kBqp1fVcFv>%2LrYmeR#p<)Z5YLonLWIV@E}WJ2a3VS zhFpc6`B@14ufa}v4ze8N$fSg%;ISD-tA~snNnC^j8!$dCb9`L6l!6^2_4DYNn?`YSx{0&;$*bf zsEPrn{|}HXZ#?P=9+x;}88XxU3?w69R8bMi$bo^OIRgXbyO0$ild7tW+o02786+pu zP~>Nbmt#oKhTMrsnTZ*golQ|WsN6=?RfkqpQ{{aKoej=N8l99nD$Q5|J9YZO#mE_z zkvK6iH8UeUEjc-BykYFGX&8aXuokig^L?3dOLZZ&xDUkGwfn@$3kcdzY#ylevGuHU4jtW^Oax?U)aj9vXZiyKqvyze% zjQ1Z^k=OyrNUefoq~>Y+B&{cCzK^!MwY?rBBUnM}cOPLShZ?!xAwl8{q#OcB7Q79T zq0iI$3`pji0LgqqAvpw{HQz+@HMCyp5o@yJ$U+F@m9UAFK&Uetd8;x|nI)Y^n13Yx~n!BbB0%;p0fvqjIfOPe)=~ zNz5>eIndeD6Ob$@sI}s!z>)TGkhK5Y+R7{ONKS>eYGRB}O2_V$VWd34@EFFoZFT#` zB&H^fnqr*Ox(_7#Gdekq`@S)$y~>x8l$ta?E+gX;=nQ;6EoVQj0(Tyg)ppbNi5+Br zb8?fAV4y~#Q*;c2WIN4{T0-XtThO^l%!Xv(Jb`|)lk)!vl79bPIUawXE^H7+(o;|* zTE-E$-9|O!8%S38T35B`1G*`F74(X*rzd8lB~MH=s&!Y3-yf0<@PTAc$HZl%O-eP4 z{ykI!Q+0WFpp(b`keHDZZx|y$(9i>tYj8?jN-{%R9y%lPI3x=`*i#i0rt^>MrR?K5 zK6nN~=NfMSo)N09^Lfe{o0OTvd`Uc2FnYuLV5?%me%j%0x2iBDF@1C*7L3Op+*d_r zR9r^p1Qd{-n3cggufxs;zuHd?(H%%Gl0cn5A$cO}Gj5?=))PM_ZCp}9TsqcDLPApd z_|O5^HQDpM1JtC7OP!Jumx(o+K3Y0nc3Zbg)yOdhtNMQ)q~t{{k3q8jw;?$vU(s?f zBuB`CtOA(}$$Y7hn+HYo!K zV^(HTa)wc~zMQ0#I0KU+c^n+Nj4fPU!MIS3MsqR|!u0WR`*68A}*$>nOM0g z_6GgChO9uos%S_FNX}tTM6iG5NJ9#WXV30o02%r(AnQVo%?OqY_9N(=%kM&Rh>}L9 zrlljuyP-1z41FAWb_y$qIxe{h!ML0Zz{F$zZdzjFPm9M^eE$GI{F&ip6vR-S%1{kS zPfAITL-;*oIu*SoU!>)-;kc>EW$2To%HcIM6SH&~%41IxGbUsurcW{ELoWs0jofUY zXHF$p?ffg}jL%A)5}%fk*a!2FGc5u#05S_++$9G>;`Wo<3KB=vzqBF)vy4}zCg2&y z+K>-wZGW6UrND2~avdaQZcc8isj68nIC7wV#B5-N6)@n`|G?y61@)(?271o9u^DNp zIJ}K**{WdAVs8Q+1?Rq@!#nyZwTT>rWLSR4RpA<)HXe%rnO4F;hXP2(XNZ=g($a(R zX=;rBbmg!TdC6a$p_a%|f%76gCvkM*>- zf(Qh$5Rw&q4QECGXF0F-M))$NH(8+?^2iEnWCeFl{gtXi2Un>P8=01tJTfjLF(EBQ zZg+cNXNPC3R>e-#(sMp|t|Zk_4g*yh#dFU8o~NqYwpPsm|8+|GK(cwi!;Zz2le-S> z;;QQRf^taAh>uH-OGxYlodq_99+~g8Xqg^Wy+JjRZ69hh#w;v_2m)0QwY2jz~Nt1Ddl*MWl=7n?ceqKnN8)`ZZ(@TeKM!GDG}M724jAoQv&WR}L;n z<_p}V?029u#1|nM(#LeZijZtbefZad{Npv%q0xz{8BZh;U;T6NN(V>ve^)>qG$;rS zdKV4hSdPX07}qbOEE-q_`VH7?Le_srHM}$=C+A7n>F0fYOL0 zl4I+G5Hcc*QAt(E?gv!`Wg)9TuLoHNa>V;;Xn4|&oMIRm$@11`;L;~=(gO~uIaGjr zoLfJ?r)K{Ilv@jW&gu_Tfu#?tvA+YI4Vn(gq3Dl{?6Dh?1)x!K`BjGG7-E-~5$N!t z8hg)&%|_7Kp%0HLel_G{(C0(4{J%buLz+|gy6z_!xUPfX$dKZl8g9CV;d4ysliJ{qJ8}G~r9@kC0w|+rHd; zH7Mh;0IPGO&eryt^>QXhoWCCMdc_jsJH=-IwPsPfMf+Y#-~Zd;{f%1B_pS5ixp&e- zZZ?Vkd%*T3d2QFddbHAe!@Bh;J?iChli%H*+rCD>sMEja-oEp2M*ohT=d39G^}$wO zjyBwE$*exH}ux6#4wD_@&8KeUw7|DBv=e-*Tg z@gLsocBy>>m+pui6E=K9qsOi-wQ_4!sh9u8xUH3^WN$cFF#q|KXPXwAv3A6#t!o$0 zp5J%iOUqte{!ZTuL%tbuKDVSbB4~`Ys8MH!VO4G1#%yLhH2$Pyk=Sfp>9`6 zAH!&g$>VFS>m2Tkf);6=ZyagP@v-tl-RAo~RzMTC>E~<3K#cUY@*wv4TKN!v`C0)@ z-DZf>ih&pjG1zT}7PImOyIrG;8Af{)Ygh$c!_7^_tbiD|>k^DzVKl9{F5#|_;)W3c z&0z&ag`1;_Tlq0=PtI2hIpj3ID{kctahu_OR{jvT%kndf=J4~8MIZIEVurfSk}fN6 zsN2;G3#J*kVpc)>aMuiI%&BU4%Vot3bDO^+CqzgID}R{VnT-|cwgLx5nkPzFF|ls5 zMoB9#*6j+yxz!l1E-Ma=>s`tU818m0fw2{gh85H<+&o#z%7ZZwo6i7QNkQXqb5Ut4 zV1(OM9XnC9G@|{^vCw*2fg>WFdywkEl&csvLDe?4v?ny?H?5$saC6l|R$iRjRRQ~_ zZa$1%%US^=-DXZ%D+Xd$St}31>2KvjwD-3H;@##Ve=8>5?K+ChfPqDrqrzPdY!Mxx zIT;djQaLLi!EGKWXT>DAU3b87lzioYw8l0_KLi#%$trIJB)ZKV<*gV9zY10!M7Ii7 zexlns5BpRr;orn;YMpH4XCAI##f);h%43`D2!DrFAR_#ra9$OcBXJHIP6Dm9tz;NY zpsC)bSF-XtyIn8ANN>|B=pEq)g$?uJtTbCxwqm-t%?XvQfYEN(yEsDHf-7OI>lp3| zsG>?%+8}7;Tvkw%aMyP>?NOYEEK_k)p|M3u+hfyyhsLHz&TJiE#U!~)&%yD^$%`G` zC~p-+HI!XHA7BMEbDOuSSuqfi)vY{;C#zfe5T~nK0by=uX`CL-tyP^PoxPB1X$3Zm zG?xZi`C)GJRG<~m-0iGV!!W|ERgEK^=WrPqB2&$48OAV~vXB}sQ#X-PY!6%x220xp zq~c_%cx_LBIk%3L-@8w`IFgjVQ+^u|(=ps$8 zAO*5b5mSr$%*Fh%rd<)684Lya-LP}*jiIgg? zBJK^!7K;>?9g2GeDOK%Fq`Fz>BU||fd$K))l*)Fx&{jP}7iY$WSOM+arWInvv~#-- z!HyC*hp`vj2(j|P)oNq~w0FA(HBxgQQ@Lq`9~4eIti~-;;i~Ynf;vPv8e0L6yUh-b ztr&>4jjg=L-OgXI>$J31HH~yN4^^dLIbnx*5*jxo#C}bLFO(1~Ff`KqCe+IB;5I8Y zu>zvp=71(vOqAPo0gH>fiCR66HMR0#9NSdwCdD{-uC>s(*5$Tue%{o|>*#h>!PZ%5 zboPSQmh;xN2r0H&mgo8q8aw2aCq}6-%n55)RHWHC%*w+m-5h4+cX7MEhh1%6-0N!~ zsaAYJ%WzjOXeuP!?Vf9H<#%=`<#lsA=fWu0kLxN@k0W!S z74&$xvlANKf~S@%7bzBk%??}G{s=3-yW1?)!V2i&cJ*kXYQ^@}KHT{%v?%L*_ekd% zq?&V8x=NsvY%|6*D%{x?T3gzkxk$B=Io{SeWZzwPp{XYG?2L@mxy(tCRzSAf^(hS~ z&etkv5$>vnB=WQHX5p^>&=5z2lncv(#+=3Fj(r|UwPSPtZqQo!6_?{S9vX8xt)S-N zt}W1*6E!prcm1hzs$p;Hw(@e_t}HZA@3noyT`xmpi;)HA>XtTE%yhR|udS6g-R+vv zR`ni*H41mV3Qf;%MEC|Yw{;$~GP0e@g@&UW6QJn`bPP9NZD$2!xJ_4kE8uCj`BZx= z=4rR<97dXx3hnP1?kbN_Ls+nRv>S7!#MA;sTmF0od;!p|Njr>oFU3u<~ZOUC+S6 znS&E}c)05bG`eFoA&B#%iU#TfXbcplJC+@aRZ(NfouQ#Wh*}UrvKiU{XlimBom7YX zWVGE{!z#g1GY6WQwk+i=G?t0^ipu>vdzw;kEW!^8DV%-CI7@4|le{M>){XIN2d^%w zHuN9C>o+w9xb%J1biKk8})^m4mGyQwn@ zgM-qiLSsDD_2=VmR^E8Gt7Uh?7$uE7S=V;A0w%a!U&4rZagRy}cLnuOb5q_QoFk#N zw*uQmnlJUR^5@`8z}CWMsxx6AG&PaAt<2M0F*%V>K*Jvf8X*eosdg}vbI;iWT1(lX zSx7Nj=n$fH659PBm+Pe(_K>yiN`xO26>(Oz0~$9(6o;`XfQCO@3CAP+daJOiAx(qE z_9|^BG_?#lHh(}11&6-GguCkZDO>^Aag(62I)ni`*m`K3=@<_5*Tj(%4Dvu;igOxXp90%LBBtS zhIyoeS7~5jPLvr9jWsx}xXuxNP_V|Kuwnb4siBYS72z0U4y$*M^+(X0ef0{tCA%YGmQIhZ(#O8bg8Qg9sjh)=QrCRpJZ#IX>Lk z2U>)+YH*}EH{Oa_g)|&VRZJO#!HE78d54OTq`@Eu_nwXOram4 zsm`(9hZ8;V7=jd64MK^tbUCzE)~b$?uCqw7EOi&JJIcym?RI5g2UA5NsOHU4R?Hf= ztKDeTG>j1L{?qPjqr=T_M_U1F-L6_=JXzvCj_{=-=hiZ$7%oF@B}brjhKBIt94wop zCJ8oW^rfTL!0}E7jlodILxJX?^^foyTR5Ar6Ay&e0U0q15rP%a7y>o#zR?=??6tTh zj8jcP1vp2bU{3Ksm=bQjG0uwF>UKSx;^_m+8eXWyVSc|}s0D?FyMET1-2YvVr51J) zo77NfT~RcqpB3)h01e9wLw6M^Mpm96<|AoVUO%^MQkthqPQjhf+REk!p~_#NrOSfA zIWxv1TGsifNY^H$*kv`PuR-JJswg&`pvDwiMze6|aA>&Iq4MQOF)*dAph4kg{sb## zhuc*VrE`_4D_0ye7NlagMr&$4pNB?wm9t`o@}~U)(a#|dss}~NJe_If?{vG$WU1y}B{$95^`6(;lZMW-_r_^|<>rR!Y)yN`T*Z>AV|mR zT}O~=DecT<&hTjLaw}*Y8f;Uz!Dm9_#6$_JaNIGc6*wW%^*2({ssywzZl+-jk{V~_ z9%$+)(TXF|#EWw$L zRA-s`0I9BWt1LUGNM2W0XsY#Smvc6>?$&vnMrV+UQgu%ccU7J1c|*q5rxj}4Ob$U) zePIdy^U!A5`V^$p{uG2@&;&l`xsnB)i135LXsY9BE40|c;!0YcImEcfL+ck%Y1b?Gf za-3flG*xEMgmBka(4u7xLFjw%Qnj?O&#ekKhcC7AKXSYF!N}mF5vb@Ev;nFx+>~RV z_e^V6y9HV=59j;~+DI-RXRJWutYNsmZ9$6rk)IW}2d^@hso}#XDU{p;8XK*&t}9gc z)SKTIpm8Hr+Er+cp<&C#7TywW=^nvv9M+ zDl6us+cgbFjulElTRw)y1+P9U6kF|?ehi>nYp5MLpM$3TFviEBaTw%>7-zXP>^I-I z3_yyl!oG-OVIee@uC5P9G^ai$8f(=as6Lm(K)WB4J<#0nlZS+>`Z}elGGm~zX6&SR zf3!Gwx(s7GX)FlEXOkDKJQ$C>pxUCY1jdV2z*)EX_={G|S+{HHi=O&8o>!o$ zWkRjtOW2Q5m}=QPXxwse=(ddTgTjql#@89X-Y}A_VV}10Lt;>&#~o-1h1&29YBI~x zoco}Sv4(xt%I{@QNkMZXs3?D~pUJ-3l1wb~f6@ zV+O0loVv@(8{{^>-eu)Ow0y&gDR7&!-mvl@K7GT=FK|0Y?#ASmzuy`1rWNzG+qvvb z?d`mT6h1W$igdlWN6qk();hd3Jh#V+`Nr+)@|GG-EV{k;_z#W42`x0-c^8^=HCyks z0y5p^;=NW(rrULJuUb^NfnqF*zwKE#{7BOVS}&fC&S#Or@0@T+K86$*3}T7=5A7@5 z{=0@dyFqJjoyTvc{sVxcD3HGc5-Y)!^53v(ByB$oLi9^VVy6C zbai;AFamqS&6V$1F;m>m-(gI!R$Yp8&3jkvQTUXHBl-}u=KS33yn|G%6_^?69DD$i zm?_s9rqFG*>s^L6faBnde9tgaWo4U?>LkOB(p=*Xs>vzWglj*vs6x)?eKi3Umkf<- z35PM(*%oMA3?=2xdlgy}XlggCamX_`amYCwT1#;19=aSF_f2(zeFlva9v=eMNBDi< zQP{9IphZcFi#6b|mG^_&?0?wG|H18AaahfMwUB=}Y{mTOb_E|%i$EUGX2KCGKiTby zII3O|l;lfI^U_f(CdKU<@}W96(OP`O)xWRX0b>``hkXFI!rRcehE!+6KEmI9l^Q#= z1={0M#=&V90g5P#E&Jp z(74D|&hMbLl7+>M40k+Rn!g-kDi5h1 zGW8u&Lzpt#pRod-bek`pv0|RYuU*clNsF>EH^R;q2CX}8QP6bE@iF-mXsz)&y{Waf zk#9~tL;kfV{8Z8bSs$Qmpk+fyK9oK{2td9OU;?3lFAxUM-W=fbAXy%E%p#euEB_uS z9WbI&c86pIJpn$H)cXL;*B4-g{k1*-l04q%$>%|m`G;u!UuBLecqlTkf?+x%WmRCJ z){9E!!(5j=o(f6*Nx%tA2ly0~rKz$X!hm!hgDtL-Y+SdTAcpbopl0Dx@ zg-eqO7W@iTJd_OOc7XPs0H2~V06LbwtQhNCK9r`oR?Ja3hwhl<{0mOTMS#ym;342A zfX{zWsxd8E0sC=NR{LOC8JvsJ`ah9+PW|5%_&;wL`%ofB_oT#sAxV|gd{IeLDQ&0Z z)F}hW2>L^E?pDvK?v;ZQK;sNN}8HzJ0+7%wNA-oGp$pyoNz5$LOM{t5vem!GJ{*oc90C|>r zvV)dUT6UxnPf^Kox@h}@WF_#!!58QJ8>KTAl`J3$c2Z-t%K6VkF&LhNWW}76_=5`zerQQM|NS4IqLQW=_(3^S^OVd#TifSo zJ0 zoOEk-hN6=E3))V}d>bHXdRg25e4*ILbpD+EI`NKnq-22yv|d#5jQAM#Qjni({{Kg^+S;8+mqm)+4uQhW>|E8@)B~8C;J0+8UXuYVU z=}&E^Wb(GwDLKG@Yr70KbV_D%n0iehAvqtm22WARIbTfMDd|`ok_DI2c1kYla$2Wk zzVce9WU`{x?@PTV?i-LxXJp>W_`!mzXvYUh@>Rh<0@+6Aqhy1kAjx;sc1k8YYrV6l z2Q)ZDaA`+n{Jq$%w<^nab=SEbBw1v2@@JV>(Okve~Z&Y!6BQ<5JA$t`89*2ii7zSQG#-+JB@SHsSaO@|>lV?WmUkLmoBY`}5NpVsyqPlA#e&S-*?1$_a@vHD8$7qu*aWW|@X zei@PvB^!JNlK$5<|C5$KYk30_f2`quR?K1fx3&EaBy|T0r++a>*5lH$l$H z+zLs*ZQ4%B$eye@N$hkR){kKiJTt zkgVq;EssIskCAgy8$QwUjFz8j`MH+)kSyq&*3Uz-Aq84q*7olp8KJ9?_+$K}(y%X~S=j_+$KuA5PJuB0gGjh+M41OR^&+VJ{6?Mf3jwskTcN%r#m=S47DU zJ`BkY)q!NYAJzPWBpX~`=WhT>{V_;hKO(hXQOQLb<*T>rDDBu$%TACipbI1`=D$j! z9kZf2VNIpd+?R_=hPxF*4XP}lbnjey*GYlyrS-?=8VVJfTl{Cd^J0%NFfMf*6 zLehVnmdTKe`DWNz&?}m!^oRa7B>mopxF|71c-5;s9Glz%`n zRJWN?OY(O#??5Z5n~=Qimx1JRt_X=gMgV_k$=O~<>y&Khqmc4GQC}03ERat<4NsbO z-UlcfXxR{w4#sSS%L82iR?t<;Zd(55UZd*u|F7>+RYU&cuTfb)d;B!O zhmvDBmkOT$iKPELncFTocmBKAs5$@cJ!;X{r!1Q~EBZfvjXFxcKV=2$0QP(%6+D!j zRIgCML&OZeh^$VkaUZei=8kMh8`P$^4*Qo!=*Qoy7d2O#z#rXioAikA#8228!hfAwNEU)J1 z?l8o{YL3dHe|1OOqO6ZtS6#C1>R_FLcGf9+2TJxj*(}Iyx7vhzm{aT)dV}NpWXK%v8kVAV{3se-QUjoi^2URTP6tX zJ}09Gru*baEs-o&3NB5$!4GYKT)_mYSk|jNPl2nC@i>5?^>(YKzbzcCUxU94|{9QQ&2%D_RV- zdp#l+ds!Y8SG+9sM7v>juliy+ESQJU^%1?h!|btbD7wT-_8!@-v353C{HfS&4Zsc? zZf6^bO~dVVH5QH$c1x%j>}6>pc6eEu3Rj%ntC@)NvV@5}UY6#Oz^TqilbhZRw5|D?$ugM@v^wZDKASKQ9se{)mBXRva}Olcv;$u&{1}; z$Hg2kO9xTlWr-5YTgh>}-h`vv%05z^M3>f*UEP$U+}h4|5q~N+x*12=ZD+fQ7NgY+ zA-ig{o$Vp6D0W*I*dAl-Y)`R#jP#9d4)(4W+go%=l5Cl9uv?StzJ0}?irr6k*jNX@ z9HVe| zciSbEoWA?Uq0`S*4K^>0UK3HaYU5V^--i9Qu!SK~BTz@(AbSf2iU~ooeKlHuJ?q5| z7D2Todz|dd+IHU|;*?^uTY?RH*v<|U(;vP+#=O17iZ6;-czz5Qp>;fY48L6D86oBr zTKo)J;zU8A#aCKJiWYV6dzD3=c(K^ak|3_!xA1F5jYQGz5s#Ozw2TtVy)2`}jY5kl z^NbN)9`$$`e(Xh(SXXHAmA?cXEB-8E;aiMxqIW%ymwLUEEH)Kd)Y+LL9Q9>vx3xv| z66@QemnL>7HnttuiVf`S1QFLj&8qfb4;8X1h8e=Yp{I5g!%UG>Xi+iD5(f$`hF@Fs zYoe(7n8(ZTs|Cv>F`F|uCzQU>W371 zNy{`b-OG|Kz9_W#$vinCw2{Y4jbN^rQ)p4+HC+@GS`0t_F8wLdqVat%TAmh*3oU9) zXNW6>7B!|bMY~Xs7k(v=F?~iXFSKADz%onRD72_io-MjG@p$FRPp)&sI#_rzb;U?I zo7%^5p6K0FviHdD@?sYVM>91;x`9n>X7_zo>`-iMcd!-1?CfF@7p7)N53q;4SWEaf zm+XGBS~YxD$r){9*(f+8e)ob1d9yYC8dO0n6!z=pN3 zv#Z4P7ScDQH`vQw>>3f;QnDAwE^TS|T_*|@yRZ+~s7O2eqF5X$ecgS*-tuDCi+1{4 zA-l`#Y`-iUf3OwX+Syk`TwCdTkL)2YcB}AjC)sTSz-G0x z`@Sj;C^mK=*t+fQ><%%Zz4R?J2<%xecBcq>T(bMg&V1bNyGxu>Z0caJVIA!3ZZW-s z^sNyC_OchdM}$U6_Bh$4QFhFLw6puf;*QccWGG91#?h945zF&g;vGXY zndRt)rE-Dv(ph%;fFZtC^ul2*d$yfEXo%-#OK*29=v!X&Aw#sEBkAj;*UzzgA2!5I zMXw$Xy8m1|ebf*y%$45JBS1Un+3AlA(Py5d?~&f+MISSSIbYJ-;y@?Pw|k#3#A}L< z9SOSP0y}-m5F-~z?=tbA4^6Vurw#FzqW6;yTxh4y8e;51>7AMY`j{8}nIQt6m2{0n z(9@o^57-xCO0*hmvS+~-9k6qTsJ%!!XO99sbCI1sZ-`G69Wokp*kU{Vl_8#5EWIy~ zzU)O8U^YA_>4jrJFMZDL{S9V=qTNZLqbxgp8MDEX-q%Ur@}j@PY*-@c)nh@gUt;&Z zg4v+x=y9O?FSXM@Vm2(5-uFm5pSRQ3FdLqi^tNQsyFeHH;P#VP*IC9iHicDpva>hD zjZTs+lggsI*o*$f5M486(fdhn&9u|E3~^i0scDWXA~ws>rs#P6ZivlU(!0iZc$c1N z_x=;pR7mip%WuT};zu(mNy_^dT?$Z$p$@F6j%TvzFVt?GOi+ z%Wf~s09!ZD&iaT6d6IQ!f<5cSIz`Y5$zCTrbA{cvxHzTQ)mdP}R@zyYn7&f_Mo$EL z*^4bHLRU%l9@(X^ClfmBdV*N$CHIgke1?>7YcHi>i zhGO@V?Z4K}Rut>jO5fBcz&h92*~+5#I?2|U3U-$lTU9t-knC}?i7(iFtBD`i4vcd&rBeDg0lO>;-da-py z&<4p~Cp&Y4-S<&(O0lbR!G^tTXX}gUFH7I(>0mE=u?g9sk}fj?^eT84-2|G7E1P7^`^om$Y-hv7^39S> zoeB1?7aK0Rydv2e&w$Um&;ci7o3V#*Hb8$BQFc`vq`sQ;Q|?~z^bnthOZIK)#uvndaSp2&5t+5#F zEiZPkXtztU$H}hWW%nH-ZYVbUIk5fTu(QL&x;Lb6hy~WU+s+Oby?0CY0@+<&Y@Bes zDcOZfz$U(F_l*}j6zg6}U$28J(IHH=TCS6>xX121TEy*t?>C_dVdwgW~p5zdDA4$5#O3-(`=qV1-^Em`f$01^lOZo!oeO~l*hbVDE(hJvsPB~%se%c}4 zQnY(5=)jY9dZt5+Jt@7flRh79r)N1t1GVN>uLFJSteu|Y5FhrC-qA0BKIT>UJckH4 zCFy&lr=7BUFMzkAx4j5D_!B$*tV2BUiS&+r3G{i;MK|TeqFsiZD`nP$4Lfajwy;^8 zmd^W0Uj|*&d8s(MS30L|0NeVE-B~!q+%wX-#>=3udC|+Um#CR`ob)QMpsXmIh}j!K zdr!nwm`b0@!b3KJzWb@Y?lqW7pGo=xY43=yD~$NU&7jw3+xzvRxREXU<$eWh{~SBJ zUaZTJ>~*rkKDXEWGN$3@vgXxWK$rf)PH)0A{6f;vTS4#hqF=!@%$M{%(kc0N@2!}I zir%&jbl^EV{VJy6Iq4nyD(GWg^bSmDFJ_>AjdMUrF!mouIFI(fcr0E=oG&b>0#g4>BAWB zZ>0C?-JnZfveQQ~-j^gD{U+#rUi3#8@5_?DM>^%Q-TN5EThZJ0fDZiDPM^Sde=EIX z-vWKii#~<%{!Y?m_JW@Fo!$F1##_<*Ne6##r_W-%zn9*rZ-YMXMSq6zz9Q)w`#>+a zV)y<6=^nq^H)Q-m{&%?{FZ>AXT`$&0booPV z<{yLI`iI@uDgIRKb+W_$w6n#SJI_-?p_fu;FUiK91e^7j-Pd0nP;8k~VC&wsv*pEvyV7?**|T13MGm@k!~V9jRmJqbrSEaFm%Z3(OG8b*^UprxsJwKkX}c%{E-jE; z$XPf>IqYOjvDhKm3uJG3u|cApDcOaef?aRgeIFJ#6zl#BY=0j+TUV^}k-pc-I(_Zz zqoTL3WLJL6FcIXEZ0dQiGhH5E!!H-_oWsQ_uX-0X)NjaIi0OqE!;in&YAL?(vP6o|lJ~usrvTxe0he`+hP6k62p3)_iyrDcy67NAG#OM7~x*vG{U#k#)++rNyRjS}n1NZ;#Z zoe!C|7rC8Gk=I9VIjg?`eYcN&%jsf@u6-pPeF^l|zV@ZiP4s?9mVJ-xE|gvLUfe@C z%1U3R@9ZBypZB7NnWDi|Nr(Ih zdcjn?_i$6>EBXRy@4Dj(>t1;E0d>b0*6qIbfVvY4>%LB!br&6t(PBb*8MD>b!Jb7_ zin2)}sDfmpe*!zRf}I^FPAT>t*|3WCh^CmLPp<6rwx3xs=%PiZi7zV3qGNA>ZC%OE zP7re{Nw&;Qu-CvAeQ%wC`PW$%y`OYcWxI2hSX@~;r~U%=mKQrow5uZ78oz>FU&Zb_ zMch#AakBlZ+S#dMT~+CueG9BJz|Kw+y#pj0@*CKSlkAbs5t|fyfo$n&cHik@a5d?> z@OQBLyx6COtGZ;}e}GM?Zugxj_9*r`*}yY`=3EWF0wpjV~ay_cKf2Spzzy*|TEuQ0{U z40%MNjXPQgeQot|q2`X(DPpF}!mpE_mTIS8M$;6%+81=ir|k454A@iBJK72QkQe<5TK=@8 z?~%@W+U~s-Em!omVxa5Ju+y)aB7KJRjx7%QtQWn*6t!ncx{M#_nKSL)J5BKkXi-qp z>?<1AFn`|tb4|=!fu9|y`#LLN|0um1{|CuQrpRq)`iegS%{ur$D*BeLhcB@!VHmkh zAj>dEBZqQ1jjx<6A^)e7)LThorN;wN4szpgmJj~ohA}r#lxbqtR$i_e_(Ba9Gh7u@ zX;xkJzthzY{Hq?u(Ym|gQOrlVeOH9)Yiqt{}=bGUv;#@PDpM>d$ugKlZY~G*i}K9_Ypv=E+R>|E$aZCv=Z!-97$~ zC4EJ|mgXhLwcVwgnE22yBZU85*K9^`GWqB6zvOg&fG+_k#fVf^4Ufb>{>NW{ZDKZ+ zx~S(i6RK{HRqge(k^Q|6o6J~KIZhppZx3PvyE$a#)!U-G&EH_J|GJ>r034RqJ}f;RXEjemNWD1oL%%y#hLO9+X|El#R4)K5Y0Szm2$=vgH^Hbw+*dER>Lf>mKu~)kt%q@{5G{tb`4J8JK^uc% z?2n4s(wAXleIYz;0*7+JC-AmhE(YD60t1{e%2l(%JSx#GE9ujQTd)n3x=~=L`vV+>z9_eYYv9kBIt?X+^ z;Hk4u+`DeR7xX?VJOq3I90ra6M}ZFk?vDFK@ULdgoSjH=W84M20USdS1Au{m1uOxU z0?z~d%BID@bASab0hR*K0|HnEEC=#{NdPxj?xj_M0H7LB9pKlEnShTkR-P{sPM{c2 z9LPdYCIVH_9d5eS0dBN4fSN!pAPA@pJPgzY9swQ&>H+nE20%mLF(4QS0U7~~fu=w+ zAPi`3V&#V;5dpLSS^}+r)_@z}2Ky6wegpUz0Y3&D2TlMdfm6UIz-izNa2EIs;Ew-3 zz+Il3`eEQG@FCCz=n8OS@7@_ddH~$fdjoxeen5X<5HJ{s0fqoWfnfl5`i=m7&!S22ubXFloSeU;@9)itCQEmrIBz4QDN9DVG4(9XEoZ0KZe~9PlM@0r(0i z0KNvk0nP%afND;RJm3TP0t?~$3+$_bH2}ZMCLfrN^ke)oH=aBp08g97Kq$}zXbSMO z2?HX4OrRDJ1k?sf0;Pa5z(YV;z#k|Flm{vR6@f}XW#Ao5(RYCZz!cyKU}_G2JPAw# zvH|M3z;xg#;Avn6FcWwNm<7xR<^XendBA*N0k9Bw7FYx<2A%^fUt&w8u$jd z1Y8Eb1-=8m2Yvwf4asi+ZvuOPO~4kQJ@6v17FY!=1D10iUxLI^U^p-W7zxA!2|yxn zlM@K|6}Scb2K)~E0sINv2JQfV0e69Wz~6uYUk6|UK7cRa1d0L00YBg(>Ng62uYqrX zOTcB|Ti`q3d*BN21Mnko6}SdOz?qkdra%LrA@CSb3kU*g0}lgrfk%K!0KRV5r~*_4 z0)T2jm+JTt2$TX!10{hHz)4hc95?~216}}L1YQEx00MX#m;pQk%ohH?ndNh0kn9fd zBEv6@JBOlXAw3(I4`cwm(2M|*ffOJC7zK<5#sF@h4NwPo1b7c~_cm}1;C+Ud;%s0i z%I5cGk45@v$jY2ft5Eq$pf8O50A6-@x#Vc z>{Gxb;5+p83h)EKuiC2zEJmKU(WrgEN?dmVXZ03)cJ0X_#xfh-M_ z0aim_1FQvJ0(hm{0Bi&{0h;6}O) z&l41kyKMnFyANBHyy1^~QQ_XK(Y6M$9lAAtP50M^C- zX#l@6bPzuw@ZQUNZf}5hTi#`R1Cx+xGB5?03h=5K1M~%6LcU?hGY|G$;3;4>FcX*s zOarn3{yX{Ck(V67yuCOV@cePgG@k#-td%ntIzz}%4g|pyfFDtK8t{PU$JU9!;{dN$ zO@Kd85a$S28#nKbz!+dOz}o{C6Sp{Sbss|Kt>h3e4A>9wF4`Y>7;8g*9xe^V1)#C= zQ(`el)MLP3+RzdC@7*c+VV?PzrexkyKnXy#|IF?t}u0=X{x09>0r0Z(sOXm4%vq8AP2|>rU6d^Q-LRdDZpf460>ka%mOlj3}8O67+3-b;CUcVr`fmV0443q0FLZ> z;3eQi;00hUuo_qetOV8o>wvAm7T^_NGq8zG+=#@>+Tf9IK;I=Zs4oWHiS%p04&Zel z1$YxsBdGFll=lK`+}przfHsc$JHT*&gK_|P7kCdii29B9fuq0?;4r}5oQFTJV7!V| z26*e@?TfcA7vKl5P~H)X0UR2RH1Cm|)OR8N0{#Sk0X_nL0e-vd7aKWLrf%W=F3a8CRT+|cRYAa4P`0>1-)0C#}f0DI1e{0-dmq_KD$ zhz{*eNFUzC7#Hw!4G~o?+!EpI0ty5^8y$Q@C>UDJO(rb8UXcxM}bFxx#w z4YUFxHQGbA19*Y!2+)V<1M~)Z0X=~pKs3O)qtiKZJr97fKftv;5;6`L0SpEP0mFe< zU>GnI7y`uTv`6PeOMopANCI94HUMjY)j%Gw9N@4n11un(126z%+-fSQjm<~Jz%mC&CbAg$_GeFU>&xX!W&jRKEo-*el&3TuzNGGUx zdMc299#{e_1y%u!&(+;K~0I(k}w*0Y(_Zlq1J# zGnC(eTfnctP2eZs2Jka*9pL)rdS|E^)@#5Iz^lME;1z)5z7^O4cy?3Dx1gT@wgXpy z?}2xKw>bX$kk}1;2V4d&0lR>2fUkkqfwzG-fSmvvauM(;4Qa9_Vo*@h-qn9RXO`dt!QVpUOE*vVMXzC9^R7CO}uVg&k)R4{E=M ze~=GtY$N@d_KXzUj=<;0C>ABW({w(gojr|Y=h*O1wVj1B-{*iQC|@AWk@b|v{2Vdr z9_->2p(BUAKoiti0f(3cGqcC$DU5TC6>wy}1r7pi9Q`O+9_M1w{GKv6wK$!~eZ?vA zqgFhjVaB44SD|z66}9~YotG&}E*ze7BfRqb0-X&h>PK5qJ%^Qf8`%q1$QAcD3iuO} zhiG{dXAaO9;H&mV0AG^_1AJ}X5NH6@10Dq)0qO#EfQJFTe&=iWT0l*p24B|%BEk3d zd~Y8BQ~~%=xHNDF72npC|A_{8j`qK_trYU`vp8Q*IsgN>3yv42dyszvX*9!5>C}0O zLly&k`7WPE7r+nqBq%*;e%N>F%Gi5;KKDeT9Mb*(Kd&>5mrwHDX$45WM`a`ELw`n# zex42#O4MJNsnE!l>Pr8eWL{51yelcK{XLa>%J6i6ejYA|WPRN_X7Cis3W~y032mN& zJQaBw#w4e(bgkw8nJ1rPy*1JOVh z&;y79Ish!J8#>Yn>Fz)`pd&!NE6@e#40!U;o(V*A{4MzGv(Q^aVT>F@GQE^e0#zCH-Wc93+MVg8;tr8UhRk_@0LE zU}6Ebegxn|VF{4&KpZdU6)N0KVB@Q?DZnIvz2hE1TYoJ*_NlOyfbBEnX$1KM^g~Fq!_$D$uub9q zUj~UMVaNtp5DVbdj+M;>p3*i}_Jnehw=Pei6T!0)yb{hp`e~qOLz#~}8_lw0Igqqf zLH$M$3f>08R$w!*3D^j{3~T_Zf^Pxv>yF*yEBG{b1cu7B;Ex%VS8qc7xBC3i-gLya2x-wgB+Ph6 z_*e3&Dq<`71eo~ePft|xX<}Y*h;5a8s*L54?Sj|TDv`I7X7w8duh58)CLxXGEx05Y zcg2ve2VQyW5}0Nop^ZaAjm$CWiHT^(FJDH_IM}z}K`=0fwFqgPo){OO31-oEpI@lD z==~*S9SzuEJR3|gw2@Dh>UbQ_Z88Q)xDctK{mTFn!VLmtgPZw#eC5z8i)E+s1+U(VeG($R2fxRdAB!& zjD0LqHn>UikZ|LOQ=|qX_Zg>{9qiM+`g!DJW14R`JTq!lhYc!cILf`|6hAX3ns)&m zG4DA=oe+4G#E_MM$MEG{JAZ$+>AP}_8oXv`j*3{7=0h>+jFziZ^JhM~9`lvy!00wc7>x`t^sVVG z7}S1nc%%U zij_?;nJ%JCtc%=RyGlL(%-?+m%i5Z>K=iMc6epSEE^=^mZnR!Vc zLXN1%zPRF^H?*wjxC#q{glX9}46P_xR+d@f87ypeBdVOJ)yb!lXy4eULW!Q`scUWCVcw6@Zbgi9-g{Aoq-R##t$(;n%E!UGphP<V4*FHL;~Sn$oDcxJdb7bx|P@JDaCzO9FkKFyBQ}{$FEP0#;M{#_OC@wrEi#w`D5X zDs@%1RFWvlG9t#(inuK*5~&*^#8`Vnl5OnCGOlfCCT1l2GGj@DnPF^AvWy}5|Gs<9 zb&b*dXP$YU(>d?&eZTj6x9>gQcajzSanh3HR{Ux%$coNcp=gY>QlFG4yH?K_*vx3& zML`z}4O@bAQbCbnz^~suu4!y>x{a2y(u!o(m{u_mSb&w@4F-=(%r1-4BFe025D*@Z zfWZGs{p3qgigV96EuxXNIPShS!f2P@vzluu?X0PQ@%96Pjc<7OqN`(Vd94-^1qzFy z?8G%~Z)FEG)lxF8=`qu+5C}Hzy!9-3keE`g?(z~KkYG$kxjYxeo15lN7urC_dG7SE4Rl`SPF4=r|^E}^r| zr7l$E0P#O}Ap_Jtu2Wa?Y>TUBR~pt9dcMIp#?aGxEqB|^WdD6|A`4gphf1*t2u@S+ zG!pu?CWm%t6>7SRGwig*tK?o*#7uCq48jbhI?DmMwH+j!=|OXYP?$_SsVWGbp6@AI zzUQ-&J*SP_Sv$nq63pv7D6EDHq4J?;^|zk{g;^ey&w7$)Fh;HJDOTo#OVfV#Elgo{ zmDar9yl4{;+zT(N3C7Icd5K6@?@eveW*b|mk-%dA#+!Tw0@>V~77v6s&-4)Wc@%qM zP3Zl>uINCD+4Y_eogU10Xxyon7@88@qld59UAHnZQ4F;+ zyn>OiDl#+l2Zb$iB^GV;kBkkw4T>BqCZ;{qmj(=htkFPN0FmNL$|1bD=_QGy`ozqH z{GZNT=5)XHrJbO>M`rh?bGYYj^``1L%rnMM4B>+9%O15byOf17Sdt+*ruvcWa|8p| zN7VPNLbo`<*6#)o%!oj=0mTTTzj{4m!grx7Hgmeo@PrjF_dZlT6w-&{o`p-)h|=#0 z3=8!*U2i;Lg*T!P6)@=;xM!*C+W6_C4*sTSS|;HME3cjie3qcWoxa=9>U60o#$`^2 zUAR8<7`!rfAek2}ZSUBXG_pMe1oII?_>&FB_sI4aWju}=8FI_B#7~+X5X(Vfn(mBu z-LI&MEC59cQ|KPYc+>idnng^u@9ERTuqzO(gdj%BL1E)w4BdVq;Q6}W&}gw{5U)2# z+M{gVpR}2pSF(%;hw+(=k-GUe{r_B-An6Y2e1K@P5#M_Zc^LTDV^H7^HmhuZ@(O|P zBpFhnG}8mAL{2#%$<_vn=DkyQwy2$3(>yT4RZMA=-kt4v^Fe!oV7)==)32}H^gf!d z7T?)f?xthWUo=TrKx7l!`60~FQXpnw1avvdzl@_N)w!KrrIw0n>88UEAfw(G*LZ+9 zo!Q0F=R0&8$Xvl{4XR%20p!=4mwSW+iRN6h>a@k=*n>^f2z3}~et+xpe%EV+bay6Q za>bh`||E6KjCoJ*0 zILnbe?j1p4t9s;%nE`?2vPqz@)PRgGqiOLdL_`1(%(82TChFR(?vIiLg!+Ya$Y`p7 z#@x8k^pYVHfn?>S_OI{uhozdTBbHTHxz5bda^c{$B;MAIbIbvo0L zw_s0NlWrIqu14cX76x9EapVz(x4d2B#04WdDIqZ?He9E4`Jr9my#z$HW&uPz%?ZPt zoW_e8Z8J5nIMFn)L~Tj-Dy-9GJY52UJ2am3!+|W5ko(Fqmidm~*+wddSRgKsr=#H* z{nmJj!_}jHWc?ILhU}BefqIz?m`K%-PL3Tg_2dNJq_I~|6dwHdXc8&LBT5@7#F}>} z`)2Z<;L{D&vsG`=*ea+H2oE_BtQ@z{8(|r2IlGM0?dt5#cDQsrL1DG8XK+HQW!86| zYCE_hmE49asESFir>1npL5G5DC%{waXcO2KF?ehOIC3D<05aFCvOgBIe9LplM1->? z6@IFjfcM)xAlU0>t5ZuG-O4K70R*eXh`lWeN{)f`#U9C=N@C!Bm4YhR!x9AwN61hCt~2CQh#90-5oQys*0^TOe_X&980$u;*)Og#s-$wMXpsWIZuL9 z*Tho4Nsx^&NMqNs@l=fGvddC9bj@{I@mZ+}Oo z@ifR0E_P91vKJ@Q00jo>pD1SVu)*cQ;YRy^z(CUSKP-`y3fQ}*JDmfPyO>13EAX1} zVdiv1{@BPo@#<6vTB z{89G29_`3Bo}a~qOsAb#lId7HTHyK}o`;&nR)K-LE~Y&BsTFIEStwxidZcsfr_&&R zlTlUxI=c7G?XH;+n4iTTSy2-gK&ZV^|$Oi$P({q?!3z#}?dKw%Rj| zk?Q#~sS@ELJ0$T=oY41G%IzM9fnZxq2=B8q$z(Dt`Rhyyn+yxSn@Q6r!=hsU(t=J* z=4Jnq9VY2i3pSa3x~PJu!&X-#-zDqS1E~EkPbZf|eoSL;AUZ(FqIAkj#DLX3>0TlR z%FiH|3=F(EgTm5rJ&-}lxiBU+{McED((hz#H}CSv3$zl=L1BfbT3J4*gTr5|B?>aJ zvy$?YAR|8`SBXo2k}j~@FO;NAg_2QVGy!8XpWKJ7XM7$CM%J=`ajKH6l7Ywqf;GQm zf^UERU~oJ3{>*v<4_H!3)!Dq69-4t|N>TvK9aqxaWR~Ax&II!vFta7rQua1u>Gu09 zzgf~i{6i&G0V#U{1Y5v64mq@Lki+x<2?0lOnRI&&WEf|PY1HKU^Od0onuv)fXRefG zQoCX~fb@^e+wO=d-?v@Z3*L)Tkr9gToAegH%H7|_m7eA1oj)#~HetY7R0k@t8G4L~4sL0NQx1^EBhNn)n5RNhh(sPFUQ1IZt#GiW-Z zY};J19Xc}Y;oxijZ@ne!VoFlJ%A)6qk*d?}`P2=47tYYyUt_t1dGvTXeEAcQEH560 z7wPp({_3iPM3mj0M>aFy%cnpX0l|l)EV!2|V{Je4C34Ldk-~UQujKST_Eq^4i2`5h zW>Xw^We<^4tX*x8zx0gV?0Xxudcc#_KroN0ubN6D-Pbn*=q1(V{qr_M=DjbrAdiZ z_~Quu+oaU}PCe|R^*+^fNiHzwq{)%(d;}{tm%Qe~MqTnKbUw6QpNH^8f!LKNnmm4T zzr#jKTMua0MeH6*^QeSzoX;bhl|WVi$?E&LKYqD(^?UO)An}sPTK>m*)NBDFky|Bp z1Z^sg&oTSvJX`PCD+^S$0EO-3)5#ddZGtfh9P74J40pZ~d z1UvS-wSLs7Q9A~+wNaY)Xi%7R$NYf6%|7#XYAI7zQxW4OAX)+8nzM6HO{$NJ8lkpo zF(^!D=b2me{tVUQwY(=+Q!Uf%4iK!1EV)wnG%L8gw-)i|YI4be^rmY>>B)Oe1lcYh zubCZmcL0UGq&wz>=Xe~tbxGodN91cLJqHnjZONl6aUDL0ikIPyt1gFklgaYM=9h1D zD?9DoWxTmdySF+xCJeLW3Mk=Ah!r`^^q`>Tk>)Cr%xS}yh;vcf_wmgY6;eqq zw6|XZB7)v$3C!|mp*Z=@%Oap(90#5wsZ#9L}lO`@xB#6kiivKh~eJ%yM8q$Ln#Mc9DM`Hf`_j z5(CD6`@3zjJ-&uuhZZa>sz71yXO-@QQ%75@l{V1W4*IKIRFsEc6NItW}TMeTtv0tmGuXLRR>Fpbq{tNv9Z!3qKe366{M#F z!7OzBVK&(<+j>@uSP2TNJq5ce6|ciWHft%niYT4&{vb&YF?f&_Jz{!aE#kJs`!pbU z^mYU9*;>l0y>te=GJYRw2&9+qvkvs07{FFFZ1QzRNpHU|cQpWm0WbkzZh%++jnA{+ ziU4-D5V?=sR%5p|0SLCB)VCwvMW@kzO33F;_1Rmc*?!7ravk@J<}_H=XQ=UF}+J?c_sqw&Q3unhG5G z76N`cNY3j-DBD)Gcoq9(TYp=&+af_lli=9>AT7w}{kY(RbRnPb&PnREu2((#L*%m- zq0;A&xLtF)#cQ+1hELfNr*^lCP8cYb7_|GLg+t$%MeP+Sa`<`XAzBPxPOGP+2HjYT zH2^n81)^EmRc3{WGVOf_h71f^w4AL~Y8Sb>i)^O)?DSmJ_!C08%p;WRhqdGrTj|&& zWBVc4pgz|JBVtRv4oEJoFUhdw$CdY`0qpsk{WPu*vi+YQtiIm@>?)R#4^D0WqipRQ zJajZ?>w5#~bphX5_rH2ia)zwwaq$zSG1se|g9|O@Yc19OI2EtMOeE9)OW2FSt4@{= zywJkR)%}YSF>$|_HLqLyz|dUdYImL35*ok)U#!-q`fN`h$6Crl>;#H)GP6eEtN#r4 zqs$SUT&lmLl8q2)R7zo+5d`f@(N-Y{wprdfb#-qaY$8bAsLp^=8nhk*X^uC<; z{i4*R!|zW16KZxwU4@$^1SfLH$!Y_l4V%kDH^Ap%Cn%d;@0_5c?E21&syCor8FrFx zV_#V#USh82a0Ooo;I|n>)jcx57ZYHqsC=6mf>ED|S=w7VEr$Y*t=RJ#gDOrMQyq z`l&x+k?S=5fgE8F#FHMlHUAsquC25>F(5F@BSgH6>4N z_oYRKZ#ux~Zp0I|2YLuswu@VMNWa^(4O<>T3)lw#yIwg(m1ZbTuC70yqLO~l=fNp* z>5uEPQ`Eu>((z$ybzh8TR7QDT_=eS?jFjE+F|9+HIJ19#L#?4m-+AkI#cGpMM#0_) z9QLpFuwJQ`JJZ2J~;3C zqg*uC=>9{Rj@x1~4V>)U7Ruq%bx$ZGs|CUs>L)ta$RpnkD^?@a=aHhia!x{W{8?%S zr)Z|38H+}G@)n=246f{}cg?r)%x3>r9Zs^Dto*E)Wchm+=C~T@8AC00D1n6yD~S)Y zs^-wI5=a&!zZUn++xP7p_ALtAg$5D_s*8Q$XN}j`((vaws=zau&v|j$Hx5kN)iO1m zeS0q*wn*nZvcW*G{%V5z*snS{K3NHb^f8>6v2wPCnXLjKub-vY@_ zyrF^k?Gn1t3zX&uoi#?^s3$J1E$VFh9N&F;F*v$lUmPWD`$c-pRtC*?*5XIl|NI>U z_3@1dzI1cJ?Be=rbB0T7NJkOPQk45?qMKa@AsZTh5X&sbxQ>@82hU~Rm&NG6^6O{k z=YQkE&M>8n`Y4a6rXR|hm_+8}6Ttgx#`uS9DS)XW0HsC4VHC*w{{yMXQ4MHkAa7Ey z*o-S=h41OOj}+rpUZKGLaQLT${DT?_pB>1yq-7jO>X%&X=Y@*h4;#c>M6bv%<1ZWMt54Xy5#T}MM_Lu zRNpTyIaGDr(^m7(KvP|3Uqx|$lQ3Pea|nD@rqKIi_**jA=zB1pN?r!0OGjv16#5-8k=G5}14P$=5 zx@g1{9y_>YyFC9(KjEGwQ0m#;wX>$(cfW&sR%vF${^)mmyu1m%l?YG7z-N5D4!`O9 zMajV!F)1p(s~zE2`+Vc~xM%#oB+rU5iVC=S0r!mmR`RhG#|M-&Ik|PDXi=4m>hMz{c&m3$}Pjwj_Gd;=Q$3$L%*c8m8nY8;supOoYT zEmCOdd_ktVeVQj-Rg)^-oTq{YLi?t!&dKAaPmM{APD*x;rEeVsOIlRSC)mY?kB^CT zN=iFuZT}fV)qG73cwS?6{@$z{M!~Py;FPzr%E})JL{|NHxLF3)cXqG z(jqcGHa0viDmoFTwb4mV_|XY6ro_f2sd^a*_`_=!L!f`eTg;@QsqjUk*qAtcRgxSz zfx0vkrqG}td3*YynXrteUgHO}WE&Q0RU^U`;c=1CQBERu@D9E;^|;RasSXecgO8-{hC&P4)={vhsW0>%SpJ*QP5R>0fo8<%c;_zQM*^cTu# zL}#I^>V>~BfisASO^8oSb{dx$oiu@5Ed<%ue+pK*s?-4CM>{&(RxqU>y9oBGfw4lk zX%lhc$*Bp^Nwhmt*hNd~5N^kA@`<`DZ!*2w2@PoXET|DPOX#ZGCOkGFAu)bpbYya; z#OT=YgakyCk0>NEJ}MfchQ~%z;cOwz1hc`vJf7^76h9>~G8!&UP|4;9#=I)Gj*ru& z>v#CpD;;6!`xoH#faZd1B zPBiuz-WZ5+tzAtI3*~ijE{+f)mhOPhjQzb7#~khdtv$|ulT7n_b-0IN@M76RLjd@9~3sH ziAl6%J|6kB6bvZ47V;m|A{2MNyeU8UwqDg!sFl pZsCR78WyjQLr+amhdRzS=N&c#65kiS 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 L>jc_tBFz1NvVP!7 diff --git a/fission/package-lock.json b/fission/package-lock.json index df1f06cede..779dc7dd15 100644 --- a/fission/package-lock.json +++ b/fission/package-lock.json @@ -9,9 +9,6 @@ "version": "0.0.1", "dependencies": { "@barclah/jolt-physics": "^0.19.3", - "@mui/base": "^5.0.0-beta.40", - "@mui/icons-material": "^5.15.20", - "@mui/system": "^5.15.20", "@react-three/drei": "^9.96.5", "@react-three/fiber": "^8.15.15", "@vitest/coverage-v8": "^1.6.0", @@ -88,7 +85,7 @@ "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz", "integrity": "sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/highlight": "^7.24.6", "picocolors": "^1.0.0" @@ -229,7 +226,7 @@ "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", "integrity": "sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/types": "^7.24.6" }, @@ -331,7 +328,7 @@ "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz", "integrity": "sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.24.6", "chalk": "^2.4.2", @@ -457,7 +454,7 @@ "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", @@ -476,6 +473,7 @@ "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dev": true, "dependencies": { "@emotion/memoize": "^0.8.1", "@emotion/sheet": "^1.2.2", @@ -488,13 +486,13 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==", - "devOptional": true + "dev": true }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", - "devOptional": true, + "dev": true, "dependencies": { "@emotion/memoize": "^0.8.1" } @@ -502,13 +500,14 @@ "node_modules/@emotion/memoize": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", + "dev": true }, "node_modules/@emotion/react": { "version": "11.11.4", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -532,7 +531,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.4.tgz", "integrity": "sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==", - "devOptional": true, + "dev": true, "dependencies": { "@emotion/hash": "^0.9.1", "@emotion/memoize": "^0.8.1", @@ -544,13 +543,14 @@ "node_modules/@emotion/sheet": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==", + "dev": true }, "node_modules/@emotion/styled": { "version": "11.11.5", "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.5.tgz", "integrity": "sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -573,13 +573,13 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", - "devOptional": true + "dev": true }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", - "devOptional": true, + "dev": true, "peerDependencies": { "react": ">=16.8.0" } @@ -587,12 +587,14 @@ "node_modules/@emotion/utils": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==", + "dev": true }, "node_modules/@emotion/weak-memoize": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", - "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==", + "dev": true }, "node_modules/@esbuild/aix-ppc64": { "version": "0.20.2", @@ -1036,6 +1038,7 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", "integrity": "sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==", + "dev": true, "dependencies": { "@floating-ui/utils": "^0.2.0" } @@ -1044,6 +1047,7 @@ "version": "1.6.5", "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", + "dev": true, "dependencies": { "@floating-ui/core": "^1.0.0", "@floating-ui/utils": "^0.2.0" @@ -1053,6 +1057,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.0.tgz", "integrity": "sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==", + "dev": true, "dependencies": { "@floating-ui/dom": "^1.0.0" }, @@ -1064,7 +1069,8 @@ "node_modules/@floating-ui/utils": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", - "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" + "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==", + "dev": true }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", @@ -1260,6 +1266,7 @@ "version": "5.0.0-beta.40", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", "@floating-ui/react-dom": "^2.0.8", @@ -1291,41 +1298,17 @@ "version": "5.15.18", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.18.tgz", "integrity": "sha512-/9pVk+Al8qxAjwFUADv4BRZgMpZM4m5E+2Q/20qhVPuIJWqKp4Ie4tGExac6zu93rgPTYVQGgu+1vjiT0E+cEw==", + "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, - "node_modules/@mui/icons-material": { - "version": "5.15.20", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.20.tgz", - "integrity": "sha512-oGcKmCuHaYbAAoLN67WKSXtHmEgyWcJToT1uRtmPyxMj9N5uqwc/mRtEnst4Wj/eGr+zYH2FiZQ79v9k7kSk1Q==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@mui/material": "^5.0.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/material": { "version": "5.15.18", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.18.tgz", "integrity": "sha512-n+/dsiqux74fFfcRUJjok+ieNQ7+BEk6/OwX9cLcLvriZrZb+/7Y8+Fd2HlUUbn5N0CDurgAHm0VH1DqyJ9HAw==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", "@mui/base": "5.0.0-beta.40", @@ -1367,13 +1350,13 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.20", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.20.tgz", - "integrity": "sha512-BK8F94AIqSrnaPYXf2KAOjGZJgWfvqAVQ2gVR3EryvQFtuBnG6RwodxrCvd3B48VuMy6Wsk897+lQMUxJyk+6g==", - "license": "MIT", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.20", + "@mui/utils": "^5.15.14", "prop-types": "^15.8.1" }, "engines": { @@ -1397,6 +1380,7 @@ "version": "5.15.14", "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", "@emotion/cache": "^11.11.0", @@ -1425,16 +1409,16 @@ } }, "node_modules/@mui/system": { - "version": "5.15.20", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.20.tgz", - "integrity": "sha512-LoMq4IlAAhxzL2VNUDBTQxAb4chnBe8JvRINVNDiMtHE2PiPOoHlhOPutSxEbaL5mkECPVWSv6p8JEV+uykwIA==", - "license": "MIT", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.20", + "@mui/private-theming": "^5.15.14", "@mui/styled-engine": "^5.15.14", "@mui/types": "^7.2.14", - "@mui/utils": "^5.15.20", + "@mui/utils": "^5.15.14", "clsx": "^2.1.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -1468,6 +1452,7 @@ "version": "7.2.14", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", + "dev": true, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -1478,10 +1463,10 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.20", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.20.tgz", - "integrity": "sha512-mAbYx0sovrnpAu1zHc3MDIhPqL8RPVC5W5xcO1b7PiSCJPtckIZmBkp8hefamAvUiAV8gpfMOM6Zb+eSisbI2A==", - "license": "MIT", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", + "dev": true, "dependencies": { "@babel/runtime": "^7.23.9", "@types/prop-types": "^15.7.11", @@ -1554,6 +1539,7 @@ "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -2308,7 +2294,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", - "devOptional": true + "dev": true }, "node_modules/@types/prop-types": { "version": "15.7.12", @@ -2345,6 +2331,7 @@ "version": "4.4.10", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "dev": true, "dependencies": { "@types/react": "*" } @@ -2794,7 +2781,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "devOptional": true, + "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -3043,7 +3030,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/runtime": "^7.12.5", "cosmiconfig": "^7.0.0", @@ -3218,7 +3205,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "devOptional": true, + "dev": true, "engines": { "node": ">=6" } @@ -3305,7 +3292,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "devOptional": true, + "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3319,7 +3306,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.8.0" } @@ -3375,6 +3362,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, "engines": { "node": ">=6" } @@ -3383,7 +3371,7 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "devOptional": true, + "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -3392,7 +3380,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "devOptional": true + "dev": true }, "node_modules/colord": { "version": "2.9.3", @@ -3435,13 +3423,13 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "devOptional": true + "dev": true }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "devOptional": true, + "dev": true, "dependencies": { "@types/parse-json": "^4.0.0", "import-fresh": "^3.2.1", @@ -3897,6 +3885,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dev": true, "dependencies": { "@babel/runtime": "^7.8.7", "csstype": "^3.0.2" @@ -3996,7 +3985,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "devOptional": true, + "dev": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -4191,7 +4180,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=10" }, @@ -4881,7 +4870,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "devOptional": true + "dev": true }, "node_modules/find-up": { "version": "5.0.0", @@ -5033,7 +5022,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "devOptional": true, + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5267,7 +5256,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "devOptional": true, + "dev": true, "engines": { "node": ">=4" } @@ -5331,7 +5320,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "devOptional": true, + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -5348,7 +5337,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "devOptional": true, + "dev": true, "dependencies": { "react-is": "^16.7.0" } @@ -5357,7 +5346,7 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "devOptional": true + "dev": true }, "node_modules/html-encoding-sniffer": { "version": "4.0.0", @@ -5464,7 +5453,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "devOptional": true, + "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -5536,7 +5525,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "devOptional": true + "dev": true }, "node_modules/is-bigint": { "version": "1.0.4", @@ -5597,7 +5586,7 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "devOptional": true, + "dev": true, "dependencies": { "hasown": "^2.0.0" }, @@ -6087,7 +6076,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "devOptional": true + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6168,7 +6157,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "devOptional": true + "dev": true }, "node_modules/linkify-it": { "version": "5.0.0", @@ -6785,7 +6774,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "devOptional": true, + "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -6797,7 +6786,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "devOptional": true, + "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -6853,7 +6842,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "devOptional": true + "dev": true }, "node_modules/path-scurry": { "version": "1.11.1", @@ -6884,7 +6873,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" } @@ -7855,6 +7844,7 @@ "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dev": true, "dependencies": { "@babel/runtime": "^7.5.5", "dom-helpers": "^5.0.1", @@ -7951,7 +7941,7 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "devOptional": true, + "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -7968,7 +7958,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "devOptional": true, + "dev": true, "engines": { "node": ">=4" } @@ -8293,7 +8283,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -8555,7 +8545,8 @@ "node_modules/stylis": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "dev": true }, "node_modules/sucrase": { "version": "3.35.0", @@ -8614,7 +8605,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "devOptional": true, + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -8626,7 +8617,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 0.4" }, @@ -9719,9 +9710,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "devOptional": true, "license": "MIT", "engines": { @@ -9773,7 +9764,7 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 6" } diff --git a/fission/package.json b/fission/package.json index 126efa86f7..176620737b 100644 --- a/fission/package.json +++ b/fission/package.json @@ -20,9 +20,6 @@ }, "dependencies": { "@barclah/jolt-physics": "^0.19.3", - "@mui/base": "^5.0.0-beta.40", - "@mui/icons-material": "^5.15.20", - "@mui/system": "^5.15.20", "@react-three/drei": "^9.96.5", "@react-three/fiber": "^8.15.15", "@vitest/coverage-v8": "^1.6.0", diff --git a/fission/prettier.config.js b/fission/prettier.config.js index 11920b1227..3300a59e04 100644 --- a/fission/prettier.config.js +++ b/fission/prettier.config.js @@ -9,7 +9,6 @@ const config = { bracketSpacing: true, bracketSameLine: false, arrowParens: "avoid", - printWidth: 120 } export default config; diff --git a/fission/src/Synthesis.tsx b/fission/src/Synthesis.tsx index b681af182b..f3569c5598 100644 --- a/fission/src/Synthesis.tsx +++ b/fission/src/Synthesis.tsx @@ -1,71 +1,74 @@ -import Scene from "./components/Scene.tsx" -import MirabufSceneObject from "./mirabuf/MirabufSceneObject.ts" -import { LoadMirabufRemote } from "./mirabuf/MirabufLoader.ts" -import { mirabuf } from "./proto/mirabuf" -import MirabufParser, { ParseErrorSeverity } from "./mirabuf/MirabufParser.ts" -import MirabufInstance from "./mirabuf/MirabufInstance.ts" -import { AnimatePresence } from "framer-motion" +import Scene from '@/components/Scene.tsx'; +import MirabufSceneObject from './mirabuf/MirabufSceneObject.ts'; +import { LoadMirabufRemote } from './mirabuf/MirabufLoader.ts'; +import { mirabuf } from './proto/mirabuf'; +import MirabufParser, { ParseErrorSeverity } from './mirabuf/MirabufParser.ts'; +import MirabufInstance from './mirabuf/MirabufInstance.ts'; +import { AnimatePresence, motion } from "framer-motion" import { ReactElement, useEffect } from "react" -import { ModalControlProvider, useModalManager } from "./ModalContext" -import { PanelControlProvider, usePanelManager } from "./PanelContext" -import { useTheme } from "./ThemeContext" -import { ToastContainer, ToastProvider } from "./ToastContext" +import { ModalControlProvider, useModalManager } from "@/ui/ModalContext" +import { PanelControlProvider, usePanelManager } from "@/ui/PanelContext" +import { useTheme } from "@/ui/ThemeContext" +import { ToastContainer, ToastProvider } from "@/ui/ToastContext" import { TOOLTIP_DURATION, TooltipControl, TooltipControlProvider, TooltipType, useTooltipManager, -} from "./TooltipContext" -import MainHUD from "./components/MainHUD" -import DownloadAssetsModal from "./modals/DownloadAssetsModal" -import ExitSynthesisModal from "./modals/ExitSynthesisModal" -import MatchResultsModal from "./modals/MatchResultsModal" -import UpdateAvailableModal from "./modals/UpdateAvailableModal" -import ViewModal from "./modals/ViewModal" -import ConnectToMultiplayerModal from "./modals/aether/ConnectToMultiplayerModal" -import ServerHostingModal from "./modals/aether/ServerHostingModal" -import ChangeInputsModal from "./modals/configuring/ChangeInputsModal" -import ChooseMultiplayerModeModal from "./modals/configuring/ChooseMultiplayerModeModal" -import ChooseSingleplayerModeModal from "./modals/configuring/ChooseSingleplayerModeModal" -import ConfigMotorModal from "./modals/configuring/ConfigMotorModal" -import DrivetrainModal from "./modals/configuring/DrivetrainModal" -import PracticeSettingsModal from "./modals/configuring/PracticeSettingsModal" -import RoboRIOModal from "./modals/configuring/RoboRIOModal" -import SettingsModal from "./modals/configuring/SettingsModal" -import RCConfigEncoderModal from "./modals/configuring/rio-config/RCConfigEncoderModal" -import RCConfigPwmGroupModal from "./modals/configuring/rio-config/RCConfigPwmGroupModal" -import RCCreateDeviceModal from "./modals/configuring/rio-config/RCCreateDeviceModal" -import DeleteAllThemesModal from "./modals/configuring/theme-editor/DeleteAllThemesModal" -import DeleteThemeModal from "./modals/configuring/theme-editor/DeleteThemeModal" -import NewThemeModal from "./modals/configuring/theme-editor/NewThemeModal" -import ThemeEditorModal from "./modals/configuring/theme-editor/ThemeEditorModal" -import MatchModeModal from "./modals/spawning/MatchModeModal" -import RobotSwitchPanel from "./panels/RobotSwitchPanel" -import SpawnLocationsPanel from "./panels/SpawnLocationPanel" -import ConfigureGamepiecePickupPanel from "./panels/configuring/ConfigureGamepiecePickupPanel" -import ConfigureShotTrajectoryPanel from "./panels/configuring/ConfigureShotTrajectoryPanel" -import ScoringZonesPanel from "./panels/configuring/scoring/ScoringZonesPanel" -import ZoneConfigPanel from "./panels/configuring/scoring/ZoneConfigPanel" -import ScoreboardPanel from "./panels/information/ScoreboardPanel" -import DriverStationPanel from "./panels/simulation/DriverStationPanel" -import ManageAssembliesModal from "./modals/spawning/ManageAssembliesModal.tsx" -import World from "./systems/World.ts" -import { AddRobotsModal, AddFieldsModal, SpawningModal } from "./modals/spawning/SpawningModals.tsx" -import ImportMirabufModal from "./modals/mirabuf/ImportMirabufModal.tsx" - -const DEFAULT_MIRA_PATH = "/api/mira/Robots/Team 2471 (2018)_v7.mira" +} from "@/ui/TooltipContext" +import MainHUD from "@/components/MainHUD" +import DownloadAssetsModal from "@/modals/DownloadAssetsModal" +import ExitSynthesisModal from "@/modals/ExitSynthesisModal" +import MatchResultsModal from "@/modals/MatchResultsModal" +import UpdateAvailableModal from "@/modals/UpdateAvailableModal" +import ViewModal from "@/modals/ViewModal" +import ConnectToMultiplayerModal from "@/modals/aether/ConnectToMultiplayerModal" +import ServerHostingModal from "@/modals/aether/ServerHostingModal" +import ChangeInputsModal from "@/modals/configuring/ChangeInputsModal" +import ChooseMultiplayerModeModal from "@/modals/configuring/ChooseMultiplayerModeModal" +import ChooseSingleplayerModeModal from "@/modals/configuring/ChooseSingleplayerModeModal" +import ConfigMotorModal from "@/modals/configuring/ConfigMotorModal" +import DrivetrainModal from "@/modals/configuring/DrivetrainModal" +import PracticeSettingsModal from "@/modals/configuring/PracticeSettingsModal" +import RoboRIOModal from "@/modals/configuring/RoboRIOModal" +import SettingsModal from "@/modals/configuring/SettingsModal" +import RCConfigEncoderModal from "@/modals/configuring/rio-config/RCConfigEncoderModal" +import RCConfigPwmGroupModal from "@/modals/configuring/rio-config/RCConfigPwmGroupModal" +import RCCreateDeviceModal from "@/modals/configuring/rio-config/RCCreateDeviceModal" +import DeleteAllThemesModal from "@/modals/configuring/theme-editor/DeleteAllThemesModal" +import DeleteThemeModal from "@/modals/configuring/theme-editor/DeleteThemeModal" +import NewThemeModal from "@/modals/configuring/theme-editor/NewThemeModal" +import ThemeEditorModal from "@/modals/configuring/theme-editor/ThemeEditorModal" +import MatchModeModal from "@/modals/spawning/MatchModeModal" +import RobotSwitchPanel from "@/panels/RobotSwitchPanel" +import SpawnLocationsPanel from "@/panels/SpawnLocationPanel" +import ConfigureGamepiecePickupPanel from "@/panels/configuring/ConfigureGamepiecePickupPanel" +import ConfigureShotTrajectoryPanel from "@/panels/configuring/ConfigureShotTrajectoryPanel" +import ScoringZonesPanel from "@/panels/configuring/scoring/ScoringZonesPanel" +import ZoneConfigPanel from "@/panels/configuring/scoring/ZoneConfigPanel" +import ScoreboardPanel from "@/panels/information/ScoreboardPanel" +import DriverStationPanel from "@/panels/simulation/DriverStationPanel" +import ManageAssembliesModal from '@/modals/spawning/ManageAssembliesModal.tsx'; +import World from '@/systems/World.ts'; +import { AddRobotsModal, AddFieldsModal, SpawningModal } from '@/modals/spawning/SpawningModals.tsx'; +import ImportMirabufModal from '@/modals/mirabuf/ImportMirabufModal.tsx'; + +const DEFAULT_MIRA_PATH = '/api/mira/Robots/Team 2471 (2018)_v7.mira'; function Synthesis() { - const urlParams = new URLSearchParams(document.location.search) - if (urlParams.has("code")) { - const code = urlParams.get("code") + + const urlParams = new URLSearchParams(document.location.search); + if (urlParams.has('code')) { + const code = urlParams.get('code') window.opener?.setAuthCode(code) window.close() } - - const { openModal, closeModal, getActiveModalElement } = useModalManager(initialModals) - const { openPanel, closePanel, closeAllPanels, getActivePanelElements } = usePanelManager(initialPanels) + + const { openModal, closeModal, getActiveModalElement } = + useModalManager(initialModals) + const { openPanel, closePanel, closeAllPanels, getActivePanelElements } = + usePanelManager(initialPanels) const { showTooltip } = useTooltipManager() const { currentTheme, applyTheme } = useTheme() @@ -74,64 +77,141 @@ function Synthesis() { applyTheme(currentTheme) }, [currentTheme, applyTheme]) + const panelElements = getActivePanelElements() + + const motionPanelElements = panelElements.map((el, i) => ( + + {el} + + )) + const modalElement = getActiveModalElement() + const motionModalElement = + modalElement == null ? null : ( + + {getActiveModalElement()} + + ) - useEffect(() => { - World.InitWorld() + + + useEffect(() => { + + World.InitWorld(); - let mira_path = DEFAULT_MIRA_PATH + let mira_path = DEFAULT_MIRA_PATH; - const urlParams = new URLSearchParams(document.location.search) + const urlParams = new URLSearchParams(document.location.search); if (urlParams.has("mira")) { - mira_path = `test_mira/${urlParams.get("mira")!}` - console.debug(`Selected Mirabuf File: ${mira_path}`) + mira_path = `test_mira/${urlParams.get("mira")!}`; + console.debug(`Selected Mirabuf File: ${mira_path}`); } console.log(urlParams) - const setup = async () => { - const miraAssembly = await LoadMirabufRemote(mira_path) - .catch(_ => LoadMirabufRemote(DEFAULT_MIRA_PATH)) - .catch(console.error) + const setup = async () => { + + const miraAssembly = await LoadMirabufRemote(mira_path) + .catch( + _ => LoadMirabufRemote(DEFAULT_MIRA_PATH) + ).catch(console.error); await (async () => { if (!miraAssembly || !(miraAssembly instanceof mirabuf.Assembly)) { - return + return; } - - const parser = new MirabufParser(miraAssembly) + + const parser = new MirabufParser(miraAssembly); if (parser.maxErrorSeverity >= ParseErrorSeverity.Unimportable) { - console.error(`Assembly Parser produced significant errors for '${miraAssembly.info!.name!}'`) - return + console.error(`Assembly Parser produced significant errors for '${miraAssembly.info!.name!}'`); + return; } + + const mirabufSceneObject = new MirabufSceneObject(new MirabufInstance(parser)); + World.SceneRenderer.RegisterSceneObject(mirabufSceneObject); + })(); + }; + setup(); - const mirabufSceneObject = new MirabufSceneObject(new MirabufInstance(parser)) - World.SceneRenderer.RegisterSceneObject(mirabufSceneObject) - })() - } - setup() - - let mainLoopHandle = 0 - const mainLoop = () => { - mainLoopHandle = requestAnimationFrame(mainLoop) - - World.UpdateWorld() - } - mainLoop() + let mainLoopHandle = 0; + const mainLoop = () => { + mainLoopHandle = requestAnimationFrame(mainLoop); + + World.UpdateWorld(); + }; + mainLoop(); // Cleanup return () => { // TODO: Teardown literally everything - cancelAnimationFrame(mainLoopHandle) - World.DestroyWorld() + cancelAnimationFrame(mainLoopHandle); + World.DestroyWorld(); // World.SceneRenderer.RemoveAllSceneObjects(); - } - }, []) + }; + }, []); return ( { + showTooltip={( + type: TooltipType, + controls?: TooltipControl[], + duration: number = TOOLTIP_DURATION + ) => { showTooltip(type, controls, duration) }} > @@ -149,10 +229,11 @@ function Synthesis() { }} > - + - {panelElements.length > 0 && panelElements} - {modalElement &&
{modalElement}
} + {motionPanelElements.length > 0 && + motionPanelElements} + {motionModalElement && motionModalElement}
@@ -195,7 +276,7 @@ const initialModals = [ ] const initialPanels: ReactElement[] = [ - , + , , , , @@ -205,4 +286,4 @@ const initialPanels: ReactElement[] = [ , ] -export default Synthesis +export default Synthesis; diff --git a/fission/src/Window.d.ts b/fission/src/Window.d.ts index 89e3c41f21..4fab77b53a 100644 --- a/fission/src/Window.d.ts +++ b/fission/src/Window.d.ts @@ -1,3 +1,3 @@ declare interface Window { - setAuthCode(code: string): void -} + setAuthCode(code: string): void; +} \ No newline at end of file diff --git a/fission/src/aps/APS.ts b/fission/src/aps/APS.ts index 065c976e9d..233fc2099a 100644 --- a/fission/src/aps/APS.ts +++ b/fission/src/aps/APS.ts @@ -1,39 +1,40 @@ import { MainHUD_AddToast } from "@/components/MainHUD" import { Random } from "@/util/Random" -const APS_AUTH_KEY = "aps_auth" -const APS_USER_INFO_KEY = "aps_user_info" +const APS_AUTH_KEY = 'aps_auth' +const APS_USER_INFO_KEY = 'aps_user_info' -export const APS_USER_INFO_UPDATE_EVENT = "aps_user_info_update" +export const APS_USER_INFO_UPDATE_EVENT = 'aps_user_info_update' const delay = 1000 const authCodeTimeout = 200000 -const CLIENT_ID = "GCxaewcLjsYlK8ud7Ka9AKf9dPwMR3e4GlybyfhAK2zvl3tU" -const CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +const CLIENT_ID = 'GCxaewcLjsYlK8ud7Ka9AKf9dPwMR3e4GlybyfhAK2zvl3tU' +const CHARACTERS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' let lastCall = Date.now() interface APSAuth { - access_token: string - refresh_token: string - expires_in: number - token_type: number + access_token: string; + refresh_token: string; + expires_in: number; + token_type: number; } interface APSUserInfo { - name: string - picture: string - givenName: string + name: string; + picture: string; + givenName: string; } class APS { + static authCode: string | undefined = undefined static get auth(): APSAuth | undefined { const res = window.localStorage.getItem(APS_AUTH_KEY) try { - return res ? (JSON.parse(res) as APSAuth) : undefined + return res ? JSON.parse(res) as APSAuth : undefined } catch (e) { console.warn(`Failed to parse stored APS auth data: ${e}`) return undefined @@ -52,7 +53,7 @@ class APS { const res = window.localStorage.getItem(APS_USER_INFO_KEY) try { - return res ? (JSON.parse(res) as APSUserInfo) : undefined + return res ? JSON.parse(res) as APSUserInfo : undefined } catch (e) { console.warn(`Failed to parse stored APS user info: ${e}`) return undefined @@ -79,32 +80,32 @@ class APS { ? `http://localhost:3000${import.meta.env.BASE_URL}` : `https://synthesis.autodesk.com${import.meta.env.BASE_URL}` - const [codeVerifier, codeChallenge] = await this.codeChallenge() + const [ codeVerifier, codeChallenge ] = await this.codeChallenge(); const dataParams = [ - ["response_type", "code"], - ["client_id", CLIENT_ID], - ["redirect_uri", callbackUrl], - ["scope", "data:read"], - ["nonce", Date.now().toString()], - ["prompt", "login"], - ["code_challenge", codeChallenge], - ["code_challenge_method", "S256"], + ['response_type', 'code'], + ['client_id', CLIENT_ID], + ['redirect_uri', callbackUrl], + ['scope', 'data:read'], + ['nonce', Date.now().toString()], + ['prompt', 'login'], + ['code_challenge', codeChallenge], + ['code_challenge_method', 'S256'] ] - const data = dataParams.map(x => `${x[0]}=${encodeURIComponent(x[1])}`).join("&") + const data = dataParams.map(x => `${x[0]}=${encodeURIComponent(x[1])}`).join('&') window.open(`https://developer.api.autodesk.com/authentication/v2/authorize?${data}`) - + const searchStart = Date.now() const func = () => { if (Date.now() - searchStart > authCodeTimeout) { - console.debug("Auth Code Timeout") + console.debug('Auth Code Timeout') return } if (this.authCode) { - const code = this.authCode - this.authCode = undefined + const code = this.authCode; + this.authCode = undefined; this.convertAuthToken(code, codeVerifier) } else { @@ -116,57 +117,51 @@ class APS { } static async convertAuthToken(code: string, codeVerifier: string) { - const authUrl = import.meta.env.DEV - ? `http://localhost:3003/api/aps/code/` - : `https://synthesis.autodesk.com/api/aps/code/` - fetch(`${authUrl}?code=${code}&code_verifier=${codeVerifier}`) - .then(x => x.json()) - .then(x => { - this.auth = x.response as APSAuth - }) - .then(() => { - console.log("Preloading user info") - if (this.auth) { - this.loadUserInfo(this.auth!).then(async () => { - if (APS.userInfo) { - MainHUD_AddToast("info", "ADSK Login", `Hello, ${APS.userInfo.givenName}`) - } - }) - } - }) + const authUrl = import.meta.env.DEV ? `http://localhost:3003/api/aps/code/` : `https://synthesis.autodesk.com/api/aps/code/` + fetch(`${authUrl}?code=${code}&code_verifier=${codeVerifier}`).then(x => x.json()).then(x => { + this.auth = x.response as APSAuth; + }).then(() => { + console.log('Preloading user info') + if (this.auth) { + this.loadUserInfo(this.auth!).then(async () => { + if (APS.userInfo) { + MainHUD_AddToast('info', 'ADSK Login', `Hello, ${APS.userInfo.givenName}`) + } + }) + } + }) } static async loadUserInfo(auth: APSAuth) { - console.log("Loading user information") - await fetch("https://api.userprofile.autodesk.com/userinfo", { - method: "GET", + console.log('Loading user information') + await fetch('https://api.userprofile.autodesk.com/userinfo', { + method: 'GET', headers: { - Authorization: auth.access_token, - }, - }) - .then(x => x.json()) - .then(x => { - const info: APSUserInfo = { - name: x.name, - givenName: x.given_name, - picture: x.picture, - } + 'Authorization': auth.access_token + } + }).then(x => x.json()).then(x => { - this.userInfo = info - }) + const info: APSUserInfo = { + name: x.name, + givenName: x.given_name, + picture: x.picture + } + + this.userInfo = info; + }) } static async codeChallenge() { const codeVerifier = this.genRandomString(50) - - const msgBuffer = new TextEncoder().encode(codeVerifier) - const hashBuffer = await crypto.subtle.digest("SHA-256", msgBuffer) - - let str = "" - new Uint8Array(hashBuffer).forEach(x => (str = str + String.fromCharCode(x))) - const codeChallenge = btoa(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "") - - return [codeVerifier, codeChallenge] + + const msgBuffer = new TextEncoder().encode(codeVerifier); + const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer); + + let str = ''; + (new Uint8Array(hashBuffer)).forEach(x => str = str + String.fromCharCode(x)) + const codeChallenge = btoa(str).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') + + return [ codeVerifier, codeChallenge ] } static genRandomString(len: number): string { @@ -175,8 +170,8 @@ class APS { const c = CHARACTERS.charAt(Math.abs(Random() * 10000) % CHARACTERS.length) s.push(c) } - - return s.join("") + + return s.join('') } } @@ -184,4 +179,4 @@ Window.prototype.setAuthCode = (code: string) => { APS.authCode = code } -export default APS +export default APS \ No newline at end of file diff --git a/fission/src/aps/APSDataManagement.ts b/fission/src/aps/APSDataManagement.ts index 0c6c4a6cec..264f095872 100644 --- a/fission/src/aps/APSDataManagement.ts +++ b/fission/src/aps/APSDataManagement.ts @@ -1,18 +1,18 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import APS from "./APS" +import APS from "./APS"; -export const FOLDER_DATA_TYPE = "folders" -export const ITEM_DATA_TYPE = "items" +export const FOLDER_DATA_TYPE = 'folders' +export const ITEM_DATA_TYPE = 'items' export interface Hub { - id: string - name: string + id: string; + name: string; } export interface Project { - id: string - name: string - folder: Folder + id: string; + name: string; + folder: Folder; } export class Data { @@ -65,24 +65,20 @@ export async function getHubs(): Promise { } try { - return await fetch("https://developer.api.autodesk.com/project/v1/hubs", { - method: "GET", + return await fetch('https://developer.api.autodesk.com/project/v1/hubs', { + method: 'GET', headers: { - Authorization: `Bearer ${auth.access_token}`, - }, + 'Authorization': `Bearer ${auth.access_token}` + } + }).then(x => x.json()).then(x => { + if ((x.data as any[]).length > 0) { + return (x.data as any[]).map(y => { return { id: y.id, name: y.attributes.name }}) + } else { + return undefined + } }) - .then(x => x.json()) - .then(x => { - if ((x.data as any[]).length > 0) { - return (x.data as any[]).map(y => { - return { id: y.id, name: y.attributes.name } - }) - } else { - return undefined - } - }) } catch (e) { - console.error("Failed to get hubs") + console.error('Failed to get hubs') return undefined } } @@ -95,27 +91,25 @@ export async function getProjects(hub: Hub): Promise { try { return await fetch(`https://developer.api.autodesk.com/project/v1/hubs/${hub.id}/projects/`, { - method: "GET", + method: 'GET', headers: { - Authorization: `Bearer ${auth.access_token}`, - }, + 'Authorization': `Bearer ${auth.access_token}` + } + }).then(x => x.json()).then(x => { + if ((x.data as any[]).length > 0) { + return (x.data as any[]).map(y => { + return { + id: y.id, + name: y.attributes.name, + folder: new Folder(y.relationships.rootFolder.data) + } + }) + } else { + return undefined + } }) - .then(x => x.json()) - .then(x => { - if ((x.data as any[]).length > 0) { - return (x.data as any[]).map(y => { - return { - id: y.id, - name: y.attributes.name, - folder: new Folder(y.relationships.rootFolder.data), - } - }) - } else { - return undefined - } - }) } catch (e) { - console.error("Failed to get hubs") + console.error('Failed to get hubs') return undefined } } @@ -127,36 +121,31 @@ export async function getFolderData(project: Project, folder: Folder): Promise x.json()).then(x => { + console.log('Raw Folder Data') + console.log(x) + if ((x.data as any[]).length > 0) { + return (x.data as any[]).map(y => { + if (y.type == ITEM_DATA_TYPE) { + return new Item(y) + } else if (y.type == FOLDER_DATA_TYPE) { + return new Folder(y) + } else { + return new Data(y) + } + }) + } else { + console.log('No data in folder') + return undefined } - ) - .then(x => x.json()) - .then(x => { - console.log("Raw Folder Data") - console.log(x) - if ((x.data as any[]).length > 0) { - return (x.data as any[]).map(y => { - if (y.type == ITEM_DATA_TYPE) { - return new Item(y) - } else if (y.type == FOLDER_DATA_TYPE) { - return new Folder(y) - } else { - return new Data(y) - } - }) - } else { - console.log("No data in folder") - return undefined - } - }) + }) } catch (e) { - console.error("Failed to get folder data") + console.error('Failed to get folder data') return undefined } -} +} \ No newline at end of file diff --git a/fission/src/index.css b/fission/src/index.css index eb75e17d81..3bb0c1be9f 100644 --- a/fission/src/index.css +++ b/fission/src/index.css @@ -3,71 +3,71 @@ @tailwind utilities; :root { - /* font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; */ - font-family: "Artifakt"; - line-height: 1.5; - font-weight: 400; + /* font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; */ + font-family: 'Artifakt'; + line-height: 1.5; + font-weight: 400; - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; + font-weight: 500; + color: #646cff; + text-decoration: inherit; } a:hover { - color: #535bf2; + color: #535bf2; } body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; } h1 { - font-size: 3.2em; - line-height: 1.1; + font-size: 3.2em; + line-height: 1.1; } button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; } button:hover { - border-color: #646cff; + border-color: #646cff; } button:focus, button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; + outline: 4px auto -webkit-focus-ring-color; } @media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } } diff --git a/fission/src/main.tsx b/fission/src/main.tsx index df3510831d..e8fc2b831f 100644 --- a/fission/src/main.tsx +++ b/fission/src/main.tsx @@ -5,58 +5,24 @@ import "./index.css" const initialThemeName = "Default" const defaultColors: Theme = { - InteractiveElementSolid: { - color: { r: 250, g: 162, b: 27, a: 1 }, - above: [], - }, - InteractiveElementLeft: { - color: { r: 224, g: 130, b: 65, a: 1 }, - above: ["Background", "BackgroundSecondary"], - }, - InteractiveElementRight: { - color: { r: 218, g: 102, b: 89, a: 1 }, - above: ["Background", "BackgroundSecondary"], - }, + InteractiveElementSolid: { color: { r: 250, g: 162, b: 27, a: 1 }, above: [] }, + InteractiveElementLeft: { color: { r: 224, g: 130, b: 65, a: 1 }, above: ['Background', 'BackgroundSecondary'] }, + InteractiveElementRight: { color: { r: 218, g: 102, b: 89, a: 1 }, above: ['Background', 'BackgroundSecondary'] }, Background: { color: { r: 0, g: 0, b: 0, a: 1 }, above: [] }, BackgroundSecondary: { color: { r: 30, g: 30, b: 30, a: 1 }, above: [] }, InteractiveBackground: { color: { r: 52, g: 58, b: 64, a: 1 }, above: [] }, - MainText: { - color: { r: 255, g: 255, b: 255, a: 1 }, - above: [ - "Background", - "BackgroundSecondary", - "BackgroundHUD", - "InteractiveBackground", - "InteractiveElementLeft", - "InteractiveElementRight", - ], - }, + MainText: { color: { r: 255, g: 255, b: 255, a: 1 }, above: ['Background', 'BackgroundSecondary', 'BackgroundHUD', 'InteractiveBackground', 'InteractiveElementLeft', 'InteractiveElementRight'] }, Scrollbar: { color: { r: 170, g: 170, b: 170, a: 1 }, above: [] }, AcceptButton: { color: { r: 71, g: 138, b: 226, a: 1 }, above: [] }, CancelButton: { color: { r: 231, g: 85, b: 81, a: 1 }, above: [] }, - InteractiveElementText: { - color: { r: 255, g: 255, b: 255, a: 1 }, - above: [], - }, - AcceptCancelButtonText: { - color: { r: 0, g: 0, b: 0, a: 1 }, - above: ["AcceptButton", "CancelButton"], - }, + InteractiveElementText: { color: { r: 255, g: 255, b: 255, a: 1 }, above: [] }, + AcceptCancelButtonText: { color: { r: 0, g: 0, b: 0, a: 1 }, above: ['AcceptButton', 'CancelButton'] }, BackgroundHUD: { color: { r: 23, g: 23, b: 23, a: 1 }, above: [] }, InteractiveHover: { color: { r: 150, g: 150, b: 150, a: 1 }, above: [] }, InteractiveSelect: { color: { r: 100, g: 100, b: 100, a: 1 }, above: [] }, - Icon: { - color: { r: 255, g: 255, b: 255, a: 1 }, - above: ["Background", "BackgroundSecondary", "InteractiveBackground"], - }, - MainHUDIcon: { - color: { r: 255, g: 255, b: 255, a: 1 }, - above: ["BackgroundHUD"], - }, - MainHUDCloseIcon: { - color: { r: 0, g: 0, b: 0, a: 1 }, - above: ["InteractiveElementRight", "#ffffff"], - }, + Icon: { color: { r: 255, g: 255, b: 255, a: 1 }, above: ['Background', 'BackgroundSecondary', 'InteractiveBackground'] }, + MainHUDIcon: { color: { r: 255, g: 255, b: 255, a: 1 }, above: ['BackgroundHUD'] }, + MainHUDCloseIcon: { color: { r: 0, g: 0, b: 0, a: 1 }, above: ['InteractiveElementRight', '#ffffff'] }, HighlightHover: { color: { r: 89, g: 255, b: 133, a: 1 }, above: [] }, HighlightSelect: { color: { r: 255, g: 89, b: 133, a: 1 }, above: [] }, SkyboxTop: { color: { r: 255, g: 255, b: 255, a: 1 }, above: [] }, @@ -73,7 +39,11 @@ const themes = { } ReactDOM.createRoot(document.getElementById("root")!).render( - + ) diff --git a/fission/src/mirabuf/MirabufInstance.ts b/fission/src/mirabuf/MirabufInstance.ts index 83307eb6cb..495f89c11e 100644 --- a/fission/src/mirabuf/MirabufInstance.ts +++ b/fission/src/mirabuf/MirabufInstance.ts @@ -1,222 +1,204 @@ -import * as THREE from "three" +import * as THREE from 'three'; import { mirabuf } from "../proto/mirabuf" -import MirabufParser, { ParseErrorSeverity } from "./MirabufParser.ts" -import World from "@/systems/World.ts" +import MirabufParser, { ParseErrorSeverity } from './MirabufParser.ts'; +import World from '@/systems/World.ts'; export enum MaterialStyle { Regular = 0, Normals = 1, - Toon = 2, + Toon = 2 } export const matToString = (mat: THREE.Matrix4) => { - const arr = mat.toArray() - return ( - `[\n${arr[0].toFixed(4)}, ${arr[4].toFixed(4)}, ${arr[8].toFixed(4)}, ${arr[12].toFixed(4)},\n` + - `${arr[1].toFixed(4)}, ${arr[5].toFixed(4)}, ${arr[9].toFixed(4)}, ${arr[13].toFixed(4)},\n` + - `${arr[2].toFixed(4)}, ${arr[6].toFixed(4)}, ${arr[10].toFixed(4)}, ${arr[14].toFixed(4)},\n` + - `${arr[3].toFixed(4)}, ${arr[7].toFixed(4)}, ${arr[11].toFixed(4)}, ${arr[15].toFixed(4)},\n]` - ) + const arr = mat.toArray(); + return `[\n${arr[0].toFixed(4)}, ${arr[4].toFixed(4)}, ${arr[8].toFixed(4)}, ${arr[12].toFixed(4)},\n` + + `${arr[1].toFixed(4)}, ${arr[5].toFixed(4)}, ${arr[9].toFixed(4)}, ${arr[13].toFixed(4)},\n` + + `${arr[2].toFixed(4)}, ${arr[6].toFixed(4)}, ${arr[10].toFixed(4)}, ${arr[14].toFixed(4)},\n` + + `${arr[3].toFixed(4)}, ${arr[7].toFixed(4)}, ${arr[11].toFixed(4)}, ${arr[15].toFixed(4)},\n]` } export const miraMatToString = (mat: mirabuf.ITransform) => { - const arr = mat.spatialMatrix! - return ( - `[\n${arr[0].toFixed(4)}, ${arr[1].toFixed(4)}, ${arr[2].toFixed(4)}, ${arr[3].toFixed(4)},\n` + - `${arr[4].toFixed(4)}, ${arr[5].toFixed(4)}, ${arr[6].toFixed(4)}, ${arr[7].toFixed(4)},\n` + - `${arr[8].toFixed(4)}, ${arr[9].toFixed(4)}, ${arr[10].toFixed(4)}, ${arr[11].toFixed(4)},\n` + - `${arr[12].toFixed(4)}, ${arr[13].toFixed(4)}, ${arr[14].toFixed(4)}, ${arr[15].toFixed(4)},\n]` - ) + const arr = mat.spatialMatrix!; + return `[\n${arr[0].toFixed(4)}, ${arr[1].toFixed(4)}, ${arr[2].toFixed(4)}, ${arr[3].toFixed(4)},\n` + + `${arr[4].toFixed(4)}, ${arr[5].toFixed(4)}, ${arr[6].toFixed(4)}, ${arr[7].toFixed(4)},\n` + + `${arr[8].toFixed(4)}, ${arr[9].toFixed(4)}, ${arr[10].toFixed(4)}, ${arr[11].toFixed(4)},\n` + + `${arr[12].toFixed(4)}, ${arr[13].toFixed(4)}, ${arr[14].toFixed(4)}, ${arr[15].toFixed(4)},\n]` } -let nextFillerMaterial = 0 +let nextFillerMaterial = 0; const fillerMaterials = [ new THREE.MeshToonMaterial({ - color: 0xe32b50, + color: 0xe32b50 }), new THREE.MeshToonMaterial({ - color: 0x4ccf57, + color: 0x4ccf57 }), new THREE.MeshToonMaterial({ - color: 0xcf4cca, - }), + color: 0xcf4cca + }) ] const transformVerts = (mesh: mirabuf.IMesh) => { - const newVerts = new Float32Array(mesh.verts!.length) + const newVerts = new Float32Array(mesh.verts!.length); for (let i = 0; i < mesh.verts!.length; i += 3) { - newVerts[i] = mesh.verts!.at(i)! / 100.0 - newVerts[i + 1] = mesh.verts!.at(i + 1)! / 100.0 - newVerts[i + 2] = mesh.verts!.at(i + 2)! / 100.0 + newVerts[i] = mesh.verts!.at(i)! / 100.0; + newVerts[i + 1] = mesh.verts!.at(i + 1)! / 100.0; + newVerts[i + 2] = mesh.verts!.at(i + 2)! / 100.0; } - return newVerts + return newVerts; } const transformNorms = (mesh: mirabuf.IMesh) => { - const newNorms = new Float32Array(mesh.normals!.length) + const newNorms = new Float32Array(mesh.normals!.length); for (let i = 0; i < mesh.normals!.length; i += 3) { - const normLength = Math.sqrt( - mesh.normals!.at(i)! * mesh.normals!.at(i)! + - mesh.normals!.at(i + 1)! * mesh.normals!.at(i + 1)! + - mesh.normals!.at(i + 2)! * mesh.normals!.at(i + 2)! - ) - - newNorms[i] = mesh.normals!.at(i)! / normLength - newNorms[i + 1] = mesh.normals!.at(i + 1)! / normLength - newNorms[i + 2] = mesh.normals!.at(i + 2)! / normLength + const normLength = Math.sqrt(mesh.normals!.at(i)! * mesh.normals!.at(i)! + + mesh.normals!.at(i + 1)! * mesh.normals!.at(i + 1)! + + mesh.normals!.at(i + 2)! * mesh.normals!.at(i + 2)! + ); + + newNorms[i] = mesh.normals!.at(i)! / normLength; + newNorms[i + 1] = mesh.normals!.at(i + 1)! / normLength; + newNorms[i + 2] = mesh.normals!.at(i + 2)! / normLength; } - return newNorms + return newNorms; } const transformGeometry = (geometry: THREE.BufferGeometry, mesh: mirabuf.IMesh) => { - const newVerts = transformVerts(mesh) - const newNorms = transformNorms(mesh) + const newVerts = transformVerts(mesh); + const newNorms = transformNorms(mesh); - geometry.setAttribute("position", new THREE.BufferAttribute(new Float32Array(newVerts), 3)) - geometry.setAttribute("normal", new THREE.BufferAttribute(new Float32Array(newNorms), 3)) - geometry.setAttribute("uv", new THREE.BufferAttribute(new Float32Array(mesh.uv!), 2)) - geometry.setIndex(mesh.indices!) + geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(newVerts), 3)); + geometry.setAttribute('normal', new THREE.BufferAttribute(new Float32Array(newNorms), 3)); + geometry.setAttribute('uv', new THREE.BufferAttribute(new Float32Array(mesh.uv!), 2)); + geometry.setIndex(mesh.indices!); } class MirabufInstance { - private _mirabufParser: MirabufParser - private _materials: Map - private _meshes: Map> + private _mirabufParser: MirabufParser; + private _materials: Map; + private _meshes: Map>; - public get parser() { - return this._mirabufParser - } - public get materials() { - return this._materials - } - public get meshes() { - return this._meshes - } + public get parser() { return this._mirabufParser; } + public get materials() { return this._materials; } + public get meshes() { return this._meshes; } public constructor(parser: MirabufParser, materialStyle?: MaterialStyle) { if (parser.errors.some(x => x[0] >= ParseErrorSeverity.Unimportable)) { - throw new Error("Parser has significant errors...") + throw new Error('Parser has significant errors...'); } - this._mirabufParser = parser - this._materials = new Map() - this._meshes = new Map() + this._mirabufParser = parser; + this._materials = new Map(); + this._meshes = new Map(); - this.LoadMaterials(materialStyle ?? MaterialStyle.Regular) - this.CreateMeshes() + this.LoadMaterials(materialStyle ?? MaterialStyle.Regular); + this.CreateMeshes(); } /** * Parses all mirabuf appearances into ThreeJs materials. */ private LoadMaterials(materialStyle: MaterialStyle) { - Object.entries(this._mirabufParser.assembly.data!.materials!.appearances!).forEach( - ([appearanceId, appearance]) => { - let hex = 0xe32b50 - if (appearance.albedo) { - const { A, B, G, R } = appearance.albedo - if (A && B && G && R) hex = (A << 24) | (R << 16) | (G << 8) | B - } - - let material: THREE.Material - if (materialStyle == MaterialStyle.Regular) { - material = new THREE.MeshPhongMaterial({ - color: hex, - shininess: 0.0, - }) - } else if (materialStyle == MaterialStyle.Normals) { - material = new THREE.MeshNormalMaterial() - } else if (materialStyle == MaterialStyle.Toon) { - material = World.SceneRenderer.CreateToonMaterial(hex, 5) - console.debug("Toon Material") - } + Object.entries(this._mirabufParser.assembly.data!.materials!.appearances!).forEach(([appearanceId, appearance]) => { + let hex = 0xe32b50; + if (appearance.albedo) { + const {A, B, G, R} = appearance.albedo; + if (A && B && G && R) + hex = A << 24 | R << 16 | G << 8 | B; + } - this._materials.set(appearanceId, material!) + let material: THREE.Material; + if (materialStyle == MaterialStyle.Regular) { + material = new THREE.MeshPhongMaterial({ + color: hex, + shininess: 0.0, + }); + } else if (materialStyle == MaterialStyle.Normals) { + material = new THREE.MeshNormalMaterial(); + } else if (materialStyle == MaterialStyle.Toon) { + material = World.SceneRenderer.CreateToonMaterial(hex, 5); + console.debug('Toon Material'); } - ) + + this._materials.set( + appearanceId, + material! + ); + }); } /** * Creates ThreeJS meshes from the parsed mirabuf file. */ private CreateMeshes() { - const assembly = this._mirabufParser.assembly - const instances = assembly.data!.parts!.partInstances! + const assembly = this._mirabufParser.assembly; + const instances = assembly.data!.parts!.partInstances!; - let totalMeshCount = 0 + let totalMeshCount = 0; - for (const instance of Object.values(instances) /* .filter(x => x.info!.name!.startsWith('EyeBall')) */) { - const definition = assembly.data!.parts!.partDefinitions![instance.partDefinitionReference!]! - const bodies = definition.bodies - const meshes = new Array() + for (const instance of Object.values(instances)/* .filter(x => x.info!.name!.startsWith('EyeBall')) */) { + const definition = assembly.data!.parts!.partDefinitions![instance.partDefinitionReference!]!; + const bodies = definition.bodies; + const meshes = new Array(); if (bodies) { for (const body of bodies) { - if (!body) continue - const mesh = body.triangleMesh - const geometry = new THREE.BufferGeometry() - if ( - mesh && - mesh.mesh && - mesh.mesh.verts && - mesh.mesh.normals && - mesh.mesh.uv && - mesh.mesh.indices - ) { - transformGeometry(geometry, mesh.mesh!) - - const appearanceOverride = body.appearanceOverride + if (!body) continue; + const mesh = body.triangleMesh; + const geometry = new THREE.BufferGeometry(); + if (mesh && mesh.mesh && mesh.mesh.verts && mesh.mesh.normals && mesh.mesh.uv && mesh.mesh.indices) { + transformGeometry(geometry, mesh.mesh!); + + const appearanceOverride = body.appearanceOverride; const material: THREE.Material = appearanceOverride && this._materials.has(appearanceOverride) ? this._materials.get(appearanceOverride)! - : fillerMaterials[nextFillerMaterial++ % fillerMaterials.length] + : fillerMaterials[nextFillerMaterial++ % fillerMaterials.length]; // if (NORMAL_MATERIALS) { // material = new THREE.MeshNormalMaterial(); // } - const threeMesh = new THREE.Mesh(geometry, material) - threeMesh.receiveShadow = true - threeMesh.castShadow = true - - meshes.push(threeMesh) + const threeMesh = new THREE.Mesh( geometry, material ); + threeMesh.receiveShadow = true; + threeMesh.castShadow = true; - const mat = this._mirabufParser.globalTransforms.get(instance.info!.GUID!)! - threeMesh.position.setFromMatrixPosition(mat) - threeMesh.rotation.setFromRotationMatrix(mat) + meshes.push(threeMesh); + + const mat = this._mirabufParser.globalTransforms.get(instance.info!.GUID!)!; + threeMesh.position.setFromMatrixPosition(mat); + threeMesh.rotation.setFromRotationMatrix(mat); } } } - totalMeshCount += meshes.length - this._meshes.set(instance.info!.GUID!, meshes) + totalMeshCount += meshes.length; + this._meshes.set(instance.info!.GUID!, meshes); } - console.debug(`Created '${totalMeshCount}' meshes for mira file '${this._mirabufParser.assembly.info!.name!}'`) + console.debug(`Created '${ totalMeshCount }' meshes for mira file '${this._mirabufParser.assembly.info!.name!}'`); } /** * Adds all the meshes to the ThreeJs scene. - * - * @param scene + * + * @param scene */ public AddToScene(scene: THREE.Scene) { - this._meshes.forEach(x => x.forEach(y => scene.add(y))) + this._meshes.forEach(x => x.forEach(y => scene.add(y))); } /** * Disposes of all ThreeJs scenes and materials. */ public Dispose(scene: THREE.Scene) { - this._meshes.forEach(x => - x.forEach(y => { - y.geometry.dispose() - scene.remove(y) - }) - ) - this._meshes.clear() - - this._materials.forEach(x => x.dispose()) - this._materials.clear() + this._meshes.forEach(x => x.forEach(y => { + y.geometry.dispose(); + scene.remove(y); + })); + this._meshes.clear(); + + this._materials.forEach(x => x.dispose()); + this._materials.clear(); } } -export default MirabufInstance +export default MirabufInstance; diff --git a/fission/src/mirabuf/MirabufLoader.ts b/fission/src/mirabuf/MirabufLoader.ts index e4ef42ffab..d7fd7f3f67 100644 --- a/fission/src/mirabuf/MirabufLoader.ts +++ b/fission/src/mirabuf/MirabufLoader.ts @@ -1,26 +1,21 @@ -import { mirabuf } from "../proto/mirabuf" -import Pako from "pako" -import * as fs from "fs" +import { mirabuf } from "../proto/mirabuf"; +import Pako from "pako"; +import * as fs from 'fs'; export function UnzipMira(buff: Uint8Array): Uint8Array { if (buff[0] == 31 && buff[1] == 139) { - return Pako.ungzip(buff) + return Pako.ungzip(buff); } else { - return buff + return buff; } } -export async function LoadMirabufRemote( - fetchLocation: string, - useCache: boolean = true -): Promise { - const miraBuff = await fetch(encodeURI(fetchLocation), useCache ? undefined : { cache: "no-store" }) - .then(x => x.blob()) - .then(x => x.arrayBuffer()) - const byteBuffer = UnzipMira(new Uint8Array(miraBuff)) - return mirabuf.Assembly.decode(byteBuffer) +export async function LoadMirabufRemote(fetchLocation: string, useCache: boolean = true): Promise { + const miraBuff = await fetch(encodeURI(fetchLocation), useCache ? undefined : {cache: "no-store"}).then(x => x.blob()).then(x => x.arrayBuffer()); + const byteBuffer = UnzipMira(new Uint8Array(miraBuff)); + return mirabuf.Assembly.decode(byteBuffer); } export function LoadMirabufLocal(fileLocation: string): mirabuf.Assembly { - return mirabuf.Assembly.decode(UnzipMira(new Uint8Array(fs.readFileSync(fileLocation)))) -} + return mirabuf.Assembly.decode(UnzipMira(new Uint8Array(fs.readFileSync(fileLocation)))); +} \ No newline at end of file diff --git a/fission/src/mirabuf/MirabufParser.ts b/fission/src/mirabuf/MirabufParser.ts index 7936f8ca44..f2be5033be 100644 --- a/fission/src/mirabuf/MirabufParser.ts +++ b/fission/src/mirabuf/MirabufParser.ts @@ -1,18 +1,18 @@ -import * as THREE from "three" -import { mirabuf } from "../proto/mirabuf" -import { MirabufTransform_ThreeMatrix4 } from "../util/TypeConversions" +import * as THREE from "three"; +import { mirabuf } from "../proto/mirabuf"; +import { MirabufTransform_ThreeMatrix4 } from "../util/TypeConversions"; export enum ParseErrorSeverity { Unimportable = 10, LikelyIssues = 6, ProbablyOkay = 5, - JustAWarning = 2, + JustAWarning = 2 } -export const GROUNDED_JOINT_ID = "grounded" -export const GAMEPIECE_SUFFIX = "_gp" +export const GROUNDED_JOINT_ID = 'grounded'; +export const GAMEPIECE_SUFFIX = '_gp'; -export type ParseError = [severity: ParseErrorSeverity, message: string] +export type ParseError = [severity: ParseErrorSeverity, message: string]; /** * TODO: @@ -20,377 +20,354 @@ export type ParseError = [severity: ParseErrorSeverity, message: string] * 2. Gamepieces added to their own RigidNodes */ class MirabufParser { - private _nodeNameCounter: number = 0 - private _assembly: mirabuf.Assembly - private _errors: Array - private _directedGraph: Graph - private _rootNode: string + private _nodeNameCounter: number = 0; - protected _partTreeValues: Map = new Map() - private _designHierarchyRoot: mirabuf.INode = new mirabuf.Node() + private _assembly: mirabuf.Assembly; + private _errors: Array; + private _directedGraph: Graph; + private _rootNode: string; - protected _partToNodeMap: Map = new Map() - protected _rigidNodes: Array = [] - private _globalTransforms: Map + protected _partTreeValues: Map = new Map(); + private _designHierarchyRoot: mirabuf.INode = new mirabuf.Node(); - private _groundedNode: RigidNode | undefined + protected _partToNodeMap: Map = new Map(); + protected _rigidNodes: Array = []; + private _globalTransforms: Map; - public get errors() { - return new Array(...this._errors) - } - public get maxErrorSeverity() { - return Math.max(...this._errors.map(x => x[0])) - } - public get assembly() { - return this._assembly - } - public get partTreeValues() { - return this._partTreeValues - } - public get designHierarchyRoot() { - return this._designHierarchyRoot - } - public get partToNodeMap() { - return this._partToNodeMap - } - public get globalTransforms() { - return this._globalTransforms - } - public get groundedNode() { - return this._groundedNode ? new RigidNodeReadOnly(this._groundedNode) : undefined - } - public get rigidNodes(): Array { - return this._rigidNodes.map(x => new RigidNodeReadOnly(x)) - } - public get directedGraph() { - return this._directedGraph - } - public get rootNode() { - return this._rootNode - } + private _groundedNode: RigidNode | undefined; + + public get errors() { return new Array(...this._errors); } + public get maxErrorSeverity() { return Math.max(...this._errors.map(x => x[0])); } + public get assembly() { return this._assembly; } + public get partTreeValues() { return this._partTreeValues; } + public get designHierarchyRoot() { return this._designHierarchyRoot; } + public get partToNodeMap() { return this._partToNodeMap; } + public get globalTransforms() { return this._globalTransforms; } + public get groundedNode() { return this._groundedNode ? new RigidNodeReadOnly(this._groundedNode) : undefined; } + public get rigidNodes(): Array { return this._rigidNodes.map(x => new RigidNodeReadOnly(x)); } + public get directedGraph() { return this._directedGraph; } + public get rootNode() { return this._rootNode; } public constructor(assembly: mirabuf.Assembly) { - this._assembly = assembly - this._errors = new Array() - this._globalTransforms = new Map() + this._assembly = assembly; + this._errors = new Array(); + this._globalTransforms = new Map(); - this.GenerateTreeValues() - this.LoadGlobalTransforms() + this.GenerateTreeValues(); + this.LoadGlobalTransforms(); // eslint-disable-next-line @typescript-eslint/no-this-alias - const that = this + const that = this; - function traverseTree(nodes: mirabuf.INode[], op: (node: mirabuf.INode) => void) { + function traverseTree(nodes: mirabuf.INode[], op: ((node: mirabuf.INode) => void)) { nodes.forEach(x => { if (x.children) { - traverseTree(x.children, op) + traverseTree(x.children, op); } - op(x) - }) + op(x); + }); } // 1: Initial Rigidgroups from ancestorial breaks in joints - (Object.keys(assembly.data!.joints!.jointInstances!) as string[]).forEach(key => { + (Object.keys(assembly.data!.joints!.jointInstances!) as (string)[]).forEach(key => { if (key != GROUNDED_JOINT_ID) { - const jInst = assembly.data!.joints!.jointInstances![key] - const [ancestorA, ancestorB] = this.FindAncestorialBreak(jInst.parentPart!, jInst.childPart!) - const parentRN = this.NewRigidNode() - this.MovePartToRigidNode(ancestorA, parentRN) - this.MovePartToRigidNode(ancestorB, this.NewRigidNode()) + const jInst = assembly.data!.joints!.jointInstances![key]; + const [ancestorA, ancestorB] = this.FindAncestorialBreak(jInst.parentPart!, jInst.childPart!); + const parentRN = this.NewRigidNode(); + this.MovePartToRigidNode(ancestorA, parentRN); + this.MovePartToRigidNode(ancestorB, this.NewRigidNode()); if (jInst.parts && jInst.parts.nodes) - traverseTree(jInst.parts.nodes, x => this.MovePartToRigidNode(x.value!, parentRN)) + traverseTree(jInst.parts.nodes, x => this.MovePartToRigidNode(x.value!, parentRN)); } - }) + }); // this.DebugPrintHierarchy(1, ...this._designHierarchyRoot.children!); // Fields Only: Assign Game Piece rigid nodes if (!assembly.dynamic) { // Collect all definitions labelled as gamepieces (dynamic = true) - const gamepieceDefinitions: Set = new Set() - - Object.values(assembly.data!.parts!.partDefinitions!).forEach((def: mirabuf.IPartDefinition) => { - if (def.dynamic) gamepieceDefinitions.add(def.info!.GUID!) - }) - - // Create gamepiece rigid nodes from partinstances with corresponding definitions - Object.values(assembly.data!.parts!.partInstances!).forEach((inst: mirabuf.IPartInstance) => { + const gamepieceDefinitions: Set = new Set(); + (Object.values(assembly.data!.parts!.partDefinitions!) as mirabuf.IPartDefinition[]).forEach(def => { + if (def.dynamic) + gamepieceDefinitions.add(def.info!.GUID!); + }); + + // Create gamepiece rigid nodes from partinstances with corresponding definitons + (Object.values(assembly.data!.parts!.partInstances!) as mirabuf.IPartInstance[]).forEach(inst => { if (gamepieceDefinitions.has(inst.partDefinitionReference!)) { - const instNode = this.BinarySearchDesignTree(inst.info!.GUID!) + const instNode = this.BinarySearchDesignTree(inst.info!.GUID!); if (instNode) { - const gpRn = this.NewRigidNode(GAMEPIECE_SUFFIX) - this.MovePartToRigidNode(instNode!.value!, gpRn) - instNode.children && - traverseTree(instNode.children, x => this.MovePartToRigidNode(x.value!, gpRn)) + const gpRn = this.NewRigidNode(GAMEPIECE_SUFFIX); + this.MovePartToRigidNode(instNode!.value!, gpRn); + instNode.children && traverseTree(instNode.children, x => this.MovePartToRigidNode(x.value!, gpRn)); } else { - this._errors.push([ParseErrorSeverity.LikelyIssues, "Failed to find Game piece in Design Tree"]) + this._errors.push([ParseErrorSeverity.LikelyIssues, 'Failed to find Game piece in Design Tree']); } } - }) + }); } // 2: Grounded joint - const gInst = assembly.data!.joints!.jointInstances![GROUNDED_JOINT_ID] - const gNode = this.NewRigidNode() - this.MovePartToRigidNode(gInst.parts!.nodes!.at(0)!.value!, gNode) - + const gInst = assembly.data!.joints!.jointInstances![GROUNDED_JOINT_ID]; + const gNode = this.NewRigidNode(); + this.MovePartToRigidNode(gInst.parts!.nodes!.at(0)!.value!, gNode); + // traverseTree(gInst.parts!.nodes!, x => (!this._partToNodeMap.has(x.value!)) && this.MovePartToRigidNode(x.value!, gNode)); - + // this.DebugPrintHierarchy(1, ...this._designHierarchyRoot.children!); // 3: Traverse and round up const traverseNodeRoundup = (node: mirabuf.INode, parentNode: RigidNode) => { - const currentNode = that._partToNodeMap.get(node.value!) + const currentNode = that._partToNodeMap.get(node.value!); if (!currentNode) { - that.MovePartToRigidNode(node.value!, parentNode) + that.MovePartToRigidNode(node.value!, parentNode); } if (node.children) { - node.children!.forEach(x => traverseNodeRoundup(x, currentNode ? currentNode : parentNode)) + node.children!.forEach(x => traverseNodeRoundup(x, currentNode ? currentNode : parentNode)); } } - this._designHierarchyRoot.children?.forEach(x => traverseNodeRoundup(x, gNode)) + this._designHierarchyRoot.children?.forEach(x => traverseNodeRoundup(x, gNode)); // this.DebugPrintHierarchy(1, ...this._designHierarchyRoot.children!); // 4: Bandage via rigidgroups assembly.data!.joints!.rigidGroups!.forEach(rg => { - let rn: RigidNode | null = null + let rn: RigidNode | null = null; rg.occurrences!.forEach(y => { - const currentRn = this._partToNodeMap.get(y)! + const currentRn = this._partToNodeMap.get(y)!; if (!rn) { - rn = currentRn + rn = currentRn; } else if (currentRn.id != rn.id) { - rn = this.MergeRigidNodes(currentRn, rn) + rn = this.MergeRigidNodes(currentRn, rn); } - }) - }) + }); + }); // this.DebugPrintHierarchy(1, ...this._designHierarchyRoot.children!); // 5. Remove Empty RNs - this._rigidNodes = this._rigidNodes.filter(x => x.parts.size > 0) + this._rigidNodes = this._rigidNodes.filter(x => x.parts.size > 0); // 6. If field, find grounded node and set isDynamic to false. Also just find grounded node again - this._groundedNode = this.partToNodeMap.get(gInst.parts!.nodes!.at(0)!.value!) + this._groundedNode = this.partToNodeMap.get(gInst.parts!.nodes!.at(0)!.value!); if (!assembly.dynamic && this._groundedNode) { - this._groundedNode.isDynamic = false + this._groundedNode.isDynamic = false; } // 7. Update root RigidNode - const rootNode = this._partToNodeMap.get(gInst.parts!.nodes!.at(0)!.value!) + const rootNode = this._partToNodeMap.get(gInst.parts!.nodes!.at(0)!.value!); if (rootNode) { - rootNode.isRoot = true - this._rootNode = rootNode.id + rootNode.isRoot = true; + this._rootNode = rootNode.id; } else { - this._rootNode = this._rigidNodes[0].id + this._rootNode = this._rigidNodes[0].id; } // 8. Generate Rigid Node Graph // Build undirected graph - const graph = new Graph() - graph.AddNode(rootNode ? rootNode.id : this._rigidNodes[0].id) - const jointInstances = (Object.values(assembly.data!.joints!.jointInstances!) as mirabuf.joint.JointInstance[]) - jointInstances.forEach((x: mirabuf.joint.JointInstance) => { - const rA = this._partToNodeMap.get(x.parentPart) - const rB = this._partToNodeMap.get(x.childPart) + const graph = new Graph(); + graph.AddNode(rootNode ? rootNode.id : this._rigidNodes[0].id); + (Object.values(assembly.data!.joints!.jointInstances!) as mirabuf.joint.JointInstance[]).forEach(x => { + const rA = this._partToNodeMap.get(x.parentPart); + const rB = this._partToNodeMap.get(x.childPart); if (rA && rB && rA.id != rB.id) { - graph.AddNode(rA.id) - graph.AddNode(rB.id) - graph.AddEdgeUndirected(rA.id, rB.id) + graph.AddNode(rA.id); + graph.AddNode(rB.id); + graph.AddEdgeUndirected(rA.id, rB.id); } - }) - const directedGraph = new Graph() - const whiteGreyBlackMap = new Map() + }); + const directedGraph = new Graph(); + const whiteGreyBlackMap = new Map(); this._rigidNodes.forEach(x => { - whiteGreyBlackMap.set(x.id, false) - directedGraph.AddNode(x.id) - }) + whiteGreyBlackMap.set(x.id, false); + directedGraph.AddNode(x.id); + }); function directedRecursive(node: string) { graph.GetAdjacencyList(node).forEach(x => { if (whiteGreyBlackMap.has(x)) { - directedGraph.AddEdgeDirected(node, x) - whiteGreyBlackMap.delete(x) - directedRecursive(x) + directedGraph.AddEdgeDirected(node, x); + whiteGreyBlackMap.delete(x); + directedRecursive(x); } - }) + }); } if (rootNode) { - whiteGreyBlackMap.delete(rootNode.id) - directedRecursive(rootNode.id) + whiteGreyBlackMap.delete(rootNode.id); + directedRecursive(rootNode.id); } else { - whiteGreyBlackMap.delete(this._rigidNodes[0].id) - directedRecursive(this._rigidNodes[0].id) + whiteGreyBlackMap.delete(this._rigidNodes[0].id); + directedRecursive(this._rigidNodes[0].id); } - this._directedGraph = directedGraph + this._directedGraph = directedGraph; } private NewRigidNode(suffix?: string): RigidNode { - const node = new RigidNode(`${this._nodeNameCounter++}${suffix ? suffix : ""}`) - this._rigidNodes.push(node) - return node + const node = new RigidNode(`${this._nodeNameCounter++}${suffix ? suffix : ''}`); + this._rigidNodes.push(node); + return node; } private MergeRigidNodes(rnA: RigidNode, rnB: RigidNode) { - const newRn = this.NewRigidNode("merged") - const allParts = new Set([...rnA.parts, ...rnB.parts]) - allParts.forEach(x => this.MovePartToRigidNode(x, newRn)) - return newRn + const newRn = this.NewRigidNode('merged'); + const allParts = new Set([...rnA.parts, ...rnB.parts]); + allParts.forEach(x => this.MovePartToRigidNode(x, newRn)); + return newRn; } private MovePartToRigidNode(part: string, node: RigidNode) { - if (part.length < 1) return - - const original = this._partToNodeMap.get(part) + if (part.length < 1) + return; + + const original = this._partToNodeMap.get(part); if (original) { - if (original === node) return + if (original === node) + return; - original.parts.delete(part) - this._partToNodeMap.delete(part) + original.parts.delete(part); + this._partToNodeMap.delete(part); } - node.parts.add(part) - this._partToNodeMap.set(part, node) + node.parts.add(part); + this._partToNodeMap.set(part, node); } /** * Loads this._globalTransforms with the world space transformations of each part instance. */ private LoadGlobalTransforms() { - const root = this._designHierarchyRoot - const partInstances = new Map( - Object.entries(this._assembly.data!.parts!.partInstances!) - ) - const partDefinitions = this._assembly.data!.parts!.partDefinitions! + const root = this._designHierarchyRoot; + const partInstances = new Map(Object.entries(this._assembly.data!.parts!.partInstances!)); + const partDefinitions = this._assembly.data!.parts!.partDefinitions!; - this._globalTransforms.clear() + this._globalTransforms.clear(); const getTransforms = (node: mirabuf.INode, parent: THREE.Matrix4) => { for (const child of node.children!) { if (!partInstances.has(child.value!)) { - continue + continue; } - const partInstance = partInstances.get(child.value!)! - - if (this._globalTransforms.has(child.value!)) continue - const mat = MirabufTransform_ThreeMatrix4(partInstance.transform!)! + const partInstance = partInstances.get(child.value!)!; + + if (this._globalTransforms.has(child.value!)) continue; + const mat = MirabufTransform_ThreeMatrix4(partInstance.transform!)!; // console.log(`[${partInstance.info!.name!}] -> ${matToString(mat)}`); - this._globalTransforms.set(child.value!, mat.premultiply(parent)) - getTransforms(child, mat) + this._globalTransforms.set(child.value!, mat.premultiply(parent)); + getTransforms(child, mat); } } for (const child of root.children!) { - const partInstance = partInstances.get(child.value!)! - let mat + const partInstance = partInstances.get(child.value!)!; + let mat; if (!partInstance.transform) { - const def = partDefinitions[partInstances.get(child.value!)!.partDefinitionReference!] + const def = partDefinitions[partInstances.get(child.value!)!.partDefinitionReference!]; if (!def.baseTransform) { - mat = new THREE.Matrix4().identity() + mat = new THREE.Matrix4().identity(); } else { - mat = MirabufTransform_ThreeMatrix4(def.baseTransform) + mat = MirabufTransform_ThreeMatrix4(def.baseTransform); } } else { - mat = MirabufTransform_ThreeMatrix4(partInstance.transform) + mat = MirabufTransform_ThreeMatrix4(partInstance.transform); } // console.log(`[${partInstance.info!.name!}] -> ${matToString(mat!)}`); - this._globalTransforms.set(partInstance.info!.GUID!, mat!) - getTransforms(child, mat!) + this._globalTransforms.set(partInstance.info!.GUID!, mat!); + getTransforms(child, mat!); } } private FindAncestorialBreak(partA: string, partB: string): [string, string] { if (!this._partTreeValues.has(partA) || !this._partTreeValues.has(partB)) { - this._errors.push([ParseErrorSeverity.LikelyIssues, "Part not found in tree."]) - return [partA, partB] + this._errors.push([ParseErrorSeverity.LikelyIssues, 'Part not found in tree.']); + return [partA, partB]; } else if (partA == partB) { - this._errors.push([ParseErrorSeverity.LikelyIssues, "Part A and B are the same."]) + this._errors.push([ParseErrorSeverity.LikelyIssues, 'Part A and B are the same.']); } - const ptv = this._partTreeValues - let pathA = this._designHierarchyRoot - let pathB = this._designHierarchyRoot - const valueA = ptv.get(partA)! - const valueB = ptv.get(partB)! + const ptv = this._partTreeValues; + let pathA = this._designHierarchyRoot; + let pathB = this._designHierarchyRoot; + const valueA = ptv.get(partA)!; + const valueB = ptv.get(partB)!; while (pathA.value! == pathB.value! && pathA.value! != partA && pathB.value! != partB) { - const ancestorIndexA = this.BinarySearchIndex(valueA, pathA.children!) - const ancestorValueA = ptv.get(pathA.children![ancestorIndexA].value!)! - pathA = pathA.children![ancestorIndexA + (ancestorValueA < valueA ? 1 : 0)] + const ancestorIndexA = this.BinarySearchIndex(valueA, pathA.children!); + const ancestorValueA = ptv.get(pathA.children![ancestorIndexA].value!)!; + pathA = pathA.children![ancestorIndexA + (ancestorValueA < valueA ? 1 : 0)]; - const ancestorIndexB = this.BinarySearchIndex(valueB, pathB.children!) - const ancestorValueB = ptv.get(pathB.children![ancestorIndexB].value!)! - pathB = pathB.children![ancestorIndexB + (ancestorValueB < valueB ? 1 : 0)] + const ancestorIndexB = this.BinarySearchIndex(valueB, pathB.children!); + const ancestorValueB = ptv.get(pathB.children![ancestorIndexB].value!)!; + pathB = pathB.children![ancestorIndexB + (ancestorValueB < valueB ? 1 : 0)]; } if (pathA.value! == partA && pathA.value! == pathB.value!) { - const ancestorIndexB = this.BinarySearchIndex(valueB, pathB.children!) - const ancestorValueB = ptv.get(pathB.children![ancestorIndexB].value!)! - pathB = pathB.children![ancestorIndexB + (ancestorValueB < valueB ? 1 : 0)] + const ancestorIndexB = this.BinarySearchIndex(valueB, pathB.children!); + const ancestorValueB = ptv.get(pathB.children![ancestorIndexB].value!)!; + pathB = pathB.children![ancestorIndexB + (ancestorValueB < valueB ? 1 : 0)]; } else if (pathB.value! == partB && pathA.value! == pathB.value!) { - const ancestorIndexA = this.BinarySearchIndex(valueA, pathA.children!) - const ancestorValueA = ptv.get(pathA.children![ancestorIndexA].value!)! - pathA = pathA.children![ancestorIndexA + (ancestorValueA < valueA ? 1 : 0)] + const ancestorIndexA = this.BinarySearchIndex(valueA, pathA.children!); + const ancestorValueA = ptv.get(pathA.children![ancestorIndexA].value!)!; + pathA = pathA.children![ancestorIndexA + (ancestorValueA < valueA ? 1 : 0)]; } - return [pathA.value!, pathB.value!] + return [pathA.value!, pathB.value!]; } private BinarySearchIndex(target: number, children: mirabuf.INode[]): number { - let l = 0 - let h = children.length + let l = 0; + let h = children.length; while (h - l > 1) { - const i = Math.floor((h + l) / 2.0) - const iVal = this._partTreeValues.get(children[i].value!)! + const i = Math.floor((h + l) / 2.0); + const iVal = this._partTreeValues.get(children[i].value!)!; if (iVal > target) { - h = i + h = i; } else if (iVal < target) { - l = i + 1 + l = i + 1; } else { - return i + return i; } } - return Math.floor((h + l) / 2.0) + return Math.floor((h + l) / 2.0); } private BinarySearchDesignTree(target: string): mirabuf.INode | null { - let node = this._designHierarchyRoot - const targetValue = this._partTreeValues.get(target)! + let node = this._designHierarchyRoot; + const targetValue = this._partTreeValues.get(target)!; while (node.value != target && node.children) { - const i = this.BinarySearchIndex(targetValue, node.children!) - const iValue = this._partTreeValues.get(node.children![i].value!)! - node = node.children![i + (iValue < targetValue ? 1 : 0)] + const i = this.BinarySearchIndex(targetValue, node.children!); + const iValue = this._partTreeValues.get(node.children![i].value!)!; + node = node.children![i + (iValue < targetValue ? 1 : 0)]; } - return node.value! == target ? node : null + return node.value! == target ? node : null; } private GenerateTreeValues() { - let nextValue = 0 - const partTreeValues = new Map() + let nextValue = 0; + const partTreeValues = new Map(); const recursive = (partNode: mirabuf.INode) => { - partNode.children = partNode.children?.filter(x => x.value != null) - partNode.children?.forEach(x => recursive(x)) - partTreeValues.set(partNode.value!, nextValue++) + partNode.children = partNode.children?.filter(x => x.value != null); + partNode.children?.forEach(x => recursive(x)); + partTreeValues.set(partNode.value!, nextValue++); } - this._designHierarchyRoot = new mirabuf.Node() - this._designHierarchyRoot.value = "Importer Generated Root" - this._designHierarchyRoot.children = [] - this._designHierarchyRoot.children.push(...this._assembly.designHierarchy!.nodes!) + this._designHierarchyRoot = new mirabuf.Node(); + this._designHierarchyRoot.value = "Importer Generated Root"; + this._designHierarchyRoot.children = []; + this._designHierarchyRoot.children.push(...this._assembly.designHierarchy!.nodes!); - recursive(this._designHierarchyRoot) - this._partTreeValues = partTreeValues + recursive(this._designHierarchyRoot); + this._partTreeValues = partTreeValues; } } @@ -398,77 +375,77 @@ class MirabufParser { * Collection of mirabuf parts that are bound together */ class RigidNode { - public isRoot: boolean - public id: string - public parts: Set = new Set() - public isDynamic: boolean + public isRoot: boolean; + public id: string; + public parts: Set = new Set(); + public isDynamic: boolean; public constructor(id: string, isDynamic?: boolean) { - this.id = id - this.isDynamic = isDynamic ?? true - this.isRoot = false + this.id = id; + this.isDynamic = isDynamic ?? true; + this.isRoot = false; } } export class RigidNodeReadOnly { - private _original: RigidNode - + private _original: RigidNode; + public get id(): string { - return this._original.id + return this._original.id; } public get parts(): ReadonlySet { - return this._original.parts + return this._original.parts; } public get isDynamic(): boolean { - return this._original.isDynamic + return this._original.isDynamic; } - public get isRoot(): boolean { - return this._original.isRoot - } + public get isRoot(): boolean { return this._original.isRoot; } public constructor(original: RigidNode) { - this._original = original + this._original = original; } } export class Graph { - private _adjacencyMap: Map + private _adjacencyMap: Map; public get nodes() { - return this._adjacencyMap.keys() + return this._adjacencyMap.keys(); } public constructor() { - this._adjacencyMap = new Map() + this._adjacencyMap = new Map(); } public AddNode(node: string) { - if (!this._adjacencyMap.has(node)) this._adjacencyMap.set(node, new Array()) + if (!this._adjacencyMap.has(node)) + this._adjacencyMap.set(node, new Array()); } public AddEdgeUndirected(nodeA: string, nodeB: string) { - if (!this._adjacencyMap.has(nodeA) || !this._adjacencyMap.has(nodeB)) throw new Error("Nodes aren't in graph") + if (!this._adjacencyMap.has(nodeA) || !this._adjacencyMap.has(nodeB)) + throw new Error("Nodes aren't in graph"); - this._adjacencyMap.get(nodeA)!.push(nodeB) - this._adjacencyMap.get(nodeB)!.push(nodeA) + this._adjacencyMap.get(nodeA)!.push(nodeB); + this._adjacencyMap.get(nodeB)!.push(nodeA); } public AddEdgeDirected(nodeA: string, nodeB: string) { - if (!this._adjacencyMap.has(nodeA) || !this._adjacencyMap.has(nodeB)) throw new Error("Nodes aren't in graph") + if (!this._adjacencyMap.has(nodeA) || !this._adjacencyMap.has(nodeB)) + throw new Error("Nodes aren't in graph"); - this._adjacencyMap.get(nodeA)!.push(nodeB) + this._adjacencyMap.get(nodeA)!.push(nodeB); } public GetAdjacencyList(node: string) { - if (!this._adjacencyMap.has(node)) { - // Don't remove this. Without this check initially, Map.get *randomly* fails. I have no clue why... - throw new Error(`Node '${node}' is not in adjacency list`) + if (!this._adjacencyMap.has(node)) { // Don't remove this. Without this check initially, Map.get *randomly* fails. I have no clue why... + throw new Error(`Node '${node}' is not in adjacency list`); } - return this._adjacencyMap.get(node)! + return this._adjacencyMap.get(node)!; } } -export default MirabufParser +export default MirabufParser; diff --git a/fission/src/mirabuf/MirabufSceneObject.ts b/fission/src/mirabuf/MirabufSceneObject.ts index ef6f34fef9..34a98b539c 100644 --- a/fission/src/mirabuf/MirabufSceneObject.ts +++ b/fission/src/mirabuf/MirabufSceneObject.ts @@ -1,30 +1,31 @@ -import { mirabuf } from "@/proto/mirabuf" -import SceneObject from "../systems/scene/SceneObject" -import MirabufInstance from "./MirabufInstance" -import { LoadMirabufRemote } from "./MirabufLoader" -import MirabufParser, { ParseErrorSeverity } from "./MirabufParser" -import World from "@/systems/World" -import Jolt from "@barclah/jolt-physics" -import { JoltMat44_ThreeMatrix4 } from "@/util/TypeConversions" -import * as THREE from "three" -import JOLT from "@/util/loading/JoltSyncLoader" -import { LayerReserve } from "@/systems/physics/PhysicsSystem" -import Mechanism from "@/systems/physics/Mechanism" -import SynthesisBrain from "@/systems/simulation/synthesis_brain/SynthesisBrain" - -const DEBUG_BODIES = true +import { mirabuf } from "@/proto/mirabuf"; +import SceneObject from "../systems/scene/SceneObject"; +import MirabufInstance from "./MirabufInstance"; +import { LoadMirabufRemote } from "./MirabufLoader"; +import MirabufParser, { ParseErrorSeverity } from "./MirabufParser"; +import World from "@/systems/World"; +import Jolt from '@barclah/jolt-physics'; +import { JoltMat44_ThreeMatrix4 } from "@/util/TypeConversions"; +import * as THREE from 'three'; +import JOLT from "@/util/loading/JoltSyncLoader"; +import { LayerReserve } from "@/systems/physics/PhysicsSystem"; +import Mechanism from "@/systems/physics/Mechanism"; +import SynthesisBrain from "@/systems/simulation/synthesis_brain/SynthesisBrain"; + +const DEBUG_BODIES = true; interface RnDebugMeshes { - colliderMesh: THREE.Mesh - comMesh: THREE.Mesh + colliderMesh: THREE.Mesh; + comMesh: THREE.Mesh; } class MirabufSceneObject extends SceneObject { - private _mirabufInstance: MirabufInstance - private _debugBodies: Map | null - private _physicsLayerReserve: LayerReserve | undefined = undefined - private _mechanism: Mechanism + private _mirabufInstance: MirabufInstance; + private _debugBodies: Map | null; + private _physicsLayerReserve: LayerReserve | undefined = undefined; + + private _mechanism: Mechanism; public constructor(mirabufInstance: MirabufInstance) { super() @@ -35,137 +36,118 @@ class MirabufSceneObject extends SceneObject { if (this._mechanism.layerReserve) { this._physicsLayerReserve = this._mechanism.layerReserve } - + this._debugBodies = null } public Setup(): void { // Rendering - this._mirabufInstance.AddToScene(World.SceneRenderer.scene) + this._mirabufInstance.AddToScene(World.SceneRenderer.scene); if (DEBUG_BODIES) { - this._debugBodies = new Map() + this._debugBodies = new Map(); this._mechanism.nodeToBody.forEach((bodyId, rnName) => { - const body = World.PhysicsSystem.GetBody(bodyId) - - const colliderMesh = this.CreateMeshForShape(body.GetShape()) - const comMesh = World.SceneRenderer.CreateSphere(0.05) - World.SceneRenderer.scene.add(colliderMesh) - World.SceneRenderer.scene.add(comMesh) - ;(comMesh.material as THREE.Material).depthTest = false - this._debugBodies!.set(rnName, { - colliderMesh: colliderMesh, - comMesh: comMesh, - }) - }) + + const body = World.PhysicsSystem.GetBody(bodyId); + + const colliderMesh = this.CreateMeshForShape(body.GetShape()); + const comMesh = World.SceneRenderer.CreateSphere(0.05); + World.SceneRenderer.scene.add(colliderMesh); + World.SceneRenderer.scene.add(comMesh); + (comMesh.material as THREE.Material).depthTest = false; + this._debugBodies!.set(rnName, { colliderMesh: colliderMesh, comMesh: comMesh }); + }); } // Simulation - World.SimulationSystem.RegisterMechanism(this._mechanism) - const simLayer = World.SimulationSystem.GetSimulationLayer(this._mechanism)! - const brain = new SynthesisBrain(this._mechanism) - simLayer.SetBrain(brain) + World.SimulationSystem.RegisterMechanism(this._mechanism); + const simLayer = World.SimulationSystem.GetSimulationLayer(this._mechanism)!; + const brain = new SynthesisBrain(this._mechanism); + simLayer.SetBrain(brain); } public Update(): void { this._mirabufInstance.parser.rigidNodes.forEach(rn => { - const body = World.PhysicsSystem.GetBody(this._mechanism.GetBodyByNodeId(rn.id)!) - const transform = JoltMat44_ThreeMatrix4(body.GetWorldTransform()) + const body = World.PhysicsSystem.GetBody(this._mechanism.GetBodyByNodeId(rn.id)!); + const transform = JoltMat44_ThreeMatrix4(body.GetWorldTransform()); rn.parts.forEach(part => { - const partTransform = this._mirabufInstance.parser.globalTransforms - .get(part)! - .clone() - .premultiply(transform) + const partTransform = this._mirabufInstance.parser.globalTransforms.get(part)!.clone().premultiply(transform); this._mirabufInstance.meshes.get(part)!.forEach(mesh => { - mesh.position.setFromMatrixPosition(partTransform) - mesh.rotation.setFromRotationMatrix(partTransform) - }) - }) + mesh.position.setFromMatrixPosition(partTransform); + mesh.rotation.setFromRotationMatrix(partTransform); + }); + }); if (isNaN(body.GetPosition().GetX())) { - const vel = body.GetLinearVelocity() - const pos = body.GetPosition() - console.warn( - `Invalid Position.\nPosition => ${pos.GetX()}, ${pos.GetY()}, ${pos.GetZ()}\nVelocity => ${vel.GetX()}, ${vel.GetY()}, ${vel.GetZ()}` - ) + const vel = body.GetLinearVelocity(); + const pos = body.GetPosition(); + console.warn(`Invalid Position.\nPosition => ${pos.GetX()}, ${pos.GetY()}, ${pos.GetZ()}\nVelocity => ${vel.GetX()}, ${vel.GetY()}, ${vel.GetZ()}`); } // console.debug(`POSITION: ${body.GetPosition().GetX()}, ${body.GetPosition().GetY()}, ${body.GetPosition().GetZ()}`) if (this._debugBodies) { - const { colliderMesh, comMesh } = this._debugBodies.get(rn.id)! - colliderMesh.position.setFromMatrixPosition(transform) - colliderMesh.rotation.setFromRotationMatrix(transform) + const { colliderMesh, comMesh } = this._debugBodies.get(rn.id)!; + colliderMesh.position.setFromMatrixPosition(transform); + colliderMesh.rotation.setFromRotationMatrix(transform); - const comTransform = JoltMat44_ThreeMatrix4(body.GetCenterOfMassTransform()) - comMesh.position.setFromMatrixPosition(comTransform) - comMesh.rotation.setFromRotationMatrix(comTransform) + const comTransform = JoltMat44_ThreeMatrix4(body.GetCenterOfMassTransform()); + comMesh.position.setFromMatrixPosition(comTransform); + comMesh.rotation.setFromRotationMatrix(comTransform); } - }) + }); } public Dispose(): void { World.SimulationSystem.UnregisterMechanism(this._mechanism) - World.PhysicsSystem.DestroyMechanism(this._mechanism) - this._mirabufInstance.Dispose(World.SceneRenderer.scene) + World.PhysicsSystem.DestroyMechanism(this._mechanism); + this._mirabufInstance.Dispose(World.SceneRenderer.scene); this._debugBodies?.forEach(x => { - World.SceneRenderer.scene.remove(x.colliderMesh, x.comMesh) - x.colliderMesh.geometry.dispose() - x.comMesh.geometry.dispose() - ;(x.colliderMesh.material as THREE.Material).dispose() - ;(x.comMesh.material as THREE.Material).dispose() - }) - this._debugBodies?.clear() - this._physicsLayerReserve?.Release() + World.SceneRenderer.scene.remove(x.colliderMesh, x.comMesh); + x.colliderMesh.geometry.dispose(); + x.comMesh.geometry.dispose(); + (x.colliderMesh.material as THREE.Material).dispose(); + (x.comMesh.material as THREE.Material).dispose(); + }); + this._debugBodies?.clear(); + this._physicsLayerReserve?.Release(); } private CreateMeshForShape(shape: Jolt.Shape): THREE.Mesh { - const scale = new JOLT.Vec3(1, 1, 1) - const triangleContext = new JOLT.ShapeGetTriangles( - shape, - JOLT.AABox.prototype.sBiggest(), - shape.GetCenterOfMass(), - JOLT.Quat.prototype.sIdentity(), - scale - ) - JOLT.destroy(scale) - - const vertices = new Float32Array( - JOLT.HEAP32.buffer, - triangleContext.GetVerticesData(), - triangleContext.GetVerticesSize() / Float32Array.BYTES_PER_ELEMENT - ) - const buffer = new THREE.BufferAttribute(vertices, 3).clone() - JOLT.destroy(triangleContext) - - const geometry = new THREE.BufferGeometry() - geometry.setAttribute("position", buffer) - geometry.computeVertexNormals() - - const material = new THREE.MeshStandardMaterial({ - color: 0x33ff33, - wireframe: true, - }) - const mesh = new THREE.Mesh(geometry, material) - mesh.castShadow = true - - return mesh + const scale = new JOLT.Vec3(1, 1, 1); + const triangleContext = new JOLT.ShapeGetTriangles(shape, JOLT.AABox.prototype.sBiggest(), shape.GetCenterOfMass(), JOLT.Quat.prototype.sIdentity(), scale); + JOLT.destroy(scale); + + const vertices = new Float32Array(JOLT.HEAP32.buffer, triangleContext.GetVerticesData(), triangleContext.GetVerticesSize() / Float32Array.BYTES_PER_ELEMENT); + const buffer = new THREE.BufferAttribute(vertices, 3).clone(); + JOLT.destroy(triangleContext); + + const geometry = new THREE.BufferGeometry(); + geometry.setAttribute('position', buffer); + geometry.computeVertexNormals(); + + const material = new THREE.MeshStandardMaterial({ color: 0x33ff33, wireframe: true }) + const mesh = new THREE.Mesh(geometry, material); + mesh.castShadow = true; + + return mesh; } } export async function CreateMirabufFromUrl(path: string): Promise { - const miraAssembly = await LoadMirabufRemote(path).catch(console.error) + const miraAssembly = await LoadMirabufRemote(path) + .catch(console.error); if (!miraAssembly || !(miraAssembly instanceof mirabuf.Assembly)) { - return + return; } - const parser = new MirabufParser(miraAssembly) + const parser = new MirabufParser(miraAssembly); if (parser.maxErrorSeverity >= ParseErrorSeverity.Unimportable) { - console.error(`Assembly Parser produced significant errors for '${miraAssembly.info!.name!}'`) - return + console.error(`Assembly Parser produced significant errors for '${miraAssembly.info!.name!}'`); + return; } - - return new MirabufSceneObject(new MirabufInstance(parser)) + + return new MirabufSceneObject(new MirabufInstance(parser)); } -export default MirabufSceneObject +export default MirabufSceneObject; \ No newline at end of file diff --git a/fission/src/proto/mirabuf.d.ts b/fission/src/proto/mirabuf.d.ts index 755e156046..a10e89a8f9 100644 --- a/fission/src/proto/mirabuf.d.ts +++ b/fission/src/proto/mirabuf.d.ts @@ -1,32 +1,34 @@ -import * as $protobuf from "protobufjs" -import Long = require("long") +import * as $protobuf from "protobufjs"; +import Long = require("long"); /** Namespace mirabuf. */ export namespace mirabuf { + /** Properties of an Assembly. */ interface IAssembly { + /** Basic information (name, Author, etc) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** All of the data in the assembly */ - data?: mirabuf.IAssemblyData | null + data?: (mirabuf.IAssemblyData|null); /** Can it be effected by the simulation dynamically */ - dynamic?: boolean | null + dynamic?: (boolean|null); /** Overall physical data of the assembly */ - physicalData?: mirabuf.IPhysicalProperties | null + physicalData?: (mirabuf.IPhysicalProperties|null); /** The Design hierarchy represented by Part Refs - The first object is a root container for all top level items */ - designHierarchy?: mirabuf.IGraphContainer | null + designHierarchy?: (mirabuf.IGraphContainer|null); /** The Joint hierarchy for compound shapes */ - jointHierarchy?: mirabuf.IGraphContainer | null + jointHierarchy?: (mirabuf.IGraphContainer|null); /** The Transform in space currently */ - transform?: mirabuf.ITransform | null + transform?: (mirabuf.ITransform|null); /** Optional thumbnail saved from Fusion 360 or scraped from previous configuration */ - thumbnail?: mirabuf.IThumbnail | null + thumbnail?: (mirabuf.IThumbnail|null); } /** @@ -35,42 +37,43 @@ export namespace mirabuf { * THIS IS THE CURRENT FILE EXPORTED */ class Assembly implements IAssembly { + /** * Constructs a new Assembly. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IAssembly) + constructor(properties?: mirabuf.IAssembly); /** Basic information (name, Author, etc) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** All of the data in the assembly */ - public data?: mirabuf.IAssemblyData | null + public data?: (mirabuf.IAssemblyData|null); /** Can it be effected by the simulation dynamically */ - public dynamic: boolean + public dynamic: boolean; /** Overall physical data of the assembly */ - public physicalData?: mirabuf.IPhysicalProperties | null + public physicalData?: (mirabuf.IPhysicalProperties|null); /** The Design hierarchy represented by Part Refs - The first object is a root container for all top level items */ - public designHierarchy?: mirabuf.IGraphContainer | null + public designHierarchy?: (mirabuf.IGraphContainer|null); /** The Joint hierarchy for compound shapes */ - public jointHierarchy?: mirabuf.IGraphContainer | null + public jointHierarchy?: (mirabuf.IGraphContainer|null); /** The Transform in space currently */ - public transform?: mirabuf.ITransform | null + public transform?: (mirabuf.ITransform|null); /** Optional thumbnail saved from Fusion 360 or scraped from previous configuration */ - public thumbnail?: mirabuf.IThumbnail | null + public thumbnail?: (mirabuf.IThumbnail|null); /** * Creates a new Assembly instance using the specified properties. * @param [properties] Properties to set * @returns Assembly instance */ - public static create(properties?: mirabuf.IAssembly): mirabuf.Assembly + public static create(properties?: mirabuf.IAssembly): mirabuf.Assembly; /** * Encodes the specified Assembly message. Does not implicitly {@link mirabuf.Assembly.verify|verify} messages. @@ -78,7 +81,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IAssembly, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IAssembly, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Assembly message, length delimited. Does not implicitly {@link mirabuf.Assembly.verify|verify} messages. @@ -86,7 +89,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IAssembly, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IAssembly, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Assembly message from the specified reader or buffer. @@ -96,7 +99,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Assembly + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Assembly; /** * Decodes an Assembly message from the specified reader or buffer, length delimited. @@ -105,21 +108,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Assembly + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Assembly; /** * Verifies an Assembly message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates an Assembly message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Assembly */ - public static fromObject(object: { [k: string]: any }): mirabuf.Assembly + public static fromObject(object: { [k: string]: any }): mirabuf.Assembly; /** * Creates a plain object from an Assembly message. Also converts values to other types if specified. @@ -127,63 +130,65 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Assembly, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Assembly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Assembly to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Assembly * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AssemblyData. */ interface IAssemblyData { + /** Meshes and Design Objects */ - parts?: mirabuf.IParts | null + parts?: (mirabuf.IParts|null); /** Joint Definition Set */ - joints?: mirabuf.joint.IJoints | null + joints?: (mirabuf.joint.IJoints|null); /** Appearance and Physical Material Set */ - materials?: mirabuf.material.IMaterials | null + materials?: (mirabuf.material.IMaterials|null); /** AssemblyData signals */ - signals?: mirabuf.signal.ISignals | null + signals?: (mirabuf.signal.ISignals|null); } /** Data used to construct the assembly */ class AssemblyData implements IAssemblyData { + /** * Constructs a new AssemblyData. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IAssemblyData) + constructor(properties?: mirabuf.IAssemblyData); /** Meshes and Design Objects */ - public parts?: mirabuf.IParts | null + public parts?: (mirabuf.IParts|null); /** Joint Definition Set */ - public joints?: mirabuf.joint.IJoints | null + public joints?: (mirabuf.joint.IJoints|null); /** Appearance and Physical Material Set */ - public materials?: mirabuf.material.IMaterials | null + public materials?: (mirabuf.material.IMaterials|null); /** AssemblyData signals. */ - public signals?: mirabuf.signal.ISignals | null + public signals?: (mirabuf.signal.ISignals|null); /** * Creates a new AssemblyData instance using the specified properties. * @param [properties] Properties to set * @returns AssemblyData instance */ - public static create(properties?: mirabuf.IAssemblyData): mirabuf.AssemblyData + public static create(properties?: mirabuf.IAssemblyData): mirabuf.AssemblyData; /** * Encodes the specified AssemblyData message. Does not implicitly {@link mirabuf.AssemblyData.verify|verify} messages. @@ -191,7 +196,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IAssemblyData, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IAssemblyData, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified AssemblyData message, length delimited. Does not implicitly {@link mirabuf.AssemblyData.verify|verify} messages. @@ -199,7 +204,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IAssemblyData, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IAssemblyData, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an AssemblyData message from the specified reader or buffer. @@ -209,7 +214,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.AssemblyData + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.AssemblyData; /** * Decodes an AssemblyData message from the specified reader or buffer, length delimited. @@ -218,21 +223,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.AssemblyData + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.AssemblyData; /** * Verifies an AssemblyData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates an AssemblyData message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns AssemblyData */ - public static fromObject(object: { [k: string]: any }): mirabuf.AssemblyData + public static fromObject(object: { [k: string]: any }): mirabuf.AssemblyData; /** * Creates a plain object from an AssemblyData message. Also converts values to other types if specified. @@ -240,66 +245,65 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.AssemblyData, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.AssemblyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this AssemblyData to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for AssemblyData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Parts. */ interface IParts { + /** Part name, version, GUID */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Map of the Exported Part Definitions */ - partDefinitions?: { [k: string]: mirabuf.IPartDefinition } | null + partDefinitions?: ({ [k: string]: mirabuf.IPartDefinition }|null); /** Map of the Exported Parts that make up the object */ - partInstances?: { [k: string]: mirabuf.IPartInstance } | null + partInstances?: ({ [k: string]: mirabuf.IPartInstance }|null); /** other associated data that can be used */ - userData?: mirabuf.IUserData | null + userData?: (mirabuf.IUserData|null); } /** Represents a Parts. */ class Parts implements IParts { + /** * Constructs a new Parts. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IParts) + constructor(properties?: mirabuf.IParts); /** Part name, version, GUID */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Map of the Exported Part Definitions */ - public partDefinitions: { [k: string]: mirabuf.IPartDefinition } + public partDefinitions: { [k: string]: mirabuf.IPartDefinition }; /** Map of the Exported Parts that make up the object */ - public partInstances: { [k: string]: mirabuf.IPartInstance } + public partInstances: { [k: string]: mirabuf.IPartInstance }; /** other associated data that can be used */ - public userData?: mirabuf.IUserData | null + public userData?: (mirabuf.IUserData|null); /** * Creates a new Parts instance using the specified properties. * @param [properties] Properties to set * @returns Parts instance */ - public static create(properties?: mirabuf.IParts): mirabuf.Parts + public static create(properties?: mirabuf.IParts): mirabuf.Parts; /** * Encodes the specified Parts message. Does not implicitly {@link mirabuf.Parts.verify|verify} messages. @@ -307,7 +311,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IParts, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IParts, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Parts message, length delimited. Does not implicitly {@link mirabuf.Parts.verify|verify} messages. @@ -315,7 +319,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IParts, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IParts, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Parts message from the specified reader or buffer. @@ -325,7 +329,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Parts + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Parts; /** * Decodes a Parts message from the specified reader or buffer, length delimited. @@ -334,21 +338,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Parts + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Parts; /** * Verifies a Parts message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Parts message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Parts */ - public static fromObject(object: { [k: string]: any }): mirabuf.Parts + public static fromObject(object: { [k: string]: any }): mirabuf.Parts; /** * Creates a plain object from a Parts message. Also converts values to other types if specified. @@ -356,44 +360,45 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Parts, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Parts, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Parts to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Parts * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartDefinition. */ interface IPartDefinition { + /** Information about version - id - name */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Physical data associated with Part */ - physicalData?: mirabuf.IPhysicalProperties | null + physicalData?: (mirabuf.IPhysicalProperties|null); /** Base Transform applied - Most Likely Identity Matrix */ - baseTransform?: mirabuf.ITransform | null + baseTransform?: (mirabuf.ITransform|null); /** Mesh Bodies to populate part */ - bodies?: mirabuf.IBody[] | null + bodies?: (mirabuf.IBody[]|null); /** Optional value to state whether an object is a dynamic object in a static assembly - all children are also considered overriden */ - dynamic?: boolean | null + dynamic?: (boolean|null); /** Optional value for overriding the friction value 0-1 */ - frictionOverride?: number | null + frictionOverride?: (number|null); /** Optional value for overriding an indiviaul object's mass */ - massOverride?: number | null + massOverride?: (number|null); } /** @@ -402,39 +407,40 @@ export namespace mirabuf { * Useful for keeping the object counter down in the scene. */ class PartDefinition implements IPartDefinition { + /** * Constructs a new PartDefinition. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IPartDefinition) + constructor(properties?: mirabuf.IPartDefinition); /** Information about version - id - name */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Physical data associated with Part */ - public physicalData?: mirabuf.IPhysicalProperties | null + public physicalData?: (mirabuf.IPhysicalProperties|null); /** Base Transform applied - Most Likely Identity Matrix */ - public baseTransform?: mirabuf.ITransform | null + public baseTransform?: (mirabuf.ITransform|null); /** Mesh Bodies to populate part */ - public bodies: mirabuf.IBody[] + public bodies: mirabuf.IBody[]; /** Optional value to state whether an object is a dynamic object in a static assembly - all children are also considered overriden */ - public dynamic: boolean + public dynamic: boolean; /** Optional value for overriding the friction value 0-1 */ - public frictionOverride: number + public frictionOverride: number; /** Optional value for overriding an indiviaul object's mass */ - public massOverride: number + public massOverride: number; /** * Creates a new PartDefinition instance using the specified properties. * @param [properties] Properties to set * @returns PartDefinition instance */ - public static create(properties?: mirabuf.IPartDefinition): mirabuf.PartDefinition + public static create(properties?: mirabuf.IPartDefinition): mirabuf.PartDefinition; /** * Encodes the specified PartDefinition message. Does not implicitly {@link mirabuf.PartDefinition.verify|verify} messages. @@ -442,7 +448,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IPartDefinition, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IPartDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PartDefinition message, length delimited. Does not implicitly {@link mirabuf.PartDefinition.verify|verify} messages. @@ -450,7 +456,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IPartDefinition, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IPartDefinition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PartDefinition message from the specified reader or buffer. @@ -460,7 +466,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.PartDefinition + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.PartDefinition; /** * Decodes a PartDefinition message from the specified reader or buffer, length delimited. @@ -469,21 +475,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.PartDefinition + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.PartDefinition; /** * Verifies a PartDefinition message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PartDefinition message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PartDefinition */ - public static fromObject(object: { [k: string]: any }): mirabuf.PartDefinition + public static fromObject(object: { [k: string]: any }): mirabuf.PartDefinition; /** * Creates a plain object from a PartDefinition message. Also converts values to other types if specified. @@ -491,90 +497,89 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.PartDefinition, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.PartDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PartDefinition to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for PartDefinition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartInstance. */ interface IPartInstance { + /** PartInstance info */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Reference to the Part Definition defined in Assembly Data */ - partDefinitionReference?: string | null + partDefinitionReference?: (string|null); /** Overriding the object transform (moves the part from the def) - in design hierarchy context */ - transform?: mirabuf.ITransform | null + transform?: (mirabuf.ITransform|null); /** Position transform from a global scope */ - globalTransform?: mirabuf.ITransform | null + globalTransform?: (mirabuf.ITransform|null); /** Joints that interact with this element */ - joints?: string[] | null + joints?: (string[]|null); /** PartInstance appearance */ - appearance?: string | null + appearance?: (string|null); /** Physical Material Reference to link to `Materials->PhysicalMaterial->Info->id` */ - physicalMaterial?: string | null + physicalMaterial?: (string|null); /** Flag that if enabled indicates we should skip generating a collider, defaults to FALSE or undefined */ - skipCollider?: boolean | null + skipCollider?: (boolean|null); } /** Represents a PartInstance. */ class PartInstance implements IPartInstance { + /** * Constructs a new PartInstance. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IPartInstance) + constructor(properties?: mirabuf.IPartInstance); /** PartInstance info. */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Reference to the Part Definition defined in Assembly Data */ - public partDefinitionReference: string + public partDefinitionReference: string; /** Overriding the object transform (moves the part from the def) - in design hierarchy context */ - public transform?: mirabuf.ITransform | null + public transform?: (mirabuf.ITransform|null); /** Position transform from a global scope */ - public globalTransform?: mirabuf.ITransform | null + public globalTransform?: (mirabuf.ITransform|null); /** Joints that interact with this element */ - public joints: string[] + public joints: string[]; /** PartInstance appearance. */ - public appearance: string + public appearance: string; /** Physical Material Reference to link to `Materials->PhysicalMaterial->Info->id` */ - public physicalMaterial: string + public physicalMaterial: string; /** Flag that if enabled indicates we should skip generating a collider, defaults to FALSE or undefined */ - public skipCollider: boolean + public skipCollider: boolean; /** * Creates a new PartInstance instance using the specified properties. * @param [properties] Properties to set * @returns PartInstance instance */ - public static create(properties?: mirabuf.IPartInstance): mirabuf.PartInstance + public static create(properties?: mirabuf.IPartInstance): mirabuf.PartInstance; /** * Encodes the specified PartInstance message. Does not implicitly {@link mirabuf.PartInstance.verify|verify} messages. @@ -582,7 +587,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IPartInstance, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IPartInstance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PartInstance message, length delimited. Does not implicitly {@link mirabuf.PartInstance.verify|verify} messages. @@ -590,7 +595,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IPartInstance, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IPartInstance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PartInstance message from the specified reader or buffer. @@ -600,7 +605,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.PartInstance + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.PartInstance; /** * Decodes a PartInstance message from the specified reader or buffer, length delimited. @@ -609,21 +614,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.PartInstance + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.PartInstance; /** * Verifies a PartInstance message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PartInstance message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PartInstance */ - public static fromObject(object: { [k: string]: any }): mirabuf.PartInstance + public static fromObject(object: { [k: string]: any }): mirabuf.PartInstance; /** * Creates a plain object from a PartInstance message. Also converts values to other types if specified. @@ -631,66 +636,65 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.PartInstance, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.PartInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PartInstance to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for PartInstance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Body. */ interface IBody { + /** Body info */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Reference to Part Definition */ - part?: string | null + part?: (string|null); /** Triangle Mesh for rendering */ - triangleMesh?: mirabuf.ITriangleMesh | null + triangleMesh?: (mirabuf.ITriangleMesh|null); /** Override Visual Appearance for the body */ - appearanceOverride?: string | null + appearanceOverride?: (string|null); } /** Represents a Body. */ class Body implements IBody { + /** * Constructs a new Body. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IBody) + constructor(properties?: mirabuf.IBody); /** Body info. */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Reference to Part Definition */ - public part: string + public part: string; /** Triangle Mesh for rendering */ - public triangleMesh?: mirabuf.ITriangleMesh | null + public triangleMesh?: (mirabuf.ITriangleMesh|null); /** Override Visual Appearance for the body */ - public appearanceOverride: string + public appearanceOverride: string; /** * Creates a new Body instance using the specified properties. * @param [properties] Properties to set * @returns Body instance */ - public static create(properties?: mirabuf.IBody): mirabuf.Body + public static create(properties?: mirabuf.IBody): mirabuf.Body; /** * Encodes the specified Body message. Does not implicitly {@link mirabuf.Body.verify|verify} messages. @@ -698,7 +702,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IBody, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IBody, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Body message, length delimited. Does not implicitly {@link mirabuf.Body.verify|verify} messages. @@ -706,7 +710,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IBody, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IBody, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Body message from the specified reader or buffer. @@ -716,7 +720,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Body + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Body; /** * Decodes a Body message from the specified reader or buffer, length delimited. @@ -725,21 +729,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Body + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Body; /** * Verifies a Body message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Body message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Body */ - public static fromObject(object: { [k: string]: any }): mirabuf.Body + public static fromObject(object: { [k: string]: any }): mirabuf.Body; /** * Creates a plain object from a Body message. Also converts values to other types if specified. @@ -747,72 +751,74 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Body, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Body, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Body to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Body * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TriangleMesh. */ interface ITriangleMesh { + /** TriangleMesh info */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Is this object a Plane ? (Does it have volume) */ - hasVolume?: boolean | null + hasVolume?: (boolean|null); /** Rendered Appearance properties referenced from Assembly Data */ - materialReference?: string | null + materialReference?: (string|null); /** Stored as true types, inidicies, verts, uv */ - mesh?: mirabuf.IMesh | null + mesh?: (mirabuf.IMesh|null); /** Stored as binary data in bytes */ - bmesh?: mirabuf.IBinaryMesh | null + bmesh?: (mirabuf.IBinaryMesh|null); } /** Traingle Mesh for Storing Display Mesh data */ class TriangleMesh implements ITriangleMesh { + /** * Constructs a new TriangleMesh. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.ITriangleMesh) + constructor(properties?: mirabuf.ITriangleMesh); /** TriangleMesh info. */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Is this object a Plane ? (Does it have volume) */ - public hasVolume: boolean + public hasVolume: boolean; /** Rendered Appearance properties referenced from Assembly Data */ - public materialReference: string + public materialReference: string; /** Stored as true types, inidicies, verts, uv */ - public mesh?: mirabuf.IMesh | null + public mesh?: (mirabuf.IMesh|null); /** Stored as binary data in bytes */ - public bmesh?: mirabuf.IBinaryMesh | null + public bmesh?: (mirabuf.IBinaryMesh|null); /** What kind of Mesh Data exists in this Triangle Mesh */ - public meshType?: "mesh" | "bmesh" + public meshType?: ("mesh"|"bmesh"); /** * Creates a new TriangleMesh instance using the specified properties. * @param [properties] Properties to set * @returns TriangleMesh instance */ - public static create(properties?: mirabuf.ITriangleMesh): mirabuf.TriangleMesh + public static create(properties?: mirabuf.ITriangleMesh): mirabuf.TriangleMesh; /** * Encodes the specified TriangleMesh message. Does not implicitly {@link mirabuf.TriangleMesh.verify|verify} messages. @@ -820,7 +826,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.ITriangleMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.ITriangleMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified TriangleMesh message, length delimited. Does not implicitly {@link mirabuf.TriangleMesh.verify|verify} messages. @@ -828,7 +834,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.ITriangleMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.ITriangleMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a TriangleMesh message from the specified reader or buffer. @@ -838,7 +844,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.TriangleMesh + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.TriangleMesh; /** * Decodes a TriangleMesh message from the specified reader or buffer, length delimited. @@ -847,21 +853,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.TriangleMesh + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.TriangleMesh; /** * Verifies a TriangleMesh message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a TriangleMesh message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns TriangleMesh */ - public static fromObject(object: { [k: string]: any }): mirabuf.TriangleMesh + public static fromObject(object: { [k: string]: any }): mirabuf.TriangleMesh; /** * Creates a plain object from a TriangleMesh message. Also converts values to other types if specified. @@ -869,66 +875,65 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.TriangleMesh, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.TriangleMesh, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this TriangleMesh to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for TriangleMesh * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Mesh. */ interface IMesh { + /** Tri Mesh Verts vec3 */ - verts?: number[] | null + verts?: (number[]|null); /** Tri Mesh Normals vec3 */ - normals?: number[] | null + normals?: (number[]|null); /** Tri Mesh uv Mapping vec2 */ - uv?: number[] | null + uv?: (number[]|null); /** Tri Mesh indicies (Vert Map) */ - indices?: number[] | null + indices?: (number[]|null); } /** Mesh Data stored as generic Data Structure */ class Mesh implements IMesh { + /** * Constructs a new Mesh. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IMesh) + constructor(properties?: mirabuf.IMesh); /** Tri Mesh Verts vec3 */ - public verts: number[] + public verts: number[]; /** Tri Mesh Normals vec3 */ - public normals: number[] + public normals: number[]; /** Tri Mesh uv Mapping vec2 */ - public uv: number[] + public uv: number[]; /** Tri Mesh indicies (Vert Map) */ - public indices: number[] + public indices: number[]; /** * Creates a new Mesh instance using the specified properties. * @param [properties] Properties to set * @returns Mesh instance */ - public static create(properties?: mirabuf.IMesh): mirabuf.Mesh + public static create(properties?: mirabuf.IMesh): mirabuf.Mesh; /** * Encodes the specified Mesh message. Does not implicitly {@link mirabuf.Mesh.verify|verify} messages. @@ -936,7 +941,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Mesh message, length delimited. Does not implicitly {@link mirabuf.Mesh.verify|verify} messages. @@ -944,7 +949,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Mesh message from the specified reader or buffer. @@ -954,7 +959,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Mesh + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Mesh; /** * Decodes a Mesh message from the specified reader or buffer, length delimited. @@ -963,21 +968,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Mesh + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Mesh; /** * Verifies a Mesh message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Mesh message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Mesh */ - public static fromObject(object: { [k: string]: any }): mirabuf.Mesh + public static fromObject(object: { [k: string]: any }): mirabuf.Mesh; /** * Creates a plain object from a Mesh message. Also converts values to other types if specified. @@ -985,45 +990,47 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Mesh, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Mesh, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Mesh to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Mesh * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BinaryMesh. */ interface IBinaryMesh { + /** BEWARE of ENDIANESS */ - data?: Uint8Array | null + data?: (Uint8Array|null); } /** Mesh used for more effective file transfers */ class BinaryMesh implements IBinaryMesh { + /** * Constructs a new BinaryMesh. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IBinaryMesh) + constructor(properties?: mirabuf.IBinaryMesh); /** BEWARE of ENDIANESS */ - public data: Uint8Array + public data: Uint8Array; /** * Creates a new BinaryMesh instance using the specified properties. * @param [properties] Properties to set * @returns BinaryMesh instance */ - public static create(properties?: mirabuf.IBinaryMesh): mirabuf.BinaryMesh + public static create(properties?: mirabuf.IBinaryMesh): mirabuf.BinaryMesh; /** * Encodes the specified BinaryMesh message. Does not implicitly {@link mirabuf.BinaryMesh.verify|verify} messages. @@ -1031,7 +1038,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IBinaryMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IBinaryMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified BinaryMesh message, length delimited. Does not implicitly {@link mirabuf.BinaryMesh.verify|verify} messages. @@ -1039,7 +1046,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IBinaryMesh, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IBinaryMesh, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a BinaryMesh message from the specified reader or buffer. @@ -1049,7 +1056,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.BinaryMesh + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.BinaryMesh; /** * Decodes a BinaryMesh message from the specified reader or buffer, length delimited. @@ -1058,21 +1065,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.BinaryMesh + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.BinaryMesh; /** * Verifies a BinaryMesh message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a BinaryMesh message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns BinaryMesh */ - public static fromObject(object: { [k: string]: any }): mirabuf.BinaryMesh + public static fromObject(object: { [k: string]: any }): mirabuf.BinaryMesh; /** * Creates a plain object from a BinaryMesh message. Also converts values to other types if specified. @@ -1080,60 +1087,59 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.BinaryMesh, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.BinaryMesh, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this BinaryMesh to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for BinaryMesh * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Node. */ interface INode { + /** the reference ID for whatever kind of graph this is */ - value?: string | null + value?: (string|null); /** the children for the given leaf */ - children?: mirabuf.INode[] | null + children?: (mirabuf.INode[]|null); /** other associated data that can be used */ - userData?: mirabuf.IUserData | null + userData?: (mirabuf.IUserData|null); } /** Represents a Node. */ class Node implements INode { + /** * Constructs a new Node. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.INode) + constructor(properties?: mirabuf.INode); /** the reference ID for whatever kind of graph this is */ - public value: string + public value: string; /** the children for the given leaf */ - public children: mirabuf.INode[] + public children: mirabuf.INode[]; /** other associated data that can be used */ - public userData?: mirabuf.IUserData | null + public userData?: (mirabuf.IUserData|null); /** * Creates a new Node instance using the specified properties. * @param [properties] Properties to set * @returns Node instance */ - public static create(properties?: mirabuf.INode): mirabuf.Node + public static create(properties?: mirabuf.INode): mirabuf.Node; /** * Encodes the specified Node message. Does not implicitly {@link mirabuf.Node.verify|verify} messages. @@ -1141,7 +1147,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.INode, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.INode, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Node message, length delimited. Does not implicitly {@link mirabuf.Node.verify|verify} messages. @@ -1149,7 +1155,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.INode, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.INode, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Node message from the specified reader or buffer. @@ -1159,7 +1165,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Node + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Node; /** * Decodes a Node message from the specified reader or buffer, length delimited. @@ -1168,21 +1174,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Node + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Node; /** * Verifies a Node message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Node message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Node */ - public static fromObject(object: { [k: string]: any }): mirabuf.Node + public static fromObject(object: { [k: string]: any }): mirabuf.Node; /** * Creates a plain object from a Node message. Also converts values to other types if specified. @@ -1190,45 +1196,47 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Node, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Node to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Node * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GraphContainer. */ interface IGraphContainer { + /** GraphContainer nodes */ - nodes?: mirabuf.INode[] | null + nodes?: (mirabuf.INode[]|null); } /** Represents a GraphContainer. */ class GraphContainer implements IGraphContainer { + /** * Constructs a new GraphContainer. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IGraphContainer) + constructor(properties?: mirabuf.IGraphContainer); /** GraphContainer nodes. */ - public nodes: mirabuf.INode[] + public nodes: mirabuf.INode[]; /** * Creates a new GraphContainer instance using the specified properties. * @param [properties] Properties to set * @returns GraphContainer instance */ - public static create(properties?: mirabuf.IGraphContainer): mirabuf.GraphContainer + public static create(properties?: mirabuf.IGraphContainer): mirabuf.GraphContainer; /** * Encodes the specified GraphContainer message. Does not implicitly {@link mirabuf.GraphContainer.verify|verify} messages. @@ -1236,7 +1244,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IGraphContainer, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IGraphContainer, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified GraphContainer message, length delimited. Does not implicitly {@link mirabuf.GraphContainer.verify|verify} messages. @@ -1244,7 +1252,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IGraphContainer, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IGraphContainer, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GraphContainer message from the specified reader or buffer. @@ -1254,7 +1262,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.GraphContainer + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.GraphContainer; /** * Decodes a GraphContainer message from the specified reader or buffer, length delimited. @@ -1263,21 +1271,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.GraphContainer + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.GraphContainer; /** * Verifies a GraphContainer message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GraphContainer message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns GraphContainer */ - public static fromObject(object: { [k: string]: any }): mirabuf.GraphContainer + public static fromObject(object: { [k: string]: any }): mirabuf.GraphContainer; /** * Creates a plain object from a GraphContainer message. Also converts values to other types if specified. @@ -1285,29 +1293,27 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.GraphContainer, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.GraphContainer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GraphContainer to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for GraphContainer * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UserData. */ interface IUserData { + /** e.g. data["wheel"] = "yes" */ - data?: { [k: string]: string } | null + data?: ({ [k: string]: string }|null); } /** @@ -1316,21 +1322,22 @@ export namespace mirabuf { * Arbitrary data to append to a given message in map form */ class UserData implements IUserData { + /** * Constructs a new UserData. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IUserData) + constructor(properties?: mirabuf.IUserData); /** e.g. data["wheel"] = "yes" */ - public data: { [k: string]: string } + public data: { [k: string]: string }; /** * Creates a new UserData instance using the specified properties. * @param [properties] Properties to set * @returns UserData instance */ - public static create(properties?: mirabuf.IUserData): mirabuf.UserData + public static create(properties?: mirabuf.IUserData): mirabuf.UserData; /** * Encodes the specified UserData message. Does not implicitly {@link mirabuf.UserData.verify|verify} messages. @@ -1338,7 +1345,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IUserData, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IUserData, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified UserData message, length delimited. Does not implicitly {@link mirabuf.UserData.verify|verify} messages. @@ -1346,7 +1353,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IUserData, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IUserData, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a UserData message from the specified reader or buffer. @@ -1356,7 +1363,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.UserData + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.UserData; /** * Decodes a UserData message from the specified reader or buffer, length delimited. @@ -1365,21 +1372,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.UserData + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.UserData; /** * Verifies a UserData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a UserData message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns UserData */ - public static fromObject(object: { [k: string]: any }): mirabuf.UserData + public static fromObject(object: { [k: string]: any }): mirabuf.UserData; /** * Creates a plain object from a UserData message. Also converts values to other types if specified. @@ -1387,57 +1394,59 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.UserData, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.UserData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this UserData to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for UserData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Vector3. */ interface IVector3 { + /** Vector3 x */ - x?: number | null + x?: (number|null); /** Vector3 y */ - y?: number | null + y?: (number|null); /** Vector3 z */ - z?: number | null + z?: (number|null); } /** Represents a Vector3. */ class Vector3 implements IVector3 { + /** * Constructs a new Vector3. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IVector3) + constructor(properties?: mirabuf.IVector3); /** Vector3 x. */ - public x: number + public x: number; /** Vector3 y. */ - public y: number + public y: number; /** Vector3 z. */ - public z: number + public z: number; /** * Creates a new Vector3 instance using the specified properties. * @param [properties] Properties to set * @returns Vector3 instance */ - public static create(properties?: mirabuf.IVector3): mirabuf.Vector3 + public static create(properties?: mirabuf.IVector3): mirabuf.Vector3; /** * Encodes the specified Vector3 message. Does not implicitly {@link mirabuf.Vector3.verify|verify} messages. @@ -1445,7 +1454,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IVector3, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IVector3, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Vector3 message, length delimited. Does not implicitly {@link mirabuf.Vector3.verify|verify} messages. @@ -1453,7 +1462,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IVector3, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IVector3, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Vector3 message from the specified reader or buffer. @@ -1463,7 +1472,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Vector3 + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Vector3; /** * Decodes a Vector3 message from the specified reader or buffer, length delimited. @@ -1472,21 +1481,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Vector3 + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Vector3; /** * Verifies a Vector3 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Vector3 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Vector3 */ - public static fromObject(object: { [k: string]: any }): mirabuf.Vector3 + public static fromObject(object: { [k: string]: any }): mirabuf.Vector3; /** * Creates a plain object from a Vector3 message. Also converts values to other types if specified. @@ -1494,69 +1503,71 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Vector3, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Vector3, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Vector3 to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Vector3 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PhysicalProperties. */ interface IPhysicalProperties { + /** kg per cubic cm kg/(cm^3) */ - density?: number | null + density?: (number|null); /** kg */ - mass?: number | null + mass?: (number|null); /** cm^3 */ - volume?: number | null + volume?: (number|null); /** cm^2 */ - area?: number | null + area?: (number|null); /** non-negative? Vec3 */ - com?: mirabuf.IVector3 | null + com?: (mirabuf.IVector3|null); } /** Represents a PhysicalProperties. */ class PhysicalProperties implements IPhysicalProperties { + /** * Constructs a new PhysicalProperties. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IPhysicalProperties) + constructor(properties?: mirabuf.IPhysicalProperties); /** kg per cubic cm kg/(cm^3) */ - public density: number + public density: number; /** kg */ - public mass: number + public mass: number; /** cm^3 */ - public volume: number + public volume: number; /** cm^2 */ - public area: number + public area: number; /** non-negative? Vec3 */ - public com?: mirabuf.IVector3 | null + public com?: (mirabuf.IVector3|null); /** * Creates a new PhysicalProperties instance using the specified properties. * @param [properties] Properties to set * @returns PhysicalProperties instance */ - public static create(properties?: mirabuf.IPhysicalProperties): mirabuf.PhysicalProperties + public static create(properties?: mirabuf.IPhysicalProperties): mirabuf.PhysicalProperties; /** * Encodes the specified PhysicalProperties message. Does not implicitly {@link mirabuf.PhysicalProperties.verify|verify} messages. @@ -1564,7 +1575,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IPhysicalProperties, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IPhysicalProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PhysicalProperties message, length delimited. Does not implicitly {@link mirabuf.PhysicalProperties.verify|verify} messages. @@ -1572,7 +1583,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IPhysicalProperties, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IPhysicalProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PhysicalProperties message from the specified reader or buffer. @@ -1582,7 +1593,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.PhysicalProperties + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.PhysicalProperties; /** * Decodes a PhysicalProperties message from the specified reader or buffer, length delimited. @@ -1591,21 +1602,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.PhysicalProperties + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.PhysicalProperties; /** * Verifies a PhysicalProperties message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PhysicalProperties message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PhysicalProperties */ - public static fromObject(object: { [k: string]: any }): mirabuf.PhysicalProperties + public static fromObject(object: { [k: string]: any }): mirabuf.PhysicalProperties; /** * Creates a plain object from a PhysicalProperties message. Also converts values to other types if specified. @@ -1613,29 +1624,27 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.PhysicalProperties, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.PhysicalProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PhysicalProperties to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for PhysicalProperties * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Transform. */ interface ITransform { + /** Transform spatialMatrix */ - spatialMatrix?: number[] | null + spatialMatrix?: (number[]|null); } /** @@ -1644,21 +1653,22 @@ export namespace mirabuf { * Data needed to apply scale, position, and rotational changes */ class Transform implements ITransform { + /** * Constructs a new Transform. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.ITransform) + constructor(properties?: mirabuf.ITransform); /** Transform spatialMatrix. */ - public spatialMatrix: number[] + public spatialMatrix: number[]; /** * Creates a new Transform instance using the specified properties. * @param [properties] Properties to set * @returns Transform instance */ - public static create(properties?: mirabuf.ITransform): mirabuf.Transform + public static create(properties?: mirabuf.ITransform): mirabuf.Transform; /** * Encodes the specified Transform message. Does not implicitly {@link mirabuf.Transform.verify|verify} messages. @@ -1666,7 +1676,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.ITransform, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.ITransform, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Transform message, length delimited. Does not implicitly {@link mirabuf.Transform.verify|verify} messages. @@ -1674,7 +1684,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.ITransform, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.ITransform, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Transform message from the specified reader or buffer. @@ -1684,7 +1694,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Transform + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Transform; /** * Decodes a Transform message from the specified reader or buffer, length delimited. @@ -1693,21 +1703,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Transform + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Transform; /** * Verifies a Transform message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Transform message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Transform */ - public static fromObject(object: { [k: string]: any }): mirabuf.Transform + public static fromObject(object: { [k: string]: any }): mirabuf.Transform; /** * Creates a plain object from a Transform message. Also converts values to other types if specified. @@ -1715,63 +1725,65 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Transform, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Transform, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Transform to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Transform * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Color. */ interface IColor { + /** Color R */ - R?: number | null + R?: (number|null); /** Color G */ - G?: number | null + G?: (number|null); /** Color B */ - B?: number | null + B?: (number|null); /** Color A */ - A?: number | null + A?: (number|null); } /** Represents a Color. */ class Color implements IColor { + /** * Constructs a new Color. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IColor) + constructor(properties?: mirabuf.IColor); /** Color R. */ - public R: number + public R: number; /** Color G. */ - public G: number + public G: number; /** Color B. */ - public B: number + public B: number; /** Color A. */ - public A: number + public A: number; /** * Creates a new Color instance using the specified properties. * @param [properties] Properties to set * @returns Color instance */ - public static create(properties?: mirabuf.IColor): mirabuf.Color + public static create(properties?: mirabuf.IColor): mirabuf.Color; /** * Encodes the specified Color message. Does not implicitly {@link mirabuf.Color.verify|verify} messages. @@ -1779,7 +1791,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IColor, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IColor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Color message, length delimited. Does not implicitly {@link mirabuf.Color.verify|verify} messages. @@ -1787,7 +1799,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IColor, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IColor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Color message from the specified reader or buffer. @@ -1797,7 +1809,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Color + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Color; /** * Decodes a Color message from the specified reader or buffer, length delimited. @@ -1806,21 +1818,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Color + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Color; /** * Verifies a Color message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Color message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Color */ - public static fromObject(object: { [k: string]: any }): mirabuf.Color + public static fromObject(object: { [k: string]: any }): mirabuf.Color; /** * Creates a plain object from a Color message. Also converts values to other types if specified. @@ -1828,39 +1840,40 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Color, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Color, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Color to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Color * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Axis enum. */ enum Axis { X = 0, Y = 1, - Z = 2, + Z = 2 } /** Properties of an Info. */ interface IInfo { + /** Info GUID */ - GUID?: string | null + GUID?: (string|null); /** Info name */ - name?: string | null + name?: (string|null); /** Info version */ - version?: number | null + version?: (number|null); } /** @@ -1868,27 +1881,28 @@ export namespace mirabuf { * The location where you can access the GUID for a reference */ class Info implements IInfo { + /** * Constructs a new Info. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IInfo) + constructor(properties?: mirabuf.IInfo); /** Info GUID. */ - public GUID: string + public GUID: string; /** Info name. */ - public name: string + public name: string; /** Info version. */ - public version: number + public version: number; /** * Creates a new Info instance using the specified properties. * @param [properties] Properties to set * @returns Info instance */ - public static create(properties?: mirabuf.IInfo): mirabuf.Info + public static create(properties?: mirabuf.IInfo): mirabuf.Info; /** * Encodes the specified Info message. Does not implicitly {@link mirabuf.Info.verify|verify} messages. @@ -1896,7 +1910,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IInfo, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Info message, length delimited. Does not implicitly {@link mirabuf.Info.verify|verify} messages. @@ -1904,7 +1918,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IInfo, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Info message from the specified reader or buffer. @@ -1914,7 +1928,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Info + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Info; /** * Decodes an Info message from the specified reader or buffer, length delimited. @@ -1923,21 +1937,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Info + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Info; /** * Verifies an Info message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates an Info message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Info */ - public static fromObject(object: { [k: string]: any }): mirabuf.Info + public static fromObject(object: { [k: string]: any }): mirabuf.Info; /** * Creates a plain object from an Info message. Also converts values to other types if specified. @@ -1945,38 +1959,39 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Info, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Info, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Info to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Info * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Thumbnail. */ interface IThumbnail { + /** Image Width */ - width?: number | null + width?: (number|null); /** Image Height */ - height?: number | null + height?: (number|null); /** Image Extension - ex. (.png, .bitmap, .jpeg) */ - extension?: string | null + extension?: (string|null); /** Transparency - true from fusion when correctly configured */ - transparent?: boolean | null + transparent?: (boolean|null); /** Data as read from the file in bytes[] form */ - data?: Uint8Array | null + data?: (Uint8Array|null); } /** @@ -1984,33 +1999,34 @@ export namespace mirabuf { * Most of the Time Fusion can encode the file with transparency as PNG not bitmap */ class Thumbnail implements IThumbnail { + /** * Constructs a new Thumbnail. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.IThumbnail) + constructor(properties?: mirabuf.IThumbnail); /** Image Width */ - public width: number + public width: number; /** Image Height */ - public height: number + public height: number; /** Image Extension - ex. (.png, .bitmap, .jpeg) */ - public extension: string + public extension: string; /** Transparency - true from fusion when correctly configured */ - public transparent: boolean + public transparent: boolean; /** Data as read from the file in bytes[] form */ - public data: Uint8Array + public data: Uint8Array; /** * Creates a new Thumbnail instance using the specified properties. * @param [properties] Properties to set * @returns Thumbnail instance */ - public static create(properties?: mirabuf.IThumbnail): mirabuf.Thumbnail + public static create(properties?: mirabuf.IThumbnail): mirabuf.Thumbnail; /** * Encodes the specified Thumbnail message. Does not implicitly {@link mirabuf.Thumbnail.verify|verify} messages. @@ -2018,7 +2034,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.IThumbnail, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.IThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Thumbnail message, length delimited. Does not implicitly {@link mirabuf.Thumbnail.verify|verify} messages. @@ -2026,7 +2042,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.IThumbnail, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.IThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Thumbnail message from the specified reader or buffer. @@ -2036,7 +2052,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.Thumbnail + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.Thumbnail; /** * Decodes a Thumbnail message from the specified reader or buffer, length delimited. @@ -2045,21 +2061,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.Thumbnail + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.Thumbnail; /** * Verifies a Thumbnail message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Thumbnail message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Thumbnail */ - public static fromObject(object: { [k: string]: any }): mirabuf.Thumbnail + public static fromObject(object: { [k: string]: any }): mirabuf.Thumbnail; /** * Creates a plain object from a Thumbnail message. Also converts values to other types if specified. @@ -2067,42 +2083,42 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: mirabuf.Thumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any } + public static toObject(message: mirabuf.Thumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Thumbnail to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Thumbnail * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Namespace joint. */ namespace joint { + /** Properties of a Joints. */ interface IJoints { + /** name, version, uid */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Unique Joint Implementations */ - jointDefinitions?: { [k: string]: mirabuf.joint.IJoint } | null + jointDefinitions?: ({ [k: string]: mirabuf.joint.IJoint }|null); /** Instances of the Joint Implementations */ - jointInstances?: { - [k: string]: mirabuf.joint.IJointInstance - } | null + jointInstances?: ({ [k: string]: mirabuf.joint.IJointInstance }|null); /** Rigidgroups ? */ - rigidGroups?: mirabuf.joint.IRigidGroup[] | null + rigidGroups?: (mirabuf.joint.IRigidGroup[]|null); /** Collection of all Motors exported */ - motorDefinitions?: { [k: string]: mirabuf.motor.IMotor } | null + motorDefinitions?: ({ [k: string]: mirabuf.motor.IMotor }|null); } /** @@ -2110,33 +2126,34 @@ export namespace mirabuf { * A way to define the motion between various group connections */ class Joints implements IJoints { + /** * Constructs a new Joints. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IJoints) + constructor(properties?: mirabuf.joint.IJoints); /** name, version, uid */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Unique Joint Implementations */ - public jointDefinitions: { [k: string]: mirabuf.joint.IJoint } + public jointDefinitions: { [k: string]: mirabuf.joint.IJoint }; /** Instances of the Joint Implementations */ - public jointInstances: { [k: string]: mirabuf.joint.IJointInstance } + public jointInstances: { [k: string]: mirabuf.joint.IJointInstance }; /** Rigidgroups ? */ - public rigidGroups: mirabuf.joint.IRigidGroup[] + public rigidGroups: mirabuf.joint.IRigidGroup[]; /** Collection of all Motors exported */ - public motorDefinitions: { [k: string]: mirabuf.motor.IMotor } + public motorDefinitions: { [k: string]: mirabuf.motor.IMotor }; /** * Creates a new Joints instance using the specified properties. * @param [properties] Properties to set * @returns Joints instance */ - public static create(properties?: mirabuf.joint.IJoints): mirabuf.joint.Joints + public static create(properties?: mirabuf.joint.IJoints): mirabuf.joint.Joints; /** * Encodes the specified Joints message. Does not implicitly {@link mirabuf.joint.Joints.verify|verify} messages. @@ -2144,7 +2161,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IJoints, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IJoints, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Joints message, length delimited. Does not implicitly {@link mirabuf.joint.Joints.verify|verify} messages. @@ -2152,7 +2169,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.IJoints, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IJoints, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Joints message from the specified reader or buffer. @@ -2162,7 +2179,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.Joints + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.Joints; /** * Decodes a Joints message from the specified reader or buffer, length delimited. @@ -2171,21 +2188,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.Joints + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.Joints; /** * Verifies a Joints message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Joints message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Joints */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.Joints + public static fromObject(object: { [k: string]: any }): mirabuf.joint.Joints; /** * Creates a plain object from a Joints message. Also converts values to other types if specified. @@ -2193,23 +2210,20 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.Joints, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.Joints, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Joints to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Joints * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** JointMotion enum. */ @@ -2221,37 +2235,38 @@ export namespace mirabuf { PINSLOT = 4, PLANAR = 5, BALL = 6, - CUSTOM = 7, + CUSTOM = 7 } /** Properties of a JointInstance. */ interface IJointInstance { + /** JointInstance info */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** JointInstance isEndEffector */ - isEndEffector?: boolean | null + isEndEffector?: (boolean|null); /** JointInstance parentPart */ - parentPart?: string | null + parentPart?: (string|null); /** JointInstance childPart */ - childPart?: string | null + childPart?: (string|null); /** JointInstance jointReference */ - jointReference?: string | null + jointReference?: (string|null); /** JointInstance offset */ - offset?: mirabuf.IVector3 | null + offset?: (mirabuf.IVector3|null); /** JointInstance parts */ - parts?: mirabuf.IGraphContainer | null + parts?: (mirabuf.IGraphContainer|null); /** JointInstance signalReference */ - signalReference?: string | null + signalReference?: (string|null); /** JointInstance motionLink */ - motionLink?: mirabuf.joint.IMotionLink[] | null + motionLink?: (mirabuf.joint.IMotionLink[]|null); } /** @@ -2259,45 +2274,46 @@ export namespace mirabuf { * Instancing helps with identifiy closed loop systems. */ class JointInstance implements IJointInstance { + /** * Constructs a new JointInstance. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IJointInstance) + constructor(properties?: mirabuf.joint.IJointInstance); /** JointInstance info. */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** JointInstance isEndEffector. */ - public isEndEffector: boolean + public isEndEffector: boolean; /** JointInstance parentPart. */ - public parentPart: string + public parentPart: string; /** JointInstance childPart. */ - public childPart: string + public childPart: string; /** JointInstance jointReference. */ - public jointReference: string + public jointReference: string; /** JointInstance offset. */ - public offset?: mirabuf.IVector3 | null + public offset?: (mirabuf.IVector3|null); /** JointInstance parts. */ - public parts?: mirabuf.IGraphContainer | null + public parts?: (mirabuf.IGraphContainer|null); /** JointInstance signalReference. */ - public signalReference: string + public signalReference: string; /** JointInstance motionLink. */ - public motionLink: mirabuf.joint.IMotionLink[] + public motionLink: mirabuf.joint.IMotionLink[]; /** * Creates a new JointInstance instance using the specified properties. * @param [properties] Properties to set * @returns JointInstance instance */ - public static create(properties?: mirabuf.joint.IJointInstance): mirabuf.joint.JointInstance + public static create(properties?: mirabuf.joint.IJointInstance): mirabuf.joint.JointInstance; /** * Encodes the specified JointInstance message. Does not implicitly {@link mirabuf.joint.JointInstance.verify|verify} messages. @@ -2305,7 +2321,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IJointInstance, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IJointInstance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified JointInstance message, length delimited. Does not implicitly {@link mirabuf.joint.JointInstance.verify|verify} messages. @@ -2313,10 +2329,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IJointInstance, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IJointInstance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a JointInstance message from the specified reader or buffer. @@ -2326,7 +2339,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.JointInstance + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.JointInstance; /** * Decodes a JointInstance message from the specified reader or buffer, length delimited. @@ -2335,21 +2348,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.JointInstance + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.JointInstance; /** * Verifies a JointInstance message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a JointInstance message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns JointInstance */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.JointInstance + public static fromObject(object: { [k: string]: any }): mirabuf.joint.JointInstance; /** * Creates a plain object from a JointInstance message. Also converts values to other types if specified. @@ -2357,35 +2370,33 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.JointInstance, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.JointInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this JointInstance to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for JointInstance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MotionLink. */ interface IMotionLink { + /** MotionLink jointInstance */ - jointInstance?: string | null + jointInstance?: (string|null); /** MotionLink ratio */ - ratio?: number | null + ratio?: (number|null); /** MotionLink reversed */ - reversed?: boolean | null + reversed?: (boolean|null); } /** @@ -2394,27 +2405,28 @@ export namespace mirabuf { * This is useful for moving parts restricted by belts and gears */ class MotionLink implements IMotionLink { + /** * Constructs a new MotionLink. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IMotionLink) + constructor(properties?: mirabuf.joint.IMotionLink); /** MotionLink jointInstance. */ - public jointInstance: string + public jointInstance: string; /** MotionLink ratio. */ - public ratio: number + public ratio: number; /** MotionLink reversed. */ - public reversed: boolean + public reversed: boolean; /** * Creates a new MotionLink instance using the specified properties. * @param [properties] Properties to set * @returns MotionLink instance */ - public static create(properties?: mirabuf.joint.IMotionLink): mirabuf.joint.MotionLink + public static create(properties?: mirabuf.joint.IMotionLink): mirabuf.joint.MotionLink; /** * Encodes the specified MotionLink message. Does not implicitly {@link mirabuf.joint.MotionLink.verify|verify} messages. @@ -2422,7 +2434,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IMotionLink, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IMotionLink, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified MotionLink message, length delimited. Does not implicitly {@link mirabuf.joint.MotionLink.verify|verify} messages. @@ -2430,10 +2442,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IMotionLink, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IMotionLink, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MotionLink message from the specified reader or buffer. @@ -2443,7 +2452,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.MotionLink + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.MotionLink; /** * Decodes a MotionLink message from the specified reader or buffer, length delimited. @@ -2452,21 +2461,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.MotionLink + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.MotionLink; /** * Verifies a MotionLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a MotionLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns MotionLink */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.MotionLink + public static fromObject(object: { [k: string]: any }): mirabuf.joint.MotionLink; /** * Creates a plain object from a MotionLink message. Also converts values to other types if specified. @@ -2474,53 +2483,51 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.MotionLink, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.MotionLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this MotionLink to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for MotionLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Joint. */ interface IJoint { + /** Joint name, ID, version, etc */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Joint origin */ - origin?: mirabuf.IVector3 | null + origin?: (mirabuf.IVector3|null); /** Joint jointMotionType */ - jointMotionType?: mirabuf.joint.JointMotion | null + jointMotionType?: (mirabuf.joint.JointMotion|null); /** Joint breakMagnitude */ - breakMagnitude?: number | null + breakMagnitude?: (number|null); /** ONEOF rotational joint */ - rotational?: mirabuf.joint.IRotationalJoint | null + rotational?: (mirabuf.joint.IRotationalJoint|null); /** ONEOF prismatic joint */ - prismatic?: mirabuf.joint.IPrismaticJoint | null + prismatic?: (mirabuf.joint.IPrismaticJoint|null); /** ONEOF custom joint */ - custom?: mirabuf.joint.ICustomJoint | null + custom?: (mirabuf.joint.ICustomJoint|null); /** Additional information someone can query or store relative to your joint. */ - userData?: mirabuf.IUserData | null + userData?: (mirabuf.IUserData|null); /** Motor definition reference to lookup in joints collection */ - motorReference?: string | null + motorReference?: (string|null); } /** @@ -2529,48 +2536,49 @@ export namespace mirabuf { * NOTE: A spring motion is a joint with no driver */ class Joint implements IJoint { + /** * Constructs a new Joint. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IJoint) + constructor(properties?: mirabuf.joint.IJoint); /** Joint name, ID, version, etc */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Joint origin. */ - public origin?: mirabuf.IVector3 | null + public origin?: (mirabuf.IVector3|null); /** Joint jointMotionType. */ - public jointMotionType: mirabuf.joint.JointMotion + public jointMotionType: mirabuf.joint.JointMotion; /** Joint breakMagnitude. */ - public breakMagnitude: number + public breakMagnitude: number; /** ONEOF rotational joint */ - public rotational?: mirabuf.joint.IRotationalJoint | null + public rotational?: (mirabuf.joint.IRotationalJoint|null); /** ONEOF prismatic joint */ - public prismatic?: mirabuf.joint.IPrismaticJoint | null + public prismatic?: (mirabuf.joint.IPrismaticJoint|null); /** ONEOF custom joint */ - public custom?: mirabuf.joint.ICustomJoint | null + public custom?: (mirabuf.joint.ICustomJoint|null); /** Additional information someone can query or store relative to your joint. */ - public userData?: mirabuf.IUserData | null + public userData?: (mirabuf.IUserData|null); /** Motor definition reference to lookup in joints collection */ - public motorReference: string + public motorReference: string; /** Joint JointMotion. */ - public JointMotion?: "rotational" | "prismatic" | "custom" + public JointMotion?: ("rotational"|"prismatic"|"custom"); /** * Creates a new Joint instance using the specified properties. * @param [properties] Properties to set * @returns Joint instance */ - public static create(properties?: mirabuf.joint.IJoint): mirabuf.joint.Joint + public static create(properties?: mirabuf.joint.IJoint): mirabuf.joint.Joint; /** * Encodes the specified Joint message. Does not implicitly {@link mirabuf.joint.Joint.verify|verify} messages. @@ -2578,7 +2586,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Joint message, length delimited. Does not implicitly {@link mirabuf.joint.Joint.verify|verify} messages. @@ -2586,7 +2594,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.IJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Joint message from the specified reader or buffer. @@ -2596,7 +2604,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.Joint + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.Joint; /** * Decodes a Joint message from the specified reader or buffer, length delimited. @@ -2605,21 +2613,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.Joint + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.Joint; /** * Verifies a Joint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Joint message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Joint */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.Joint + public static fromObject(object: { [k: string]: any }): mirabuf.joint.Joint; /** * Creates a plain object from a Joint message. Also converts values to other types if specified. @@ -2627,54 +2635,53 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.Joint, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.Joint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Joint to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Joint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Dynamics. */ interface IDynamics { + /** Damping effect on a given joint motion */ - damping?: number | null + damping?: (number|null); /** Friction effect on a given joint motion */ - friction?: number | null + friction?: (number|null); } /** Dynamics specify the mechanical effects on the motion. */ class Dynamics implements IDynamics { + /** * Constructs a new Dynamics. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IDynamics) + constructor(properties?: mirabuf.joint.IDynamics); /** Damping effect on a given joint motion */ - public damping: number + public damping: number; /** Friction effect on a given joint motion */ - public friction: number + public friction: number; /** * Creates a new Dynamics instance using the specified properties. * @param [properties] Properties to set * @returns Dynamics instance */ - public static create(properties?: mirabuf.joint.IDynamics): mirabuf.joint.Dynamics + public static create(properties?: mirabuf.joint.IDynamics): mirabuf.joint.Dynamics; /** * Encodes the specified Dynamics message. Does not implicitly {@link mirabuf.joint.Dynamics.verify|verify} messages. @@ -2682,7 +2689,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IDynamics, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IDynamics, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Dynamics message, length delimited. Does not implicitly {@link mirabuf.joint.Dynamics.verify|verify} messages. @@ -2690,7 +2697,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.IDynamics, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IDynamics, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Dynamics message from the specified reader or buffer. @@ -2700,7 +2707,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.Dynamics + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.Dynamics; /** * Decodes a Dynamics message from the specified reader or buffer, length delimited. @@ -2709,21 +2716,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.Dynamics + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.Dynamics; /** * Verifies a Dynamics message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Dynamics message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Dynamics */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.Dynamics + public static fromObject(object: { [k: string]: any }): mirabuf.joint.Dynamics; /** * Creates a plain object from a Dynamics message. Also converts values to other types if specified. @@ -2731,38 +2738,36 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.Dynamics, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.Dynamics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Dynamics to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Dynamics * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Limits. */ interface ILimits { + /** Lower Limit corresponds to default displacement */ - lower?: number | null + lower?: (number|null); /** Upper Limit is the joint extent */ - upper?: number | null + upper?: (number|null); /** Velocity Max in m/s^2 (angular for rotational) */ - velocity?: number | null + velocity?: (number|null); /** Effort is the absolute force a joint can apply for a given instant - ROS has a great article on it http://wiki.ros.org/pr2_controller_manager/safety_limits */ - effort?: number | null + effort?: (number|null); } /** @@ -2771,30 +2776,31 @@ export namespace mirabuf { * TODO: Add units */ class Limits implements ILimits { + /** * Constructs a new Limits. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.ILimits) + constructor(properties?: mirabuf.joint.ILimits); /** Lower Limit corresponds to default displacement */ - public lower: number + public lower: number; /** Upper Limit is the joint extent */ - public upper: number + public upper: number; /** Velocity Max in m/s^2 (angular for rotational) */ - public velocity: number + public velocity: number; /** Effort is the absolute force a joint can apply for a given instant - ROS has a great article on it http://wiki.ros.org/pr2_controller_manager/safety_limits */ - public effort: number + public effort: number; /** * Creates a new Limits instance using the specified properties. * @param [properties] Properties to set * @returns Limits instance */ - public static create(properties?: mirabuf.joint.ILimits): mirabuf.joint.Limits + public static create(properties?: mirabuf.joint.ILimits): mirabuf.joint.Limits; /** * Encodes the specified Limits message. Does not implicitly {@link mirabuf.joint.Limits.verify|verify} messages. @@ -2802,7 +2808,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.ILimits, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Limits message, length delimited. Does not implicitly {@link mirabuf.joint.Limits.verify|verify} messages. @@ -2810,7 +2816,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.ILimits, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.ILimits, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Limits message from the specified reader or buffer. @@ -2820,7 +2826,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.Limits + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.Limits; /** * Decodes a Limits message from the specified reader or buffer, length delimited. @@ -2829,21 +2835,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.Limits + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.Limits; /** * Verifies a Limits message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Limits message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Limits */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.Limits + public static fromObject(object: { [k: string]: any }): mirabuf.joint.Limits; /** * Creates a plain object from a Limits message. Also converts values to other types if specified. @@ -2851,38 +2857,36 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.Limits, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.Limits, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Limits to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Limits * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Safety. */ interface ISafety { + /** Lower software limit */ - lowerLimit?: number | null + lowerLimit?: (number|null); /** Upper Software limit */ - upperLimit?: number | null + upperLimit?: (number|null); /** Relation between position and velocity limit */ - kPosition?: number | null + kPosition?: (number|null); /** Relation between effort and velocity limit */ - kVelocity?: number | null + kVelocity?: (number|null); } /** @@ -2894,30 +2898,31 @@ export namespace mirabuf { * http://wiki.ros.org/pr2_controller_manager/safety_limits */ class Safety implements ISafety { + /** * Constructs a new Safety. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.ISafety) + constructor(properties?: mirabuf.joint.ISafety); /** Lower software limit */ - public lowerLimit: number + public lowerLimit: number; /** Upper Software limit */ - public upperLimit: number + public upperLimit: number; /** Relation between position and velocity limit */ - public kPosition: number + public kPosition: number; /** Relation between effort and velocity limit */ - public kVelocity: number + public kVelocity: number; /** * Creates a new Safety instance using the specified properties. * @param [properties] Properties to set * @returns Safety instance */ - public static create(properties?: mirabuf.joint.ISafety): mirabuf.joint.Safety + public static create(properties?: mirabuf.joint.ISafety): mirabuf.joint.Safety; /** * Encodes the specified Safety message. Does not implicitly {@link mirabuf.joint.Safety.verify|verify} messages. @@ -2925,7 +2930,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.ISafety, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.ISafety, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Safety message, length delimited. Does not implicitly {@link mirabuf.joint.Safety.verify|verify} messages. @@ -2933,7 +2938,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.ISafety, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.ISafety, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Safety message from the specified reader or buffer. @@ -2943,7 +2948,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.Safety + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.Safety; /** * Decodes a Safety message from the specified reader or buffer, length delimited. @@ -2952,21 +2957,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.Safety + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.Safety; /** * Verifies a Safety message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Safety message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Safety */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.Safety + public static fromObject(object: { [k: string]: any }): mirabuf.joint.Safety; /** * Creates a plain object from a Safety message. Also converts values to other types if specified. @@ -2974,78 +2979,77 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.Safety, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.Safety, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Safety to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Safety * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DOF. */ interface IDOF { + /** In case you want to name this degree of freedom */ - name?: string | null + name?: (string|null); /** Axis the degree of freedom is pivoting by */ - axis?: mirabuf.IVector3 | null + axis?: (mirabuf.IVector3|null); /** Direction the axis vector is offset from - this has an incorrect naming scheme */ - pivotDirection?: mirabuf.Axis | null + pivotDirection?: (mirabuf.Axis|null); /** Dynamic properties of this joint pivot */ - dynamics?: mirabuf.joint.IDynamics | null + dynamics?: (mirabuf.joint.IDynamics|null); /** Limits of this freedom */ - limits?: mirabuf.joint.ILimits | null + limits?: (mirabuf.joint.ILimits|null); /** Current value of the DOF */ - value?: number | null + value?: (number|null); } /** DOF - representing the construction of a joint motion */ class DOF implements IDOF { + /** * Constructs a new DOF. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IDOF) + constructor(properties?: mirabuf.joint.IDOF); /** In case you want to name this degree of freedom */ - public name: string + public name: string; /** Axis the degree of freedom is pivoting by */ - public axis?: mirabuf.IVector3 | null + public axis?: (mirabuf.IVector3|null); /** Direction the axis vector is offset from - this has an incorrect naming scheme */ - public pivotDirection: mirabuf.Axis + public pivotDirection: mirabuf.Axis; /** Dynamic properties of this joint pivot */ - public dynamics?: mirabuf.joint.IDynamics | null + public dynamics?: (mirabuf.joint.IDynamics|null); /** Limits of this freedom */ - public limits?: mirabuf.joint.ILimits | null + public limits?: (mirabuf.joint.ILimits|null); /** Current value of the DOF */ - public value: number + public value: number; /** * Creates a new DOF instance using the specified properties. * @param [properties] Properties to set * @returns DOF instance */ - public static create(properties?: mirabuf.joint.IDOF): mirabuf.joint.DOF + public static create(properties?: mirabuf.joint.IDOF): mirabuf.joint.DOF; /** * Encodes the specified DOF message. Does not implicitly {@link mirabuf.joint.DOF.verify|verify} messages. @@ -3053,7 +3057,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IDOF, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IDOF, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified DOF message, length delimited. Does not implicitly {@link mirabuf.joint.DOF.verify|verify} messages. @@ -3061,7 +3065,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.joint.IDOF, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IDOF, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DOF message from the specified reader or buffer. @@ -3071,7 +3075,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.DOF + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.DOF; /** * Decodes a DOF message from the specified reader or buffer, length delimited. @@ -3080,21 +3084,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.DOF + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.DOF; /** * Verifies a DOF message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a DOF message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns DOF */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.DOF + public static fromObject(object: { [k: string]: any }): mirabuf.joint.DOF; /** * Creates a plain object from a DOF message. Also converts values to other types if specified. @@ -3102,29 +3106,27 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.DOF, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.DOF, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this DOF to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for DOF * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomJoint. */ interface ICustomJoint { + /** A list of degrees of freedom that the joint can contain */ - dofs?: mirabuf.joint.IDOF[] | null + dofs?: (mirabuf.joint.IDOF[]|null); } /** @@ -3132,21 +3134,22 @@ export namespace mirabuf { * There should be input validation to handle max freedom case. */ class CustomJoint implements ICustomJoint { + /** * Constructs a new CustomJoint. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.ICustomJoint) + constructor(properties?: mirabuf.joint.ICustomJoint); /** A list of degrees of freedom that the joint can contain */ - public dofs: mirabuf.joint.IDOF[] + public dofs: mirabuf.joint.IDOF[]; /** * Creates a new CustomJoint instance using the specified properties. * @param [properties] Properties to set * @returns CustomJoint instance */ - public static create(properties?: mirabuf.joint.ICustomJoint): mirabuf.joint.CustomJoint + public static create(properties?: mirabuf.joint.ICustomJoint): mirabuf.joint.CustomJoint; /** * Encodes the specified CustomJoint message. Does not implicitly {@link mirabuf.joint.CustomJoint.verify|verify} messages. @@ -3154,7 +3157,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.ICustomJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.ICustomJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified CustomJoint message, length delimited. Does not implicitly {@link mirabuf.joint.CustomJoint.verify|verify} messages. @@ -3162,10 +3165,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.ICustomJoint, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.ICustomJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CustomJoint message from the specified reader or buffer. @@ -3175,7 +3175,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.CustomJoint + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.CustomJoint; /** * Decodes a CustomJoint message from the specified reader or buffer, length delimited. @@ -3184,21 +3184,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.CustomJoint + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.CustomJoint; /** * Verifies a CustomJoint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a CustomJoint message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns CustomJoint */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.CustomJoint + public static fromObject(object: { [k: string]: any }): mirabuf.joint.CustomJoint; /** * Creates a plain object from a CustomJoint message. Also converts values to other types if specified. @@ -3206,29 +3206,27 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.CustomJoint, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.CustomJoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CustomJoint to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for CustomJoint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RotationalJoint. */ interface IRotationalJoint { + /** RotationalJoint rotationalFreedom */ - rotationalFreedom?: mirabuf.joint.IDOF | null + rotationalFreedom?: (mirabuf.joint.IDOF|null); } /** @@ -3236,21 +3234,22 @@ export namespace mirabuf { * This is the exact same as prismatic for now. */ class RotationalJoint implements IRotationalJoint { + /** * Constructs a new RotationalJoint. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IRotationalJoint) + constructor(properties?: mirabuf.joint.IRotationalJoint); /** RotationalJoint rotationalFreedom. */ - public rotationalFreedom?: mirabuf.joint.IDOF | null + public rotationalFreedom?: (mirabuf.joint.IDOF|null); /** * Creates a new RotationalJoint instance using the specified properties. * @param [properties] Properties to set * @returns RotationalJoint instance */ - public static create(properties?: mirabuf.joint.IRotationalJoint): mirabuf.joint.RotationalJoint + public static create(properties?: mirabuf.joint.IRotationalJoint): mirabuf.joint.RotationalJoint; /** * Encodes the specified RotationalJoint message. Does not implicitly {@link mirabuf.joint.RotationalJoint.verify|verify} messages. @@ -3258,7 +3257,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IRotationalJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IRotationalJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified RotationalJoint message, length delimited. Does not implicitly {@link mirabuf.joint.RotationalJoint.verify|verify} messages. @@ -3266,10 +3265,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IRotationalJoint, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IRotationalJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a RotationalJoint message from the specified reader or buffer. @@ -3279,7 +3275,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.RotationalJoint + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.RotationalJoint; /** * Decodes a RotationalJoint message from the specified reader or buffer, length delimited. @@ -3288,21 +3284,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.RotationalJoint + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.RotationalJoint; /** * Verifies a RotationalJoint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a RotationalJoint message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns RotationalJoint */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.RotationalJoint + public static fromObject(object: { [k: string]: any }): mirabuf.joint.RotationalJoint; /** * Creates a plain object from a RotationalJoint message. Also converts values to other types if specified. @@ -3310,60 +3306,59 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.RotationalJoint, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.RotationalJoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this RotationalJoint to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for RotationalJoint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BallJoint. */ interface IBallJoint { + /** BallJoint yaw */ - yaw?: mirabuf.joint.IDOF | null + yaw?: (mirabuf.joint.IDOF|null); /** BallJoint pitch */ - pitch?: mirabuf.joint.IDOF | null + pitch?: (mirabuf.joint.IDOF|null); /** BallJoint rotation */ - rotation?: mirabuf.joint.IDOF | null + rotation?: (mirabuf.joint.IDOF|null); } /** Represents a BallJoint. */ class BallJoint implements IBallJoint { + /** * Constructs a new BallJoint. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IBallJoint) + constructor(properties?: mirabuf.joint.IBallJoint); /** BallJoint yaw. */ - public yaw?: mirabuf.joint.IDOF | null + public yaw?: (mirabuf.joint.IDOF|null); /** BallJoint pitch. */ - public pitch?: mirabuf.joint.IDOF | null + public pitch?: (mirabuf.joint.IDOF|null); /** BallJoint rotation. */ - public rotation?: mirabuf.joint.IDOF | null + public rotation?: (mirabuf.joint.IDOF|null); /** * Creates a new BallJoint instance using the specified properties. * @param [properties] Properties to set * @returns BallJoint instance */ - public static create(properties?: mirabuf.joint.IBallJoint): mirabuf.joint.BallJoint + public static create(properties?: mirabuf.joint.IBallJoint): mirabuf.joint.BallJoint; /** * Encodes the specified BallJoint message. Does not implicitly {@link mirabuf.joint.BallJoint.verify|verify} messages. @@ -3371,7 +3366,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IBallJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IBallJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified BallJoint message, length delimited. Does not implicitly {@link mirabuf.joint.BallJoint.verify|verify} messages. @@ -3379,10 +3374,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IBallJoint, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IBallJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a BallJoint message from the specified reader or buffer. @@ -3392,7 +3384,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.BallJoint + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.BallJoint; /** * Decodes a BallJoint message from the specified reader or buffer, length delimited. @@ -3401,21 +3393,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.BallJoint + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.BallJoint; /** * Verifies a BallJoint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a BallJoint message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns BallJoint */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.BallJoint + public static fromObject(object: { [k: string]: any }): mirabuf.joint.BallJoint; /** * Creates a plain object from a BallJoint message. Also converts values to other types if specified. @@ -3423,48 +3415,47 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.BallJoint, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.BallJoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this BallJoint to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for BallJoint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrismaticJoint. */ interface IPrismaticJoint { + /** PrismaticJoint prismaticFreedom */ - prismaticFreedom?: mirabuf.joint.IDOF | null + prismaticFreedom?: (mirabuf.joint.IDOF|null); } /** Prismatic Joint describes a motion that translates the position in a single axis */ class PrismaticJoint implements IPrismaticJoint { + /** * Constructs a new PrismaticJoint. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IPrismaticJoint) + constructor(properties?: mirabuf.joint.IPrismaticJoint); /** PrismaticJoint prismaticFreedom. */ - public prismaticFreedom?: mirabuf.joint.IDOF | null + public prismaticFreedom?: (mirabuf.joint.IDOF|null); /** * Creates a new PrismaticJoint instance using the specified properties. * @param [properties] Properties to set * @returns PrismaticJoint instance */ - public static create(properties?: mirabuf.joint.IPrismaticJoint): mirabuf.joint.PrismaticJoint + public static create(properties?: mirabuf.joint.IPrismaticJoint): mirabuf.joint.PrismaticJoint; /** * Encodes the specified PrismaticJoint message. Does not implicitly {@link mirabuf.joint.PrismaticJoint.verify|verify} messages. @@ -3472,7 +3463,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IPrismaticJoint, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IPrismaticJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PrismaticJoint message, length delimited. Does not implicitly {@link mirabuf.joint.PrismaticJoint.verify|verify} messages. @@ -3480,10 +3471,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IPrismaticJoint, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IPrismaticJoint, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PrismaticJoint message from the specified reader or buffer. @@ -3493,7 +3481,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.PrismaticJoint + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.PrismaticJoint; /** * Decodes a PrismaticJoint message from the specified reader or buffer, length delimited. @@ -3502,21 +3490,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.PrismaticJoint + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.PrismaticJoint; /** * Verifies a PrismaticJoint message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PrismaticJoint message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PrismaticJoint */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.PrismaticJoint + public static fromObject(object: { [k: string]: any }): mirabuf.joint.PrismaticJoint; /** * Creates a plain object from a PrismaticJoint message. Also converts values to other types if specified. @@ -3524,54 +3512,53 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.PrismaticJoint, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.PrismaticJoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PrismaticJoint to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for PrismaticJoint * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RigidGroup. */ interface IRigidGroup { + /** RigidGroup name */ - name?: string | null + name?: (string|null); /** RigidGroup occurrences */ - occurrences?: string[] | null + occurrences?: (string[]|null); } /** Represents a RigidGroup. */ class RigidGroup implements IRigidGroup { + /** * Constructs a new RigidGroup. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.joint.IRigidGroup) + constructor(properties?: mirabuf.joint.IRigidGroup); /** RigidGroup name. */ - public name: string + public name: string; /** RigidGroup occurrences. */ - public occurrences: string[] + public occurrences: string[]; /** * Creates a new RigidGroup instance using the specified properties. * @param [properties] Properties to set * @returns RigidGroup instance */ - public static create(properties?: mirabuf.joint.IRigidGroup): mirabuf.joint.RigidGroup + public static create(properties?: mirabuf.joint.IRigidGroup): mirabuf.joint.RigidGroup; /** * Encodes the specified RigidGroup message. Does not implicitly {@link mirabuf.joint.RigidGroup.verify|verify} messages. @@ -3579,7 +3566,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.joint.IRigidGroup, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.joint.IRigidGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified RigidGroup message, length delimited. Does not implicitly {@link mirabuf.joint.RigidGroup.verify|verify} messages. @@ -3587,10 +3574,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.joint.IRigidGroup, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.joint.IRigidGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a RigidGroup message from the specified reader or buffer. @@ -3600,7 +3584,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.joint.RigidGroup + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.joint.RigidGroup; /** * Decodes a RigidGroup message from the specified reader or buffer, length delimited. @@ -3609,21 +3593,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.joint.RigidGroup + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.joint.RigidGroup; /** * Verifies a RigidGroup message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a RigidGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns RigidGroup */ - public static fromObject(object: { [k: string]: any }): mirabuf.joint.RigidGroup + public static fromObject(object: { [k: string]: any }): mirabuf.joint.RigidGroup; /** * Creates a plain object from a RigidGroup message. Also converts values to other types if specified. @@ -3631,28 +3615,26 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.joint.RigidGroup, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.joint.RigidGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this RigidGroup to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for RigidGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace motor. */ namespace motor { + /** * Duty Cycles for electric motors * Affects the dynamic output of the motor @@ -3663,19 +3645,20 @@ export namespace mirabuf { CONTINUOUS_RUNNING = 0, SHORT_TIME = 1, INTERMITTENT_PERIODIC = 2, - CONTINUOUS_PERIODIC = 3, + CONTINUOUS_PERIODIC = 3 } /** Properties of a Motor. */ interface IMotor { + /** Motor info */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Motor dcMotor */ - dcMotor?: mirabuf.motor.IDCMotor | null + dcMotor?: (mirabuf.motor.IDCMotor|null); /** Motor simpleMotor */ - simpleMotor?: mirabuf.motor.ISimpleMotor | null + simpleMotor?: (mirabuf.motor.ISimpleMotor|null); } /** @@ -3683,30 +3666,31 @@ export namespace mirabuf { * Could represent something like a DC Motor relationship */ class Motor implements IMotor { + /** * Constructs a new Motor. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.motor.IMotor) + constructor(properties?: mirabuf.motor.IMotor); /** Motor info. */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Motor dcMotor. */ - public dcMotor?: mirabuf.motor.IDCMotor | null + public dcMotor?: (mirabuf.motor.IDCMotor|null); /** Motor simpleMotor. */ - public simpleMotor?: mirabuf.motor.ISimpleMotor | null + public simpleMotor?: (mirabuf.motor.ISimpleMotor|null); /** Motor motorType. */ - public motorType?: "dcMotor" | "simpleMotor" + public motorType?: ("dcMotor"|"simpleMotor"); /** * Creates a new Motor instance using the specified properties. * @param [properties] Properties to set * @returns Motor instance */ - public static create(properties?: mirabuf.motor.IMotor): mirabuf.motor.Motor + public static create(properties?: mirabuf.motor.IMotor): mirabuf.motor.Motor; /** * Encodes the specified Motor message. Does not implicitly {@link mirabuf.motor.Motor.verify|verify} messages. @@ -3714,7 +3698,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.motor.IMotor, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.motor.IMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Motor message, length delimited. Does not implicitly {@link mirabuf.motor.Motor.verify|verify} messages. @@ -3722,7 +3706,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.motor.IMotor, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.motor.IMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Motor message from the specified reader or buffer. @@ -3732,7 +3716,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.motor.Motor + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.motor.Motor; /** * Decodes a Motor message from the specified reader or buffer, length delimited. @@ -3741,21 +3725,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.motor.Motor + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.motor.Motor; /** * Verifies a Motor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Motor message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Motor */ - public static fromObject(object: { [k: string]: any }): mirabuf.motor.Motor + public static fromObject(object: { [k: string]: any }): mirabuf.motor.Motor; /** * Creates a plain object from a Motor message. Also converts values to other types if specified. @@ -3763,35 +3747,33 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.motor.Motor, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.motor.Motor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Motor to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Motor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SimpleMotor. */ interface ISimpleMotor { + /** Torque at 0 rpm with a inverse linear relationship to max_velocity */ - stallTorque?: number | null + stallTorque?: (number|null); /** The target velocity in RPM, will use stall_torque relationship to reach each step */ - maxVelocity?: number | null + maxVelocity?: (number|null); /** (Optional) 0 - 1, the relationship of stall_torque used to perserve the position of this motor */ - brakingConstant?: number | null + brakingConstant?: (number|null); } /** @@ -3801,27 +3783,28 @@ export namespace mirabuf { * Assumes you are solving using a velocity constraint for a joint and not a acceleration constraint */ class SimpleMotor implements ISimpleMotor { + /** * Constructs a new SimpleMotor. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.motor.ISimpleMotor) + constructor(properties?: mirabuf.motor.ISimpleMotor); /** Torque at 0 rpm with a inverse linear relationship to max_velocity */ - public stallTorque: number + public stallTorque: number; /** The target velocity in RPM, will use stall_torque relationship to reach each step */ - public maxVelocity: number + public maxVelocity: number; /** (Optional) 0 - 1, the relationship of stall_torque used to perserve the position of this motor */ - public brakingConstant: number + public brakingConstant: number; /** * Creates a new SimpleMotor instance using the specified properties. * @param [properties] Properties to set * @returns SimpleMotor instance */ - public static create(properties?: mirabuf.motor.ISimpleMotor): mirabuf.motor.SimpleMotor + public static create(properties?: mirabuf.motor.ISimpleMotor): mirabuf.motor.SimpleMotor; /** * Encodes the specified SimpleMotor message. Does not implicitly {@link mirabuf.motor.SimpleMotor.verify|verify} messages. @@ -3829,7 +3812,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.motor.ISimpleMotor, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.motor.ISimpleMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified SimpleMotor message, length delimited. Does not implicitly {@link mirabuf.motor.SimpleMotor.verify|verify} messages. @@ -3837,10 +3820,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.motor.ISimpleMotor, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.motor.ISimpleMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SimpleMotor message from the specified reader or buffer. @@ -3850,7 +3830,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.motor.SimpleMotor + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.motor.SimpleMotor; /** * Decodes a SimpleMotor message from the specified reader or buffer, length delimited. @@ -3859,21 +3839,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.motor.SimpleMotor + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.motor.SimpleMotor; /** * Verifies a SimpleMotor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SimpleMotor message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns SimpleMotor */ - public static fromObject(object: { [k: string]: any }): mirabuf.motor.SimpleMotor + public static fromObject(object: { [k: string]: any }): mirabuf.motor.SimpleMotor; /** * Creates a plain object from a SimpleMotor message. Also converts values to other types if specified. @@ -3881,50 +3861,48 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.motor.SimpleMotor, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.motor.SimpleMotor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SimpleMotor to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for SimpleMotor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DCMotor. */ interface IDCMotor { + /** Reference for purchase page or spec sheet */ - referenceUrl?: string | null + referenceUrl?: (string|null); /** m-Nm/Amp */ - torqueConstant?: number | null + torqueConstant?: (number|null); /** mV/rad/sec */ - emfConstant?: number | null + emfConstant?: (number|null); /** Resistance of Motor - Optional if other values are known */ - resistance?: number | null + resistance?: (number|null); /** measure in percentage of 100 - generally around 60 - measured under optimal load */ - maximumEffeciency?: number | null + maximumEffeciency?: (number|null); /** measured in Watts */ - maximumPower?: number | null + maximumPower?: (number|null); /** Stated Duty Cycle of motor */ - dutyCycle?: mirabuf.motor.DutyCycles | null + dutyCycle?: (mirabuf.motor.DutyCycles|null); /** Optional data that can give a better relationship to the simulation */ - advanced?: mirabuf.motor.DCMotor.IAdvanced | null + advanced?: (mirabuf.motor.DCMotor.IAdvanced|null); } /** @@ -3933,42 +3911,43 @@ export namespace mirabuf { * Still needs some more but overall they are most of the parameters we can use */ class DCMotor implements IDCMotor { + /** * Constructs a new DCMotor. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.motor.IDCMotor) + constructor(properties?: mirabuf.motor.IDCMotor); /** Reference for purchase page or spec sheet */ - public referenceUrl: string + public referenceUrl: string; /** m-Nm/Amp */ - public torqueConstant: number + public torqueConstant: number; /** mV/rad/sec */ - public emfConstant: number + public emfConstant: number; /** Resistance of Motor - Optional if other values are known */ - public resistance: number + public resistance: number; /** measure in percentage of 100 - generally around 60 - measured under optimal load */ - public maximumEffeciency: number + public maximumEffeciency: number; /** measured in Watts */ - public maximumPower: number + public maximumPower: number; /** Stated Duty Cycle of motor */ - public dutyCycle: mirabuf.motor.DutyCycles + public dutyCycle: mirabuf.motor.DutyCycles; /** Optional data that can give a better relationship to the simulation */ - public advanced?: mirabuf.motor.DCMotor.IAdvanced | null + public advanced?: (mirabuf.motor.DCMotor.IAdvanced|null); /** * Creates a new DCMotor instance using the specified properties. * @param [properties] Properties to set * @returns DCMotor instance */ - public static create(properties?: mirabuf.motor.IDCMotor): mirabuf.motor.DCMotor + public static create(properties?: mirabuf.motor.IDCMotor): mirabuf.motor.DCMotor; /** * Encodes the specified DCMotor message. Does not implicitly {@link mirabuf.motor.DCMotor.verify|verify} messages. @@ -3976,7 +3955,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.motor.IDCMotor, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.motor.IDCMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified DCMotor message, length delimited. Does not implicitly {@link mirabuf.motor.DCMotor.verify|verify} messages. @@ -3984,7 +3963,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.motor.IDCMotor, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.motor.IDCMotor, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DCMotor message from the specified reader or buffer. @@ -3994,7 +3973,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.motor.DCMotor + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.motor.DCMotor; /** * Decodes a DCMotor message from the specified reader or buffer, length delimited. @@ -4003,21 +3982,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.motor.DCMotor + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.motor.DCMotor; /** * Verifies a DCMotor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a DCMotor message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns DCMotor */ - public static fromObject(object: { [k: string]: any }): mirabuf.motor.DCMotor + public static fromObject(object: { [k: string]: any }): mirabuf.motor.DCMotor; /** * Creates a plain object from a DCMotor message. Also converts values to other types if specified. @@ -4025,79 +4004,79 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.motor.DCMotor, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.motor.DCMotor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this DCMotor to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for DCMotor * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DCMotor { + /** Properties of an Advanced. */ interface IAdvanced { + /** measured in AMPs */ - freeCurrent?: number | null + freeCurrent?: (number|null); /** measured in RPM */ - freeSpeed?: number | null + freeSpeed?: (number|null); /** measure in AMPs */ - stallCurrent?: number | null + stallCurrent?: (number|null); /** measured in Nm */ - stallTorque?: number | null + stallTorque?: (number|null); /** measured in Volts DC */ - inputVoltage?: number | null + inputVoltage?: (number|null); /** between (K * (N / 4)) and (K * ((N-2) / 4)) where N is number of poles - leave at 0 if unknown */ - resistanceVariation?: number | null + resistanceVariation?: (number|null); } /** Information usually found on datasheet */ class Advanced implements IAdvanced { + /** * Constructs a new Advanced. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.motor.DCMotor.IAdvanced) + constructor(properties?: mirabuf.motor.DCMotor.IAdvanced); /** measured in AMPs */ - public freeCurrent: number + public freeCurrent: number; /** measured in RPM */ - public freeSpeed: number + public freeSpeed: number; /** measure in AMPs */ - public stallCurrent: number + public stallCurrent: number; /** measured in Nm */ - public stallTorque: number + public stallTorque: number; /** measured in Volts DC */ - public inputVoltage: number + public inputVoltage: number; /** between (K * (N / 4)) and (K * ((N-2) / 4)) where N is number of poles - leave at 0 if unknown */ - public resistanceVariation: number + public resistanceVariation: number; /** * Creates a new Advanced instance using the specified properties. * @param [properties] Properties to set * @returns Advanced instance */ - public static create(properties?: mirabuf.motor.DCMotor.IAdvanced): mirabuf.motor.DCMotor.Advanced + public static create(properties?: mirabuf.motor.DCMotor.IAdvanced): mirabuf.motor.DCMotor.Advanced; /** * Encodes the specified Advanced message. Does not implicitly {@link mirabuf.motor.DCMotor.Advanced.verify|verify} messages. @@ -4105,10 +4084,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: mirabuf.motor.DCMotor.IAdvanced, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encode(message: mirabuf.motor.DCMotor.IAdvanced, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Advanced message, length delimited. Does not implicitly {@link mirabuf.motor.DCMotor.Advanced.verify|verify} messages. @@ -4116,10 +4092,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.motor.DCMotor.IAdvanced, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.motor.DCMotor.IAdvanced, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Advanced message from the specified reader or buffer. @@ -4129,10 +4102,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): mirabuf.motor.DCMotor.Advanced + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.motor.DCMotor.Advanced; /** * Decodes an Advanced message from the specified reader or buffer, length delimited. @@ -4141,21 +4111,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.motor.DCMotor.Advanced + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.motor.DCMotor.Advanced; /** * Verifies an Advanced message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates an Advanced message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Advanced */ - public static fromObject(object: { [k: string]: any }): mirabuf.motor.DCMotor.Advanced + public static fromObject(object: { [k: string]: any }): mirabuf.motor.DCMotor.Advanced; /** * Creates a plain object from an Advanced message. Also converts values to other types if specified. @@ -4163,41 +4133,38 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.motor.DCMotor.Advanced, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.motor.DCMotor.Advanced, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Advanced to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Advanced * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } } } /** Namespace material. */ namespace material { + /** Properties of a Materials. */ interface IMaterials { + /** Identifiable information (id, name, version) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Map of Physical Materials */ - physicalMaterials?: { - [k: string]: mirabuf.material.IPhysicalMaterial - } | null + physicalMaterials?: ({ [k: string]: mirabuf.material.IPhysicalMaterial }|null); /** Map of Appearances that are purely visual */ - appearances?: { [k: string]: mirabuf.material.IAppearance } | null + appearances?: ({ [k: string]: mirabuf.material.IAppearance }|null); } /** @@ -4206,29 +4173,28 @@ export namespace mirabuf { * Can be Stored in AssemblyData */ class Materials implements IMaterials { + /** * Constructs a new Materials. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.IMaterials) + constructor(properties?: mirabuf.material.IMaterials); /** Identifiable information (id, name, version) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Map of Physical Materials */ - public physicalMaterials: { - [k: string]: mirabuf.material.IPhysicalMaterial - } + public physicalMaterials: { [k: string]: mirabuf.material.IPhysicalMaterial }; /** Map of Appearances that are purely visual */ - public appearances: { [k: string]: mirabuf.material.IAppearance } + public appearances: { [k: string]: mirabuf.material.IAppearance }; /** * Creates a new Materials instance using the specified properties. * @param [properties] Properties to set * @returns Materials instance */ - public static create(properties?: mirabuf.material.IMaterials): mirabuf.material.Materials + public static create(properties?: mirabuf.material.IMaterials): mirabuf.material.Materials; /** * Encodes the specified Materials message. Does not implicitly {@link mirabuf.material.Materials.verify|verify} messages. @@ -4236,7 +4202,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.material.IMaterials, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.material.IMaterials, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Materials message, length delimited. Does not implicitly {@link mirabuf.material.Materials.verify|verify} messages. @@ -4244,10 +4210,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.IMaterials, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.IMaterials, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Materials message from the specified reader or buffer. @@ -4257,7 +4220,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.material.Materials + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.Materials; /** * Decodes a Materials message from the specified reader or buffer, length delimited. @@ -4266,21 +4229,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.material.Materials + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.Materials; /** * Verifies a Materials message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Materials message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Materials */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.Materials + public static fromObject(object: { [k: string]: any }): mirabuf.material.Materials; /** * Creates a plain object from a Materials message. Also converts values to other types if specified. @@ -4288,41 +4251,39 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.Materials, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.Materials, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Materials to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Materials * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Appearance. */ interface IAppearance { + /** Identfiable information (id, name, version) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** albedo map RGBA 0-255 */ - albedo?: mirabuf.IColor | null + albedo?: (mirabuf.IColor|null); /** roughness value 0-1 */ - roughness?: number | null + roughness?: (number|null); /** metallic value 0-1 */ - metallic?: number | null + metallic?: (number|null); /** specular value 0-1 */ - specular?: number | null + specular?: (number|null); } /** @@ -4330,33 +4291,34 @@ export namespace mirabuf { * Limited to just color for now */ class Appearance implements IAppearance { + /** * Constructs a new Appearance. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.IAppearance) + constructor(properties?: mirabuf.material.IAppearance); /** Identfiable information (id, name, version) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** albedo map RGBA 0-255 */ - public albedo?: mirabuf.IColor | null + public albedo?: (mirabuf.IColor|null); /** roughness value 0-1 */ - public roughness: number + public roughness: number; /** metallic value 0-1 */ - public metallic: number + public metallic: number; /** specular value 0-1 */ - public specular: number + public specular: number; /** * Creates a new Appearance instance using the specified properties. * @param [properties] Properties to set * @returns Appearance instance */ - public static create(properties?: mirabuf.material.IAppearance): mirabuf.material.Appearance + public static create(properties?: mirabuf.material.IAppearance): mirabuf.material.Appearance; /** * Encodes the specified Appearance message. Does not implicitly {@link mirabuf.material.Appearance.verify|verify} messages. @@ -4364,7 +4326,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.material.IAppearance, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.material.IAppearance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Appearance message, length delimited. Does not implicitly {@link mirabuf.material.Appearance.verify|verify} messages. @@ -4372,10 +4334,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.IAppearance, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.IAppearance, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Appearance message from the specified reader or buffer. @@ -4385,7 +4344,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.material.Appearance + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.Appearance; /** * Decodes an Appearance message from the specified reader or buffer, length delimited. @@ -4394,21 +4353,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.material.Appearance + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.Appearance; /** * Verifies an Appearance message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates an Appearance message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Appearance */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.Appearance + public static fromObject(object: { [k: string]: any }): mirabuf.material.Appearance; /** * Creates a plain object from an Appearance message. Also converts values to other types if specified. @@ -4416,102 +4375,101 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.Appearance, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.Appearance, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Appearance to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Appearance * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PhysicalMaterial. */ interface IPhysicalMaterial { + /** Identifiable information (id, name, version, etc) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** short description of physical material */ - description?: string | null + description?: (string|null); /** Thermal Physical properties of the model OPTIONAL */ - thermal?: mirabuf.material.PhysicalMaterial.IThermal | null + thermal?: (mirabuf.material.PhysicalMaterial.IThermal|null); /** Mechanical properties of the model OPTIONAL */ - mechanical?: mirabuf.material.PhysicalMaterial.IMechanical | null + mechanical?: (mirabuf.material.PhysicalMaterial.IMechanical|null); /** Physical Strength properties of the model OPTIONAL */ - strength?: mirabuf.material.PhysicalMaterial.IStrength | null + strength?: (mirabuf.material.PhysicalMaterial.IStrength|null); /** Frictional force for dampening - Interpolate (0-1) */ - dynamicFriction?: number | null + dynamicFriction?: (number|null); /** Frictional force override at stop - Interpolate (0-1) */ - staticFriction?: number | null + staticFriction?: (number|null); /** Restitution of the object - Interpolate (0-1) */ - restitution?: number | null + restitution?: (number|null); /** should this object deform when encountering large forces - TODO: This needs a proper message and equation field */ - deformable?: boolean | null + deformable?: (boolean|null); /** generic type to assign some default params */ - matType?: mirabuf.material.PhysicalMaterial.MaterialType | null + matType?: (mirabuf.material.PhysicalMaterial.MaterialType|null); } /** Data to represent any given Physical Material */ class PhysicalMaterial implements IPhysicalMaterial { + /** * Constructs a new PhysicalMaterial. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.IPhysicalMaterial) + constructor(properties?: mirabuf.material.IPhysicalMaterial); /** Identifiable information (id, name, version, etc) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** short description of physical material */ - public description: string + public description: string; /** Thermal Physical properties of the model OPTIONAL */ - public thermal?: mirabuf.material.PhysicalMaterial.IThermal | null + public thermal?: (mirabuf.material.PhysicalMaterial.IThermal|null); /** Mechanical properties of the model OPTIONAL */ - public mechanical?: mirabuf.material.PhysicalMaterial.IMechanical | null + public mechanical?: (mirabuf.material.PhysicalMaterial.IMechanical|null); /** Physical Strength properties of the model OPTIONAL */ - public strength?: mirabuf.material.PhysicalMaterial.IStrength | null + public strength?: (mirabuf.material.PhysicalMaterial.IStrength|null); /** Frictional force for dampening - Interpolate (0-1) */ - public dynamicFriction: number + public dynamicFriction: number; /** Frictional force override at stop - Interpolate (0-1) */ - public staticFriction: number + public staticFriction: number; /** Restitution of the object - Interpolate (0-1) */ - public restitution: number + public restitution: number; /** should this object deform when encountering large forces - TODO: This needs a proper message and equation field */ - public deformable: boolean + public deformable: boolean; /** generic type to assign some default params */ - public matType: mirabuf.material.PhysicalMaterial.MaterialType + public matType: mirabuf.material.PhysicalMaterial.MaterialType; /** * Creates a new PhysicalMaterial instance using the specified properties. * @param [properties] Properties to set * @returns PhysicalMaterial instance */ - public static create(properties?: mirabuf.material.IPhysicalMaterial): mirabuf.material.PhysicalMaterial + public static create(properties?: mirabuf.material.IPhysicalMaterial): mirabuf.material.PhysicalMaterial; /** * Encodes the specified PhysicalMaterial message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.verify|verify} messages. @@ -4519,10 +4477,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: mirabuf.material.IPhysicalMaterial, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encode(message: mirabuf.material.IPhysicalMaterial, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified PhysicalMaterial message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.verify|verify} messages. @@ -4530,10 +4485,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.IPhysicalMaterial, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.IPhysicalMaterial, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PhysicalMaterial message from the specified reader or buffer. @@ -4543,10 +4495,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): mirabuf.material.PhysicalMaterial + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.PhysicalMaterial; /** * Decodes a PhysicalMaterial message from the specified reader or buffer, length delimited. @@ -4555,21 +4504,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.material.PhysicalMaterial + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.PhysicalMaterial; /** * Verifies a PhysicalMaterial message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a PhysicalMaterial message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns PhysicalMaterial */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial + public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial; /** * Creates a plain object from a PhysicalMaterial message. Also converts values to other types if specified. @@ -4577,69 +4526,67 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.PhysicalMaterial, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.PhysicalMaterial, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PhysicalMaterial to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for PhysicalMaterial * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PhysicalMaterial { + /** MaterialType enum. */ enum MaterialType { METAL = 0, - PLASTIC = 1, + PLASTIC = 1 } /** Properties of a Thermal. */ interface IThermal { + /** W/(m*K) */ - thermalConductivity?: number | null + thermalConductivity?: (number|null); /** J/(g*C) */ - specificHeat?: number | null + specificHeat?: (number|null); /** um/(m*C) */ - thermalExpansionCoefficient?: number | null + thermalExpansionCoefficient?: (number|null); } /** Thermal Properties Set Definition for Simulation. */ class Thermal implements IThermal { + /** * Constructs a new Thermal. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.PhysicalMaterial.IThermal) + constructor(properties?: mirabuf.material.PhysicalMaterial.IThermal); /** W/(m*K) */ - public thermalConductivity: number + public thermalConductivity: number; /** J/(g*C) */ - public specificHeat: number + public specificHeat: number; /** um/(m*C) */ - public thermalExpansionCoefficient: number + public thermalExpansionCoefficient: number; /** * Creates a new Thermal instance using the specified properties. * @param [properties] Properties to set * @returns Thermal instance */ - public static create( - properties?: mirabuf.material.PhysicalMaterial.IThermal - ): mirabuf.material.PhysicalMaterial.Thermal + public static create(properties?: mirabuf.material.PhysicalMaterial.IThermal): mirabuf.material.PhysicalMaterial.Thermal; /** * Encodes the specified Thermal message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Thermal.verify|verify} messages. @@ -4647,10 +4594,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: mirabuf.material.PhysicalMaterial.IThermal, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encode(message: mirabuf.material.PhysicalMaterial.IThermal, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Thermal message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Thermal.verify|verify} messages. @@ -4658,10 +4602,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.PhysicalMaterial.IThermal, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.PhysicalMaterial.IThermal, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Thermal message from the specified reader or buffer. @@ -4671,10 +4612,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): mirabuf.material.PhysicalMaterial.Thermal + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.PhysicalMaterial.Thermal; /** * Decodes a Thermal message from the specified reader or buffer, length delimited. @@ -4683,23 +4621,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array - ): mirabuf.material.PhysicalMaterial.Thermal + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.PhysicalMaterial.Thermal; /** * Verifies a Thermal message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Thermal message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Thermal */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Thermal + public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Thermal; /** * Creates a plain object from a Thermal message. Also converts values to other types if specified. @@ -4707,74 +4643,71 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.PhysicalMaterial.Thermal, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.PhysicalMaterial.Thermal, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Thermal to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Thermal * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Mechanical. */ interface IMechanical { + /** GPa */ - youngMod?: number | null + youngMod?: (number|null); /** ? */ - poissonRatio?: number | null + poissonRatio?: (number|null); /** MPa */ - shearMod?: number | null + shearMod?: (number|null); /** g/cm^3 */ - density?: number | null + density?: (number|null); /** ? */ - dampingCoefficient?: number | null + dampingCoefficient?: (number|null); } /** Mechanical Properties Set Definition for Simulation. */ class Mechanical implements IMechanical { + /** * Constructs a new Mechanical. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.PhysicalMaterial.IMechanical) + constructor(properties?: mirabuf.material.PhysicalMaterial.IMechanical); /** GPa */ - public youngMod: number + public youngMod: number; /** ? */ - public poissonRatio: number + public poissonRatio: number; /** MPa */ - public shearMod: number + public shearMod: number; /** g/cm^3 */ - public density: number + public density: number; /** ? */ - public dampingCoefficient: number + public dampingCoefficient: number; /** * Creates a new Mechanical instance using the specified properties. * @param [properties] Properties to set * @returns Mechanical instance */ - public static create( - properties?: mirabuf.material.PhysicalMaterial.IMechanical - ): mirabuf.material.PhysicalMaterial.Mechanical + public static create(properties?: mirabuf.material.PhysicalMaterial.IMechanical): mirabuf.material.PhysicalMaterial.Mechanical; /** * Encodes the specified Mechanical message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Mechanical.verify|verify} messages. @@ -4782,10 +4715,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: mirabuf.material.PhysicalMaterial.IMechanical, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encode(message: mirabuf.material.PhysicalMaterial.IMechanical, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Mechanical message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Mechanical.verify|verify} messages. @@ -4793,10 +4723,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.PhysicalMaterial.IMechanical, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.PhysicalMaterial.IMechanical, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Mechanical message from the specified reader or buffer. @@ -4806,10 +4733,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): mirabuf.material.PhysicalMaterial.Mechanical + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.PhysicalMaterial.Mechanical; /** * Decodes a Mechanical message from the specified reader or buffer, length delimited. @@ -4818,23 +4742,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array - ): mirabuf.material.PhysicalMaterial.Mechanical + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.PhysicalMaterial.Mechanical; /** * Verifies a Mechanical message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Mechanical message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Mechanical */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Mechanical + public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Mechanical; /** * Creates a plain object from a Mechanical message. Also converts values to other types if specified. @@ -4842,62 +4764,59 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.PhysicalMaterial.Mechanical, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.PhysicalMaterial.Mechanical, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Mechanical to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Mechanical * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Strength. */ interface IStrength { + /** MPa */ - yieldStrength?: number | null + yieldStrength?: (number|null); /** MPa */ - tensileStrength?: number | null + tensileStrength?: (number|null); /** yes / no */ - thermalTreatment?: boolean | null + thermalTreatment?: (boolean|null); } /** Strength Properties Set Definition for Simulation. */ class Strength implements IStrength { + /** * Constructs a new Strength. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.material.PhysicalMaterial.IStrength) + constructor(properties?: mirabuf.material.PhysicalMaterial.IStrength); /** MPa */ - public yieldStrength: number + public yieldStrength: number; /** MPa */ - public tensileStrength: number + public tensileStrength: number; /** yes / no */ - public thermalTreatment: boolean + public thermalTreatment: boolean; /** * Creates a new Strength instance using the specified properties. * @param [properties] Properties to set * @returns Strength instance */ - public static create( - properties?: mirabuf.material.PhysicalMaterial.IStrength - ): mirabuf.material.PhysicalMaterial.Strength + public static create(properties?: mirabuf.material.PhysicalMaterial.IStrength): mirabuf.material.PhysicalMaterial.Strength; /** * Encodes the specified Strength message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Strength.verify|verify} messages. @@ -4905,10 +4824,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: mirabuf.material.PhysicalMaterial.IStrength, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encode(message: mirabuf.material.PhysicalMaterial.IStrength, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Strength message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Strength.verify|verify} messages. @@ -4916,10 +4832,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: mirabuf.material.PhysicalMaterial.IStrength, - writer?: $protobuf.Writer - ): $protobuf.Writer + public static encodeDelimited(message: mirabuf.material.PhysicalMaterial.IStrength, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Strength message from the specified reader or buffer. @@ -4929,10 +4842,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): mirabuf.material.PhysicalMaterial.Strength + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.material.PhysicalMaterial.Strength; /** * Decodes a Strength message from the specified reader or buffer, length delimited. @@ -4941,23 +4851,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array - ): mirabuf.material.PhysicalMaterial.Strength + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.material.PhysicalMaterial.Strength; /** * Verifies a Strength message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Strength message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Strength */ - public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Strength + public static fromObject(object: { [k: string]: any }): mirabuf.material.PhysicalMaterial.Strength; /** * Creates a plain object from a Strength message. Also converts values to other types if specified. @@ -4965,58 +4873,58 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.material.PhysicalMaterial.Strength, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.material.PhysicalMaterial.Strength, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Strength to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Strength * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } } } /** Namespace signal. */ namespace signal { + /** Properties of a Signals. */ interface ISignals { + /** Has identifiable data (id, name, version) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Contains a full collection of symbols */ - signalMap?: { [k: string]: mirabuf.signal.ISignal } | null + signalMap?: ({ [k: string]: mirabuf.signal.ISignal }|null); } /** Signals is a container for all of the potential signals. */ class Signals implements ISignals { + /** * Constructs a new Signals. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.signal.ISignals) + constructor(properties?: mirabuf.signal.ISignals); /** Has identifiable data (id, name, version) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Contains a full collection of symbols */ - public signalMap: { [k: string]: mirabuf.signal.ISignal } + public signalMap: { [k: string]: mirabuf.signal.ISignal }; /** * Creates a new Signals instance using the specified properties. * @param [properties] Properties to set * @returns Signals instance */ - public static create(properties?: mirabuf.signal.ISignals): mirabuf.signal.Signals + public static create(properties?: mirabuf.signal.ISignals): mirabuf.signal.Signals; /** * Encodes the specified Signals message. Does not implicitly {@link mirabuf.signal.Signals.verify|verify} messages. @@ -5024,7 +4932,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.signal.ISignals, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.signal.ISignals, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Signals message, length delimited. Does not implicitly {@link mirabuf.signal.Signals.verify|verify} messages. @@ -5032,7 +4940,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.signal.ISignals, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.signal.ISignals, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Signals message from the specified reader or buffer. @@ -5042,7 +4950,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.signal.Signals + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.signal.Signals; /** * Decodes a Signals message from the specified reader or buffer, length delimited. @@ -5051,21 +4959,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.signal.Signals + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.signal.Signals; /** * Verifies a Signals message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Signals message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Signals */ - public static fromObject(object: { [k: string]: any }): mirabuf.signal.Signals + public static fromObject(object: { [k: string]: any }): mirabuf.signal.Signals; /** * Creates a plain object from a Signals message. Also converts values to other types if specified. @@ -5073,29 +4981,26 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.signal.Signals, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.signal.Signals, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Signals to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Signals * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } /** IOType is a way to specify Input or Output. */ enum IOType { INPUT = 0, - OUTPUT = 1, + OUTPUT = 1 } /** @@ -5108,25 +5013,26 @@ export namespace mirabuf { Analog = 2, I2C = 3, CANBUS = 4, - CUSTOM = 5, + CUSTOM = 5 } /** Properties of a Signal. */ interface ISignal { + /** Has identifiable data (id, name, version) */ - info?: mirabuf.IInfo | null + info?: (mirabuf.IInfo|null); /** Is this a Input or Output */ - io?: mirabuf.signal.IOType | null + io?: (mirabuf.signal.IOType|null); /** The name of a custom input type that is not listed as a device type */ - customType?: string | null + customType?: (string|null); /** ID for a given signal that exists... PWM 2, CANBUS 4 */ - signalId?: number | null + signalId?: (number|null); /** Enum for device type that should always be set */ - deviceType?: mirabuf.signal.DeviceType | null + deviceType?: (mirabuf.signal.DeviceType|null); } /** @@ -5136,33 +5042,34 @@ export namespace mirabuf { * TODO: Decide how this is linked to a exported object */ class Signal implements ISignal { + /** * Constructs a new Signal. * @param [properties] Properties to set */ - constructor(properties?: mirabuf.signal.ISignal) + constructor(properties?: mirabuf.signal.ISignal); /** Has identifiable data (id, name, version) */ - public info?: mirabuf.IInfo | null + public info?: (mirabuf.IInfo|null); /** Is this a Input or Output */ - public io: mirabuf.signal.IOType + public io: mirabuf.signal.IOType; /** The name of a custom input type that is not listed as a device type */ - public customType: string + public customType: string; /** ID for a given signal that exists... PWM 2, CANBUS 4 */ - public signalId: number + public signalId: number; /** Enum for device type that should always be set */ - public deviceType: mirabuf.signal.DeviceType + public deviceType: mirabuf.signal.DeviceType; /** * Creates a new Signal instance using the specified properties. * @param [properties] Properties to set * @returns Signal instance */ - public static create(properties?: mirabuf.signal.ISignal): mirabuf.signal.Signal + public static create(properties?: mirabuf.signal.ISignal): mirabuf.signal.Signal; /** * Encodes the specified Signal message. Does not implicitly {@link mirabuf.signal.Signal.verify|verify} messages. @@ -5170,7 +5077,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: mirabuf.signal.ISignal, writer?: $protobuf.Writer): $protobuf.Writer + public static encode(message: mirabuf.signal.ISignal, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Signal message, length delimited. Does not implicitly {@link mirabuf.signal.Signal.verify|verify} messages. @@ -5178,7 +5085,7 @@ export namespace mirabuf { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: mirabuf.signal.ISignal, writer?: $protobuf.Writer): $protobuf.Writer + public static encodeDelimited(message: mirabuf.signal.ISignal, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Signal message from the specified reader or buffer. @@ -5188,7 +5095,7 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): mirabuf.signal.Signal + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mirabuf.signal.Signal; /** * Decodes a Signal message from the specified reader or buffer, length delimited. @@ -5197,21 +5104,21 @@ export namespace mirabuf { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): mirabuf.signal.Signal + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mirabuf.signal.Signal; /** * Verifies a Signal message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Signal message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Signal */ - public static fromObject(object: { [k: string]: any }): mirabuf.signal.Signal + public static fromObject(object: { [k: string]: any }): mirabuf.signal.Signal; /** * Creates a plain object from a Signal message. Also converts values to other types if specified. @@ -5219,23 +5126,20 @@ export namespace mirabuf { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: mirabuf.signal.Signal, - options?: $protobuf.IConversionOptions - ): { [k: string]: any } + public static toObject(message: mirabuf.signal.Signal, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Signal to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any } + public toJSON(): { [k: string]: any }; /** * Gets the default type url for Signal * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/fission/src/proto/mirabuf.js b/fission/src/proto/mirabuf.js index e20f2223e2..d195e18832 100644 --- a/fission/src/proto/mirabuf.js +++ b/fission/src/proto/mirabuf.js @@ -1,23 +1,23 @@ /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -import * as $protobuf from "protobufjs/minimal" +import * as $protobuf from "protobufjs/minimal"; // Common aliases -const $Reader = $protobuf.Reader, - $Writer = $protobuf.Writer, - $util = $protobuf.util +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}) +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const mirabuf = $root.mirabuf = (() => { -export const mirabuf = ($root.mirabuf = (() => { /** * Namespace mirabuf. * @exports mirabuf * @namespace */ - const mirabuf = {} + const mirabuf = {}; + + mirabuf.Assembly = (function() { - mirabuf.Assembly = (function () { /** * Properties of an Assembly. * @memberof mirabuf @@ -45,7 +45,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Assembly(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -54,7 +55,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.info = null + Assembly.prototype.info = null; /** * All of the data in the assembly @@ -62,7 +63,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.data = null + Assembly.prototype.data = null; /** * Can it be effected by the simulation dynamically @@ -70,7 +71,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.dynamic = false + Assembly.prototype.dynamic = false; /** * Overall physical data of the assembly @@ -78,7 +79,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.physicalData = null + Assembly.prototype.physicalData = null; /** * The Design hierarchy represented by Part Refs - The first object is a root container for all top level items @@ -86,7 +87,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.designHierarchy = null + Assembly.prototype.designHierarchy = null; /** * The Joint hierarchy for compound shapes @@ -94,7 +95,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.jointHierarchy = null + Assembly.prototype.jointHierarchy = null; /** * The Transform in space currently @@ -102,7 +103,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.transform = null + Assembly.prototype.transform = null; /** * Optional thumbnail saved from Fusion 360 or scraped from previous configuration @@ -110,7 +111,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Assembly * @instance */ - Assembly.prototype.thumbnail = null + Assembly.prototype.thumbnail = null; /** * Creates a new Assembly instance using the specified properties. @@ -121,8 +122,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Assembly} Assembly instance */ Assembly.create = function create(properties) { - return new Assembly(properties) - } + return new Assembly(properties); + }; /** * Encodes the specified Assembly message. Does not implicitly {@link mirabuf.Assembly.verify|verify} messages. @@ -134,43 +135,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Assembly.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) - $root.mirabuf.AssemblyData.encode( - message.data, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.AssemblyData.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.dynamic != null && Object.hasOwnProperty.call(message, "dynamic")) - writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.dynamic) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dynamic); if (message.physicalData != null && Object.hasOwnProperty.call(message, "physicalData")) - $root.mirabuf.PhysicalProperties.encode( - message.physicalData, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.PhysicalProperties.encode(message.physicalData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.designHierarchy != null && Object.hasOwnProperty.call(message, "designHierarchy")) - $root.mirabuf.GraphContainer.encode( - message.designHierarchy, - writer.uint32(/* id 5, wireType 2 =*/ 42).fork() - ).ldelim() + $root.mirabuf.GraphContainer.encode(message.designHierarchy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.jointHierarchy != null && Object.hasOwnProperty.call(message, "jointHierarchy")) - $root.mirabuf.GraphContainer.encode( - message.jointHierarchy, - writer.uint32(/* id 6, wireType 2 =*/ 50).fork() - ).ldelim() + $root.mirabuf.GraphContainer.encode(message.jointHierarchy, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.transform != null && Object.hasOwnProperty.call(message, "transform")) - $root.mirabuf.Transform.encode( - message.transform, - writer.uint32(/* id 7, wireType 2 =*/ 58).fork() - ).ldelim() + $root.mirabuf.Transform.encode(message.transform, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) - $root.mirabuf.Thumbnail.encode( - message.thumbnail, - writer.uint32(/* id 8, wireType 2 =*/ 66).fork() - ).ldelim() - return writer - } + $root.mirabuf.Thumbnail.encode(message.thumbnail, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; /** * Encodes the specified Assembly message, length delimited. Does not implicitly {@link mirabuf.Assembly.verify|verify} messages. @@ -182,8 +166,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Assembly.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes an Assembly message from the specified reader or buffer. @@ -197,51 +181,51 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Assembly.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Assembly() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Assembly(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.data = $root.mirabuf.AssemblyData.decode(reader, reader.uint32()) - break + case 2: { + message.data = $root.mirabuf.AssemblyData.decode(reader, reader.uint32()); + break; } - case 3: { - message.dynamic = reader.bool() - break + case 3: { + message.dynamic = reader.bool(); + break; } - case 4: { - message.physicalData = $root.mirabuf.PhysicalProperties.decode(reader, reader.uint32()) - break + case 4: { + message.physicalData = $root.mirabuf.PhysicalProperties.decode(reader, reader.uint32()); + break; } - case 5: { - message.designHierarchy = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()) - break + case 5: { + message.designHierarchy = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()); + break; } - case 6: { - message.jointHierarchy = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()) - break + case 6: { + message.jointHierarchy = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()); + break; } - case 7: { - message.transform = $root.mirabuf.Transform.decode(reader, reader.uint32()) - break + case 7: { + message.transform = $root.mirabuf.Transform.decode(reader, reader.uint32()); + break; } - case 8: { - message.thumbnail = $root.mirabuf.Thumbnail.decode(reader, reader.uint32()) - break + case 8: { + message.thumbnail = $root.mirabuf.Thumbnail.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes an Assembly message from the specified reader or buffer, length delimited. @@ -254,9 +238,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Assembly.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies an Assembly message. @@ -267,39 +252,48 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Assembly.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.data != null && message.hasOwnProperty("data")) { - let error = $root.mirabuf.AssemblyData.verify(message.data) - if (error) return "data." + error + let error = $root.mirabuf.AssemblyData.verify(message.data); + if (error) + return "data." + error; } if (message.dynamic != null && message.hasOwnProperty("dynamic")) - if (typeof message.dynamic !== "boolean") return "dynamic: boolean expected" + if (typeof message.dynamic !== "boolean") + return "dynamic: boolean expected"; if (message.physicalData != null && message.hasOwnProperty("physicalData")) { - let error = $root.mirabuf.PhysicalProperties.verify(message.physicalData) - if (error) return "physicalData." + error + let error = $root.mirabuf.PhysicalProperties.verify(message.physicalData); + if (error) + return "physicalData." + error; } if (message.designHierarchy != null && message.hasOwnProperty("designHierarchy")) { - let error = $root.mirabuf.GraphContainer.verify(message.designHierarchy) - if (error) return "designHierarchy." + error + let error = $root.mirabuf.GraphContainer.verify(message.designHierarchy); + if (error) + return "designHierarchy." + error; } if (message.jointHierarchy != null && message.hasOwnProperty("jointHierarchy")) { - let error = $root.mirabuf.GraphContainer.verify(message.jointHierarchy) - if (error) return "jointHierarchy." + error + let error = $root.mirabuf.GraphContainer.verify(message.jointHierarchy); + if (error) + return "jointHierarchy." + error; } if (message.transform != null && message.hasOwnProperty("transform")) { - let error = $root.mirabuf.Transform.verify(message.transform) - if (error) return "transform." + error + let error = $root.mirabuf.Transform.verify(message.transform); + if (error) + return "transform." + error; } if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) { - let error = $root.mirabuf.Thumbnail.verify(message.thumbnail) - if (error) return "thumbnail." + error + let error = $root.mirabuf.Thumbnail.verify(message.thumbnail); + if (error) + return "thumbnail." + error; } - return null - } + return null; + }; /** * Creates an Assembly message from a plain object. Also converts values to their respective internal types. @@ -310,44 +304,48 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Assembly} Assembly */ Assembly.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Assembly) return object - let message = new $root.mirabuf.Assembly() + if (object instanceof $root.mirabuf.Assembly) + return object; + let message = new $root.mirabuf.Assembly(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.Assembly.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.Assembly.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.data != null) { - if (typeof object.data !== "object") throw TypeError(".mirabuf.Assembly.data: object expected") - message.data = $root.mirabuf.AssemblyData.fromObject(object.data) + if (typeof object.data !== "object") + throw TypeError(".mirabuf.Assembly.data: object expected"); + message.data = $root.mirabuf.AssemblyData.fromObject(object.data); } - if (object.dynamic != null) message.dynamic = Boolean(object.dynamic) + if (object.dynamic != null) + message.dynamic = Boolean(object.dynamic); if (object.physicalData != null) { if (typeof object.physicalData !== "object") - throw TypeError(".mirabuf.Assembly.physicalData: object expected") - message.physicalData = $root.mirabuf.PhysicalProperties.fromObject(object.physicalData) + throw TypeError(".mirabuf.Assembly.physicalData: object expected"); + message.physicalData = $root.mirabuf.PhysicalProperties.fromObject(object.physicalData); } if (object.designHierarchy != null) { if (typeof object.designHierarchy !== "object") - throw TypeError(".mirabuf.Assembly.designHierarchy: object expected") - message.designHierarchy = $root.mirabuf.GraphContainer.fromObject(object.designHierarchy) + throw TypeError(".mirabuf.Assembly.designHierarchy: object expected"); + message.designHierarchy = $root.mirabuf.GraphContainer.fromObject(object.designHierarchy); } if (object.jointHierarchy != null) { if (typeof object.jointHierarchy !== "object") - throw TypeError(".mirabuf.Assembly.jointHierarchy: object expected") - message.jointHierarchy = $root.mirabuf.GraphContainer.fromObject(object.jointHierarchy) + throw TypeError(".mirabuf.Assembly.jointHierarchy: object expected"); + message.jointHierarchy = $root.mirabuf.GraphContainer.fromObject(object.jointHierarchy); } if (object.transform != null) { if (typeof object.transform !== "object") - throw TypeError(".mirabuf.Assembly.transform: object expected") - message.transform = $root.mirabuf.Transform.fromObject(object.transform) + throw TypeError(".mirabuf.Assembly.transform: object expected"); + message.transform = $root.mirabuf.Transform.fromObject(object.transform); } if (object.thumbnail != null) { if (typeof object.thumbnail !== "object") - throw TypeError(".mirabuf.Assembly.thumbnail: object expected") - message.thumbnail = $root.mirabuf.Thumbnail.fromObject(object.thumbnail) + throw TypeError(".mirabuf.Assembly.thumbnail: object expected"); + message.thumbnail = $root.mirabuf.Thumbnail.fromObject(object.thumbnail); } - return message - } + return message; + }; /** * Creates a plain object from an Assembly message. Also converts values to other types if specified. @@ -359,35 +357,37 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Assembly.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.data = null - object.dynamic = false - object.physicalData = null - object.designHierarchy = null - object.jointHierarchy = null - object.transform = null - object.thumbnail = null + object.info = null; + object.data = null; + object.dynamic = false; + object.physicalData = null; + object.designHierarchy = null; + object.jointHierarchy = null; + object.transform = null; + object.thumbnail = null; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.data != null && message.hasOwnProperty("data")) - object.data = $root.mirabuf.AssemblyData.toObject(message.data, options) - if (message.dynamic != null && message.hasOwnProperty("dynamic")) object.dynamic = message.dynamic + object.data = $root.mirabuf.AssemblyData.toObject(message.data, options); + if (message.dynamic != null && message.hasOwnProperty("dynamic")) + object.dynamic = message.dynamic; if (message.physicalData != null && message.hasOwnProperty("physicalData")) - object.physicalData = $root.mirabuf.PhysicalProperties.toObject(message.physicalData, options) + object.physicalData = $root.mirabuf.PhysicalProperties.toObject(message.physicalData, options); if (message.designHierarchy != null && message.hasOwnProperty("designHierarchy")) - object.designHierarchy = $root.mirabuf.GraphContainer.toObject(message.designHierarchy, options) + object.designHierarchy = $root.mirabuf.GraphContainer.toObject(message.designHierarchy, options); if (message.jointHierarchy != null && message.hasOwnProperty("jointHierarchy")) - object.jointHierarchy = $root.mirabuf.GraphContainer.toObject(message.jointHierarchy, options) + object.jointHierarchy = $root.mirabuf.GraphContainer.toObject(message.jointHierarchy, options); if (message.transform != null && message.hasOwnProperty("transform")) - object.transform = $root.mirabuf.Transform.toObject(message.transform, options) + object.transform = $root.mirabuf.Transform.toObject(message.transform, options); if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = $root.mirabuf.Thumbnail.toObject(message.thumbnail, options) - return object - } + object.thumbnail = $root.mirabuf.Thumbnail.toObject(message.thumbnail, options); + return object; + }; /** * Converts this Assembly to JSON. @@ -397,8 +397,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Assembly.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Assembly @@ -410,15 +410,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Assembly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Assembly" - } + return typeUrlPrefix + "/mirabuf.Assembly"; + }; - return Assembly - })() + return Assembly; + })(); + + mirabuf.AssemblyData = (function() { - mirabuf.AssemblyData = (function () { /** * Properties of an AssemblyData. * @memberof mirabuf @@ -440,7 +441,8 @@ export const mirabuf = ($root.mirabuf = (() => { function AssemblyData(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -449,7 +451,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.AssemblyData * @instance */ - AssemblyData.prototype.parts = null + AssemblyData.prototype.parts = null; /** * Joint Definition Set @@ -457,7 +459,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.AssemblyData * @instance */ - AssemblyData.prototype.joints = null + AssemblyData.prototype.joints = null; /** * Appearance and Physical Material Set @@ -465,7 +467,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.AssemblyData * @instance */ - AssemblyData.prototype.materials = null + AssemblyData.prototype.materials = null; /** * AssemblyData signals. @@ -473,7 +475,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.AssemblyData * @instance */ - AssemblyData.prototype.signals = null + AssemblyData.prototype.signals = null; /** * Creates a new AssemblyData instance using the specified properties. @@ -484,8 +486,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.AssemblyData} AssemblyData instance */ AssemblyData.create = function create(properties) { - return new AssemblyData(properties) - } + return new AssemblyData(properties); + }; /** * Encodes the specified AssemblyData message. Does not implicitly {@link mirabuf.AssemblyData.verify|verify} messages. @@ -497,26 +499,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ AssemblyData.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.parts != null && Object.hasOwnProperty.call(message, "parts")) - $root.mirabuf.Parts.encode(message.parts, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Parts.encode(message.parts, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.joints != null && Object.hasOwnProperty.call(message, "joints")) - $root.mirabuf.joint.Joints.encode( - message.joints, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.joint.Joints.encode(message.joints, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.materials != null && Object.hasOwnProperty.call(message, "materials")) - $root.mirabuf.material.Materials.encode( - message.materials, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() + $root.mirabuf.material.Materials.encode(message.materials, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.signals != null && Object.hasOwnProperty.call(message, "signals")) - $root.mirabuf.signal.Signals.encode( - message.signals, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() - return writer - } + $root.mirabuf.signal.Signals.encode(message.signals, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; /** * Encodes the specified AssemblyData message, length delimited. Does not implicitly {@link mirabuf.AssemblyData.verify|verify} messages. @@ -528,8 +522,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ AssemblyData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes an AssemblyData message from the specified reader or buffer. @@ -543,35 +537,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ AssemblyData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.AssemblyData() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.AssemblyData(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parts = $root.mirabuf.Parts.decode(reader, reader.uint32()) - break + case 1: { + message.parts = $root.mirabuf.Parts.decode(reader, reader.uint32()); + break; } - case 2: { - message.joints = $root.mirabuf.joint.Joints.decode(reader, reader.uint32()) - break + case 2: { + message.joints = $root.mirabuf.joint.Joints.decode(reader, reader.uint32()); + break; } - case 3: { - message.materials = $root.mirabuf.material.Materials.decode(reader, reader.uint32()) - break + case 3: { + message.materials = $root.mirabuf.material.Materials.decode(reader, reader.uint32()); + break; } - case 4: { - message.signals = $root.mirabuf.signal.Signals.decode(reader, reader.uint32()) - break + case 4: { + message.signals = $root.mirabuf.signal.Signals.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes an AssemblyData message from the specified reader or buffer, length delimited. @@ -584,9 +578,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ AssemblyData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies an AssemblyData message. @@ -597,25 +592,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ AssemblyData.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.parts != null && message.hasOwnProperty("parts")) { - let error = $root.mirabuf.Parts.verify(message.parts) - if (error) return "parts." + error + let error = $root.mirabuf.Parts.verify(message.parts); + if (error) + return "parts." + error; } if (message.joints != null && message.hasOwnProperty("joints")) { - let error = $root.mirabuf.joint.Joints.verify(message.joints) - if (error) return "joints." + error + let error = $root.mirabuf.joint.Joints.verify(message.joints); + if (error) + return "joints." + error; } if (message.materials != null && message.hasOwnProperty("materials")) { - let error = $root.mirabuf.material.Materials.verify(message.materials) - if (error) return "materials." + error + let error = $root.mirabuf.material.Materials.verify(message.materials); + if (error) + return "materials." + error; } if (message.signals != null && message.hasOwnProperty("signals")) { - let error = $root.mirabuf.signal.Signals.verify(message.signals) - if (error) return "signals." + error + let error = $root.mirabuf.signal.Signals.verify(message.signals); + if (error) + return "signals." + error; } - return null - } + return null; + }; /** * Creates an AssemblyData message from a plain object. Also converts values to their respective internal types. @@ -626,28 +626,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.AssemblyData} AssemblyData */ AssemblyData.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.AssemblyData) return object - let message = new $root.mirabuf.AssemblyData() + if (object instanceof $root.mirabuf.AssemblyData) + return object; + let message = new $root.mirabuf.AssemblyData(); if (object.parts != null) { - if (typeof object.parts !== "object") throw TypeError(".mirabuf.AssemblyData.parts: object expected") - message.parts = $root.mirabuf.Parts.fromObject(object.parts) + if (typeof object.parts !== "object") + throw TypeError(".mirabuf.AssemblyData.parts: object expected"); + message.parts = $root.mirabuf.Parts.fromObject(object.parts); } if (object.joints != null) { - if (typeof object.joints !== "object") throw TypeError(".mirabuf.AssemblyData.joints: object expected") - message.joints = $root.mirabuf.joint.Joints.fromObject(object.joints) + if (typeof object.joints !== "object") + throw TypeError(".mirabuf.AssemblyData.joints: object expected"); + message.joints = $root.mirabuf.joint.Joints.fromObject(object.joints); } if (object.materials != null) { if (typeof object.materials !== "object") - throw TypeError(".mirabuf.AssemblyData.materials: object expected") - message.materials = $root.mirabuf.material.Materials.fromObject(object.materials) + throw TypeError(".mirabuf.AssemblyData.materials: object expected"); + message.materials = $root.mirabuf.material.Materials.fromObject(object.materials); } if (object.signals != null) { if (typeof object.signals !== "object") - throw TypeError(".mirabuf.AssemblyData.signals: object expected") - message.signals = $root.mirabuf.signal.Signals.fromObject(object.signals) + throw TypeError(".mirabuf.AssemblyData.signals: object expected"); + message.signals = $root.mirabuf.signal.Signals.fromObject(object.signals); } - return message - } + return message; + }; /** * Creates a plain object from an AssemblyData message. Also converts values to other types if specified. @@ -659,24 +662,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ AssemblyData.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.parts = null - object.joints = null - object.materials = null - object.signals = null + object.parts = null; + object.joints = null; + object.materials = null; + object.signals = null; } if (message.parts != null && message.hasOwnProperty("parts")) - object.parts = $root.mirabuf.Parts.toObject(message.parts, options) + object.parts = $root.mirabuf.Parts.toObject(message.parts, options); if (message.joints != null && message.hasOwnProperty("joints")) - object.joints = $root.mirabuf.joint.Joints.toObject(message.joints, options) + object.joints = $root.mirabuf.joint.Joints.toObject(message.joints, options); if (message.materials != null && message.hasOwnProperty("materials")) - object.materials = $root.mirabuf.material.Materials.toObject(message.materials, options) + object.materials = $root.mirabuf.material.Materials.toObject(message.materials, options); if (message.signals != null && message.hasOwnProperty("signals")) - object.signals = $root.mirabuf.signal.Signals.toObject(message.signals, options) - return object - } + object.signals = $root.mirabuf.signal.Signals.toObject(message.signals, options); + return object; + }; /** * Converts this AssemblyData to JSON. @@ -686,8 +690,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ AssemblyData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for AssemblyData @@ -699,15 +703,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ AssemblyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.AssemblyData" - } + return typeUrlPrefix + "/mirabuf.AssemblyData"; + }; - return AssemblyData - })() + return AssemblyData; + })(); + + mirabuf.Parts = (function() { - mirabuf.Parts = (function () { /** * Properties of a Parts. * @memberof mirabuf @@ -727,11 +732,12 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.IParts=} [properties] Properties to set */ function Parts(properties) { - this.partDefinitions = {} - this.partInstances = {} + this.partDefinitions = {}; + this.partInstances = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -740,7 +746,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Parts * @instance */ - Parts.prototype.info = null + Parts.prototype.info = null; /** * Map of the Exported Part Definitions @@ -748,7 +754,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Parts * @instance */ - Parts.prototype.partDefinitions = $util.emptyObject + Parts.prototype.partDefinitions = $util.emptyObject; /** * Map of the Exported Parts that make up the object @@ -756,7 +762,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Parts * @instance */ - Parts.prototype.partInstances = $util.emptyObject + Parts.prototype.partInstances = $util.emptyObject; /** * other associated data that can be used @@ -764,7 +770,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Parts * @instance */ - Parts.prototype.userData = null + Parts.prototype.userData = null; /** * Creates a new Parts instance using the specified properties. @@ -775,8 +781,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Parts} Parts instance */ Parts.create = function create(properties) { - return new Parts(properties) - } + return new Parts(properties); + }; /** * Encodes the specified Parts message. Does not implicitly {@link mirabuf.Parts.verify|verify} messages. @@ -788,36 +794,24 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Parts.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.partDefinitions != null && Object.hasOwnProperty.call(message, "partDefinitions")) for (let keys = Object.keys(message.partDefinitions), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/ 18).fork().uint32(/* id 1, wireType 2 =*/ 10).string(keys[i]) - $root.mirabuf.PartDefinition.encode( - message.partDefinitions[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.PartDefinition.encode(message.partDefinitions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.partInstances != null && Object.hasOwnProperty.call(message, "partInstances")) for (let keys = Object.keys(message.partInstances), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/ 26).fork().uint32(/* id 1, wireType 2 =*/ 10).string(keys[i]) - $root.mirabuf.PartInstance.encode( - message.partInstances[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.PartInstance.encode(message.partInstances[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.userData != null && Object.hasOwnProperty.call(message, "userData")) - $root.mirabuf.UserData.encode( - message.userData, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() - return writer - } + $root.mirabuf.UserData.encode(message.userData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; /** * Encodes the specified Parts message, length delimited. Does not implicitly {@link mirabuf.Parts.verify|verify} messages. @@ -829,8 +823,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Parts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Parts message from the specified reader or buffer. @@ -844,73 +838,73 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Parts.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Parts(), - key, - value + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Parts(), key, value; while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break - } - case 2: { - if (message.partDefinitions === $util.emptyObject) message.partDefinitions = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.partDefinitions === $util.emptyObject) + message.partDefinitions = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.PartDefinition.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.PartDefinition.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.partDefinitions[key] = value - break - } - case 3: { - if (message.partInstances === $util.emptyObject) message.partInstances = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + message.partDefinitions[key] = value; + break; + } + case 3: { + if (message.partInstances === $util.emptyObject) + message.partInstances = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.PartInstance.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.PartInstance.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.partInstances[key] = value - break + message.partInstances[key] = value; + break; } - case 4: { - message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()) - break + case 4: { + message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Parts message from the specified reader or buffer, length delimited. @@ -923,9 +917,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Parts.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Parts message. @@ -936,33 +931,40 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Parts.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.partDefinitions != null && message.hasOwnProperty("partDefinitions")) { - if (!$util.isObject(message.partDefinitions)) return "partDefinitions: object expected" - let key = Object.keys(message.partDefinitions) + if (!$util.isObject(message.partDefinitions)) + return "partDefinitions: object expected"; + let key = Object.keys(message.partDefinitions); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.PartDefinition.verify(message.partDefinitions[key[i]]) - if (error) return "partDefinitions." + error + let error = $root.mirabuf.PartDefinition.verify(message.partDefinitions[key[i]]); + if (error) + return "partDefinitions." + error; } } if (message.partInstances != null && message.hasOwnProperty("partInstances")) { - if (!$util.isObject(message.partInstances)) return "partInstances: object expected" - let key = Object.keys(message.partInstances) + if (!$util.isObject(message.partInstances)) + return "partInstances: object expected"; + let key = Object.keys(message.partInstances); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.PartInstance.verify(message.partInstances[key[i]]) - if (error) return "partInstances." + error + let error = $root.mirabuf.PartInstance.verify(message.partInstances[key[i]]); + if (error) + return "partInstances." + error; } } if (message.userData != null && message.hasOwnProperty("userData")) { - let error = $root.mirabuf.UserData.verify(message.userData) - if (error) return "userData." + error + let error = $root.mirabuf.UserData.verify(message.userData); + if (error) + return "userData." + error; } - return null - } + return null; + }; /** * Creates a Parts message from a plain object. Also converts values to their respective internal types. @@ -973,42 +975,41 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Parts} Parts */ Parts.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Parts) return object - let message = new $root.mirabuf.Parts() + if (object instanceof $root.mirabuf.Parts) + return object; + let message = new $root.mirabuf.Parts(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.Parts.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.Parts.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.partDefinitions) { if (typeof object.partDefinitions !== "object") - throw TypeError(".mirabuf.Parts.partDefinitions: object expected") - message.partDefinitions = {} + throw TypeError(".mirabuf.Parts.partDefinitions: object expected"); + message.partDefinitions = {}; for (let keys = Object.keys(object.partDefinitions), i = 0; i < keys.length; ++i) { if (typeof object.partDefinitions[keys[i]] !== "object") - throw TypeError(".mirabuf.Parts.partDefinitions: object expected") - message.partDefinitions[keys[i]] = $root.mirabuf.PartDefinition.fromObject( - object.partDefinitions[keys[i]] - ) + throw TypeError(".mirabuf.Parts.partDefinitions: object expected"); + message.partDefinitions[keys[i]] = $root.mirabuf.PartDefinition.fromObject(object.partDefinitions[keys[i]]); } } if (object.partInstances) { if (typeof object.partInstances !== "object") - throw TypeError(".mirabuf.Parts.partInstances: object expected") - message.partInstances = {} + throw TypeError(".mirabuf.Parts.partInstances: object expected"); + message.partInstances = {}; for (let keys = Object.keys(object.partInstances), i = 0; i < keys.length; ++i) { if (typeof object.partInstances[keys[i]] !== "object") - throw TypeError(".mirabuf.Parts.partInstances: object expected") - message.partInstances[keys[i]] = $root.mirabuf.PartInstance.fromObject( - object.partInstances[keys[i]] - ) + throw TypeError(".mirabuf.Parts.partInstances: object expected"); + message.partInstances[keys[i]] = $root.mirabuf.PartInstance.fromObject(object.partInstances[keys[i]]); } } if (object.userData != null) { - if (typeof object.userData !== "object") throw TypeError(".mirabuf.Parts.userData: object expected") - message.userData = $root.mirabuf.UserData.fromObject(object.userData) + if (typeof object.userData !== "object") + throw TypeError(".mirabuf.Parts.userData: object expected"); + message.userData = $root.mirabuf.UserData.fromObject(object.userData); } - return message - } + return message; + }; /** * Creates a plain object from a Parts message. Also converts values to other types if specified. @@ -1020,39 +1021,34 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Parts.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.objects || options.defaults) { - object.partDefinitions = {} - object.partInstances = {} + object.partDefinitions = {}; + object.partInstances = {}; } if (options.defaults) { - object.info = null - object.userData = null + object.info = null; + object.userData = null; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - let keys2 + object.info = $root.mirabuf.Info.toObject(message.info, options); + let keys2; if (message.partDefinitions && (keys2 = Object.keys(message.partDefinitions)).length) { - object.partDefinitions = {} + object.partDefinitions = {}; for (let j = 0; j < keys2.length; ++j) - object.partDefinitions[keys2[j]] = $root.mirabuf.PartDefinition.toObject( - message.partDefinitions[keys2[j]], - options - ) + object.partDefinitions[keys2[j]] = $root.mirabuf.PartDefinition.toObject(message.partDefinitions[keys2[j]], options); } if (message.partInstances && (keys2 = Object.keys(message.partInstances)).length) { - object.partInstances = {} + object.partInstances = {}; for (let j = 0; j < keys2.length; ++j) - object.partInstances[keys2[j]] = $root.mirabuf.PartInstance.toObject( - message.partInstances[keys2[j]], - options - ) + object.partInstances[keys2[j]] = $root.mirabuf.PartInstance.toObject(message.partInstances[keys2[j]], options); } if (message.userData != null && message.hasOwnProperty("userData")) - object.userData = $root.mirabuf.UserData.toObject(message.userData, options) - return object - } + object.userData = $root.mirabuf.UserData.toObject(message.userData, options); + return object; + }; /** * Converts this Parts to JSON. @@ -1062,8 +1058,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Parts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Parts @@ -1075,15 +1071,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Parts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Parts" - } + return typeUrlPrefix + "/mirabuf.Parts"; + }; - return Parts - })() + return Parts; + })(); + + mirabuf.PartDefinition = (function() { - mirabuf.PartDefinition = (function () { /** * Properties of a PartDefinition. * @memberof mirabuf @@ -1108,10 +1105,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.IPartDefinition=} [properties] Properties to set */ function PartDefinition(properties) { - this.bodies = [] + this.bodies = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1120,7 +1118,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.info = null + PartDefinition.prototype.info = null; /** * Physical data associated with Part @@ -1128,7 +1126,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.physicalData = null + PartDefinition.prototype.physicalData = null; /** * Base Transform applied - Most Likely Identity Matrix @@ -1136,7 +1134,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.baseTransform = null + PartDefinition.prototype.baseTransform = null; /** * Mesh Bodies to populate part @@ -1144,7 +1142,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.bodies = $util.emptyArray + PartDefinition.prototype.bodies = $util.emptyArray; /** * Optional value to state whether an object is a dynamic object in a static assembly - all children are also considered overriden @@ -1152,7 +1150,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.dynamic = false + PartDefinition.prototype.dynamic = false; /** * Optional value for overriding the friction value 0-1 @@ -1160,7 +1158,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.frictionOverride = 0 + PartDefinition.prototype.frictionOverride = 0; /** * Optional value for overriding an indiviaul object's mass @@ -1168,7 +1166,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartDefinition * @instance */ - PartDefinition.prototype.massOverride = 0 + PartDefinition.prototype.massOverride = 0; /** * Creates a new PartDefinition instance using the specified properties. @@ -1179,8 +1177,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PartDefinition} PartDefinition instance */ PartDefinition.create = function create(properties) { - return new PartDefinition(properties) - } + return new PartDefinition(properties); + }; /** * Encodes the specified PartDefinition message. Does not implicitly {@link mirabuf.PartDefinition.verify|verify} messages. @@ -1192,33 +1190,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PartDefinition.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.physicalData != null && Object.hasOwnProperty.call(message, "physicalData")) - $root.mirabuf.PhysicalProperties.encode( - message.physicalData, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.PhysicalProperties.encode(message.physicalData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.baseTransform != null && Object.hasOwnProperty.call(message, "baseTransform")) - $root.mirabuf.Transform.encode( - message.baseTransform, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() + $root.mirabuf.Transform.encode(message.baseTransform, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.bodies != null && message.bodies.length) for (let i = 0; i < message.bodies.length; ++i) - $root.mirabuf.Body.encode( - message.bodies[i], - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.Body.encode(message.bodies[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.dynamic != null && Object.hasOwnProperty.call(message, "dynamic")) - writer.uint32(/* id 5, wireType 0 =*/ 40).bool(message.dynamic) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.dynamic); if (message.frictionOverride != null && Object.hasOwnProperty.call(message, "frictionOverride")) - writer.uint32(/* id 6, wireType 5 =*/ 53).float(message.frictionOverride) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.frictionOverride); if (message.massOverride != null && Object.hasOwnProperty.call(message, "massOverride")) - writer.uint32(/* id 7, wireType 5 =*/ 61).float(message.massOverride) - return writer - } + writer.uint32(/* id 7, wireType 5 =*/61).float(message.massOverride); + return writer; + }; /** * Encodes the specified PartDefinition message, length delimited. Does not implicitly {@link mirabuf.PartDefinition.verify|verify} messages. @@ -1230,8 +1220,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PartDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a PartDefinition message from the specified reader or buffer. @@ -1245,48 +1235,49 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PartDefinition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.PartDefinition() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.PartDefinition(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.physicalData = $root.mirabuf.PhysicalProperties.decode(reader, reader.uint32()) - break + case 2: { + message.physicalData = $root.mirabuf.PhysicalProperties.decode(reader, reader.uint32()); + break; } - case 3: { - message.baseTransform = $root.mirabuf.Transform.decode(reader, reader.uint32()) - break + case 3: { + message.baseTransform = $root.mirabuf.Transform.decode(reader, reader.uint32()); + break; } - case 4: { - if (!(message.bodies && message.bodies.length)) message.bodies = [] - message.bodies.push($root.mirabuf.Body.decode(reader, reader.uint32())) - break + case 4: { + if (!(message.bodies && message.bodies.length)) + message.bodies = []; + message.bodies.push($root.mirabuf.Body.decode(reader, reader.uint32())); + break; } - case 5: { - message.dynamic = reader.bool() - break + case 5: { + message.dynamic = reader.bool(); + break; } - case 6: { - message.frictionOverride = reader.float() - break + case 6: { + message.frictionOverride = reader.float(); + break; } - case 7: { - message.massOverride = reader.float() - break + case 7: { + message.massOverride = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a PartDefinition message from the specified reader or buffer, length delimited. @@ -1299,9 +1290,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PartDefinition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a PartDefinition message. @@ -1312,34 +1304,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PartDefinition.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.physicalData != null && message.hasOwnProperty("physicalData")) { - let error = $root.mirabuf.PhysicalProperties.verify(message.physicalData) - if (error) return "physicalData." + error + let error = $root.mirabuf.PhysicalProperties.verify(message.physicalData); + if (error) + return "physicalData." + error; } if (message.baseTransform != null && message.hasOwnProperty("baseTransform")) { - let error = $root.mirabuf.Transform.verify(message.baseTransform) - if (error) return "baseTransform." + error + let error = $root.mirabuf.Transform.verify(message.baseTransform); + if (error) + return "baseTransform." + error; } if (message.bodies != null && message.hasOwnProperty("bodies")) { - if (!Array.isArray(message.bodies)) return "bodies: array expected" + if (!Array.isArray(message.bodies)) + return "bodies: array expected"; for (let i = 0; i < message.bodies.length; ++i) { - let error = $root.mirabuf.Body.verify(message.bodies[i]) - if (error) return "bodies." + error + let error = $root.mirabuf.Body.verify(message.bodies[i]); + if (error) + return "bodies." + error; } } if (message.dynamic != null && message.hasOwnProperty("dynamic")) - if (typeof message.dynamic !== "boolean") return "dynamic: boolean expected" + if (typeof message.dynamic !== "boolean") + return "dynamic: boolean expected"; if (message.frictionOverride != null && message.hasOwnProperty("frictionOverride")) - if (typeof message.frictionOverride !== "number") return "frictionOverride: number expected" + if (typeof message.frictionOverride !== "number") + return "frictionOverride: number expected"; if (message.massOverride != null && message.hasOwnProperty("massOverride")) - if (typeof message.massOverride !== "number") return "massOverride: number expected" - return null - } + if (typeof message.massOverride !== "number") + return "massOverride: number expected"; + return null; + }; /** * Creates a PartDefinition message from a plain object. Also converts values to their respective internal types. @@ -1350,36 +1351,42 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PartDefinition} PartDefinition */ PartDefinition.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.PartDefinition) return object - let message = new $root.mirabuf.PartDefinition() + if (object instanceof $root.mirabuf.PartDefinition) + return object; + let message = new $root.mirabuf.PartDefinition(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.PartDefinition.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.PartDefinition.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.physicalData != null) { if (typeof object.physicalData !== "object") - throw TypeError(".mirabuf.PartDefinition.physicalData: object expected") - message.physicalData = $root.mirabuf.PhysicalProperties.fromObject(object.physicalData) + throw TypeError(".mirabuf.PartDefinition.physicalData: object expected"); + message.physicalData = $root.mirabuf.PhysicalProperties.fromObject(object.physicalData); } if (object.baseTransform != null) { if (typeof object.baseTransform !== "object") - throw TypeError(".mirabuf.PartDefinition.baseTransform: object expected") - message.baseTransform = $root.mirabuf.Transform.fromObject(object.baseTransform) + throw TypeError(".mirabuf.PartDefinition.baseTransform: object expected"); + message.baseTransform = $root.mirabuf.Transform.fromObject(object.baseTransform); } if (object.bodies) { - if (!Array.isArray(object.bodies)) throw TypeError(".mirabuf.PartDefinition.bodies: array expected") - message.bodies = [] + if (!Array.isArray(object.bodies)) + throw TypeError(".mirabuf.PartDefinition.bodies: array expected"); + message.bodies = []; for (let i = 0; i < object.bodies.length; ++i) { if (typeof object.bodies[i] !== "object") - throw TypeError(".mirabuf.PartDefinition.bodies: object expected") - message.bodies[i] = $root.mirabuf.Body.fromObject(object.bodies[i]) + throw TypeError(".mirabuf.PartDefinition.bodies: object expected"); + message.bodies[i] = $root.mirabuf.Body.fromObject(object.bodies[i]); } } - if (object.dynamic != null) message.dynamic = Boolean(object.dynamic) - if (object.frictionOverride != null) message.frictionOverride = Number(object.frictionOverride) - if (object.massOverride != null) message.massOverride = Number(object.massOverride) - return message - } + if (object.dynamic != null) + message.dynamic = Boolean(object.dynamic); + if (object.frictionOverride != null) + message.frictionOverride = Number(object.frictionOverride); + if (object.massOverride != null) + message.massOverride = Number(object.massOverride); + return message; + }; /** * Creates a plain object from a PartDefinition message. Also converts values to other types if specified. @@ -1391,41 +1398,38 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ PartDefinition.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.bodies = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.bodies = []; if (options.defaults) { - object.info = null - object.physicalData = null - object.baseTransform = null - object.dynamic = false - object.frictionOverride = 0 - object.massOverride = 0 + object.info = null; + object.physicalData = null; + object.baseTransform = null; + object.dynamic = false; + object.frictionOverride = 0; + object.massOverride = 0; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.physicalData != null && message.hasOwnProperty("physicalData")) - object.physicalData = $root.mirabuf.PhysicalProperties.toObject(message.physicalData, options) + object.physicalData = $root.mirabuf.PhysicalProperties.toObject(message.physicalData, options); if (message.baseTransform != null && message.hasOwnProperty("baseTransform")) - object.baseTransform = $root.mirabuf.Transform.toObject(message.baseTransform, options) + object.baseTransform = $root.mirabuf.Transform.toObject(message.baseTransform, options); if (message.bodies && message.bodies.length) { - object.bodies = [] + object.bodies = []; for (let j = 0; j < message.bodies.length; ++j) - object.bodies[j] = $root.mirabuf.Body.toObject(message.bodies[j], options) + object.bodies[j] = $root.mirabuf.Body.toObject(message.bodies[j], options); } - if (message.dynamic != null && message.hasOwnProperty("dynamic")) object.dynamic = message.dynamic + if (message.dynamic != null && message.hasOwnProperty("dynamic")) + object.dynamic = message.dynamic; if (message.frictionOverride != null && message.hasOwnProperty("frictionOverride")) - object.frictionOverride = - options.json && !isFinite(message.frictionOverride) - ? String(message.frictionOverride) - : message.frictionOverride + object.frictionOverride = options.json && !isFinite(message.frictionOverride) ? String(message.frictionOverride) : message.frictionOverride; if (message.massOverride != null && message.hasOwnProperty("massOverride")) - object.massOverride = - options.json && !isFinite(message.massOverride) - ? String(message.massOverride) - : message.massOverride - return object - } + object.massOverride = options.json && !isFinite(message.massOverride) ? String(message.massOverride) : message.massOverride; + return object; + }; /** * Converts this PartDefinition to JSON. @@ -1435,8 +1439,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ PartDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for PartDefinition @@ -1448,15 +1452,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ PartDefinition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.PartDefinition" - } + return typeUrlPrefix + "/mirabuf.PartDefinition"; + }; - return PartDefinition - })() + return PartDefinition; + })(); + + mirabuf.PartInstance = (function() { - mirabuf.PartInstance = (function () { /** * Properties of a PartInstance. * @memberof mirabuf @@ -1480,10 +1485,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.IPartInstance=} [properties] Properties to set */ function PartInstance(properties) { - this.joints = [] + this.joints = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1492,7 +1498,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.info = null + PartInstance.prototype.info = null; /** * Reference to the Part Definition defined in Assembly Data @@ -1500,7 +1506,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.partDefinitionReference = "" + PartInstance.prototype.partDefinitionReference = ""; /** * Overriding the object transform (moves the part from the def) - in design hierarchy context @@ -1508,7 +1514,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.transform = null + PartInstance.prototype.transform = null; /** * Position transform from a global scope @@ -1516,7 +1522,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.globalTransform = null + PartInstance.prototype.globalTransform = null; /** * Joints that interact with this element @@ -1524,7 +1530,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.joints = $util.emptyArray + PartInstance.prototype.joints = $util.emptyArray; /** * PartInstance appearance. @@ -1532,7 +1538,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.appearance = "" + PartInstance.prototype.appearance = ""; /** * Physical Material Reference to link to `Materials->PhysicalMaterial->Info->id` @@ -1540,7 +1546,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.physicalMaterial = "" + PartInstance.prototype.physicalMaterial = ""; /** * Flag that if enabled indicates we should skip generating a collider, defaults to FALSE or undefined @@ -1548,7 +1554,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PartInstance * @instance */ - PartInstance.prototype.skipCollider = false + PartInstance.prototype.skipCollider = false; /** * Creates a new PartInstance instance using the specified properties. @@ -1559,8 +1565,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PartInstance} PartInstance instance */ PartInstance.create = function create(properties) { - return new PartInstance(properties) - } + return new PartInstance(properties); + }; /** * Encodes the specified PartInstance message. Does not implicitly {@link mirabuf.PartInstance.verify|verify} messages. @@ -1572,35 +1578,27 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PartInstance.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() - if ( - message.partDefinitionReference != null && - Object.hasOwnProperty.call(message, "partDefinitionReference") - ) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.partDefinitionReference) + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partDefinitionReference != null && Object.hasOwnProperty.call(message, "partDefinitionReference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.partDefinitionReference); if (message.transform != null && Object.hasOwnProperty.call(message, "transform")) - $root.mirabuf.Transform.encode( - message.transform, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() + $root.mirabuf.Transform.encode(message.transform, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.globalTransform != null && Object.hasOwnProperty.call(message, "globalTransform")) - $root.mirabuf.Transform.encode( - message.globalTransform, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.Transform.encode(message.globalTransform, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.joints != null && message.joints.length) for (let i = 0; i < message.joints.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.joints[i]) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.joints[i]); if (message.appearance != null && Object.hasOwnProperty.call(message, "appearance")) - writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.appearance) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.appearance); if (message.physicalMaterial != null && Object.hasOwnProperty.call(message, "physicalMaterial")) - writer.uint32(/* id 7, wireType 2 =*/ 58).string(message.physicalMaterial) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.physicalMaterial); if (message.skipCollider != null && Object.hasOwnProperty.call(message, "skipCollider")) - writer.uint32(/* id 8, wireType 0 =*/ 64).bool(message.skipCollider) - return writer - } + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.skipCollider); + return writer; + }; /** * Encodes the specified PartInstance message, length delimited. Does not implicitly {@link mirabuf.PartInstance.verify|verify} messages. @@ -1612,8 +1610,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PartInstance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a PartInstance message from the specified reader or buffer. @@ -1627,52 +1625,53 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PartInstance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.PartInstance() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.PartInstance(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.partDefinitionReference = reader.string() - break + case 2: { + message.partDefinitionReference = reader.string(); + break; } - case 3: { - message.transform = $root.mirabuf.Transform.decode(reader, reader.uint32()) - break + case 3: { + message.transform = $root.mirabuf.Transform.decode(reader, reader.uint32()); + break; } - case 4: { - message.globalTransform = $root.mirabuf.Transform.decode(reader, reader.uint32()) - break + case 4: { + message.globalTransform = $root.mirabuf.Transform.decode(reader, reader.uint32()); + break; } - case 5: { - if (!(message.joints && message.joints.length)) message.joints = [] - message.joints.push(reader.string()) - break + case 5: { + if (!(message.joints && message.joints.length)) + message.joints = []; + message.joints.push(reader.string()); + break; } - case 6: { - message.appearance = reader.string() - break + case 6: { + message.appearance = reader.string(); + break; } - case 7: { - message.physicalMaterial = reader.string() - break + case 7: { + message.physicalMaterial = reader.string(); + break; } - case 8: { - message.skipCollider = reader.bool() - break + case 8: { + message.skipCollider = reader.bool(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a PartInstance message from the specified reader or buffer, length delimited. @@ -1685,9 +1684,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PartInstance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a PartInstance message. @@ -1698,34 +1698,44 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PartInstance.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.partDefinitionReference != null && message.hasOwnProperty("partDefinitionReference")) - if (!$util.isString(message.partDefinitionReference)) return "partDefinitionReference: string expected" + if (!$util.isString(message.partDefinitionReference)) + return "partDefinitionReference: string expected"; if (message.transform != null && message.hasOwnProperty("transform")) { - let error = $root.mirabuf.Transform.verify(message.transform) - if (error) return "transform." + error + let error = $root.mirabuf.Transform.verify(message.transform); + if (error) + return "transform." + error; } if (message.globalTransform != null && message.hasOwnProperty("globalTransform")) { - let error = $root.mirabuf.Transform.verify(message.globalTransform) - if (error) return "globalTransform." + error + let error = $root.mirabuf.Transform.verify(message.globalTransform); + if (error) + return "globalTransform." + error; } if (message.joints != null && message.hasOwnProperty("joints")) { - if (!Array.isArray(message.joints)) return "joints: array expected" + if (!Array.isArray(message.joints)) + return "joints: array expected"; for (let i = 0; i < message.joints.length; ++i) - if (!$util.isString(message.joints[i])) return "joints: string[] expected" + if (!$util.isString(message.joints[i])) + return "joints: string[] expected"; } if (message.appearance != null && message.hasOwnProperty("appearance")) - if (!$util.isString(message.appearance)) return "appearance: string expected" + if (!$util.isString(message.appearance)) + return "appearance: string expected"; if (message.physicalMaterial != null && message.hasOwnProperty("physicalMaterial")) - if (!$util.isString(message.physicalMaterial)) return "physicalMaterial: string expected" + if (!$util.isString(message.physicalMaterial)) + return "physicalMaterial: string expected"; if (message.skipCollider != null && message.hasOwnProperty("skipCollider")) - if (typeof message.skipCollider !== "boolean") return "skipCollider: boolean expected" - return null - } + if (typeof message.skipCollider !== "boolean") + return "skipCollider: boolean expected"; + return null; + }; /** * Creates a PartInstance message from a plain object. Also converts values to their respective internal types. @@ -1736,34 +1746,41 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PartInstance} PartInstance */ PartInstance.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.PartInstance) return object - let message = new $root.mirabuf.PartInstance() + if (object instanceof $root.mirabuf.PartInstance) + return object; + let message = new $root.mirabuf.PartInstance(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.PartInstance.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.PartInstance.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.partDefinitionReference != null) - message.partDefinitionReference = String(object.partDefinitionReference) + message.partDefinitionReference = String(object.partDefinitionReference); if (object.transform != null) { if (typeof object.transform !== "object") - throw TypeError(".mirabuf.PartInstance.transform: object expected") - message.transform = $root.mirabuf.Transform.fromObject(object.transform) + throw TypeError(".mirabuf.PartInstance.transform: object expected"); + message.transform = $root.mirabuf.Transform.fromObject(object.transform); } if (object.globalTransform != null) { if (typeof object.globalTransform !== "object") - throw TypeError(".mirabuf.PartInstance.globalTransform: object expected") - message.globalTransform = $root.mirabuf.Transform.fromObject(object.globalTransform) + throw TypeError(".mirabuf.PartInstance.globalTransform: object expected"); + message.globalTransform = $root.mirabuf.Transform.fromObject(object.globalTransform); } if (object.joints) { - if (!Array.isArray(object.joints)) throw TypeError(".mirabuf.PartInstance.joints: array expected") - message.joints = [] - for (let i = 0; i < object.joints.length; ++i) message.joints[i] = String(object.joints[i]) - } - if (object.appearance != null) message.appearance = String(object.appearance) - if (object.physicalMaterial != null) message.physicalMaterial = String(object.physicalMaterial) - if (object.skipCollider != null) message.skipCollider = Boolean(object.skipCollider) - return message - } + if (!Array.isArray(object.joints)) + throw TypeError(".mirabuf.PartInstance.joints: array expected"); + message.joints = []; + for (let i = 0; i < object.joints.length; ++i) + message.joints[i] = String(object.joints[i]); + } + if (object.appearance != null) + message.appearance = String(object.appearance); + if (object.physicalMaterial != null) + message.physicalMaterial = String(object.physicalMaterial); + if (object.skipCollider != null) + message.skipCollider = Boolean(object.skipCollider); + return message; + }; /** * Creates a plain object from a PartInstance message. Also converts values to other types if specified. @@ -1775,38 +1792,41 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ PartInstance.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.joints = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.joints = []; if (options.defaults) { - object.info = null - object.partDefinitionReference = "" - object.transform = null - object.globalTransform = null - object.appearance = "" - object.physicalMaterial = "" - object.skipCollider = false + object.info = null; + object.partDefinitionReference = ""; + object.transform = null; + object.globalTransform = null; + object.appearance = ""; + object.physicalMaterial = ""; + object.skipCollider = false; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.partDefinitionReference != null && message.hasOwnProperty("partDefinitionReference")) - object.partDefinitionReference = message.partDefinitionReference + object.partDefinitionReference = message.partDefinitionReference; if (message.transform != null && message.hasOwnProperty("transform")) - object.transform = $root.mirabuf.Transform.toObject(message.transform, options) + object.transform = $root.mirabuf.Transform.toObject(message.transform, options); if (message.globalTransform != null && message.hasOwnProperty("globalTransform")) - object.globalTransform = $root.mirabuf.Transform.toObject(message.globalTransform, options) + object.globalTransform = $root.mirabuf.Transform.toObject(message.globalTransform, options); if (message.joints && message.joints.length) { - object.joints = [] - for (let j = 0; j < message.joints.length; ++j) object.joints[j] = message.joints[j] + object.joints = []; + for (let j = 0; j < message.joints.length; ++j) + object.joints[j] = message.joints[j]; } if (message.appearance != null && message.hasOwnProperty("appearance")) - object.appearance = message.appearance + object.appearance = message.appearance; if (message.physicalMaterial != null && message.hasOwnProperty("physicalMaterial")) - object.physicalMaterial = message.physicalMaterial + object.physicalMaterial = message.physicalMaterial; if (message.skipCollider != null && message.hasOwnProperty("skipCollider")) - object.skipCollider = message.skipCollider - return object - } + object.skipCollider = message.skipCollider; + return object; + }; /** * Converts this PartInstance to JSON. @@ -1816,8 +1836,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ PartInstance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for PartInstance @@ -1829,15 +1849,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ PartInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.PartInstance" - } + return typeUrlPrefix + "/mirabuf.PartInstance"; + }; - return PartInstance - })() + return PartInstance; + })(); + + mirabuf.Body = (function() { - mirabuf.Body = (function () { /** * Properties of a Body. * @memberof mirabuf @@ -1859,7 +1880,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Body(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1868,7 +1890,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Body * @instance */ - Body.prototype.info = null + Body.prototype.info = null; /** * Reference to Part Definition @@ -1876,7 +1898,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Body * @instance */ - Body.prototype.part = "" + Body.prototype.part = ""; /** * Triangle Mesh for rendering @@ -1884,7 +1906,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Body * @instance */ - Body.prototype.triangleMesh = null + Body.prototype.triangleMesh = null; /** * Override Visual Appearance for the body @@ -1892,7 +1914,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Body * @instance */ - Body.prototype.appearanceOverride = "" + Body.prototype.appearanceOverride = ""; /** * Creates a new Body instance using the specified properties. @@ -1903,8 +1925,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Body} Body instance */ Body.create = function create(properties) { - return new Body(properties) - } + return new Body(properties); + }; /** * Encodes the specified Body message. Does not implicitly {@link mirabuf.Body.verify|verify} messages. @@ -1916,20 +1938,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Body.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.part != null && Object.hasOwnProperty.call(message, "part")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.part) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.part); if (message.triangleMesh != null && Object.hasOwnProperty.call(message, "triangleMesh")) - $root.mirabuf.TriangleMesh.encode( - message.triangleMesh, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() + $root.mirabuf.TriangleMesh.encode(message.triangleMesh, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.appearanceOverride != null && Object.hasOwnProperty.call(message, "appearanceOverride")) - writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.appearanceOverride) - return writer - } + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appearanceOverride); + return writer; + }; /** * Encodes the specified Body message, length delimited. Does not implicitly {@link mirabuf.Body.verify|verify} messages. @@ -1941,8 +1961,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Body.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Body message from the specified reader or buffer. @@ -1956,35 +1976,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Body.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Body() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Body(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.part = reader.string() - break + case 2: { + message.part = reader.string(); + break; } - case 3: { - message.triangleMesh = $root.mirabuf.TriangleMesh.decode(reader, reader.uint32()) - break + case 3: { + message.triangleMesh = $root.mirabuf.TriangleMesh.decode(reader, reader.uint32()); + break; } - case 4: { - message.appearanceOverride = reader.string() - break + case 4: { + message.appearanceOverride = reader.string(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Body message from the specified reader or buffer, length delimited. @@ -1997,9 +2017,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Body.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Body message. @@ -2010,21 +2031,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Body.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.part != null && message.hasOwnProperty("part")) - if (!$util.isString(message.part)) return "part: string expected" + if (!$util.isString(message.part)) + return "part: string expected"; if (message.triangleMesh != null && message.hasOwnProperty("triangleMesh")) { - let error = $root.mirabuf.TriangleMesh.verify(message.triangleMesh) - if (error) return "triangleMesh." + error + let error = $root.mirabuf.TriangleMesh.verify(message.triangleMesh); + if (error) + return "triangleMesh." + error; } if (message.appearanceOverride != null && message.hasOwnProperty("appearanceOverride")) - if (!$util.isString(message.appearanceOverride)) return "appearanceOverride: string expected" - return null - } + if (!$util.isString(message.appearanceOverride)) + return "appearanceOverride: string expected"; + return null; + }; /** * Creates a Body message from a plain object. Also converts values to their respective internal types. @@ -2035,21 +2061,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Body} Body */ Body.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Body) return object - let message = new $root.mirabuf.Body() + if (object instanceof $root.mirabuf.Body) + return object; + let message = new $root.mirabuf.Body(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.Body.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.Body.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } - if (object.part != null) message.part = String(object.part) + if (object.part != null) + message.part = String(object.part); if (object.triangleMesh != null) { if (typeof object.triangleMesh !== "object") - throw TypeError(".mirabuf.Body.triangleMesh: object expected") - message.triangleMesh = $root.mirabuf.TriangleMesh.fromObject(object.triangleMesh) + throw TypeError(".mirabuf.Body.triangleMesh: object expected"); + message.triangleMesh = $root.mirabuf.TriangleMesh.fromObject(object.triangleMesh); } - if (object.appearanceOverride != null) message.appearanceOverride = String(object.appearanceOverride) - return message - } + if (object.appearanceOverride != null) + message.appearanceOverride = String(object.appearanceOverride); + return message; + }; /** * Creates a plain object from a Body message. Also converts values to other types if specified. @@ -2061,23 +2091,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Body.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.part = "" - object.triangleMesh = null - object.appearanceOverride = "" + object.info = null; + object.part = ""; + object.triangleMesh = null; + object.appearanceOverride = ""; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - if (message.part != null && message.hasOwnProperty("part")) object.part = message.part + object.info = $root.mirabuf.Info.toObject(message.info, options); + if (message.part != null && message.hasOwnProperty("part")) + object.part = message.part; if (message.triangleMesh != null && message.hasOwnProperty("triangleMesh")) - object.triangleMesh = $root.mirabuf.TriangleMesh.toObject(message.triangleMesh, options) + object.triangleMesh = $root.mirabuf.TriangleMesh.toObject(message.triangleMesh, options); if (message.appearanceOverride != null && message.hasOwnProperty("appearanceOverride")) - object.appearanceOverride = message.appearanceOverride - return object - } + object.appearanceOverride = message.appearanceOverride; + return object; + }; /** * Converts this Body to JSON. @@ -2087,8 +2119,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Body.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Body @@ -2100,15 +2132,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Body" - } + return typeUrlPrefix + "/mirabuf.Body"; + }; + + return Body; + })(); - return Body - })() + mirabuf.TriangleMesh = (function() { - mirabuf.TriangleMesh = (function () { /** * Properties of a TriangleMesh. * @memberof mirabuf @@ -2131,7 +2164,8 @@ export const mirabuf = ($root.mirabuf = (() => { function TriangleMesh(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -2140,7 +2174,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.TriangleMesh * @instance */ - TriangleMesh.prototype.info = null + TriangleMesh.prototype.info = null; /** * Is this object a Plane ? (Does it have volume) @@ -2148,7 +2182,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.TriangleMesh * @instance */ - TriangleMesh.prototype.hasVolume = false + TriangleMesh.prototype.hasVolume = false; /** * Rendered Appearance properties referenced from Assembly Data @@ -2156,7 +2190,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.TriangleMesh * @instance */ - TriangleMesh.prototype.materialReference = "" + TriangleMesh.prototype.materialReference = ""; /** * Stored as true types, inidicies, verts, uv @@ -2164,7 +2198,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.TriangleMesh * @instance */ - TriangleMesh.prototype.mesh = null + TriangleMesh.prototype.mesh = null; /** * Stored as binary data in bytes @@ -2172,10 +2206,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.TriangleMesh * @instance */ - TriangleMesh.prototype.bmesh = null + TriangleMesh.prototype.bmesh = null; // OneOf field names bound to virtual getters and setters - let $oneOfFields + let $oneOfFields; /** * What kind of Mesh Data exists in this Triangle Mesh @@ -2184,9 +2218,9 @@ export const mirabuf = ($root.mirabuf = (() => { * @instance */ Object.defineProperty(TriangleMesh.prototype, "meshType", { - get: $util.oneOfGetter(($oneOfFields = ["mesh", "bmesh"])), - set: $util.oneOfSetter($oneOfFields), - }) + get: $util.oneOfGetter($oneOfFields = ["mesh", "bmesh"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new TriangleMesh instance using the specified properties. @@ -2197,8 +2231,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.TriangleMesh} TriangleMesh instance */ TriangleMesh.create = function create(properties) { - return new TriangleMesh(properties) - } + return new TriangleMesh(properties); + }; /** * Encodes the specified TriangleMesh message. Does not implicitly {@link mirabuf.TriangleMesh.verify|verify} messages. @@ -2210,22 +2244,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ TriangleMesh.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.hasVolume != null && Object.hasOwnProperty.call(message, "hasVolume")) - writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.hasVolume) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.hasVolume); if (message.materialReference != null && Object.hasOwnProperty.call(message, "materialReference")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.materialReference) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.materialReference); if (message.mesh != null && Object.hasOwnProperty.call(message, "mesh")) - $root.mirabuf.Mesh.encode(message.mesh, writer.uint32(/* id 4, wireType 2 =*/ 34).fork()).ldelim() + $root.mirabuf.Mesh.encode(message.mesh, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.bmesh != null && Object.hasOwnProperty.call(message, "bmesh")) - $root.mirabuf.BinaryMesh.encode( - message.bmesh, - writer.uint32(/* id 5, wireType 2 =*/ 42).fork() - ).ldelim() - return writer - } + $root.mirabuf.BinaryMesh.encode(message.bmesh, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; /** * Encodes the specified TriangleMesh message, length delimited. Does not implicitly {@link mirabuf.TriangleMesh.verify|verify} messages. @@ -2237,8 +2269,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ TriangleMesh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a TriangleMesh message from the specified reader or buffer. @@ -2252,39 +2284,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TriangleMesh.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.TriangleMesh() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.TriangleMesh(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.hasVolume = reader.bool() - break + case 2: { + message.hasVolume = reader.bool(); + break; } - case 3: { - message.materialReference = reader.string() - break + case 3: { + message.materialReference = reader.string(); + break; } - case 4: { - message.mesh = $root.mirabuf.Mesh.decode(reader, reader.uint32()) - break + case 4: { + message.mesh = $root.mirabuf.Mesh.decode(reader, reader.uint32()); + break; } - case 5: { - message.bmesh = $root.mirabuf.BinaryMesh.decode(reader, reader.uint32()) - break + case 5: { + message.bmesh = $root.mirabuf.BinaryMesh.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a TriangleMesh message from the specified reader or buffer, length delimited. @@ -2297,9 +2329,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TriangleMesh.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a TriangleMesh message. @@ -2310,33 +2343,40 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TriangleMesh.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" - let properties = {} + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.hasVolume != null && message.hasOwnProperty("hasVolume")) - if (typeof message.hasVolume !== "boolean") return "hasVolume: boolean expected" + if (typeof message.hasVolume !== "boolean") + return "hasVolume: boolean expected"; if (message.materialReference != null && message.hasOwnProperty("materialReference")) - if (!$util.isString(message.materialReference)) return "materialReference: string expected" + if (!$util.isString(message.materialReference)) + return "materialReference: string expected"; if (message.mesh != null && message.hasOwnProperty("mesh")) { - properties.meshType = 1 + properties.meshType = 1; { - let error = $root.mirabuf.Mesh.verify(message.mesh) - if (error) return "mesh." + error + let error = $root.mirabuf.Mesh.verify(message.mesh); + if (error) + return "mesh." + error; } } if (message.bmesh != null && message.hasOwnProperty("bmesh")) { - if (properties.meshType === 1) return "meshType: multiple values" - properties.meshType = 1 + if (properties.meshType === 1) + return "meshType: multiple values"; + properties.meshType = 1; { - let error = $root.mirabuf.BinaryMesh.verify(message.bmesh) - if (error) return "bmesh." + error + let error = $root.mirabuf.BinaryMesh.verify(message.bmesh); + if (error) + return "bmesh." + error; } } - return null - } + return null; + }; /** * Creates a TriangleMesh message from a plain object. Also converts values to their respective internal types. @@ -2347,24 +2387,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.TriangleMesh} TriangleMesh */ TriangleMesh.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.TriangleMesh) return object - let message = new $root.mirabuf.TriangleMesh() + if (object instanceof $root.mirabuf.TriangleMesh) + return object; + let message = new $root.mirabuf.TriangleMesh(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.TriangleMesh.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) - } - if (object.hasVolume != null) message.hasVolume = Boolean(object.hasVolume) - if (object.materialReference != null) message.materialReference = String(object.materialReference) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.TriangleMesh.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); + } + if (object.hasVolume != null) + message.hasVolume = Boolean(object.hasVolume); + if (object.materialReference != null) + message.materialReference = String(object.materialReference); if (object.mesh != null) { - if (typeof object.mesh !== "object") throw TypeError(".mirabuf.TriangleMesh.mesh: object expected") - message.mesh = $root.mirabuf.Mesh.fromObject(object.mesh) + if (typeof object.mesh !== "object") + throw TypeError(".mirabuf.TriangleMesh.mesh: object expected"); + message.mesh = $root.mirabuf.Mesh.fromObject(object.mesh); } if (object.bmesh != null) { - if (typeof object.bmesh !== "object") throw TypeError(".mirabuf.TriangleMesh.bmesh: object expected") - message.bmesh = $root.mirabuf.BinaryMesh.fromObject(object.bmesh) + if (typeof object.bmesh !== "object") + throw TypeError(".mirabuf.TriangleMesh.bmesh: object expected"); + message.bmesh = $root.mirabuf.BinaryMesh.fromObject(object.bmesh); } - return message - } + return message; + }; /** * Creates a plain object from a TriangleMesh message. Also converts values to other types if specified. @@ -2376,28 +2422,32 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ TriangleMesh.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.hasVolume = false - object.materialReference = "" + object.info = null; + object.hasVolume = false; + object.materialReference = ""; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - if (message.hasVolume != null && message.hasOwnProperty("hasVolume")) object.hasVolume = message.hasVolume + object.info = $root.mirabuf.Info.toObject(message.info, options); + if (message.hasVolume != null && message.hasOwnProperty("hasVolume")) + object.hasVolume = message.hasVolume; if (message.materialReference != null && message.hasOwnProperty("materialReference")) - object.materialReference = message.materialReference + object.materialReference = message.materialReference; if (message.mesh != null && message.hasOwnProperty("mesh")) { - object.mesh = $root.mirabuf.Mesh.toObject(message.mesh, options) - if (options.oneofs) object.meshType = "mesh" + object.mesh = $root.mirabuf.Mesh.toObject(message.mesh, options); + if (options.oneofs) + object.meshType = "mesh"; } if (message.bmesh != null && message.hasOwnProperty("bmesh")) { - object.bmesh = $root.mirabuf.BinaryMesh.toObject(message.bmesh, options) - if (options.oneofs) object.meshType = "bmesh" + object.bmesh = $root.mirabuf.BinaryMesh.toObject(message.bmesh, options); + if (options.oneofs) + object.meshType = "bmesh"; } - return object - } + return object; + }; /** * Converts this TriangleMesh to JSON. @@ -2407,8 +2457,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ TriangleMesh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for TriangleMesh @@ -2420,15 +2470,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ TriangleMesh.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.TriangleMesh" - } + return typeUrlPrefix + "/mirabuf.TriangleMesh"; + }; - return TriangleMesh - })() + return TriangleMesh; + })(); + + mirabuf.Mesh = (function() { - mirabuf.Mesh = (function () { /** * Properties of a Mesh. * @memberof mirabuf @@ -2448,13 +2499,14 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.IMesh=} [properties] Properties to set */ function Mesh(properties) { - this.verts = [] - this.normals = [] - this.uv = [] - this.indices = [] + this.verts = []; + this.normals = []; + this.uv = []; + this.indices = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -2463,7 +2515,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Mesh * @instance */ - Mesh.prototype.verts = $util.emptyArray + Mesh.prototype.verts = $util.emptyArray; /** * Tri Mesh Normals vec3 @@ -2471,7 +2523,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Mesh * @instance */ - Mesh.prototype.normals = $util.emptyArray + Mesh.prototype.normals = $util.emptyArray; /** * Tri Mesh uv Mapping vec2 @@ -2479,7 +2531,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Mesh * @instance */ - Mesh.prototype.uv = $util.emptyArray + Mesh.prototype.uv = $util.emptyArray; /** * Tri Mesh indicies (Vert Map) @@ -2487,7 +2539,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Mesh * @instance */ - Mesh.prototype.indices = $util.emptyArray + Mesh.prototype.indices = $util.emptyArray; /** * Creates a new Mesh instance using the specified properties. @@ -2498,8 +2550,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Mesh} Mesh instance */ Mesh.create = function create(properties) { - return new Mesh(properties) - } + return new Mesh(properties); + }; /** * Encodes the specified Mesh message. Does not implicitly {@link mirabuf.Mesh.verify|verify} messages. @@ -2511,29 +2563,34 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Mesh.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.verts != null && message.verts.length) { - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - for (let i = 0; i < message.verts.length; ++i) writer.float(message.verts[i]) - writer.ldelim() + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.verts.length; ++i) + writer.float(message.verts[i]); + writer.ldelim(); } if (message.normals != null && message.normals.length) { - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - for (let i = 0; i < message.normals.length; ++i) writer.float(message.normals[i]) - writer.ldelim() + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.normals.length; ++i) + writer.float(message.normals[i]); + writer.ldelim(); } if (message.uv != null && message.uv.length) { - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - for (let i = 0; i < message.uv.length; ++i) writer.float(message.uv[i]) - writer.ldelim() + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.uv.length; ++i) + writer.float(message.uv[i]); + writer.ldelim(); } if (message.indices != null && message.indices.length) { - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - for (let i = 0; i < message.indices.length; ++i) writer.int32(message.indices[i]) - writer.ldelim() + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.indices.length; ++i) + writer.int32(message.indices[i]); + writer.ldelim(); } - return writer - } + return writer; + }; /** * Encodes the specified Mesh message, length delimited. Does not implicitly {@link mirabuf.Mesh.verify|verify} messages. @@ -2545,8 +2602,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Mesh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Mesh message from the specified reader or buffer. @@ -2560,51 +2617,63 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Mesh.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Mesh() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Mesh(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.verts && message.verts.length)) message.verts = [] + case 1: { + if (!(message.verts && message.verts.length)) + message.verts = []; if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos - while (reader.pos < end2) message.verts.push(reader.float()) - } else message.verts.push(reader.float()) - break - } - case 2: { - if (!(message.normals && message.normals.length)) message.normals = [] + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.verts.push(reader.float()); + } else + message.verts.push(reader.float()); + break; + } + case 2: { + if (!(message.normals && message.normals.length)) + message.normals = []; if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos - while (reader.pos < end2) message.normals.push(reader.float()) - } else message.normals.push(reader.float()) - break - } - case 3: { - if (!(message.uv && message.uv.length)) message.uv = [] + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.normals.push(reader.float()); + } else + message.normals.push(reader.float()); + break; + } + case 3: { + if (!(message.uv && message.uv.length)) + message.uv = []; if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos - while (reader.pos < end2) message.uv.push(reader.float()) - } else message.uv.push(reader.float()) - break - } - case 4: { - if (!(message.indices && message.indices.length)) message.indices = [] + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.uv.push(reader.float()); + } else + message.uv.push(reader.float()); + break; + } + case 4: { + if (!(message.indices && message.indices.length)) + message.indices = []; if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos - while (reader.pos < end2) message.indices.push(reader.int32()) - } else message.indices.push(reader.int32()) - break + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.indices.push(reader.int32()); + } else + message.indices.push(reader.int32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Mesh message from the specified reader or buffer, length delimited. @@ -2617,9 +2686,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Mesh.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Mesh message. @@ -2630,29 +2700,38 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Mesh.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.verts != null && message.hasOwnProperty("verts")) { - if (!Array.isArray(message.verts)) return "verts: array expected" + if (!Array.isArray(message.verts)) + return "verts: array expected"; for (let i = 0; i < message.verts.length; ++i) - if (typeof message.verts[i] !== "number") return "verts: number[] expected" + if (typeof message.verts[i] !== "number") + return "verts: number[] expected"; } if (message.normals != null && message.hasOwnProperty("normals")) { - if (!Array.isArray(message.normals)) return "normals: array expected" + if (!Array.isArray(message.normals)) + return "normals: array expected"; for (let i = 0; i < message.normals.length; ++i) - if (typeof message.normals[i] !== "number") return "normals: number[] expected" + if (typeof message.normals[i] !== "number") + return "normals: number[] expected"; } if (message.uv != null && message.hasOwnProperty("uv")) { - if (!Array.isArray(message.uv)) return "uv: array expected" + if (!Array.isArray(message.uv)) + return "uv: array expected"; for (let i = 0; i < message.uv.length; ++i) - if (typeof message.uv[i] !== "number") return "uv: number[] expected" + if (typeof message.uv[i] !== "number") + return "uv: number[] expected"; } if (message.indices != null && message.hasOwnProperty("indices")) { - if (!Array.isArray(message.indices)) return "indices: array expected" + if (!Array.isArray(message.indices)) + return "indices: array expected"; for (let i = 0; i < message.indices.length; ++i) - if (!$util.isInteger(message.indices[i])) return "indices: integer[] expected" + if (!$util.isInteger(message.indices[i])) + return "indices: integer[] expected"; } - return null - } + return null; + }; /** * Creates a Mesh message from a plain object. Also converts values to their respective internal types. @@ -2663,30 +2742,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Mesh} Mesh */ Mesh.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Mesh) return object - let message = new $root.mirabuf.Mesh() + if (object instanceof $root.mirabuf.Mesh) + return object; + let message = new $root.mirabuf.Mesh(); if (object.verts) { - if (!Array.isArray(object.verts)) throw TypeError(".mirabuf.Mesh.verts: array expected") - message.verts = [] - for (let i = 0; i < object.verts.length; ++i) message.verts[i] = Number(object.verts[i]) + if (!Array.isArray(object.verts)) + throw TypeError(".mirabuf.Mesh.verts: array expected"); + message.verts = []; + for (let i = 0; i < object.verts.length; ++i) + message.verts[i] = Number(object.verts[i]); } if (object.normals) { - if (!Array.isArray(object.normals)) throw TypeError(".mirabuf.Mesh.normals: array expected") - message.normals = [] - for (let i = 0; i < object.normals.length; ++i) message.normals[i] = Number(object.normals[i]) + if (!Array.isArray(object.normals)) + throw TypeError(".mirabuf.Mesh.normals: array expected"); + message.normals = []; + for (let i = 0; i < object.normals.length; ++i) + message.normals[i] = Number(object.normals[i]); } if (object.uv) { - if (!Array.isArray(object.uv)) throw TypeError(".mirabuf.Mesh.uv: array expected") - message.uv = [] - for (let i = 0; i < object.uv.length; ++i) message.uv[i] = Number(object.uv[i]) + if (!Array.isArray(object.uv)) + throw TypeError(".mirabuf.Mesh.uv: array expected"); + message.uv = []; + for (let i = 0; i < object.uv.length; ++i) + message.uv[i] = Number(object.uv[i]); } if (object.indices) { - if (!Array.isArray(object.indices)) throw TypeError(".mirabuf.Mesh.indices: array expected") - message.indices = [] - for (let i = 0; i < object.indices.length; ++i) message.indices[i] = object.indices[i] | 0 + if (!Array.isArray(object.indices)) + throw TypeError(".mirabuf.Mesh.indices: array expected"); + message.indices = []; + for (let i = 0; i < object.indices.length; ++i) + message.indices[i] = object.indices[i] | 0; } - return message - } + return message; + }; /** * Creates a plain object from a Mesh message. Also converts values to other types if specified. @@ -2698,37 +2786,37 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Mesh.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.arrays || options.defaults) { - object.verts = [] - object.normals = [] - object.uv = [] - object.indices = [] + object.verts = []; + object.normals = []; + object.uv = []; + object.indices = []; } if (message.verts && message.verts.length) { - object.verts = [] + object.verts = []; for (let j = 0; j < message.verts.length; ++j) - object.verts[j] = - options.json && !isFinite(message.verts[j]) ? String(message.verts[j]) : message.verts[j] + object.verts[j] = options.json && !isFinite(message.verts[j]) ? String(message.verts[j]) : message.verts[j]; } if (message.normals && message.normals.length) { - object.normals = [] + object.normals = []; for (let j = 0; j < message.normals.length; ++j) - object.normals[j] = - options.json && !isFinite(message.normals[j]) ? String(message.normals[j]) : message.normals[j] + object.normals[j] = options.json && !isFinite(message.normals[j]) ? String(message.normals[j]) : message.normals[j]; } if (message.uv && message.uv.length) { - object.uv = [] + object.uv = []; for (let j = 0; j < message.uv.length; ++j) - object.uv[j] = options.json && !isFinite(message.uv[j]) ? String(message.uv[j]) : message.uv[j] + object.uv[j] = options.json && !isFinite(message.uv[j]) ? String(message.uv[j]) : message.uv[j]; } if (message.indices && message.indices.length) { - object.indices = [] - for (let j = 0; j < message.indices.length; ++j) object.indices[j] = message.indices[j] + object.indices = []; + for (let j = 0; j < message.indices.length; ++j) + object.indices[j] = message.indices[j]; } - return object - } + return object; + }; /** * Converts this Mesh to JSON. @@ -2738,8 +2826,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Mesh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Mesh @@ -2751,15 +2839,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Mesh.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Mesh" - } + return typeUrlPrefix + "/mirabuf.Mesh"; + }; + + return Mesh; + })(); - return Mesh - })() + mirabuf.BinaryMesh = (function() { - mirabuf.BinaryMesh = (function () { /** * Properties of a BinaryMesh. * @memberof mirabuf @@ -2778,7 +2867,8 @@ export const mirabuf = ($root.mirabuf = (() => { function BinaryMesh(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -2787,7 +2877,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.BinaryMesh * @instance */ - BinaryMesh.prototype.data = $util.newBuffer([]) + BinaryMesh.prototype.data = $util.newBuffer([]); /** * Creates a new BinaryMesh instance using the specified properties. @@ -2798,8 +2888,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.BinaryMesh} BinaryMesh instance */ BinaryMesh.create = function create(properties) { - return new BinaryMesh(properties) - } + return new BinaryMesh(properties); + }; /** * Encodes the specified BinaryMesh message. Does not implicitly {@link mirabuf.BinaryMesh.verify|verify} messages. @@ -2811,11 +2901,12 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ BinaryMesh.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.data) - return writer - } + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + return writer; + }; /** * Encodes the specified BinaryMesh message, length delimited. Does not implicitly {@link mirabuf.BinaryMesh.verify|verify} messages. @@ -2827,8 +2918,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ BinaryMesh.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a BinaryMesh message from the specified reader or buffer. @@ -2842,23 +2933,23 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BinaryMesh.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.BinaryMesh() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.BinaryMesh(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.data = reader.bytes() - break + case 1: { + message.data = reader.bytes(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a BinaryMesh message from the specified reader or buffer, length delimited. @@ -2871,9 +2962,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BinaryMesh.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a BinaryMesh message. @@ -2884,12 +2976,13 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BinaryMesh.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.data != null && message.hasOwnProperty("data")) - if (!((message.data && typeof message.data.length === "number") || $util.isString(message.data))) - return "data: buffer expected" - return null - } + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; /** * Creates a BinaryMesh message from a plain object. Also converts values to their respective internal types. @@ -2900,18 +2993,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.BinaryMesh} BinaryMesh */ BinaryMesh.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.BinaryMesh) return object - let message = new $root.mirabuf.BinaryMesh() + if (object instanceof $root.mirabuf.BinaryMesh) + return object; + let message = new $root.mirabuf.BinaryMesh(); if (object.data != null) if (typeof object.data === "string") - $util.base64.decode( - object.data, - (message.data = $util.newBuffer($util.base64.length(object.data))), - 0 - ) - else if (object.data.length >= 0) message.data = object.data - return message - } + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; /** * Creates a plain object from a BinaryMesh message. Also converts values to other types if specified. @@ -2923,23 +3014,21 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ BinaryMesh.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) - if (options.bytes === String) object.data = "" + if (options.bytes === String) + object.data = ""; else { - object.data = [] - if (options.bytes !== Array) object.data = $util.newBuffer(object.data) + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); } if (message.data != null && message.hasOwnProperty("data")) - object.data = - options.bytes === String - ? $util.base64.encode(message.data, 0, message.data.length) - : options.bytes === Array - ? Array.prototype.slice.call(message.data) - : message.data - return object - } + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; /** * Converts this BinaryMesh to JSON. @@ -2949,8 +3038,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ BinaryMesh.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for BinaryMesh @@ -2962,15 +3051,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ BinaryMesh.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.BinaryMesh" - } + return typeUrlPrefix + "/mirabuf.BinaryMesh"; + }; - return BinaryMesh - })() + return BinaryMesh; + })(); + + mirabuf.Node = (function() { - mirabuf.Node = (function () { /** * Properties of a Node. * @memberof mirabuf @@ -2989,10 +3079,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.INode=} [properties] Properties to set */ function Node(properties) { - this.children = [] + this.children = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3001,7 +3092,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Node * @instance */ - Node.prototype.value = "" + Node.prototype.value = ""; /** * the children for the given leaf @@ -3009,7 +3100,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Node * @instance */ - Node.prototype.children = $util.emptyArray + Node.prototype.children = $util.emptyArray; /** * other associated data that can be used @@ -3017,7 +3108,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Node * @instance */ - Node.prototype.userData = null + Node.prototype.userData = null; /** * Creates a new Node instance using the specified properties. @@ -3028,8 +3119,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Node} Node instance */ Node.create = function create(properties) { - return new Node(properties) - } + return new Node(properties); + }; /** * Encodes the specified Node message. Does not implicitly {@link mirabuf.Node.verify|verify} messages. @@ -3041,22 +3132,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Node.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.value) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.children != null && message.children.length) for (let i = 0; i < message.children.length; ++i) - $root.mirabuf.Node.encode( - message.children[i], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.Node.encode(message.children[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.userData != null && Object.hasOwnProperty.call(message, "userData")) - $root.mirabuf.UserData.encode( - message.userData, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() - return writer - } + $root.mirabuf.UserData.encode(message.userData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** * Encodes the specified Node message, length delimited. Does not implicitly {@link mirabuf.Node.verify|verify} messages. @@ -3068,8 +3154,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Node.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Node message from the specified reader or buffer. @@ -3083,32 +3169,33 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Node.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Node() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Node(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.value = reader.string() - break + case 1: { + message.value = reader.string(); + break; } - case 2: { - if (!(message.children && message.children.length)) message.children = [] - message.children.push($root.mirabuf.Node.decode(reader, reader.uint32())) - break + case 2: { + if (!(message.children && message.children.length)) + message.children = []; + message.children.push($root.mirabuf.Node.decode(reader, reader.uint32())); + break; } - case 3: { - message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()) - break + case 3: { + message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Node message from the specified reader or buffer, length delimited. @@ -3121,9 +3208,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Node.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Node message. @@ -3134,22 +3222,27 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Node.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) return "value: string expected" + if (!$util.isString(message.value)) + return "value: string expected"; if (message.children != null && message.hasOwnProperty("children")) { - if (!Array.isArray(message.children)) return "children: array expected" + if (!Array.isArray(message.children)) + return "children: array expected"; for (let i = 0; i < message.children.length; ++i) { - let error = $root.mirabuf.Node.verify(message.children[i]) - if (error) return "children." + error + let error = $root.mirabuf.Node.verify(message.children[i]); + if (error) + return "children." + error; } } if (message.userData != null && message.hasOwnProperty("userData")) { - let error = $root.mirabuf.UserData.verify(message.userData) - if (error) return "userData." + error + let error = $root.mirabuf.UserData.verify(message.userData); + if (error) + return "userData." + error; } - return null - } + return null; + }; /** * Creates a Node message from a plain object. Also converts values to their respective internal types. @@ -3160,24 +3253,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Node} Node */ Node.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Node) return object - let message = new $root.mirabuf.Node() - if (object.value != null) message.value = String(object.value) + if (object instanceof $root.mirabuf.Node) + return object; + let message = new $root.mirabuf.Node(); + if (object.value != null) + message.value = String(object.value); if (object.children) { - if (!Array.isArray(object.children)) throw TypeError(".mirabuf.Node.children: array expected") - message.children = [] + if (!Array.isArray(object.children)) + throw TypeError(".mirabuf.Node.children: array expected"); + message.children = []; for (let i = 0; i < object.children.length; ++i) { if (typeof object.children[i] !== "object") - throw TypeError(".mirabuf.Node.children: object expected") - message.children[i] = $root.mirabuf.Node.fromObject(object.children[i]) + throw TypeError(".mirabuf.Node.children: object expected"); + message.children[i] = $root.mirabuf.Node.fromObject(object.children[i]); } } if (object.userData != null) { - if (typeof object.userData !== "object") throw TypeError(".mirabuf.Node.userData: object expected") - message.userData = $root.mirabuf.UserData.fromObject(object.userData) + if (typeof object.userData !== "object") + throw TypeError(".mirabuf.Node.userData: object expected"); + message.userData = $root.mirabuf.UserData.fromObject(object.userData); } - return message - } + return message; + }; /** * Creates a plain object from a Node message. Also converts values to other types if specified. @@ -3189,23 +3286,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Node.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.children = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.children = []; if (options.defaults) { - object.value = "" - object.userData = null + object.value = ""; + object.userData = null; } - if (message.value != null && message.hasOwnProperty("value")) object.value = message.value + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; if (message.children && message.children.length) { - object.children = [] + object.children = []; for (let j = 0; j < message.children.length; ++j) - object.children[j] = $root.mirabuf.Node.toObject(message.children[j], options) + object.children[j] = $root.mirabuf.Node.toObject(message.children[j], options); } if (message.userData != null && message.hasOwnProperty("userData")) - object.userData = $root.mirabuf.UserData.toObject(message.userData, options) - return object - } + object.userData = $root.mirabuf.UserData.toObject(message.userData, options); + return object; + }; /** * Converts this Node to JSON. @@ -3215,8 +3315,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Node.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Node @@ -3228,15 +3328,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Node.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Node" - } + return typeUrlPrefix + "/mirabuf.Node"; + }; - return Node - })() + return Node; + })(); + + mirabuf.GraphContainer = (function() { - mirabuf.GraphContainer = (function () { /** * Properties of a GraphContainer. * @memberof mirabuf @@ -3253,10 +3354,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.IGraphContainer=} [properties] Properties to set */ function GraphContainer(properties) { - this.nodes = [] + this.nodes = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3265,7 +3367,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.GraphContainer * @instance */ - GraphContainer.prototype.nodes = $util.emptyArray + GraphContainer.prototype.nodes = $util.emptyArray; /** * Creates a new GraphContainer instance using the specified properties. @@ -3276,8 +3378,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.GraphContainer} GraphContainer instance */ GraphContainer.create = function create(properties) { - return new GraphContainer(properties) - } + return new GraphContainer(properties); + }; /** * Encodes the specified GraphContainer message. Does not implicitly {@link mirabuf.GraphContainer.verify|verify} messages. @@ -3289,15 +3391,13 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ GraphContainer.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.nodes != null && message.nodes.length) for (let i = 0; i < message.nodes.length; ++i) - $root.mirabuf.Node.encode( - message.nodes[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim() - return writer - } + $root.mirabuf.Node.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** * Encodes the specified GraphContainer message, length delimited. Does not implicitly {@link mirabuf.GraphContainer.verify|verify} messages. @@ -3309,8 +3409,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ GraphContainer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a GraphContainer message from the specified reader or buffer. @@ -3324,24 +3424,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GraphContainer.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.GraphContainer() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.GraphContainer(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.nodes && message.nodes.length)) message.nodes = [] - message.nodes.push($root.mirabuf.Node.decode(reader, reader.uint32())) - break + case 1: { + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.mirabuf.Node.decode(reader, reader.uint32())); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a GraphContainer message from the specified reader or buffer, length delimited. @@ -3354,9 +3455,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GraphContainer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a GraphContainer message. @@ -3367,16 +3469,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GraphContainer.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) return "nodes: array expected" + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; for (let i = 0; i < message.nodes.length; ++i) { - let error = $root.mirabuf.Node.verify(message.nodes[i]) - if (error) return "nodes." + error + let error = $root.mirabuf.Node.verify(message.nodes[i]); + if (error) + return "nodes." + error; } } - return null - } + return null; + }; /** * Creates a GraphContainer message from a plain object. Also converts values to their respective internal types. @@ -3387,19 +3492,21 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.GraphContainer} GraphContainer */ GraphContainer.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.GraphContainer) return object - let message = new $root.mirabuf.GraphContainer() + if (object instanceof $root.mirabuf.GraphContainer) + return object; + let message = new $root.mirabuf.GraphContainer(); if (object.nodes) { - if (!Array.isArray(object.nodes)) throw TypeError(".mirabuf.GraphContainer.nodes: array expected") - message.nodes = [] + if (!Array.isArray(object.nodes)) + throw TypeError(".mirabuf.GraphContainer.nodes: array expected"); + message.nodes = []; for (let i = 0; i < object.nodes.length; ++i) { if (typeof object.nodes[i] !== "object") - throw TypeError(".mirabuf.GraphContainer.nodes: object expected") - message.nodes[i] = $root.mirabuf.Node.fromObject(object.nodes[i]) + throw TypeError(".mirabuf.GraphContainer.nodes: object expected"); + message.nodes[i] = $root.mirabuf.Node.fromObject(object.nodes[i]); } } - return message - } + return message; + }; /** * Creates a plain object from a GraphContainer message. Also converts values to other types if specified. @@ -3411,16 +3518,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ GraphContainer.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.nodes = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.nodes = []; if (message.nodes && message.nodes.length) { - object.nodes = [] + object.nodes = []; for (let j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.mirabuf.Node.toObject(message.nodes[j], options) + object.nodes[j] = $root.mirabuf.Node.toObject(message.nodes[j], options); } - return object - } + return object; + }; /** * Converts this GraphContainer to JSON. @@ -3430,8 +3539,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ GraphContainer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for GraphContainer @@ -3443,15 +3552,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ GraphContainer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.GraphContainer" - } + return typeUrlPrefix + "/mirabuf.GraphContainer"; + }; + + return GraphContainer; + })(); - return GraphContainer - })() + mirabuf.UserData = (function() { - mirabuf.UserData = (function () { /** * Properties of a UserData. * @memberof mirabuf @@ -3463,17 +3573,18 @@ export const mirabuf = ($root.mirabuf = (() => { * Constructs a new UserData. * @memberof mirabuf * @classdesc UserData - * + * * Arbitrary data to append to a given message in map form * @implements IUserData * @constructor * @param {mirabuf.IUserData=} [properties] Properties to set */ function UserData(properties) { - this.data = {} + this.data = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3482,7 +3593,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.UserData * @instance */ - UserData.prototype.data = $util.emptyObject + UserData.prototype.data = $util.emptyObject; /** * Creates a new UserData instance using the specified properties. @@ -3493,8 +3604,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.UserData} UserData instance */ UserData.create = function create(properties) { - return new UserData(properties) - } + return new UserData(properties); + }; /** * Encodes the specified UserData message. Does not implicitly {@link mirabuf.UserData.verify|verify} messages. @@ -3506,19 +3617,13 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ UserData.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) for (let keys = Object.keys(message.data), i = 0; i < keys.length; ++i) - writer - .uint32(/* id 1, wireType 2 =*/ 10) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - .uint32(/* id 2, wireType 2 =*/ 18) - .string(message.data[keys[i]]) - .ldelim() - return writer - } + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.data[keys[i]]).ldelim(); + return writer; + }; /** * Encodes the specified UserData message, length delimited. Does not implicitly {@link mirabuf.UserData.verify|verify} messages. @@ -3530,8 +3635,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ UserData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a UserData message from the specified reader or buffer. @@ -3545,43 +3650,42 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UserData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.UserData(), - key, - value + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.UserData(), key, value; while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (message.data === $util.emptyObject) message.data = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = "" + case 1: { + if (message.data === $util.emptyObject) + message.data = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = reader.string() - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.data[key] = value - break + message.data[key] = value; + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a UserData message from the specified reader or buffer, length delimited. @@ -3594,9 +3698,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UserData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a UserData message. @@ -3607,15 +3712,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ UserData.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.data != null && message.hasOwnProperty("data")) { - if (!$util.isObject(message.data)) return "data: object expected" - let key = Object.keys(message.data) + if (!$util.isObject(message.data)) + return "data: object expected"; + let key = Object.keys(message.data); for (let i = 0; i < key.length; ++i) - if (!$util.isString(message.data[key[i]])) return "data: string{k:string} expected" + if (!$util.isString(message.data[key[i]])) + return "data: string{k:string} expected"; } - return null - } + return null; + }; /** * Creates a UserData message from a plain object. Also converts values to their respective internal types. @@ -3626,16 +3734,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.UserData} UserData */ UserData.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.UserData) return object - let message = new $root.mirabuf.UserData() + if (object instanceof $root.mirabuf.UserData) + return object; + let message = new $root.mirabuf.UserData(); if (object.data) { - if (typeof object.data !== "object") throw TypeError(".mirabuf.UserData.data: object expected") - message.data = {} + if (typeof object.data !== "object") + throw TypeError(".mirabuf.UserData.data: object expected"); + message.data = {}; for (let keys = Object.keys(object.data), i = 0; i < keys.length; ++i) - message.data[keys[i]] = String(object.data[keys[i]]) + message.data[keys[i]] = String(object.data[keys[i]]); } - return message - } + return message; + }; /** * Creates a plain object from a UserData message. Also converts values to other types if specified. @@ -3647,16 +3757,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ UserData.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.objects || options.defaults) object.data = {} - let keys2 + if (!options) + options = {}; + let object = {}; + if (options.objects || options.defaults) + object.data = {}; + let keys2; if (message.data && (keys2 = Object.keys(message.data)).length) { - object.data = {} - for (let j = 0; j < keys2.length; ++j) object.data[keys2[j]] = message.data[keys2[j]] + object.data = {}; + for (let j = 0; j < keys2.length; ++j) + object.data[keys2[j]] = message.data[keys2[j]]; } - return object - } + return object; + }; /** * Converts this UserData to JSON. @@ -3666,8 +3779,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ UserData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for UserData @@ -3679,15 +3792,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ UserData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.UserData" - } + return typeUrlPrefix + "/mirabuf.UserData"; + }; + + return UserData; + })(); - return UserData - })() + mirabuf.Vector3 = (function() { - mirabuf.Vector3 = (function () { /** * Properties of a Vector3. * @memberof mirabuf @@ -3708,7 +3822,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Vector3(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3717,7 +3832,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Vector3 * @instance */ - Vector3.prototype.x = 0 + Vector3.prototype.x = 0; /** * Vector3 y. @@ -3725,7 +3840,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Vector3 * @instance */ - Vector3.prototype.y = 0 + Vector3.prototype.y = 0; /** * Vector3 z. @@ -3733,7 +3848,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Vector3 * @instance */ - Vector3.prototype.z = 0 + Vector3.prototype.z = 0; /** * Creates a new Vector3 instance using the specified properties. @@ -3744,8 +3859,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Vector3} Vector3 instance */ Vector3.create = function create(properties) { - return new Vector3(properties) - } + return new Vector3(properties); + }; /** * Encodes the specified Vector3 message. Does not implicitly {@link mirabuf.Vector3.verify|verify} messages. @@ -3757,15 +3872,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Vector3.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.x != null && Object.hasOwnProperty.call(message, "x")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.x) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); if (message.y != null && Object.hasOwnProperty.call(message, "y")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.y) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); if (message.z != null && Object.hasOwnProperty.call(message, "z")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.z) - return writer - } + writer.uint32(/* id 3, wireType 5 =*/29).float(message.z); + return writer; + }; /** * Encodes the specified Vector3 message, length delimited. Does not implicitly {@link mirabuf.Vector3.verify|verify} messages. @@ -3777,8 +3893,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Vector3.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Vector3 message from the specified reader or buffer. @@ -3792,31 +3908,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Vector3.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Vector3() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Vector3(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.x = reader.float() - break + case 1: { + message.x = reader.float(); + break; } - case 2: { - message.y = reader.float() - break + case 2: { + message.y = reader.float(); + break; } - case 3: { - message.z = reader.float() - break + case 3: { + message.z = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Vector3 message from the specified reader or buffer, length delimited. @@ -3829,9 +3945,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Vector3.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Vector3 message. @@ -3842,15 +3959,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Vector3.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x !== "number") return "x: number expected" + if (typeof message.x !== "number") + return "x: number expected"; if (message.y != null && message.hasOwnProperty("y")) - if (typeof message.y !== "number") return "y: number expected" + if (typeof message.y !== "number") + return "y: number expected"; if (message.z != null && message.hasOwnProperty("z")) - if (typeof message.z !== "number") return "z: number expected" - return null - } + if (typeof message.z !== "number") + return "z: number expected"; + return null; + }; /** * Creates a Vector3 message from a plain object. Also converts values to their respective internal types. @@ -3861,13 +3982,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Vector3} Vector3 */ Vector3.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Vector3) return object - let message = new $root.mirabuf.Vector3() - if (object.x != null) message.x = Number(object.x) - if (object.y != null) message.y = Number(object.y) - if (object.z != null) message.z = Number(object.z) - return message - } + if (object instanceof $root.mirabuf.Vector3) + return object; + let message = new $root.mirabuf.Vector3(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); + if (object.z != null) + message.z = Number(object.z); + return message; + }; /** * Creates a plain object from a Vector3 message. Also converts values to other types if specified. @@ -3879,21 +4004,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Vector3.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.x = 0 - object.y = 0 - object.z = 0 + object.x = 0; + object.y = 0; + object.z = 0; } if (message.x != null && message.hasOwnProperty("x")) - object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; if (message.y != null && message.hasOwnProperty("y")) - object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; if (message.z != null && message.hasOwnProperty("z")) - object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z - return object - } + object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z; + return object; + }; /** * Converts this Vector3 to JSON. @@ -3903,8 +4029,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Vector3.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Vector3 @@ -3916,15 +4042,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Vector3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Vector3" - } + return typeUrlPrefix + "/mirabuf.Vector3"; + }; - return Vector3 - })() + return Vector3; + })(); + + mirabuf.PhysicalProperties = (function() { - mirabuf.PhysicalProperties = (function () { /** * Properties of a PhysicalProperties. * @memberof mirabuf @@ -3947,7 +4074,8 @@ export const mirabuf = ($root.mirabuf = (() => { function PhysicalProperties(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3956,7 +4084,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PhysicalProperties * @instance */ - PhysicalProperties.prototype.density = 0 + PhysicalProperties.prototype.density = 0; /** * kg @@ -3964,7 +4092,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PhysicalProperties * @instance */ - PhysicalProperties.prototype.mass = 0 + PhysicalProperties.prototype.mass = 0; /** * cm^3 @@ -3972,7 +4100,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PhysicalProperties * @instance */ - PhysicalProperties.prototype.volume = 0 + PhysicalProperties.prototype.volume = 0; /** * cm^2 @@ -3980,7 +4108,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PhysicalProperties * @instance */ - PhysicalProperties.prototype.area = 0 + PhysicalProperties.prototype.area = 0; /** * non-negative? Vec3 @@ -3988,7 +4116,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.PhysicalProperties * @instance */ - PhysicalProperties.prototype.com = null + PhysicalProperties.prototype.com = null; /** * Creates a new PhysicalProperties instance using the specified properties. @@ -3999,8 +4127,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PhysicalProperties} PhysicalProperties instance */ PhysicalProperties.create = function create(properties) { - return new PhysicalProperties(properties) - } + return new PhysicalProperties(properties); + }; /** * Encodes the specified PhysicalProperties message. Does not implicitly {@link mirabuf.PhysicalProperties.verify|verify} messages. @@ -4012,19 +4140,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PhysicalProperties.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.density != null && Object.hasOwnProperty.call(message, "density")) - writer.uint32(/* id 1, wireType 1 =*/ 9).double(message.density) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.density); if (message.mass != null && Object.hasOwnProperty.call(message, "mass")) - writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.mass) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mass); if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) - writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.volume) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.volume); if (message.area != null && Object.hasOwnProperty.call(message, "area")) - writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.area) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.area); if (message.com != null && Object.hasOwnProperty.call(message, "com")) - $root.mirabuf.Vector3.encode(message.com, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim() - return writer - } + $root.mirabuf.Vector3.encode(message.com, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; /** * Encodes the specified PhysicalProperties message, length delimited. Does not implicitly {@link mirabuf.PhysicalProperties.verify|verify} messages. @@ -4036,8 +4165,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PhysicalProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a PhysicalProperties message from the specified reader or buffer. @@ -4051,39 +4180,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PhysicalProperties.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.PhysicalProperties() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.PhysicalProperties(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.density = reader.double() - break + case 1: { + message.density = reader.double(); + break; } - case 2: { - message.mass = reader.double() - break + case 2: { + message.mass = reader.double(); + break; } - case 3: { - message.volume = reader.double() - break + case 3: { + message.volume = reader.double(); + break; } - case 4: { - message.area = reader.double() - break + case 4: { + message.area = reader.double(); + break; } - case 5: { - message.com = $root.mirabuf.Vector3.decode(reader, reader.uint32()) - break + case 5: { + message.com = $root.mirabuf.Vector3.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a PhysicalProperties message from the specified reader or buffer, length delimited. @@ -4096,9 +4225,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PhysicalProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a PhysicalProperties message. @@ -4109,21 +4239,27 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PhysicalProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.density != null && message.hasOwnProperty("density")) - if (typeof message.density !== "number") return "density: number expected" + if (typeof message.density !== "number") + return "density: number expected"; if (message.mass != null && message.hasOwnProperty("mass")) - if (typeof message.mass !== "number") return "mass: number expected" + if (typeof message.mass !== "number") + return "mass: number expected"; if (message.volume != null && message.hasOwnProperty("volume")) - if (typeof message.volume !== "number") return "volume: number expected" + if (typeof message.volume !== "number") + return "volume: number expected"; if (message.area != null && message.hasOwnProperty("area")) - if (typeof message.area !== "number") return "area: number expected" + if (typeof message.area !== "number") + return "area: number expected"; if (message.com != null && message.hasOwnProperty("com")) { - let error = $root.mirabuf.Vector3.verify(message.com) - if (error) return "com." + error + let error = $root.mirabuf.Vector3.verify(message.com); + if (error) + return "com." + error; } - return null - } + return null; + }; /** * Creates a PhysicalProperties message from a plain object. Also converts values to their respective internal types. @@ -4134,18 +4270,24 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.PhysicalProperties} PhysicalProperties */ PhysicalProperties.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.PhysicalProperties) return object - let message = new $root.mirabuf.PhysicalProperties() - if (object.density != null) message.density = Number(object.density) - if (object.mass != null) message.mass = Number(object.mass) - if (object.volume != null) message.volume = Number(object.volume) - if (object.area != null) message.area = Number(object.area) + if (object instanceof $root.mirabuf.PhysicalProperties) + return object; + let message = new $root.mirabuf.PhysicalProperties(); + if (object.density != null) + message.density = Number(object.density); + if (object.mass != null) + message.mass = Number(object.mass); + if (object.volume != null) + message.volume = Number(object.volume); + if (object.area != null) + message.area = Number(object.area); if (object.com != null) { - if (typeof object.com !== "object") throw TypeError(".mirabuf.PhysicalProperties.com: object expected") - message.com = $root.mirabuf.Vector3.fromObject(object.com) + if (typeof object.com !== "object") + throw TypeError(".mirabuf.PhysicalProperties.com: object expected"); + message.com = $root.mirabuf.Vector3.fromObject(object.com); } - return message - } + return message; + }; /** * Creates a plain object from a PhysicalProperties message. Also converts values to other types if specified. @@ -4157,27 +4299,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ PhysicalProperties.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.density = 0 - object.mass = 0 - object.volume = 0 - object.area = 0 - object.com = null + object.density = 0; + object.mass = 0; + object.volume = 0; + object.area = 0; + object.com = null; } if (message.density != null && message.hasOwnProperty("density")) - object.density = options.json && !isFinite(message.density) ? String(message.density) : message.density + object.density = options.json && !isFinite(message.density) ? String(message.density) : message.density; if (message.mass != null && message.hasOwnProperty("mass")) - object.mass = options.json && !isFinite(message.mass) ? String(message.mass) : message.mass + object.mass = options.json && !isFinite(message.mass) ? String(message.mass) : message.mass; if (message.volume != null && message.hasOwnProperty("volume")) - object.volume = options.json && !isFinite(message.volume) ? String(message.volume) : message.volume + object.volume = options.json && !isFinite(message.volume) ? String(message.volume) : message.volume; if (message.area != null && message.hasOwnProperty("area")) - object.area = options.json && !isFinite(message.area) ? String(message.area) : message.area + object.area = options.json && !isFinite(message.area) ? String(message.area) : message.area; if (message.com != null && message.hasOwnProperty("com")) - object.com = $root.mirabuf.Vector3.toObject(message.com, options) - return object - } + object.com = $root.mirabuf.Vector3.toObject(message.com, options); + return object; + }; /** * Converts this PhysicalProperties to JSON. @@ -4187,8 +4330,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ PhysicalProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for PhysicalProperties @@ -4200,15 +4343,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ PhysicalProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.PhysicalProperties" - } + return typeUrlPrefix + "/mirabuf.PhysicalProperties"; + }; + + return PhysicalProperties; + })(); - return PhysicalProperties - })() + mirabuf.Transform = (function() { - mirabuf.Transform = (function () { /** * Properties of a Transform. * @memberof mirabuf @@ -4220,17 +4364,18 @@ export const mirabuf = ($root.mirabuf = (() => { * Constructs a new Transform. * @memberof mirabuf * @classdesc Transform - * + * * Data needed to apply scale, position, and rotational changes * @implements ITransform * @constructor * @param {mirabuf.ITransform=} [properties] Properties to set */ function Transform(properties) { - this.spatialMatrix = [] + this.spatialMatrix = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -4239,7 +4384,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Transform * @instance */ - Transform.prototype.spatialMatrix = $util.emptyArray + Transform.prototype.spatialMatrix = $util.emptyArray; /** * Creates a new Transform instance using the specified properties. @@ -4250,8 +4395,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Transform} Transform instance */ Transform.create = function create(properties) { - return new Transform(properties) - } + return new Transform(properties); + }; /** * Encodes the specified Transform message. Does not implicitly {@link mirabuf.Transform.verify|verify} messages. @@ -4263,14 +4408,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Transform.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.spatialMatrix != null && message.spatialMatrix.length) { - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - for (let i = 0; i < message.spatialMatrix.length; ++i) writer.float(message.spatialMatrix[i]) - writer.ldelim() + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.spatialMatrix.length; ++i) + writer.float(message.spatialMatrix[i]); + writer.ldelim(); } - return writer - } + return writer; + }; /** * Encodes the specified Transform message, length delimited. Does not implicitly {@link mirabuf.Transform.verify|verify} messages. @@ -4282,8 +4429,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Transform.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Transform message from the specified reader or buffer. @@ -4297,27 +4444,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Transform.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Transform() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Transform(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.spatialMatrix && message.spatialMatrix.length)) message.spatialMatrix = [] + case 1: { + if (!(message.spatialMatrix && message.spatialMatrix.length)) + message.spatialMatrix = []; if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos - while (reader.pos < end2) message.spatialMatrix.push(reader.float()) - } else message.spatialMatrix.push(reader.float()) - break + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.spatialMatrix.push(reader.float()); + } else + message.spatialMatrix.push(reader.float()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Transform message from the specified reader or buffer, length delimited. @@ -4330,9 +4480,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Transform.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Transform message. @@ -4343,14 +4494,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Transform.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.spatialMatrix != null && message.hasOwnProperty("spatialMatrix")) { - if (!Array.isArray(message.spatialMatrix)) return "spatialMatrix: array expected" + if (!Array.isArray(message.spatialMatrix)) + return "spatialMatrix: array expected"; for (let i = 0; i < message.spatialMatrix.length; ++i) - if (typeof message.spatialMatrix[i] !== "number") return "spatialMatrix: number[] expected" + if (typeof message.spatialMatrix[i] !== "number") + return "spatialMatrix: number[] expected"; } - return null - } + return null; + }; /** * Creates a Transform message from a plain object. Also converts values to their respective internal types. @@ -4361,17 +4515,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Transform} Transform */ Transform.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Transform) return object - let message = new $root.mirabuf.Transform() + if (object instanceof $root.mirabuf.Transform) + return object; + let message = new $root.mirabuf.Transform(); if (object.spatialMatrix) { if (!Array.isArray(object.spatialMatrix)) - throw TypeError(".mirabuf.Transform.spatialMatrix: array expected") - message.spatialMatrix = [] + throw TypeError(".mirabuf.Transform.spatialMatrix: array expected"); + message.spatialMatrix = []; for (let i = 0; i < object.spatialMatrix.length; ++i) - message.spatialMatrix[i] = Number(object.spatialMatrix[i]) + message.spatialMatrix[i] = Number(object.spatialMatrix[i]); } - return message - } + return message; + }; /** * Creates a plain object from a Transform message. Also converts values to other types if specified. @@ -4383,19 +4538,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Transform.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.spatialMatrix = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.spatialMatrix = []; if (message.spatialMatrix && message.spatialMatrix.length) { - object.spatialMatrix = [] + object.spatialMatrix = []; for (let j = 0; j < message.spatialMatrix.length; ++j) - object.spatialMatrix[j] = - options.json && !isFinite(message.spatialMatrix[j]) - ? String(message.spatialMatrix[j]) - : message.spatialMatrix[j] + object.spatialMatrix[j] = options.json && !isFinite(message.spatialMatrix[j]) ? String(message.spatialMatrix[j]) : message.spatialMatrix[j]; } - return object - } + return object; + }; /** * Converts this Transform to JSON. @@ -4405,8 +4559,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Transform.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Transform @@ -4418,15 +4572,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Transform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Transform" - } + return typeUrlPrefix + "/mirabuf.Transform"; + }; + + return Transform; + })(); - return Transform - })() + mirabuf.Color = (function() { - mirabuf.Color = (function () { /** * Properties of a Color. * @memberof mirabuf @@ -4448,7 +4603,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Color(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -4457,7 +4613,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Color * @instance */ - Color.prototype.R = 0 + Color.prototype.R = 0; /** * Color G. @@ -4465,7 +4621,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Color * @instance */ - Color.prototype.G = 0 + Color.prototype.G = 0; /** * Color B. @@ -4473,7 +4629,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Color * @instance */ - Color.prototype.B = 0 + Color.prototype.B = 0; /** * Color A. @@ -4481,7 +4637,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Color * @instance */ - Color.prototype.A = 0 + Color.prototype.A = 0; /** * Creates a new Color instance using the specified properties. @@ -4492,8 +4648,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Color} Color instance */ Color.create = function create(properties) { - return new Color(properties) - } + return new Color(properties); + }; /** * Encodes the specified Color message. Does not implicitly {@link mirabuf.Color.verify|verify} messages. @@ -4505,17 +4661,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Color.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.R != null && Object.hasOwnProperty.call(message, "R")) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.R) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.R); if (message.G != null && Object.hasOwnProperty.call(message, "G")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.G) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.G); if (message.B != null && Object.hasOwnProperty.call(message, "B")) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.B) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.B); if (message.A != null && Object.hasOwnProperty.call(message, "A")) - writer.uint32(/* id 4, wireType 0 =*/ 32).int32(message.A) - return writer - } + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.A); + return writer; + }; /** * Encodes the specified Color message, length delimited. Does not implicitly {@link mirabuf.Color.verify|verify} messages. @@ -4527,8 +4684,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Color.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Color message from the specified reader or buffer. @@ -4542,35 +4699,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Color.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Color() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Color(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.R = reader.int32() - break + case 1: { + message.R = reader.int32(); + break; } - case 2: { - message.G = reader.int32() - break + case 2: { + message.G = reader.int32(); + break; } - case 3: { - message.B = reader.int32() - break + case 3: { + message.B = reader.int32(); + break; } - case 4: { - message.A = reader.int32() - break + case 4: { + message.A = reader.int32(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Color message from the specified reader or buffer, length delimited. @@ -4583,9 +4740,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Color.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Color message. @@ -4596,17 +4754,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Color.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.R != null && message.hasOwnProperty("R")) - if (!$util.isInteger(message.R)) return "R: integer expected" + if (!$util.isInteger(message.R)) + return "R: integer expected"; if (message.G != null && message.hasOwnProperty("G")) - if (!$util.isInteger(message.G)) return "G: integer expected" + if (!$util.isInteger(message.G)) + return "G: integer expected"; if (message.B != null && message.hasOwnProperty("B")) - if (!$util.isInteger(message.B)) return "B: integer expected" + if (!$util.isInteger(message.B)) + return "B: integer expected"; if (message.A != null && message.hasOwnProperty("A")) - if (!$util.isInteger(message.A)) return "A: integer expected" - return null - } + if (!$util.isInteger(message.A)) + return "A: integer expected"; + return null; + }; /** * Creates a Color message from a plain object. Also converts values to their respective internal types. @@ -4617,14 +4780,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Color} Color */ Color.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Color) return object - let message = new $root.mirabuf.Color() - if (object.R != null) message.R = object.R | 0 - if (object.G != null) message.G = object.G | 0 - if (object.B != null) message.B = object.B | 0 - if (object.A != null) message.A = object.A | 0 - return message - } + if (object instanceof $root.mirabuf.Color) + return object; + let message = new $root.mirabuf.Color(); + if (object.R != null) + message.R = object.R | 0; + if (object.G != null) + message.G = object.G | 0; + if (object.B != null) + message.B = object.B | 0; + if (object.A != null) + message.A = object.A | 0; + return message; + }; /** * Creates a plain object from a Color message. Also converts values to other types if specified. @@ -4636,20 +4804,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Color.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.R = 0 - object.G = 0 - object.B = 0 - object.A = 0 - } - if (message.R != null && message.hasOwnProperty("R")) object.R = message.R - if (message.G != null && message.hasOwnProperty("G")) object.G = message.G - if (message.B != null && message.hasOwnProperty("B")) object.B = message.B - if (message.A != null && message.hasOwnProperty("A")) object.A = message.A - return object - } + object.R = 0; + object.G = 0; + object.B = 0; + object.A = 0; + } + if (message.R != null && message.hasOwnProperty("R")) + object.R = message.R; + if (message.G != null && message.hasOwnProperty("G")) + object.G = message.G; + if (message.B != null && message.hasOwnProperty("B")) + object.B = message.B; + if (message.A != null && message.hasOwnProperty("A")) + object.A = message.A; + return object; + }; /** * Converts this Color to JSON. @@ -4659,8 +4832,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Color.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Color @@ -4672,13 +4845,13 @@ export const mirabuf = ($root.mirabuf = (() => { */ Color.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Color" - } + return typeUrlPrefix + "/mirabuf.Color"; + }; - return Color - })() + return Color; + })(); /** * Axis enum. @@ -4688,16 +4861,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} Y=1 Y value * @property {number} Z=2 Z value */ - mirabuf.Axis = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "X")] = 0 - values[(valuesById[1] = "Y")] = 1 - values[(valuesById[2] = "Z")] = 2 - return values - })() + mirabuf.Axis = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "X"] = 0; + values[valuesById[1] = "Y"] = 1; + values[valuesById[2] = "Z"] = 2; + return values; + })(); + + mirabuf.Info = (function() { - mirabuf.Info = (function () { /** * Properties of an Info. * @memberof mirabuf @@ -4719,7 +4892,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Info(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -4728,7 +4902,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Info * @instance */ - Info.prototype.GUID = "" + Info.prototype.GUID = ""; /** * Info name. @@ -4736,7 +4910,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Info * @instance */ - Info.prototype.name = "" + Info.prototype.name = ""; /** * Info version. @@ -4744,7 +4918,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Info * @instance */ - Info.prototype.version = 0 + Info.prototype.version = 0; /** * Creates a new Info instance using the specified properties. @@ -4755,8 +4929,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Info} Info instance */ Info.create = function create(properties) { - return new Info(properties) - } + return new Info(properties); + }; /** * Encodes the specified Info message. Does not implicitly {@link mirabuf.Info.verify|verify} messages. @@ -4768,15 +4942,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Info.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.GUID != null && Object.hasOwnProperty.call(message, "GUID")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.GUID) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.GUID); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 0 =*/ 24).uint32(message.version) - return writer - } + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.version); + return writer; + }; /** * Encodes the specified Info message, length delimited. Does not implicitly {@link mirabuf.Info.verify|verify} messages. @@ -4788,8 +4963,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Info.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes an Info message from the specified reader or buffer. @@ -4803,31 +4978,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Info.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Info() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Info(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.GUID = reader.string() - break + case 1: { + message.GUID = reader.string(); + break; } - case 2: { - message.name = reader.string() - break + case 2: { + message.name = reader.string(); + break; } - case 3: { - message.version = reader.uint32() - break + case 3: { + message.version = reader.uint32(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes an Info message from the specified reader or buffer, length delimited. @@ -4840,9 +5015,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Info.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies an Info message. @@ -4853,15 +5029,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Info.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.GUID != null && message.hasOwnProperty("GUID")) - if (!$util.isString(message.GUID)) return "GUID: string expected" + if (!$util.isString(message.GUID)) + return "GUID: string expected"; if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) return "name: string expected" + if (!$util.isString(message.name)) + return "name: string expected"; if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) return "version: integer expected" - return null - } + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; /** * Creates an Info message from a plain object. Also converts values to their respective internal types. @@ -4872,13 +5052,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Info} Info */ Info.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Info) return object - let message = new $root.mirabuf.Info() - if (object.GUID != null) message.GUID = String(object.GUID) - if (object.name != null) message.name = String(object.name) - if (object.version != null) message.version = object.version >>> 0 - return message - } + if (object instanceof $root.mirabuf.Info) + return object; + let message = new $root.mirabuf.Info(); + if (object.GUID != null) + message.GUID = String(object.GUID); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = object.version >>> 0; + return message; + }; /** * Creates a plain object from an Info message. Also converts values to other types if specified. @@ -4890,18 +5074,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Info.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.GUID = "" - object.name = "" - object.version = 0 - } - if (message.GUID != null && message.hasOwnProperty("GUID")) object.GUID = message.GUID - if (message.name != null && message.hasOwnProperty("name")) object.name = message.name - if (message.version != null && message.hasOwnProperty("version")) object.version = message.version - return object - } + object.GUID = ""; + object.name = ""; + object.version = 0; + } + if (message.GUID != null && message.hasOwnProperty("GUID")) + object.GUID = message.GUID; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; /** * Converts this Info to JSON. @@ -4911,8 +5099,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Info.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Info @@ -4924,15 +5112,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Info.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Info" - } + return typeUrlPrefix + "/mirabuf.Info"; + }; + + return Info; + })(); - return Info - })() + mirabuf.Thumbnail = (function() { - mirabuf.Thumbnail = (function () { /** * Properties of a Thumbnail. * @memberof mirabuf @@ -4956,7 +5145,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Thumbnail(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -4965,7 +5155,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Thumbnail * @instance */ - Thumbnail.prototype.width = 0 + Thumbnail.prototype.width = 0; /** * Image Height @@ -4973,7 +5163,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Thumbnail * @instance */ - Thumbnail.prototype.height = 0 + Thumbnail.prototype.height = 0; /** * Image Extension - ex. (.png, .bitmap, .jpeg) @@ -4981,7 +5171,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Thumbnail * @instance */ - Thumbnail.prototype.extension = "" + Thumbnail.prototype.extension = ""; /** * Transparency - true from fusion when correctly configured @@ -4989,7 +5179,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Thumbnail * @instance */ - Thumbnail.prototype.transparent = false + Thumbnail.prototype.transparent = false; /** * Data as read from the file in bytes[] form @@ -4997,7 +5187,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.Thumbnail * @instance */ - Thumbnail.prototype.data = $util.newBuffer([]) + Thumbnail.prototype.data = $util.newBuffer([]); /** * Creates a new Thumbnail instance using the specified properties. @@ -5008,8 +5198,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Thumbnail} Thumbnail instance */ Thumbnail.create = function create(properties) { - return new Thumbnail(properties) - } + return new Thumbnail(properties); + }; /** * Encodes the specified Thumbnail message. Does not implicitly {@link mirabuf.Thumbnail.verify|verify} messages. @@ -5021,19 +5211,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Thumbnail.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.width) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.width); if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.height) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.height); if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.extension) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.extension); if (message.transparent != null && Object.hasOwnProperty.call(message, "transparent")) - writer.uint32(/* id 4, wireType 0 =*/ 32).bool(message.transparent) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.transparent); if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/ 42).bytes(message.data) - return writer - } + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data); + return writer; + }; /** * Encodes the specified Thumbnail message, length delimited. Does not implicitly {@link mirabuf.Thumbnail.verify|verify} messages. @@ -5045,8 +5236,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Thumbnail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Thumbnail message from the specified reader or buffer. @@ -5060,39 +5251,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Thumbnail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.Thumbnail() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.Thumbnail(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.width = reader.int32() - break + case 1: { + message.width = reader.int32(); + break; } - case 2: { - message.height = reader.int32() - break + case 2: { + message.height = reader.int32(); + break; } - case 3: { - message.extension = reader.string() - break + case 3: { + message.extension = reader.string(); + break; } - case 4: { - message.transparent = reader.bool() - break + case 4: { + message.transparent = reader.bool(); + break; } - case 5: { - message.data = reader.bytes() - break + case 5: { + message.data = reader.bytes(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Thumbnail message from the specified reader or buffer, length delimited. @@ -5105,9 +5296,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Thumbnail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Thumbnail message. @@ -5118,20 +5310,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Thumbnail.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.width != null && message.hasOwnProperty("width")) - if (!$util.isInteger(message.width)) return "width: integer expected" + if (!$util.isInteger(message.width)) + return "width: integer expected"; if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height)) return "height: integer expected" + if (!$util.isInteger(message.height)) + return "height: integer expected"; if (message.extension != null && message.hasOwnProperty("extension")) - if (!$util.isString(message.extension)) return "extension: string expected" + if (!$util.isString(message.extension)) + return "extension: string expected"; if (message.transparent != null && message.hasOwnProperty("transparent")) - if (typeof message.transparent !== "boolean") return "transparent: boolean expected" + if (typeof message.transparent !== "boolean") + return "transparent: boolean expected"; if (message.data != null && message.hasOwnProperty("data")) - if (!((message.data && typeof message.data.length === "number") || $util.isString(message.data))) - return "data: buffer expected" - return null - } + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; /** * Creates a Thumbnail message from a plain object. Also converts values to their respective internal types. @@ -5142,22 +5339,24 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.Thumbnail} Thumbnail */ Thumbnail.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.Thumbnail) return object - let message = new $root.mirabuf.Thumbnail() - if (object.width != null) message.width = object.width | 0 - if (object.height != null) message.height = object.height | 0 - if (object.extension != null) message.extension = String(object.extension) - if (object.transparent != null) message.transparent = Boolean(object.transparent) + if (object instanceof $root.mirabuf.Thumbnail) + return object; + let message = new $root.mirabuf.Thumbnail(); + if (object.width != null) + message.width = object.width | 0; + if (object.height != null) + message.height = object.height | 0; + if (object.extension != null) + message.extension = String(object.extension); + if (object.transparent != null) + message.transparent = Boolean(object.transparent); if (object.data != null) if (typeof object.data === "string") - $util.base64.decode( - object.data, - (message.data = $util.newBuffer($util.base64.length(object.data))), - 0 - ) - else if (object.data.length >= 0) message.data = object.data - return message - } + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; /** * Creates a plain object from a Thumbnail message. Also converts values to other types if specified. @@ -5169,33 +5368,34 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Thumbnail.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.width = 0 - object.height = 0 - object.extension = "" - object.transparent = false - if (options.bytes === String) object.data = "" + object.width = 0; + object.height = 0; + object.extension = ""; + object.transparent = false; + if (options.bytes === String) + object.data = ""; else { - object.data = [] - if (options.bytes !== Array) object.data = $util.newBuffer(object.data) + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); } } - if (message.width != null && message.hasOwnProperty("width")) object.width = message.width - if (message.height != null && message.hasOwnProperty("height")) object.height = message.height - if (message.extension != null && message.hasOwnProperty("extension")) object.extension = message.extension + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.extension != null && message.hasOwnProperty("extension")) + object.extension = message.extension; if (message.transparent != null && message.hasOwnProperty("transparent")) - object.transparent = message.transparent + object.transparent = message.transparent; if (message.data != null && message.hasOwnProperty("data")) - object.data = - options.bytes === String - ? $util.base64.encode(message.data, 0, message.data.length) - : options.bytes === Array - ? Array.prototype.slice.call(message.data) - : message.data - return object - } + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; /** * Converts this Thumbnail to JSON. @@ -5205,8 +5405,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Thumbnail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Thumbnail @@ -5218,23 +5418,25 @@ export const mirabuf = ($root.mirabuf = (() => { */ Thumbnail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.Thumbnail" - } + return typeUrlPrefix + "/mirabuf.Thumbnail"; + }; + + return Thumbnail; + })(); - return Thumbnail - })() + mirabuf.joint = (function() { - mirabuf.joint = (function () { /** * Namespace joint. * @memberof mirabuf * @namespace */ - const joint = {} + const joint = {}; + + joint.Joints = (function() { - joint.Joints = (function () { /** * Properties of a Joints. * @memberof mirabuf.joint @@ -5256,13 +5458,14 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.joint.IJoints=} [properties] Properties to set */ function Joints(properties) { - this.jointDefinitions = {} - this.jointInstances = {} - this.rigidGroups = [] - this.motorDefinitions = {} + this.jointDefinitions = {}; + this.jointInstances = {}; + this.rigidGroups = []; + this.motorDefinitions = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -5271,7 +5474,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joints * @instance */ - Joints.prototype.info = null + Joints.prototype.info = null; /** * Unique Joint Implementations @@ -5279,7 +5482,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joints * @instance */ - Joints.prototype.jointDefinitions = $util.emptyObject + Joints.prototype.jointDefinitions = $util.emptyObject; /** * Instances of the Joint Implementations @@ -5287,7 +5490,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joints * @instance */ - Joints.prototype.jointInstances = $util.emptyObject + Joints.prototype.jointInstances = $util.emptyObject; /** * Rigidgroups ? @@ -5295,7 +5498,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joints * @instance */ - Joints.prototype.rigidGroups = $util.emptyArray + Joints.prototype.rigidGroups = $util.emptyArray; /** * Collection of all Motors exported @@ -5303,7 +5506,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joints * @instance */ - Joints.prototype.motorDefinitions = $util.emptyObject + Joints.prototype.motorDefinitions = $util.emptyObject; /** * Creates a new Joints instance using the specified properties. @@ -5314,8 +5517,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Joints} Joints instance */ Joints.create = function create(properties) { - return new Joints(properties) - } + return new Joints(properties); + }; /** * Encodes the specified Joints message. Does not implicitly {@link mirabuf.joint.Joints.verify|verify} messages. @@ -5327,59 +5530,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Joints.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.jointDefinitions != null && Object.hasOwnProperty.call(message, "jointDefinitions")) for (let keys = Object.keys(message.jointDefinitions), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 2, wireType 2 =*/ 18) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.joint.Joint.encode( - message.jointDefinitions[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.joint.Joint.encode(message.jointDefinitions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.jointInstances != null && Object.hasOwnProperty.call(message, "jointInstances")) for (let keys = Object.keys(message.jointInstances), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 3, wireType 2 =*/ 26) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.joint.JointInstance.encode( - message.jointInstances[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.joint.JointInstance.encode(message.jointInstances[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.rigidGroups != null && message.rigidGroups.length) for (let i = 0; i < message.rigidGroups.length; ++i) - $root.mirabuf.joint.RigidGroup.encode( - message.rigidGroups[i], - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.joint.RigidGroup.encode(message.rigidGroups[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.motorDefinitions != null && Object.hasOwnProperty.call(message, "motorDefinitions")) for (let keys = Object.keys(message.motorDefinitions), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 5, wireType 2 =*/ 42) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.motor.Motor.encode( - message.motorDefinitions[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.motor.Motor.encode(message.motorDefinitions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - return writer - } + return writer; + }; /** * Encodes the specified Joints message, length delimited. Does not implicitly {@link mirabuf.joint.Joints.verify|verify} messages. @@ -5391,8 +5565,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Joints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Joints message from the specified reader or buffer. @@ -5406,96 +5580,98 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Joints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.Joints(), - key, - value + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.Joints(), key, value; while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - if (message.jointDefinitions === $util.emptyObject) message.jointDefinitions = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 2: { + if (message.jointDefinitions === $util.emptyObject) + message.jointDefinitions = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.joint.Joint.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.joint.Joint.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.jointDefinitions[key] = value - break + message.jointDefinitions[key] = value; + break; } - case 3: { - if (message.jointInstances === $util.emptyObject) message.jointInstances = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 3: { + if (message.jointInstances === $util.emptyObject) + message.jointInstances = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.joint.JointInstance.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.joint.JointInstance.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.jointInstances[key] = value - break + message.jointInstances[key] = value; + break; } - case 4: { - if (!(message.rigidGroups && message.rigidGroups.length)) message.rigidGroups = [] - message.rigidGroups.push($root.mirabuf.joint.RigidGroup.decode(reader, reader.uint32())) - break + case 4: { + if (!(message.rigidGroups && message.rigidGroups.length)) + message.rigidGroups = []; + message.rigidGroups.push($root.mirabuf.joint.RigidGroup.decode(reader, reader.uint32())); + break; } - case 5: { - if (message.motorDefinitions === $util.emptyObject) message.motorDefinitions = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 5: { + if (message.motorDefinitions === $util.emptyObject) + message.motorDefinitions = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.motor.Motor.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.motor.Motor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.motorDefinitions[key] = value - break + message.motorDefinitions[key] = value; + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Joints message from the specified reader or buffer, length delimited. @@ -5508,9 +5684,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Joints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Joints message. @@ -5521,44 +5698,54 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Joints.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.jointDefinitions != null && message.hasOwnProperty("jointDefinitions")) { - if (!$util.isObject(message.jointDefinitions)) return "jointDefinitions: object expected" - let key = Object.keys(message.jointDefinitions) + if (!$util.isObject(message.jointDefinitions)) + return "jointDefinitions: object expected"; + let key = Object.keys(message.jointDefinitions); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.joint.Joint.verify(message.jointDefinitions[key[i]]) - if (error) return "jointDefinitions." + error + let error = $root.mirabuf.joint.Joint.verify(message.jointDefinitions[key[i]]); + if (error) + return "jointDefinitions." + error; } } if (message.jointInstances != null && message.hasOwnProperty("jointInstances")) { - if (!$util.isObject(message.jointInstances)) return "jointInstances: object expected" - let key = Object.keys(message.jointInstances) + if (!$util.isObject(message.jointInstances)) + return "jointInstances: object expected"; + let key = Object.keys(message.jointInstances); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.joint.JointInstance.verify(message.jointInstances[key[i]]) - if (error) return "jointInstances." + error + let error = $root.mirabuf.joint.JointInstance.verify(message.jointInstances[key[i]]); + if (error) + return "jointInstances." + error; } } if (message.rigidGroups != null && message.hasOwnProperty("rigidGroups")) { - if (!Array.isArray(message.rigidGroups)) return "rigidGroups: array expected" + if (!Array.isArray(message.rigidGroups)) + return "rigidGroups: array expected"; for (let i = 0; i < message.rigidGroups.length; ++i) { - let error = $root.mirabuf.joint.RigidGroup.verify(message.rigidGroups[i]) - if (error) return "rigidGroups." + error + let error = $root.mirabuf.joint.RigidGroup.verify(message.rigidGroups[i]); + if (error) + return "rigidGroups." + error; } } if (message.motorDefinitions != null && message.hasOwnProperty("motorDefinitions")) { - if (!$util.isObject(message.motorDefinitions)) return "motorDefinitions: object expected" - let key = Object.keys(message.motorDefinitions) + if (!$util.isObject(message.motorDefinitions)) + return "motorDefinitions: object expected"; + let key = Object.keys(message.motorDefinitions); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.motor.Motor.verify(message.motorDefinitions[key[i]]) - if (error) return "motorDefinitions." + error + let error = $root.mirabuf.motor.Motor.verify(message.motorDefinitions[key[i]]); + if (error) + return "motorDefinitions." + error; } } - return null - } + return null; + }; /** * Creates a Joints message from a plain object. Also converts values to their respective internal types. @@ -5569,60 +5756,56 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Joints} Joints */ Joints.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.Joints) return object - let message = new $root.mirabuf.joint.Joints() + if (object instanceof $root.mirabuf.joint.Joints) + return object; + let message = new $root.mirabuf.joint.Joints(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.joint.Joints.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.joint.Joints.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.jointDefinitions) { if (typeof object.jointDefinitions !== "object") - throw TypeError(".mirabuf.joint.Joints.jointDefinitions: object expected") - message.jointDefinitions = {} + throw TypeError(".mirabuf.joint.Joints.jointDefinitions: object expected"); + message.jointDefinitions = {}; for (let keys = Object.keys(object.jointDefinitions), i = 0; i < keys.length; ++i) { if (typeof object.jointDefinitions[keys[i]] !== "object") - throw TypeError(".mirabuf.joint.Joints.jointDefinitions: object expected") - message.jointDefinitions[keys[i]] = $root.mirabuf.joint.Joint.fromObject( - object.jointDefinitions[keys[i]] - ) + throw TypeError(".mirabuf.joint.Joints.jointDefinitions: object expected"); + message.jointDefinitions[keys[i]] = $root.mirabuf.joint.Joint.fromObject(object.jointDefinitions[keys[i]]); } } if (object.jointInstances) { if (typeof object.jointInstances !== "object") - throw TypeError(".mirabuf.joint.Joints.jointInstances: object expected") - message.jointInstances = {} + throw TypeError(".mirabuf.joint.Joints.jointInstances: object expected"); + message.jointInstances = {}; for (let keys = Object.keys(object.jointInstances), i = 0; i < keys.length; ++i) { if (typeof object.jointInstances[keys[i]] !== "object") - throw TypeError(".mirabuf.joint.Joints.jointInstances: object expected") - message.jointInstances[keys[i]] = $root.mirabuf.joint.JointInstance.fromObject( - object.jointInstances[keys[i]] - ) + throw TypeError(".mirabuf.joint.Joints.jointInstances: object expected"); + message.jointInstances[keys[i]] = $root.mirabuf.joint.JointInstance.fromObject(object.jointInstances[keys[i]]); } } if (object.rigidGroups) { if (!Array.isArray(object.rigidGroups)) - throw TypeError(".mirabuf.joint.Joints.rigidGroups: array expected") - message.rigidGroups = [] + throw TypeError(".mirabuf.joint.Joints.rigidGroups: array expected"); + message.rigidGroups = []; for (let i = 0; i < object.rigidGroups.length; ++i) { if (typeof object.rigidGroups[i] !== "object") - throw TypeError(".mirabuf.joint.Joints.rigidGroups: object expected") - message.rigidGroups[i] = $root.mirabuf.joint.RigidGroup.fromObject(object.rigidGroups[i]) + throw TypeError(".mirabuf.joint.Joints.rigidGroups: object expected"); + message.rigidGroups[i] = $root.mirabuf.joint.RigidGroup.fromObject(object.rigidGroups[i]); } } if (object.motorDefinitions) { if (typeof object.motorDefinitions !== "object") - throw TypeError(".mirabuf.joint.Joints.motorDefinitions: object expected") - message.motorDefinitions = {} + throw TypeError(".mirabuf.joint.Joints.motorDefinitions: object expected"); + message.motorDefinitions = {}; for (let keys = Object.keys(object.motorDefinitions), i = 0; i < keys.length; ++i) { if (typeof object.motorDefinitions[keys[i]] !== "object") - throw TypeError(".mirabuf.joint.Joints.motorDefinitions: object expected") - message.motorDefinitions[keys[i]] = $root.mirabuf.motor.Motor.fromObject( - object.motorDefinitions[keys[i]] - ) + throw TypeError(".mirabuf.joint.Joints.motorDefinitions: object expected"); + message.motorDefinitions[keys[i]] = $root.mirabuf.motor.Motor.fromObject(object.motorDefinitions[keys[i]]); } } - return message - } + return message; + }; /** * Creates a plain object from a Joints message. Also converts values to other types if specified. @@ -5634,49 +5817,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Joints.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.rigidGroups = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rigidGroups = []; if (options.objects || options.defaults) { - object.jointDefinitions = {} - object.jointInstances = {} - object.motorDefinitions = {} + object.jointDefinitions = {}; + object.jointInstances = {}; + object.motorDefinitions = {}; } - if (options.defaults) object.info = null + if (options.defaults) + object.info = null; if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - let keys2 + object.info = $root.mirabuf.Info.toObject(message.info, options); + let keys2; if (message.jointDefinitions && (keys2 = Object.keys(message.jointDefinitions)).length) { - object.jointDefinitions = {} + object.jointDefinitions = {}; for (let j = 0; j < keys2.length; ++j) - object.jointDefinitions[keys2[j]] = $root.mirabuf.joint.Joint.toObject( - message.jointDefinitions[keys2[j]], - options - ) + object.jointDefinitions[keys2[j]] = $root.mirabuf.joint.Joint.toObject(message.jointDefinitions[keys2[j]], options); } if (message.jointInstances && (keys2 = Object.keys(message.jointInstances)).length) { - object.jointInstances = {} + object.jointInstances = {}; for (let j = 0; j < keys2.length; ++j) - object.jointInstances[keys2[j]] = $root.mirabuf.joint.JointInstance.toObject( - message.jointInstances[keys2[j]], - options - ) + object.jointInstances[keys2[j]] = $root.mirabuf.joint.JointInstance.toObject(message.jointInstances[keys2[j]], options); } if (message.rigidGroups && message.rigidGroups.length) { - object.rigidGroups = [] + object.rigidGroups = []; for (let j = 0; j < message.rigidGroups.length; ++j) - object.rigidGroups[j] = $root.mirabuf.joint.RigidGroup.toObject(message.rigidGroups[j], options) + object.rigidGroups[j] = $root.mirabuf.joint.RigidGroup.toObject(message.rigidGroups[j], options); } if (message.motorDefinitions && (keys2 = Object.keys(message.motorDefinitions)).length) { - object.motorDefinitions = {} + object.motorDefinitions = {}; for (let j = 0; j < keys2.length; ++j) - object.motorDefinitions[keys2[j]] = $root.mirabuf.motor.Motor.toObject( - message.motorDefinitions[keys2[j]], - options - ) + object.motorDefinitions[keys2[j]] = $root.mirabuf.motor.Motor.toObject(message.motorDefinitions[keys2[j]], options); } - return object - } + return object; + }; /** * Converts this Joints to JSON. @@ -5686,8 +5863,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Joints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Joints @@ -5699,13 +5876,13 @@ export const mirabuf = ($root.mirabuf = (() => { */ Joints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.Joints" - } + return typeUrlPrefix + "/mirabuf.joint.Joints"; + }; - return Joints - })() + return Joints; + })(); /** * JointMotion enum. @@ -5720,21 +5897,21 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} BALL=6 BALL value * @property {number} CUSTOM=7 CUSTOM value */ - joint.JointMotion = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "RIGID")] = 0 - values[(valuesById[1] = "REVOLUTE")] = 1 - values[(valuesById[2] = "SLIDER")] = 2 - values[(valuesById[3] = "CYLINDRICAL")] = 3 - values[(valuesById[4] = "PINSLOT")] = 4 - values[(valuesById[5] = "PLANAR")] = 5 - values[(valuesById[6] = "BALL")] = 6 - values[(valuesById[7] = "CUSTOM")] = 7 - return values - })() - - joint.JointInstance = (function () { + joint.JointMotion = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RIGID"] = 0; + values[valuesById[1] = "REVOLUTE"] = 1; + values[valuesById[2] = "SLIDER"] = 2; + values[valuesById[3] = "CYLINDRICAL"] = 3; + values[valuesById[4] = "PINSLOT"] = 4; + values[valuesById[5] = "PLANAR"] = 5; + values[valuesById[6] = "BALL"] = 6; + values[valuesById[7] = "CUSTOM"] = 7; + return values; + })(); + + joint.JointInstance = (function() { + /** * Properties of a JointInstance. * @memberof mirabuf.joint @@ -5760,10 +5937,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.joint.IJointInstance=} [properties] Properties to set */ function JointInstance(properties) { - this.motionLink = [] + this.motionLink = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -5772,7 +5950,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.info = null + JointInstance.prototype.info = null; /** * JointInstance isEndEffector. @@ -5780,7 +5958,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.isEndEffector = false + JointInstance.prototype.isEndEffector = false; /** * JointInstance parentPart. @@ -5788,7 +5966,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.parentPart = "" + JointInstance.prototype.parentPart = ""; /** * JointInstance childPart. @@ -5796,7 +5974,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.childPart = "" + JointInstance.prototype.childPart = ""; /** * JointInstance jointReference. @@ -5804,7 +5982,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.jointReference = "" + JointInstance.prototype.jointReference = ""; /** * JointInstance offset. @@ -5812,7 +5990,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.offset = null + JointInstance.prototype.offset = null; /** * JointInstance parts. @@ -5820,7 +5998,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.parts = null + JointInstance.prototype.parts = null; /** * JointInstance signalReference. @@ -5828,7 +6006,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.signalReference = "" + JointInstance.prototype.signalReference = ""; /** * JointInstance motionLink. @@ -5836,7 +6014,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.JointInstance * @instance */ - JointInstance.prototype.motionLink = $util.emptyArray + JointInstance.prototype.motionLink = $util.emptyArray; /** * Creates a new JointInstance instance using the specified properties. @@ -5847,8 +6025,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.JointInstance} JointInstance instance */ JointInstance.create = function create(properties) { - return new JointInstance(properties) - } + return new JointInstance(properties); + }; /** * Encodes the specified JointInstance message. Does not implicitly {@link mirabuf.joint.JointInstance.verify|verify} messages. @@ -5860,37 +6038,29 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ JointInstance.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.isEndEffector != null && Object.hasOwnProperty.call(message, "isEndEffector")) - writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.isEndEffector) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isEndEffector); if (message.parentPart != null && Object.hasOwnProperty.call(message, "parentPart")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.parentPart) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentPart); if (message.childPart != null && Object.hasOwnProperty.call(message, "childPart")) - writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.childPart) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.childPart); if (message.jointReference != null && Object.hasOwnProperty.call(message, "jointReference")) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.jointReference) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.jointReference); if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - $root.mirabuf.Vector3.encode( - message.offset, - writer.uint32(/* id 6, wireType 2 =*/ 50).fork() - ).ldelim() + $root.mirabuf.Vector3.encode(message.offset, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.parts != null && Object.hasOwnProperty.call(message, "parts")) - $root.mirabuf.GraphContainer.encode( - message.parts, - writer.uint32(/* id 7, wireType 2 =*/ 58).fork() - ).ldelim() + $root.mirabuf.GraphContainer.encode(message.parts, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.signalReference != null && Object.hasOwnProperty.call(message, "signalReference")) - writer.uint32(/* id 8, wireType 2 =*/ 66).string(message.signalReference) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.signalReference); if (message.motionLink != null && message.motionLink.length) for (let i = 0; i < message.motionLink.length; ++i) - $root.mirabuf.joint.MotionLink.encode( - message.motionLink[i], - writer.uint32(/* id 9, wireType 2 =*/ 74).fork() - ).ldelim() - return writer - } + $root.mirabuf.joint.MotionLink.encode(message.motionLink[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; /** * Encodes the specified JointInstance message, length delimited. Does not implicitly {@link mirabuf.joint.JointInstance.verify|verify} messages. @@ -5902,8 +6072,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ JointInstance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a JointInstance message from the specified reader or buffer. @@ -5917,56 +6087,57 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ JointInstance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.JointInstance() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.JointInstance(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.isEndEffector = reader.bool() - break + case 2: { + message.isEndEffector = reader.bool(); + break; } - case 3: { - message.parentPart = reader.string() - break + case 3: { + message.parentPart = reader.string(); + break; } - case 4: { - message.childPart = reader.string() - break + case 4: { + message.childPart = reader.string(); + break; } - case 5: { - message.jointReference = reader.string() - break + case 5: { + message.jointReference = reader.string(); + break; } - case 6: { - message.offset = $root.mirabuf.Vector3.decode(reader, reader.uint32()) - break + case 6: { + message.offset = $root.mirabuf.Vector3.decode(reader, reader.uint32()); + break; } - case 7: { - message.parts = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()) - break + case 7: { + message.parts = $root.mirabuf.GraphContainer.decode(reader, reader.uint32()); + break; } - case 8: { - message.signalReference = reader.string() - break + case 8: { + message.signalReference = reader.string(); + break; } - case 9: { - if (!(message.motionLink && message.motionLink.length)) message.motionLink = [] - message.motionLink.push($root.mirabuf.joint.MotionLink.decode(reader, reader.uint32())) - break + case 9: { + if (!(message.motionLink && message.motionLink.length)) + message.motionLink = []; + message.motionLink.push($root.mirabuf.joint.MotionLink.decode(reader, reader.uint32())); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a JointInstance message from the specified reader or buffer, length delimited. @@ -5979,9 +6150,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ JointInstance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a JointInstance message. @@ -5992,38 +6164,49 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ JointInstance.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.isEndEffector != null && message.hasOwnProperty("isEndEffector")) - if (typeof message.isEndEffector !== "boolean") return "isEndEffector: boolean expected" + if (typeof message.isEndEffector !== "boolean") + return "isEndEffector: boolean expected"; if (message.parentPart != null && message.hasOwnProperty("parentPart")) - if (!$util.isString(message.parentPart)) return "parentPart: string expected" + if (!$util.isString(message.parentPart)) + return "parentPart: string expected"; if (message.childPart != null && message.hasOwnProperty("childPart")) - if (!$util.isString(message.childPart)) return "childPart: string expected" + if (!$util.isString(message.childPart)) + return "childPart: string expected"; if (message.jointReference != null && message.hasOwnProperty("jointReference")) - if (!$util.isString(message.jointReference)) return "jointReference: string expected" + if (!$util.isString(message.jointReference)) + return "jointReference: string expected"; if (message.offset != null && message.hasOwnProperty("offset")) { - let error = $root.mirabuf.Vector3.verify(message.offset) - if (error) return "offset." + error + let error = $root.mirabuf.Vector3.verify(message.offset); + if (error) + return "offset." + error; } if (message.parts != null && message.hasOwnProperty("parts")) { - let error = $root.mirabuf.GraphContainer.verify(message.parts) - if (error) return "parts." + error + let error = $root.mirabuf.GraphContainer.verify(message.parts); + if (error) + return "parts." + error; } if (message.signalReference != null && message.hasOwnProperty("signalReference")) - if (!$util.isString(message.signalReference)) return "signalReference: string expected" + if (!$util.isString(message.signalReference)) + return "signalReference: string expected"; if (message.motionLink != null && message.hasOwnProperty("motionLink")) { - if (!Array.isArray(message.motionLink)) return "motionLink: array expected" + if (!Array.isArray(message.motionLink)) + return "motionLink: array expected"; for (let i = 0; i < message.motionLink.length; ++i) { - let error = $root.mirabuf.joint.MotionLink.verify(message.motionLink[i]) - if (error) return "motionLink." + error + let error = $root.mirabuf.joint.MotionLink.verify(message.motionLink[i]); + if (error) + return "motionLink." + error; } } - return null - } + return null; + }; /** * Creates a JointInstance message from a plain object. Also converts values to their respective internal types. @@ -6034,40 +6217,46 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.JointInstance} JointInstance */ JointInstance.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.JointInstance) return object - let message = new $root.mirabuf.joint.JointInstance() + if (object instanceof $root.mirabuf.joint.JointInstance) + return object; + let message = new $root.mirabuf.joint.JointInstance(); if (object.info != null) { if (typeof object.info !== "object") - throw TypeError(".mirabuf.joint.JointInstance.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) - } - if (object.isEndEffector != null) message.isEndEffector = Boolean(object.isEndEffector) - if (object.parentPart != null) message.parentPart = String(object.parentPart) - if (object.childPart != null) message.childPart = String(object.childPart) - if (object.jointReference != null) message.jointReference = String(object.jointReference) + throw TypeError(".mirabuf.joint.JointInstance.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); + } + if (object.isEndEffector != null) + message.isEndEffector = Boolean(object.isEndEffector); + if (object.parentPart != null) + message.parentPart = String(object.parentPart); + if (object.childPart != null) + message.childPart = String(object.childPart); + if (object.jointReference != null) + message.jointReference = String(object.jointReference); if (object.offset != null) { if (typeof object.offset !== "object") - throw TypeError(".mirabuf.joint.JointInstance.offset: object expected") - message.offset = $root.mirabuf.Vector3.fromObject(object.offset) + throw TypeError(".mirabuf.joint.JointInstance.offset: object expected"); + message.offset = $root.mirabuf.Vector3.fromObject(object.offset); } if (object.parts != null) { if (typeof object.parts !== "object") - throw TypeError(".mirabuf.joint.JointInstance.parts: object expected") - message.parts = $root.mirabuf.GraphContainer.fromObject(object.parts) + throw TypeError(".mirabuf.joint.JointInstance.parts: object expected"); + message.parts = $root.mirabuf.GraphContainer.fromObject(object.parts); } - if (object.signalReference != null) message.signalReference = String(object.signalReference) + if (object.signalReference != null) + message.signalReference = String(object.signalReference); if (object.motionLink) { if (!Array.isArray(object.motionLink)) - throw TypeError(".mirabuf.joint.JointInstance.motionLink: array expected") - message.motionLink = [] + throw TypeError(".mirabuf.joint.JointInstance.motionLink: array expected"); + message.motionLink = []; for (let i = 0; i < object.motionLink.length; ++i) { if (typeof object.motionLink[i] !== "object") - throw TypeError(".mirabuf.joint.JointInstance.motionLink: object expected") - message.motionLink[i] = $root.mirabuf.joint.MotionLink.fromObject(object.motionLink[i]) + throw TypeError(".mirabuf.joint.JointInstance.motionLink: object expected"); + message.motionLink[i] = $root.mirabuf.joint.MotionLink.fromObject(object.motionLink[i]); } } - return message - } + return message; + }; /** * Creates a plain object from a JointInstance message. Also converts values to other types if specified. @@ -6079,42 +6268,44 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ JointInstance.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.motionLink = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.motionLink = []; if (options.defaults) { - object.info = null - object.isEndEffector = false - object.parentPart = "" - object.childPart = "" - object.jointReference = "" - object.offset = null - object.parts = null - object.signalReference = "" + object.info = null; + object.isEndEffector = false; + object.parentPart = ""; + object.childPart = ""; + object.jointReference = ""; + object.offset = null; + object.parts = null; + object.signalReference = ""; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.isEndEffector != null && message.hasOwnProperty("isEndEffector")) - object.isEndEffector = message.isEndEffector + object.isEndEffector = message.isEndEffector; if (message.parentPart != null && message.hasOwnProperty("parentPart")) - object.parentPart = message.parentPart + object.parentPart = message.parentPart; if (message.childPart != null && message.hasOwnProperty("childPart")) - object.childPart = message.childPart + object.childPart = message.childPart; if (message.jointReference != null && message.hasOwnProperty("jointReference")) - object.jointReference = message.jointReference + object.jointReference = message.jointReference; if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = $root.mirabuf.Vector3.toObject(message.offset, options) + object.offset = $root.mirabuf.Vector3.toObject(message.offset, options); if (message.parts != null && message.hasOwnProperty("parts")) - object.parts = $root.mirabuf.GraphContainer.toObject(message.parts, options) + object.parts = $root.mirabuf.GraphContainer.toObject(message.parts, options); if (message.signalReference != null && message.hasOwnProperty("signalReference")) - object.signalReference = message.signalReference + object.signalReference = message.signalReference; if (message.motionLink && message.motionLink.length) { - object.motionLink = [] + object.motionLink = []; for (let j = 0; j < message.motionLink.length; ++j) - object.motionLink[j] = $root.mirabuf.joint.MotionLink.toObject(message.motionLink[j], options) + object.motionLink[j] = $root.mirabuf.joint.MotionLink.toObject(message.motionLink[j], options); } - return object - } + return object; + }; /** * Converts this JointInstance to JSON. @@ -6124,8 +6315,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ JointInstance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for JointInstance @@ -6137,15 +6328,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ JointInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.JointInstance" - } + return typeUrlPrefix + "/mirabuf.joint.JointInstance"; + }; - return JointInstance - })() + return JointInstance; + })(); + + joint.MotionLink = (function() { - joint.MotionLink = (function () { /** * Properties of a MotionLink. * @memberof mirabuf.joint @@ -6168,7 +6360,8 @@ export const mirabuf = ($root.mirabuf = (() => { function MotionLink(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -6177,7 +6370,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.MotionLink * @instance */ - MotionLink.prototype.jointInstance = "" + MotionLink.prototype.jointInstance = ""; /** * MotionLink ratio. @@ -6185,7 +6378,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.MotionLink * @instance */ - MotionLink.prototype.ratio = 0 + MotionLink.prototype.ratio = 0; /** * MotionLink reversed. @@ -6193,7 +6386,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.MotionLink * @instance */ - MotionLink.prototype.reversed = false + MotionLink.prototype.reversed = false; /** * Creates a new MotionLink instance using the specified properties. @@ -6204,8 +6397,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.MotionLink} MotionLink instance */ MotionLink.create = function create(properties) { - return new MotionLink(properties) - } + return new MotionLink(properties); + }; /** * Encodes the specified MotionLink message. Does not implicitly {@link mirabuf.joint.MotionLink.verify|verify} messages. @@ -6217,15 +6410,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ MotionLink.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.jointInstance != null && Object.hasOwnProperty.call(message, "jointInstance")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.jointInstance) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.jointInstance); if (message.ratio != null && Object.hasOwnProperty.call(message, "ratio")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.ratio) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.ratio); if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) - writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.reversed) - return writer - } + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.reversed); + return writer; + }; /** * Encodes the specified MotionLink message, length delimited. Does not implicitly {@link mirabuf.joint.MotionLink.verify|verify} messages. @@ -6237,8 +6431,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ MotionLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a MotionLink message from the specified reader or buffer. @@ -6252,31 +6446,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MotionLink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.MotionLink() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.MotionLink(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.jointInstance = reader.string() - break + case 1: { + message.jointInstance = reader.string(); + break; } - case 2: { - message.ratio = reader.float() - break + case 2: { + message.ratio = reader.float(); + break; } - case 3: { - message.reversed = reader.bool() - break + case 3: { + message.reversed = reader.bool(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a MotionLink message from the specified reader or buffer, length delimited. @@ -6289,9 +6483,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MotionLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a MotionLink message. @@ -6302,15 +6497,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MotionLink.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.jointInstance != null && message.hasOwnProperty("jointInstance")) - if (!$util.isString(message.jointInstance)) return "jointInstance: string expected" + if (!$util.isString(message.jointInstance)) + return "jointInstance: string expected"; if (message.ratio != null && message.hasOwnProperty("ratio")) - if (typeof message.ratio !== "number") return "ratio: number expected" + if (typeof message.ratio !== "number") + return "ratio: number expected"; if (message.reversed != null && message.hasOwnProperty("reversed")) - if (typeof message.reversed !== "boolean") return "reversed: boolean expected" - return null - } + if (typeof message.reversed !== "boolean") + return "reversed: boolean expected"; + return null; + }; /** * Creates a MotionLink message from a plain object. Also converts values to their respective internal types. @@ -6321,13 +6520,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.MotionLink} MotionLink */ MotionLink.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.MotionLink) return object - let message = new $root.mirabuf.joint.MotionLink() - if (object.jointInstance != null) message.jointInstance = String(object.jointInstance) - if (object.ratio != null) message.ratio = Number(object.ratio) - if (object.reversed != null) message.reversed = Boolean(object.reversed) - return message - } + if (object instanceof $root.mirabuf.joint.MotionLink) + return object; + let message = new $root.mirabuf.joint.MotionLink(); + if (object.jointInstance != null) + message.jointInstance = String(object.jointInstance); + if (object.ratio != null) + message.ratio = Number(object.ratio); + if (object.reversed != null) + message.reversed = Boolean(object.reversed); + return message; + }; /** * Creates a plain object from a MotionLink message. Also converts values to other types if specified. @@ -6339,20 +6542,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ MotionLink.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.jointInstance = "" - object.ratio = 0 - object.reversed = false + object.jointInstance = ""; + object.ratio = 0; + object.reversed = false; } if (message.jointInstance != null && message.hasOwnProperty("jointInstance")) - object.jointInstance = message.jointInstance + object.jointInstance = message.jointInstance; if (message.ratio != null && message.hasOwnProperty("ratio")) - object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio - if (message.reversed != null && message.hasOwnProperty("reversed")) object.reversed = message.reversed - return object - } + object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; + if (message.reversed != null && message.hasOwnProperty("reversed")) + object.reversed = message.reversed; + return object; + }; /** * Converts this MotionLink to JSON. @@ -6362,8 +6567,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ MotionLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for MotionLink @@ -6375,15 +6580,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ MotionLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.MotionLink" - } + return typeUrlPrefix + "/mirabuf.joint.MotionLink"; + }; - return MotionLink - })() + return MotionLink; + })(); + + joint.Joint = (function() { - joint.Joint = (function () { /** * Properties of a Joint. * @memberof mirabuf.joint @@ -6412,7 +6618,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Joint(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -6421,7 +6628,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.info = null + Joint.prototype.info = null; /** * Joint origin. @@ -6429,7 +6636,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.origin = null + Joint.prototype.origin = null; /** * Joint jointMotionType. @@ -6437,7 +6644,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.jointMotionType = 0 + Joint.prototype.jointMotionType = 0; /** * Joint breakMagnitude. @@ -6445,7 +6652,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.breakMagnitude = 0 + Joint.prototype.breakMagnitude = 0; /** * ONEOF rotational joint @@ -6453,7 +6660,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.rotational = null + Joint.prototype.rotational = null; /** * ONEOF prismatic joint @@ -6461,7 +6668,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.prismatic = null + Joint.prototype.prismatic = null; /** * ONEOF custom joint @@ -6469,7 +6676,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.custom = null + Joint.prototype.custom = null; /** * Additional information someone can query or store relative to your joint. @@ -6477,7 +6684,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.userData = null + Joint.prototype.userData = null; /** * Motor definition reference to lookup in joints collection @@ -6485,10 +6692,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Joint * @instance */ - Joint.prototype.motorReference = "" + Joint.prototype.motorReference = ""; // OneOf field names bound to virtual getters and setters - let $oneOfFields + let $oneOfFields; /** * Joint JointMotion. @@ -6497,9 +6704,9 @@ export const mirabuf = ($root.mirabuf = (() => { * @instance */ Object.defineProperty(Joint.prototype, "JointMotion", { - get: $util.oneOfGetter(($oneOfFields = ["rotational", "prismatic", "custom"])), - set: $util.oneOfSetter($oneOfFields), - }) + get: $util.oneOfGetter($oneOfFields = ["rotational", "prismatic", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Joint instance using the specified properties. @@ -6510,8 +6717,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Joint} Joint instance */ Joint.create = function create(properties) { - return new Joint(properties) - } + return new Joint(properties); + }; /** * Encodes the specified Joint message. Does not implicitly {@link mirabuf.joint.Joint.verify|verify} messages. @@ -6523,42 +6730,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Joint.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) - $root.mirabuf.Vector3.encode( - message.origin, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.Vector3.encode(message.origin, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.jointMotionType != null && Object.hasOwnProperty.call(message, "jointMotionType")) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.jointMotionType) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.jointMotionType); if (message.breakMagnitude != null && Object.hasOwnProperty.call(message, "breakMagnitude")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.breakMagnitude) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.breakMagnitude); if (message.rotational != null && Object.hasOwnProperty.call(message, "rotational")) - $root.mirabuf.joint.RotationalJoint.encode( - message.rotational, - writer.uint32(/* id 5, wireType 2 =*/ 42).fork() - ).ldelim() + $root.mirabuf.joint.RotationalJoint.encode(message.rotational, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.prismatic != null && Object.hasOwnProperty.call(message, "prismatic")) - $root.mirabuf.joint.PrismaticJoint.encode( - message.prismatic, - writer.uint32(/* id 6, wireType 2 =*/ 50).fork() - ).ldelim() + $root.mirabuf.joint.PrismaticJoint.encode(message.prismatic, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.mirabuf.joint.CustomJoint.encode( - message.custom, - writer.uint32(/* id 7, wireType 2 =*/ 58).fork() - ).ldelim() + $root.mirabuf.joint.CustomJoint.encode(message.custom, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.userData != null && Object.hasOwnProperty.call(message, "userData")) - $root.mirabuf.UserData.encode( - message.userData, - writer.uint32(/* id 8, wireType 2 =*/ 66).fork() - ).ldelim() + $root.mirabuf.UserData.encode(message.userData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.motorReference != null && Object.hasOwnProperty.call(message, "motorReference")) - writer.uint32(/* id 9, wireType 2 =*/ 74).string(message.motorReference) - return writer - } + writer.uint32(/* id 9, wireType 2 =*/74).string(message.motorReference); + return writer; + }; /** * Encodes the specified Joint message, length delimited. Does not implicitly {@link mirabuf.joint.Joint.verify|verify} messages. @@ -6570,8 +6763,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Joint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Joint message from the specified reader or buffer. @@ -6585,55 +6778,55 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Joint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.Joint() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.Joint(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.origin = $root.mirabuf.Vector3.decode(reader, reader.uint32()) - break + case 2: { + message.origin = $root.mirabuf.Vector3.decode(reader, reader.uint32()); + break; } - case 3: { - message.jointMotionType = reader.int32() - break + case 3: { + message.jointMotionType = reader.int32(); + break; } - case 4: { - message.breakMagnitude = reader.float() - break + case 4: { + message.breakMagnitude = reader.float(); + break; } - case 5: { - message.rotational = $root.mirabuf.joint.RotationalJoint.decode(reader, reader.uint32()) - break + case 5: { + message.rotational = $root.mirabuf.joint.RotationalJoint.decode(reader, reader.uint32()); + break; } - case 6: { - message.prismatic = $root.mirabuf.joint.PrismaticJoint.decode(reader, reader.uint32()) - break + case 6: { + message.prismatic = $root.mirabuf.joint.PrismaticJoint.decode(reader, reader.uint32()); + break; } - case 7: { - message.custom = $root.mirabuf.joint.CustomJoint.decode(reader, reader.uint32()) - break + case 7: { + message.custom = $root.mirabuf.joint.CustomJoint.decode(reader, reader.uint32()); + break; } - case 8: { - message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()) - break + case 8: { + message.userData = $root.mirabuf.UserData.decode(reader, reader.uint32()); + break; } - case 9: { - message.motorReference = reader.string() - break + case 9: { + message.motorReference = reader.string(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Joint message from the specified reader or buffer, length delimited. @@ -6646,9 +6839,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Joint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Joint message. @@ -6659,63 +6853,74 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Joint.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" - let properties = {} + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.origin != null && message.hasOwnProperty("origin")) { - let error = $root.mirabuf.Vector3.verify(message.origin) - if (error) return "origin." + error + let error = $root.mirabuf.Vector3.verify(message.origin); + if (error) + return "origin." + error; } if (message.jointMotionType != null && message.hasOwnProperty("jointMotionType")) switch (message.jointMotionType) { - default: - return "jointMotionType: enum value expected" - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break + default: + return "jointMotionType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } if (message.breakMagnitude != null && message.hasOwnProperty("breakMagnitude")) - if (typeof message.breakMagnitude !== "number") return "breakMagnitude: number expected" + if (typeof message.breakMagnitude !== "number") + return "breakMagnitude: number expected"; if (message.rotational != null && message.hasOwnProperty("rotational")) { - properties.JointMotion = 1 + properties.JointMotion = 1; { - let error = $root.mirabuf.joint.RotationalJoint.verify(message.rotational) - if (error) return "rotational." + error + let error = $root.mirabuf.joint.RotationalJoint.verify(message.rotational); + if (error) + return "rotational." + error; } } if (message.prismatic != null && message.hasOwnProperty("prismatic")) { - if (properties.JointMotion === 1) return "JointMotion: multiple values" - properties.JointMotion = 1 + if (properties.JointMotion === 1) + return "JointMotion: multiple values"; + properties.JointMotion = 1; { - let error = $root.mirabuf.joint.PrismaticJoint.verify(message.prismatic) - if (error) return "prismatic." + error + let error = $root.mirabuf.joint.PrismaticJoint.verify(message.prismatic); + if (error) + return "prismatic." + error; } } if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.JointMotion === 1) return "JointMotion: multiple values" - properties.JointMotion = 1 + if (properties.JointMotion === 1) + return "JointMotion: multiple values"; + properties.JointMotion = 1; { - let error = $root.mirabuf.joint.CustomJoint.verify(message.custom) - if (error) return "custom." + error + let error = $root.mirabuf.joint.CustomJoint.verify(message.custom); + if (error) + return "custom." + error; } } if (message.userData != null && message.hasOwnProperty("userData")) { - let error = $root.mirabuf.UserData.verify(message.userData) - if (error) return "userData." + error + let error = $root.mirabuf.UserData.verify(message.userData); + if (error) + return "userData." + error; } if (message.motorReference != null && message.hasOwnProperty("motorReference")) - if (!$util.isString(message.motorReference)) return "motorReference: string expected" - return null - } + if (!$util.isString(message.motorReference)) + return "motorReference: string expected"; + return null; + }; /** * Creates a Joint message from a plain object. Also converts values to their respective internal types. @@ -6726,81 +6931,85 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Joint} Joint */ Joint.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.Joint) return object - let message = new $root.mirabuf.joint.Joint() + if (object instanceof $root.mirabuf.joint.Joint) + return object; + let message = new $root.mirabuf.joint.Joint(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.joint.Joint.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.joint.Joint.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.origin != null) { if (typeof object.origin !== "object") - throw TypeError(".mirabuf.joint.Joint.origin: object expected") - message.origin = $root.mirabuf.Vector3.fromObject(object.origin) + throw TypeError(".mirabuf.joint.Joint.origin: object expected"); + message.origin = $root.mirabuf.Vector3.fromObject(object.origin); } switch (object.jointMotionType) { - default: - if (typeof object.jointMotionType === "number") { - message.jointMotionType = object.jointMotionType - break - } - break - case "RIGID": - case 0: - message.jointMotionType = 0 - break - case "REVOLUTE": - case 1: - message.jointMotionType = 1 - break - case "SLIDER": - case 2: - message.jointMotionType = 2 - break - case "CYLINDRICAL": - case 3: - message.jointMotionType = 3 - break - case "PINSLOT": - case 4: - message.jointMotionType = 4 - break - case "PLANAR": - case 5: - message.jointMotionType = 5 - break - case "BALL": - case 6: - message.jointMotionType = 6 - break - case "CUSTOM": - case 7: - message.jointMotionType = 7 - break - } - if (object.breakMagnitude != null) message.breakMagnitude = Number(object.breakMagnitude) + default: + if (typeof object.jointMotionType === "number") { + message.jointMotionType = object.jointMotionType; + break; + } + break; + case "RIGID": + case 0: + message.jointMotionType = 0; + break; + case "REVOLUTE": + case 1: + message.jointMotionType = 1; + break; + case "SLIDER": + case 2: + message.jointMotionType = 2; + break; + case "CYLINDRICAL": + case 3: + message.jointMotionType = 3; + break; + case "PINSLOT": + case 4: + message.jointMotionType = 4; + break; + case "PLANAR": + case 5: + message.jointMotionType = 5; + break; + case "BALL": + case 6: + message.jointMotionType = 6; + break; + case "CUSTOM": + case 7: + message.jointMotionType = 7; + break; + } + if (object.breakMagnitude != null) + message.breakMagnitude = Number(object.breakMagnitude); if (object.rotational != null) { if (typeof object.rotational !== "object") - throw TypeError(".mirabuf.joint.Joint.rotational: object expected") - message.rotational = $root.mirabuf.joint.RotationalJoint.fromObject(object.rotational) + throw TypeError(".mirabuf.joint.Joint.rotational: object expected"); + message.rotational = $root.mirabuf.joint.RotationalJoint.fromObject(object.rotational); } if (object.prismatic != null) { if (typeof object.prismatic !== "object") - throw TypeError(".mirabuf.joint.Joint.prismatic: object expected") - message.prismatic = $root.mirabuf.joint.PrismaticJoint.fromObject(object.prismatic) + throw TypeError(".mirabuf.joint.Joint.prismatic: object expected"); + message.prismatic = $root.mirabuf.joint.PrismaticJoint.fromObject(object.prismatic); } if (object.custom != null) { if (typeof object.custom !== "object") - throw TypeError(".mirabuf.joint.Joint.custom: object expected") - message.custom = $root.mirabuf.joint.CustomJoint.fromObject(object.custom) + throw TypeError(".mirabuf.joint.Joint.custom: object expected"); + message.custom = $root.mirabuf.joint.CustomJoint.fromObject(object.custom); } if (object.userData != null) { if (typeof object.userData !== "object") - throw TypeError(".mirabuf.joint.Joint.userData: object expected") - message.userData = $root.mirabuf.UserData.fromObject(object.userData) + throw TypeError(".mirabuf.joint.Joint.userData: object expected"); + message.userData = $root.mirabuf.UserData.fromObject(object.userData); } - if (object.motorReference != null) message.motorReference = String(object.motorReference) - return message - } + if (object.motorReference != null) + message.motorReference = String(object.motorReference); + return message; + }; /** * Creates a plain object from a Joint message. Also converts values to other types if specified. @@ -6812,50 +7021,46 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Joint.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.origin = null - object.jointMotionType = options.enums === String ? "RIGID" : 0 - object.breakMagnitude = 0 - object.userData = null - object.motorReference = "" + object.info = null; + object.origin = null; + object.jointMotionType = options.enums === String ? "RIGID" : 0; + object.breakMagnitude = 0; + object.userData = null; + object.motorReference = ""; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.origin != null && message.hasOwnProperty("origin")) - object.origin = $root.mirabuf.Vector3.toObject(message.origin, options) + object.origin = $root.mirabuf.Vector3.toObject(message.origin, options); if (message.jointMotionType != null && message.hasOwnProperty("jointMotionType")) - object.jointMotionType = - options.enums === String - ? $root.mirabuf.joint.JointMotion[message.jointMotionType] === undefined - ? message.jointMotionType - : $root.mirabuf.joint.JointMotion[message.jointMotionType] - : message.jointMotionType + object.jointMotionType = options.enums === String ? $root.mirabuf.joint.JointMotion[message.jointMotionType] === undefined ? message.jointMotionType : $root.mirabuf.joint.JointMotion[message.jointMotionType] : message.jointMotionType; if (message.breakMagnitude != null && message.hasOwnProperty("breakMagnitude")) - object.breakMagnitude = - options.json && !isFinite(message.breakMagnitude) - ? String(message.breakMagnitude) - : message.breakMagnitude + object.breakMagnitude = options.json && !isFinite(message.breakMagnitude) ? String(message.breakMagnitude) : message.breakMagnitude; if (message.rotational != null && message.hasOwnProperty("rotational")) { - object.rotational = $root.mirabuf.joint.RotationalJoint.toObject(message.rotational, options) - if (options.oneofs) object.JointMotion = "rotational" + object.rotational = $root.mirabuf.joint.RotationalJoint.toObject(message.rotational, options); + if (options.oneofs) + object.JointMotion = "rotational"; } if (message.prismatic != null && message.hasOwnProperty("prismatic")) { - object.prismatic = $root.mirabuf.joint.PrismaticJoint.toObject(message.prismatic, options) - if (options.oneofs) object.JointMotion = "prismatic" + object.prismatic = $root.mirabuf.joint.PrismaticJoint.toObject(message.prismatic, options); + if (options.oneofs) + object.JointMotion = "prismatic"; } if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.mirabuf.joint.CustomJoint.toObject(message.custom, options) - if (options.oneofs) object.JointMotion = "custom" + object.custom = $root.mirabuf.joint.CustomJoint.toObject(message.custom, options); + if (options.oneofs) + object.JointMotion = "custom"; } if (message.userData != null && message.hasOwnProperty("userData")) - object.userData = $root.mirabuf.UserData.toObject(message.userData, options) + object.userData = $root.mirabuf.UserData.toObject(message.userData, options); if (message.motorReference != null && message.hasOwnProperty("motorReference")) - object.motorReference = message.motorReference - return object - } + object.motorReference = message.motorReference; + return object; + }; /** * Converts this Joint to JSON. @@ -6865,8 +7070,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Joint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Joint @@ -6878,15 +7083,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Joint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.Joint" - } + return typeUrlPrefix + "/mirabuf.joint.Joint"; + }; + + return Joint; + })(); - return Joint - })() + joint.Dynamics = (function() { - joint.Dynamics = (function () { /** * Properties of a Dynamics. * @memberof mirabuf.joint @@ -6906,7 +7112,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Dynamics(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -6915,7 +7122,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Dynamics * @instance */ - Dynamics.prototype.damping = 0 + Dynamics.prototype.damping = 0; /** * Friction effect on a given joint motion @@ -6923,7 +7130,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Dynamics * @instance */ - Dynamics.prototype.friction = 0 + Dynamics.prototype.friction = 0; /** * Creates a new Dynamics instance using the specified properties. @@ -6934,8 +7141,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Dynamics} Dynamics instance */ Dynamics.create = function create(properties) { - return new Dynamics(properties) - } + return new Dynamics(properties); + }; /** * Encodes the specified Dynamics message. Does not implicitly {@link mirabuf.joint.Dynamics.verify|verify} messages. @@ -6947,13 +7154,14 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Dynamics.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.damping != null && Object.hasOwnProperty.call(message, "damping")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.damping) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.damping); if (message.friction != null && Object.hasOwnProperty.call(message, "friction")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.friction) - return writer - } + writer.uint32(/* id 2, wireType 5 =*/21).float(message.friction); + return writer; + }; /** * Encodes the specified Dynamics message, length delimited. Does not implicitly {@link mirabuf.joint.Dynamics.verify|verify} messages. @@ -6965,8 +7173,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Dynamics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Dynamics message from the specified reader or buffer. @@ -6980,27 +7188,27 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Dynamics.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.Dynamics() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.Dynamics(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.damping = reader.float() - break + case 1: { + message.damping = reader.float(); + break; } - case 2: { - message.friction = reader.float() - break + case 2: { + message.friction = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Dynamics message from the specified reader or buffer, length delimited. @@ -7013,9 +7221,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Dynamics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Dynamics message. @@ -7026,13 +7235,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Dynamics.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.damping != null && message.hasOwnProperty("damping")) - if (typeof message.damping !== "number") return "damping: number expected" + if (typeof message.damping !== "number") + return "damping: number expected"; if (message.friction != null && message.hasOwnProperty("friction")) - if (typeof message.friction !== "number") return "friction: number expected" - return null - } + if (typeof message.friction !== "number") + return "friction: number expected"; + return null; + }; /** * Creates a Dynamics message from a plain object. Also converts values to their respective internal types. @@ -7043,12 +7255,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Dynamics} Dynamics */ Dynamics.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.Dynamics) return object - let message = new $root.mirabuf.joint.Dynamics() - if (object.damping != null) message.damping = Number(object.damping) - if (object.friction != null) message.friction = Number(object.friction) - return message - } + if (object instanceof $root.mirabuf.joint.Dynamics) + return object; + let message = new $root.mirabuf.joint.Dynamics(); + if (object.damping != null) + message.damping = Number(object.damping); + if (object.friction != null) + message.friction = Number(object.friction); + return message; + }; /** * Creates a plain object from a Dynamics message. Also converts values to other types if specified. @@ -7060,20 +7275,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Dynamics.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.damping = 0 - object.friction = 0 + object.damping = 0; + object.friction = 0; } if (message.damping != null && message.hasOwnProperty("damping")) - object.damping = - options.json && !isFinite(message.damping) ? String(message.damping) : message.damping + object.damping = options.json && !isFinite(message.damping) ? String(message.damping) : message.damping; if (message.friction != null && message.hasOwnProperty("friction")) - object.friction = - options.json && !isFinite(message.friction) ? String(message.friction) : message.friction - return object - } + object.friction = options.json && !isFinite(message.friction) ? String(message.friction) : message.friction; + return object; + }; /** * Converts this Dynamics to JSON. @@ -7083,8 +7297,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Dynamics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Dynamics @@ -7096,15 +7310,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Dynamics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.Dynamics" - } + return typeUrlPrefix + "/mirabuf.joint.Dynamics"; + }; - return Dynamics - })() + return Dynamics; + })(); + + joint.Limits = (function() { - joint.Limits = (function () { /** * Properties of a Limits. * @memberof mirabuf.joint @@ -7119,7 +7334,7 @@ export const mirabuf = ($root.mirabuf = (() => { * Constructs a new Limits. * @memberof mirabuf.joint * @classdesc Limits specify the mechanical range of a given joint. - * + * * TODO: Add units * @implements ILimits * @constructor @@ -7128,7 +7343,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Limits(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -7137,7 +7353,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Limits * @instance */ - Limits.prototype.lower = 0 + Limits.prototype.lower = 0; /** * Upper Limit is the joint extent @@ -7145,7 +7361,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Limits * @instance */ - Limits.prototype.upper = 0 + Limits.prototype.upper = 0; /** * Velocity Max in m/s^2 (angular for rotational) @@ -7153,7 +7369,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Limits * @instance */ - Limits.prototype.velocity = 0 + Limits.prototype.velocity = 0; /** * Effort is the absolute force a joint can apply for a given instant - ROS has a great article on it http://wiki.ros.org/pr2_controller_manager/safety_limits @@ -7161,7 +7377,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Limits * @instance */ - Limits.prototype.effort = 0 + Limits.prototype.effort = 0; /** * Creates a new Limits instance using the specified properties. @@ -7172,8 +7388,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Limits} Limits instance */ Limits.create = function create(properties) { - return new Limits(properties) - } + return new Limits(properties); + }; /** * Encodes the specified Limits message. Does not implicitly {@link mirabuf.joint.Limits.verify|verify} messages. @@ -7185,17 +7401,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Limits.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.lower != null && Object.hasOwnProperty.call(message, "lower")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.lower) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.lower); if (message.upper != null && Object.hasOwnProperty.call(message, "upper")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.upper) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.upper); if (message.velocity != null && Object.hasOwnProperty.call(message, "velocity")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.velocity) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.velocity); if (message.effort != null && Object.hasOwnProperty.call(message, "effort")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.effort) - return writer - } + writer.uint32(/* id 4, wireType 5 =*/37).float(message.effort); + return writer; + }; /** * Encodes the specified Limits message, length delimited. Does not implicitly {@link mirabuf.joint.Limits.verify|verify} messages. @@ -7207,8 +7424,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Limits.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Limits message from the specified reader or buffer. @@ -7222,35 +7439,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Limits.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.Limits() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.Limits(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.lower = reader.float() - break + case 1: { + message.lower = reader.float(); + break; } - case 2: { - message.upper = reader.float() - break + case 2: { + message.upper = reader.float(); + break; } - case 3: { - message.velocity = reader.float() - break + case 3: { + message.velocity = reader.float(); + break; } - case 4: { - message.effort = reader.float() - break + case 4: { + message.effort = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Limits message from the specified reader or buffer, length delimited. @@ -7263,9 +7480,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Limits.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Limits message. @@ -7276,17 +7494,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Limits.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.lower != null && message.hasOwnProperty("lower")) - if (typeof message.lower !== "number") return "lower: number expected" + if (typeof message.lower !== "number") + return "lower: number expected"; if (message.upper != null && message.hasOwnProperty("upper")) - if (typeof message.upper !== "number") return "upper: number expected" + if (typeof message.upper !== "number") + return "upper: number expected"; if (message.velocity != null && message.hasOwnProperty("velocity")) - if (typeof message.velocity !== "number") return "velocity: number expected" + if (typeof message.velocity !== "number") + return "velocity: number expected"; if (message.effort != null && message.hasOwnProperty("effort")) - if (typeof message.effort !== "number") return "effort: number expected" - return null - } + if (typeof message.effort !== "number") + return "effort: number expected"; + return null; + }; /** * Creates a Limits message from a plain object. Also converts values to their respective internal types. @@ -7297,14 +7520,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Limits} Limits */ Limits.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.Limits) return object - let message = new $root.mirabuf.joint.Limits() - if (object.lower != null) message.lower = Number(object.lower) - if (object.upper != null) message.upper = Number(object.upper) - if (object.velocity != null) message.velocity = Number(object.velocity) - if (object.effort != null) message.effort = Number(object.effort) - return message - } + if (object instanceof $root.mirabuf.joint.Limits) + return object; + let message = new $root.mirabuf.joint.Limits(); + if (object.lower != null) + message.lower = Number(object.lower); + if (object.upper != null) + message.upper = Number(object.upper); + if (object.velocity != null) + message.velocity = Number(object.velocity); + if (object.effort != null) + message.effort = Number(object.effort); + return message; + }; /** * Creates a plain object from a Limits message. Also converts values to other types if specified. @@ -7316,25 +7544,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Limits.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.lower = 0 - object.upper = 0 - object.velocity = 0 - object.effort = 0 + object.lower = 0; + object.upper = 0; + object.velocity = 0; + object.effort = 0; } if (message.lower != null && message.hasOwnProperty("lower")) - object.lower = options.json && !isFinite(message.lower) ? String(message.lower) : message.lower + object.lower = options.json && !isFinite(message.lower) ? String(message.lower) : message.lower; if (message.upper != null && message.hasOwnProperty("upper")) - object.upper = options.json && !isFinite(message.upper) ? String(message.upper) : message.upper + object.upper = options.json && !isFinite(message.upper) ? String(message.upper) : message.upper; if (message.velocity != null && message.hasOwnProperty("velocity")) - object.velocity = - options.json && !isFinite(message.velocity) ? String(message.velocity) : message.velocity + object.velocity = options.json && !isFinite(message.velocity) ? String(message.velocity) : message.velocity; if (message.effort != null && message.hasOwnProperty("effort")) - object.effort = options.json && !isFinite(message.effort) ? String(message.effort) : message.effort - return object - } + object.effort = options.json && !isFinite(message.effort) ? String(message.effort) : message.effort; + return object; + }; /** * Converts this Limits to JSON. @@ -7344,8 +7572,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Limits.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Limits @@ -7357,15 +7585,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Limits.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.Limits" - } + return typeUrlPrefix + "/mirabuf.joint.Limits"; + }; + + return Limits; + })(); - return Limits - })() + joint.Safety = (function() { - joint.Safety = (function () { /** * Properties of a Safety. * @memberof mirabuf.joint @@ -7382,7 +7611,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @classdesc Safety switch configuration for a given joint. * Can usefully indicate a bounds issue. * Inspired by the URDF implementation. - * + * * This should really just be created by the controller. * http://wiki.ros.org/pr2_controller_manager/safety_limits * @implements ISafety @@ -7392,7 +7621,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Safety(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -7401,7 +7631,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Safety * @instance */ - Safety.prototype.lowerLimit = 0 + Safety.prototype.lowerLimit = 0; /** * Upper Software limit @@ -7409,7 +7639,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Safety * @instance */ - Safety.prototype.upperLimit = 0 + Safety.prototype.upperLimit = 0; /** * Relation between position and velocity limit @@ -7417,7 +7647,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Safety * @instance */ - Safety.prototype.kPosition = 0 + Safety.prototype.kPosition = 0; /** * Relation between effort and velocity limit @@ -7425,7 +7655,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.Safety * @instance */ - Safety.prototype.kVelocity = 0 + Safety.prototype.kVelocity = 0; /** * Creates a new Safety instance using the specified properties. @@ -7436,8 +7666,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Safety} Safety instance */ Safety.create = function create(properties) { - return new Safety(properties) - } + return new Safety(properties); + }; /** * Encodes the specified Safety message. Does not implicitly {@link mirabuf.joint.Safety.verify|verify} messages. @@ -7449,17 +7679,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Safety.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.lowerLimit != null && Object.hasOwnProperty.call(message, "lowerLimit")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.lowerLimit) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.lowerLimit); if (message.upperLimit != null && Object.hasOwnProperty.call(message, "upperLimit")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.upperLimit) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.upperLimit); if (message.kPosition != null && Object.hasOwnProperty.call(message, "kPosition")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.kPosition) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.kPosition); if (message.kVelocity != null && Object.hasOwnProperty.call(message, "kVelocity")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.kVelocity) - return writer - } + writer.uint32(/* id 4, wireType 5 =*/37).float(message.kVelocity); + return writer; + }; /** * Encodes the specified Safety message, length delimited. Does not implicitly {@link mirabuf.joint.Safety.verify|verify} messages. @@ -7471,8 +7702,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Safety.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Safety message from the specified reader or buffer. @@ -7486,35 +7717,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Safety.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.Safety() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.Safety(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.lowerLimit = reader.float() - break + case 1: { + message.lowerLimit = reader.float(); + break; } - case 2: { - message.upperLimit = reader.float() - break + case 2: { + message.upperLimit = reader.float(); + break; } - case 3: { - message.kPosition = reader.float() - break + case 3: { + message.kPosition = reader.float(); + break; } - case 4: { - message.kVelocity = reader.float() - break + case 4: { + message.kVelocity = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Safety message from the specified reader or buffer, length delimited. @@ -7527,9 +7758,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Safety.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Safety message. @@ -7540,17 +7772,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Safety.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.lowerLimit != null && message.hasOwnProperty("lowerLimit")) - if (typeof message.lowerLimit !== "number") return "lowerLimit: number expected" + if (typeof message.lowerLimit !== "number") + return "lowerLimit: number expected"; if (message.upperLimit != null && message.hasOwnProperty("upperLimit")) - if (typeof message.upperLimit !== "number") return "upperLimit: number expected" + if (typeof message.upperLimit !== "number") + return "upperLimit: number expected"; if (message.kPosition != null && message.hasOwnProperty("kPosition")) - if (typeof message.kPosition !== "number") return "kPosition: number expected" + if (typeof message.kPosition !== "number") + return "kPosition: number expected"; if (message.kVelocity != null && message.hasOwnProperty("kVelocity")) - if (typeof message.kVelocity !== "number") return "kVelocity: number expected" - return null - } + if (typeof message.kVelocity !== "number") + return "kVelocity: number expected"; + return null; + }; /** * Creates a Safety message from a plain object. Also converts values to their respective internal types. @@ -7561,14 +7798,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.Safety} Safety */ Safety.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.Safety) return object - let message = new $root.mirabuf.joint.Safety() - if (object.lowerLimit != null) message.lowerLimit = Number(object.lowerLimit) - if (object.upperLimit != null) message.upperLimit = Number(object.upperLimit) - if (object.kPosition != null) message.kPosition = Number(object.kPosition) - if (object.kVelocity != null) message.kVelocity = Number(object.kVelocity) - return message - } + if (object instanceof $root.mirabuf.joint.Safety) + return object; + let message = new $root.mirabuf.joint.Safety(); + if (object.lowerLimit != null) + message.lowerLimit = Number(object.lowerLimit); + if (object.upperLimit != null) + message.upperLimit = Number(object.upperLimit); + if (object.kPosition != null) + message.kPosition = Number(object.kPosition); + if (object.kVelocity != null) + message.kVelocity = Number(object.kVelocity); + return message; + }; /** * Creates a plain object from a Safety message. Also converts values to other types if specified. @@ -7580,28 +7822,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Safety.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.lowerLimit = 0 - object.upperLimit = 0 - object.kPosition = 0 - object.kVelocity = 0 + object.lowerLimit = 0; + object.upperLimit = 0; + object.kPosition = 0; + object.kVelocity = 0; } if (message.lowerLimit != null && message.hasOwnProperty("lowerLimit")) - object.lowerLimit = - options.json && !isFinite(message.lowerLimit) ? String(message.lowerLimit) : message.lowerLimit + object.lowerLimit = options.json && !isFinite(message.lowerLimit) ? String(message.lowerLimit) : message.lowerLimit; if (message.upperLimit != null && message.hasOwnProperty("upperLimit")) - object.upperLimit = - options.json && !isFinite(message.upperLimit) ? String(message.upperLimit) : message.upperLimit + object.upperLimit = options.json && !isFinite(message.upperLimit) ? String(message.upperLimit) : message.upperLimit; if (message.kPosition != null && message.hasOwnProperty("kPosition")) - object.kPosition = - options.json && !isFinite(message.kPosition) ? String(message.kPosition) : message.kPosition + object.kPosition = options.json && !isFinite(message.kPosition) ? String(message.kPosition) : message.kPosition; if (message.kVelocity != null && message.hasOwnProperty("kVelocity")) - object.kVelocity = - options.json && !isFinite(message.kVelocity) ? String(message.kVelocity) : message.kVelocity - return object - } + object.kVelocity = options.json && !isFinite(message.kVelocity) ? String(message.kVelocity) : message.kVelocity; + return object; + }; /** * Converts this Safety to JSON. @@ -7611,8 +7850,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Safety.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Safety @@ -7624,15 +7863,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Safety.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.Safety" - } + return typeUrlPrefix + "/mirabuf.joint.Safety"; + }; + + return Safety; + })(); - return Safety - })() + joint.DOF = (function() { - joint.DOF = (function () { /** * Properties of a DOF. * @memberof mirabuf.joint @@ -7656,7 +7896,8 @@ export const mirabuf = ($root.mirabuf = (() => { function DOF(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -7665,7 +7906,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.name = "" + DOF.prototype.name = ""; /** * Axis the degree of freedom is pivoting by @@ -7673,7 +7914,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.axis = null + DOF.prototype.axis = null; /** * Direction the axis vector is offset from - this has an incorrect naming scheme @@ -7681,7 +7922,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.pivotDirection = 0 + DOF.prototype.pivotDirection = 0; /** * Dynamic properties of this joint pivot @@ -7689,7 +7930,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.dynamics = null + DOF.prototype.dynamics = null; /** * Limits of this freedom @@ -7697,7 +7938,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.limits = null + DOF.prototype.limits = null; /** * Current value of the DOF @@ -7705,7 +7946,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.DOF * @instance */ - DOF.prototype.value = 0 + DOF.prototype.value = 0; /** * Creates a new DOF instance using the specified properties. @@ -7716,8 +7957,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.DOF} DOF instance */ DOF.create = function create(properties) { - return new DOF(properties) - } + return new DOF(properties); + }; /** * Encodes the specified DOF message. Does not implicitly {@link mirabuf.joint.DOF.verify|verify} messages. @@ -7729,30 +7970,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ DOF.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.axis != null && Object.hasOwnProperty.call(message, "axis")) - $root.mirabuf.Vector3.encode( - message.axis, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.Vector3.encode(message.axis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.pivotDirection != null && Object.hasOwnProperty.call(message, "pivotDirection")) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.pivotDirection) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pivotDirection); if (message.dynamics != null && Object.hasOwnProperty.call(message, "dynamics")) - $root.mirabuf.joint.Dynamics.encode( - message.dynamics, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.joint.Dynamics.encode(message.dynamics, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.limits != null && Object.hasOwnProperty.call(message, "limits")) - $root.mirabuf.joint.Limits.encode( - message.limits, - writer.uint32(/* id 5, wireType 2 =*/ 42).fork() - ).ldelim() + $root.mirabuf.joint.Limits.encode(message.limits, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 6, wireType 5 =*/ 53).float(message.value) - return writer - } + writer.uint32(/* id 6, wireType 5 =*/53).float(message.value); + return writer; + }; /** * Encodes the specified DOF message, length delimited. Does not implicitly {@link mirabuf.joint.DOF.verify|verify} messages. @@ -7764,8 +7997,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ DOF.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a DOF message from the specified reader or buffer. @@ -7779,43 +8012,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DOF.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.DOF() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.DOF(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string() - break + case 1: { + message.name = reader.string(); + break; } - case 2: { - message.axis = $root.mirabuf.Vector3.decode(reader, reader.uint32()) - break + case 2: { + message.axis = $root.mirabuf.Vector3.decode(reader, reader.uint32()); + break; } - case 3: { - message.pivotDirection = reader.int32() - break + case 3: { + message.pivotDirection = reader.int32(); + break; } - case 4: { - message.dynamics = $root.mirabuf.joint.Dynamics.decode(reader, reader.uint32()) - break + case 4: { + message.dynamics = $root.mirabuf.joint.Dynamics.decode(reader, reader.uint32()); + break; } - case 5: { - message.limits = $root.mirabuf.joint.Limits.decode(reader, reader.uint32()) - break + case 5: { + message.limits = $root.mirabuf.joint.Limits.decode(reader, reader.uint32()); + break; } - case 6: { - message.value = reader.float() - break + case 6: { + message.value = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a DOF message from the specified reader or buffer, length delimited. @@ -7828,9 +8061,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DOF.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a DOF message. @@ -7841,34 +8075,40 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DOF.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) return "name: string expected" + if (!$util.isString(message.name)) + return "name: string expected"; if (message.axis != null && message.hasOwnProperty("axis")) { - let error = $root.mirabuf.Vector3.verify(message.axis) - if (error) return "axis." + error + let error = $root.mirabuf.Vector3.verify(message.axis); + if (error) + return "axis." + error; } if (message.pivotDirection != null && message.hasOwnProperty("pivotDirection")) switch (message.pivotDirection) { - default: - return "pivotDirection: enum value expected" - case 0: - case 1: - case 2: - break + default: + return "pivotDirection: enum value expected"; + case 0: + case 1: + case 2: + break; } if (message.dynamics != null && message.hasOwnProperty("dynamics")) { - let error = $root.mirabuf.joint.Dynamics.verify(message.dynamics) - if (error) return "dynamics." + error + let error = $root.mirabuf.joint.Dynamics.verify(message.dynamics); + if (error) + return "dynamics." + error; } if (message.limits != null && message.hasOwnProperty("limits")) { - let error = $root.mirabuf.joint.Limits.verify(message.limits) - if (error) return "limits." + error + let error = $root.mirabuf.joint.Limits.verify(message.limits); + if (error) + return "limits." + error; } if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") return "value: number expected" - return null - } + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; /** * Creates a DOF message from a plain object. Also converts values to their respective internal types. @@ -7879,45 +8119,50 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.DOF} DOF */ DOF.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.DOF) return object - let message = new $root.mirabuf.joint.DOF() - if (object.name != null) message.name = String(object.name) + if (object instanceof $root.mirabuf.joint.DOF) + return object; + let message = new $root.mirabuf.joint.DOF(); + if (object.name != null) + message.name = String(object.name); if (object.axis != null) { - if (typeof object.axis !== "object") throw TypeError(".mirabuf.joint.DOF.axis: object expected") - message.axis = $root.mirabuf.Vector3.fromObject(object.axis) + if (typeof object.axis !== "object") + throw TypeError(".mirabuf.joint.DOF.axis: object expected"); + message.axis = $root.mirabuf.Vector3.fromObject(object.axis); } switch (object.pivotDirection) { - default: - if (typeof object.pivotDirection === "number") { - message.pivotDirection = object.pivotDirection - break - } - break - case "X": - case 0: - message.pivotDirection = 0 - break - case "Y": - case 1: - message.pivotDirection = 1 - break - case "Z": - case 2: - message.pivotDirection = 2 - break + default: + if (typeof object.pivotDirection === "number") { + message.pivotDirection = object.pivotDirection; + break; + } + break; + case "X": + case 0: + message.pivotDirection = 0; + break; + case "Y": + case 1: + message.pivotDirection = 1; + break; + case "Z": + case 2: + message.pivotDirection = 2; + break; } if (object.dynamics != null) { if (typeof object.dynamics !== "object") - throw TypeError(".mirabuf.joint.DOF.dynamics: object expected") - message.dynamics = $root.mirabuf.joint.Dynamics.fromObject(object.dynamics) + throw TypeError(".mirabuf.joint.DOF.dynamics: object expected"); + message.dynamics = $root.mirabuf.joint.Dynamics.fromObject(object.dynamics); } if (object.limits != null) { - if (typeof object.limits !== "object") throw TypeError(".mirabuf.joint.DOF.limits: object expected") - message.limits = $root.mirabuf.joint.Limits.fromObject(object.limits) + if (typeof object.limits !== "object") + throw TypeError(".mirabuf.joint.DOF.limits: object expected"); + message.limits = $root.mirabuf.joint.Limits.fromObject(object.limits); } - if (object.value != null) message.value = Number(object.value) - return message - } + if (object.value != null) + message.value = Number(object.value); + return message; + }; /** * Creates a plain object from a DOF message. Also converts values to other types if specified. @@ -7929,34 +8174,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ DOF.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.name = "" - object.axis = null - object.pivotDirection = options.enums === String ? "X" : 0 - object.dynamics = null - object.limits = null - object.value = 0 - } - if (message.name != null && message.hasOwnProperty("name")) object.name = message.name + object.name = ""; + object.axis = null; + object.pivotDirection = options.enums === String ? "X" : 0; + object.dynamics = null; + object.limits = null; + object.value = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.axis != null && message.hasOwnProperty("axis")) - object.axis = $root.mirabuf.Vector3.toObject(message.axis, options) + object.axis = $root.mirabuf.Vector3.toObject(message.axis, options); if (message.pivotDirection != null && message.hasOwnProperty("pivotDirection")) - object.pivotDirection = - options.enums === String - ? $root.mirabuf.Axis[message.pivotDirection] === undefined - ? message.pivotDirection - : $root.mirabuf.Axis[message.pivotDirection] - : message.pivotDirection + object.pivotDirection = options.enums === String ? $root.mirabuf.Axis[message.pivotDirection] === undefined ? message.pivotDirection : $root.mirabuf.Axis[message.pivotDirection] : message.pivotDirection; if (message.dynamics != null && message.hasOwnProperty("dynamics")) - object.dynamics = $root.mirabuf.joint.Dynamics.toObject(message.dynamics, options) + object.dynamics = $root.mirabuf.joint.Dynamics.toObject(message.dynamics, options); if (message.limits != null && message.hasOwnProperty("limits")) - object.limits = $root.mirabuf.joint.Limits.toObject(message.limits, options) + object.limits = $root.mirabuf.joint.Limits.toObject(message.limits, options); if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value - return object - } + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; /** * Converts this DOF to JSON. @@ -7966,8 +8208,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ DOF.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for DOF @@ -7979,15 +8221,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ DOF.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.DOF" - } + return typeUrlPrefix + "/mirabuf.joint.DOF"; + }; + + return DOF; + })(); - return DOF - })() + joint.CustomJoint = (function() { - joint.CustomJoint = (function () { /** * Properties of a CustomJoint. * @memberof mirabuf.joint @@ -8005,10 +8248,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.joint.ICustomJoint=} [properties] Properties to set */ function CustomJoint(properties) { - this.dofs = [] + this.dofs = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -8017,7 +8261,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.CustomJoint * @instance */ - CustomJoint.prototype.dofs = $util.emptyArray + CustomJoint.prototype.dofs = $util.emptyArray; /** * Creates a new CustomJoint instance using the specified properties. @@ -8028,8 +8272,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.CustomJoint} CustomJoint instance */ CustomJoint.create = function create(properties) { - return new CustomJoint(properties) - } + return new CustomJoint(properties); + }; /** * Encodes the specified CustomJoint message. Does not implicitly {@link mirabuf.joint.CustomJoint.verify|verify} messages. @@ -8041,15 +8285,13 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ CustomJoint.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.dofs != null && message.dofs.length) for (let i = 0; i < message.dofs.length; ++i) - $root.mirabuf.joint.DOF.encode( - message.dofs[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim() - return writer - } + $root.mirabuf.joint.DOF.encode(message.dofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** * Encodes the specified CustomJoint message, length delimited. Does not implicitly {@link mirabuf.joint.CustomJoint.verify|verify} messages. @@ -8061,8 +8303,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ CustomJoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a CustomJoint message from the specified reader or buffer. @@ -8076,24 +8318,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CustomJoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.CustomJoint() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.CustomJoint(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.dofs && message.dofs.length)) message.dofs = [] - message.dofs.push($root.mirabuf.joint.DOF.decode(reader, reader.uint32())) - break + case 1: { + if (!(message.dofs && message.dofs.length)) + message.dofs = []; + message.dofs.push($root.mirabuf.joint.DOF.decode(reader, reader.uint32())); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a CustomJoint message from the specified reader or buffer, length delimited. @@ -8106,9 +8349,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CustomJoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a CustomJoint message. @@ -8119,16 +8363,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CustomJoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.dofs != null && message.hasOwnProperty("dofs")) { - if (!Array.isArray(message.dofs)) return "dofs: array expected" + if (!Array.isArray(message.dofs)) + return "dofs: array expected"; for (let i = 0; i < message.dofs.length; ++i) { - let error = $root.mirabuf.joint.DOF.verify(message.dofs[i]) - if (error) return "dofs." + error + let error = $root.mirabuf.joint.DOF.verify(message.dofs[i]); + if (error) + return "dofs." + error; } } - return null - } + return null; + }; /** * Creates a CustomJoint message from a plain object. Also converts values to their respective internal types. @@ -8139,19 +8386,21 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.CustomJoint} CustomJoint */ CustomJoint.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.CustomJoint) return object - let message = new $root.mirabuf.joint.CustomJoint() + if (object instanceof $root.mirabuf.joint.CustomJoint) + return object; + let message = new $root.mirabuf.joint.CustomJoint(); if (object.dofs) { - if (!Array.isArray(object.dofs)) throw TypeError(".mirabuf.joint.CustomJoint.dofs: array expected") - message.dofs = [] + if (!Array.isArray(object.dofs)) + throw TypeError(".mirabuf.joint.CustomJoint.dofs: array expected"); + message.dofs = []; for (let i = 0; i < object.dofs.length; ++i) { if (typeof object.dofs[i] !== "object") - throw TypeError(".mirabuf.joint.CustomJoint.dofs: object expected") - message.dofs[i] = $root.mirabuf.joint.DOF.fromObject(object.dofs[i]) + throw TypeError(".mirabuf.joint.CustomJoint.dofs: object expected"); + message.dofs[i] = $root.mirabuf.joint.DOF.fromObject(object.dofs[i]); } } - return message - } + return message; + }; /** * Creates a plain object from a CustomJoint message. Also converts values to other types if specified. @@ -8163,16 +8412,18 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ CustomJoint.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.dofs = [] + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.dofs = []; if (message.dofs && message.dofs.length) { - object.dofs = [] + object.dofs = []; for (let j = 0; j < message.dofs.length; ++j) - object.dofs[j] = $root.mirabuf.joint.DOF.toObject(message.dofs[j], options) + object.dofs[j] = $root.mirabuf.joint.DOF.toObject(message.dofs[j], options); } - return object - } + return object; + }; /** * Converts this CustomJoint to JSON. @@ -8182,8 +8433,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ CustomJoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for CustomJoint @@ -8195,15 +8446,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ CustomJoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.CustomJoint" - } + return typeUrlPrefix + "/mirabuf.joint.CustomJoint"; + }; + + return CustomJoint; + })(); - return CustomJoint - })() + joint.RotationalJoint = (function() { - joint.RotationalJoint = (function () { /** * Properties of a RotationalJoint. * @memberof mirabuf.joint @@ -8223,7 +8475,8 @@ export const mirabuf = ($root.mirabuf = (() => { function RotationalJoint(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -8232,7 +8485,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.RotationalJoint * @instance */ - RotationalJoint.prototype.rotationalFreedom = null + RotationalJoint.prototype.rotationalFreedom = null; /** * Creates a new RotationalJoint instance using the specified properties. @@ -8243,8 +8496,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.RotationalJoint} RotationalJoint instance */ RotationalJoint.create = function create(properties) { - return new RotationalJoint(properties) - } + return new RotationalJoint(properties); + }; /** * Encodes the specified RotationalJoint message. Does not implicitly {@link mirabuf.joint.RotationalJoint.verify|verify} messages. @@ -8256,14 +8509,12 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ RotationalJoint.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.rotationalFreedom != null && Object.hasOwnProperty.call(message, "rotationalFreedom")) - $root.mirabuf.joint.DOF.encode( - message.rotationalFreedom, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim() - return writer - } + $root.mirabuf.joint.DOF.encode(message.rotationalFreedom, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** * Encodes the specified RotationalJoint message, length delimited. Does not implicitly {@link mirabuf.joint.RotationalJoint.verify|verify} messages. @@ -8275,8 +8526,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ RotationalJoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a RotationalJoint message from the specified reader or buffer. @@ -8290,23 +8541,23 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RotationalJoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.RotationalJoint() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.RotationalJoint(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.rotationalFreedom = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()) - break + case 1: { + message.rotationalFreedom = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a RotationalJoint message from the specified reader or buffer, length delimited. @@ -8319,9 +8570,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RotationalJoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a RotationalJoint message. @@ -8332,13 +8584,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RotationalJoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.rotationalFreedom != null && message.hasOwnProperty("rotationalFreedom")) { - let error = $root.mirabuf.joint.DOF.verify(message.rotationalFreedom) - if (error) return "rotationalFreedom." + error + let error = $root.mirabuf.joint.DOF.verify(message.rotationalFreedom); + if (error) + return "rotationalFreedom." + error; } - return null - } + return null; + }; /** * Creates a RotationalJoint message from a plain object. Also converts values to their respective internal types. @@ -8349,15 +8603,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.RotationalJoint} RotationalJoint */ RotationalJoint.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.RotationalJoint) return object - let message = new $root.mirabuf.joint.RotationalJoint() + if (object instanceof $root.mirabuf.joint.RotationalJoint) + return object; + let message = new $root.mirabuf.joint.RotationalJoint(); if (object.rotationalFreedom != null) { if (typeof object.rotationalFreedom !== "object") - throw TypeError(".mirabuf.joint.RotationalJoint.rotationalFreedom: object expected") - message.rotationalFreedom = $root.mirabuf.joint.DOF.fromObject(object.rotationalFreedom) + throw TypeError(".mirabuf.joint.RotationalJoint.rotationalFreedom: object expected"); + message.rotationalFreedom = $root.mirabuf.joint.DOF.fromObject(object.rotationalFreedom); } - return message - } + return message; + }; /** * Creates a plain object from a RotationalJoint message. Also converts values to other types if specified. @@ -8369,13 +8624,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ RotationalJoint.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.defaults) object.rotationalFreedom = null + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.rotationalFreedom = null; if (message.rotationalFreedom != null && message.hasOwnProperty("rotationalFreedom")) - object.rotationalFreedom = $root.mirabuf.joint.DOF.toObject(message.rotationalFreedom, options) - return object - } + object.rotationalFreedom = $root.mirabuf.joint.DOF.toObject(message.rotationalFreedom, options); + return object; + }; /** * Converts this RotationalJoint to JSON. @@ -8385,8 +8642,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ RotationalJoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for RotationalJoint @@ -8398,15 +8655,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ RotationalJoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.RotationalJoint" - } + return typeUrlPrefix + "/mirabuf.joint.RotationalJoint"; + }; + + return RotationalJoint; + })(); - return RotationalJoint - })() + joint.BallJoint = (function() { - joint.BallJoint = (function () { /** * Properties of a BallJoint. * @memberof mirabuf.joint @@ -8427,7 +8685,8 @@ export const mirabuf = ($root.mirabuf = (() => { function BallJoint(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -8436,7 +8695,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.BallJoint * @instance */ - BallJoint.prototype.yaw = null + BallJoint.prototype.yaw = null; /** * BallJoint pitch. @@ -8444,7 +8703,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.BallJoint * @instance */ - BallJoint.prototype.pitch = null + BallJoint.prototype.pitch = null; /** * BallJoint rotation. @@ -8452,7 +8711,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.BallJoint * @instance */ - BallJoint.prototype.rotation = null + BallJoint.prototype.rotation = null; /** * Creates a new BallJoint instance using the specified properties. @@ -8463,8 +8722,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.BallJoint} BallJoint instance */ BallJoint.create = function create(properties) { - return new BallJoint(properties) - } + return new BallJoint(properties); + }; /** * Encodes the specified BallJoint message. Does not implicitly {@link mirabuf.joint.BallJoint.verify|verify} messages. @@ -8476,24 +8735,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ BallJoint.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.yaw != null && Object.hasOwnProperty.call(message, "yaw")) - $root.mirabuf.joint.DOF.encode( - message.yaw, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim() + $root.mirabuf.joint.DOF.encode(message.yaw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.pitch != null && Object.hasOwnProperty.call(message, "pitch")) - $root.mirabuf.joint.DOF.encode( - message.pitch, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.joint.DOF.encode(message.pitch, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.rotation != null && Object.hasOwnProperty.call(message, "rotation")) - $root.mirabuf.joint.DOF.encode( - message.rotation, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() - return writer - } + $root.mirabuf.joint.DOF.encode(message.rotation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** * Encodes the specified BallJoint message, length delimited. Does not implicitly {@link mirabuf.joint.BallJoint.verify|verify} messages. @@ -8505,8 +8756,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ BallJoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a BallJoint message from the specified reader or buffer. @@ -8520,31 +8771,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BallJoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.BallJoint() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.BallJoint(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.yaw = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()) - break + case 1: { + message.yaw = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()); + break; } - case 2: { - message.pitch = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()) - break + case 2: { + message.pitch = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()); + break; } - case 3: { - message.rotation = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()) - break + case 3: { + message.rotation = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a BallJoint message from the specified reader or buffer, length delimited. @@ -8557,9 +8808,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BallJoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a BallJoint message. @@ -8570,21 +8822,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BallJoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.yaw != null && message.hasOwnProperty("yaw")) { - let error = $root.mirabuf.joint.DOF.verify(message.yaw) - if (error) return "yaw." + error + let error = $root.mirabuf.joint.DOF.verify(message.yaw); + if (error) + return "yaw." + error; } if (message.pitch != null && message.hasOwnProperty("pitch")) { - let error = $root.mirabuf.joint.DOF.verify(message.pitch) - if (error) return "pitch." + error + let error = $root.mirabuf.joint.DOF.verify(message.pitch); + if (error) + return "pitch." + error; } if (message.rotation != null && message.hasOwnProperty("rotation")) { - let error = $root.mirabuf.joint.DOF.verify(message.rotation) - if (error) return "rotation." + error + let error = $root.mirabuf.joint.DOF.verify(message.rotation); + if (error) + return "rotation." + error; } - return null - } + return null; + }; /** * Creates a BallJoint message from a plain object. Also converts values to their respective internal types. @@ -8595,24 +8851,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.BallJoint} BallJoint */ BallJoint.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.BallJoint) return object - let message = new $root.mirabuf.joint.BallJoint() + if (object instanceof $root.mirabuf.joint.BallJoint) + return object; + let message = new $root.mirabuf.joint.BallJoint(); if (object.yaw != null) { - if (typeof object.yaw !== "object") throw TypeError(".mirabuf.joint.BallJoint.yaw: object expected") - message.yaw = $root.mirabuf.joint.DOF.fromObject(object.yaw) + if (typeof object.yaw !== "object") + throw TypeError(".mirabuf.joint.BallJoint.yaw: object expected"); + message.yaw = $root.mirabuf.joint.DOF.fromObject(object.yaw); } if (object.pitch != null) { if (typeof object.pitch !== "object") - throw TypeError(".mirabuf.joint.BallJoint.pitch: object expected") - message.pitch = $root.mirabuf.joint.DOF.fromObject(object.pitch) + throw TypeError(".mirabuf.joint.BallJoint.pitch: object expected"); + message.pitch = $root.mirabuf.joint.DOF.fromObject(object.pitch); } if (object.rotation != null) { if (typeof object.rotation !== "object") - throw TypeError(".mirabuf.joint.BallJoint.rotation: object expected") - message.rotation = $root.mirabuf.joint.DOF.fromObject(object.rotation) + throw TypeError(".mirabuf.joint.BallJoint.rotation: object expected"); + message.rotation = $root.mirabuf.joint.DOF.fromObject(object.rotation); } - return message - } + return message; + }; /** * Creates a plain object from a BallJoint message. Also converts values to other types if specified. @@ -8624,21 +8882,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ BallJoint.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.yaw = null - object.pitch = null - object.rotation = null + object.yaw = null; + object.pitch = null; + object.rotation = null; } if (message.yaw != null && message.hasOwnProperty("yaw")) - object.yaw = $root.mirabuf.joint.DOF.toObject(message.yaw, options) + object.yaw = $root.mirabuf.joint.DOF.toObject(message.yaw, options); if (message.pitch != null && message.hasOwnProperty("pitch")) - object.pitch = $root.mirabuf.joint.DOF.toObject(message.pitch, options) + object.pitch = $root.mirabuf.joint.DOF.toObject(message.pitch, options); if (message.rotation != null && message.hasOwnProperty("rotation")) - object.rotation = $root.mirabuf.joint.DOF.toObject(message.rotation, options) - return object - } + object.rotation = $root.mirabuf.joint.DOF.toObject(message.rotation, options); + return object; + }; /** * Converts this BallJoint to JSON. @@ -8648,8 +8907,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ BallJoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for BallJoint @@ -8661,15 +8920,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ BallJoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.BallJoint" - } + return typeUrlPrefix + "/mirabuf.joint.BallJoint"; + }; + + return BallJoint; + })(); - return BallJoint - })() + joint.PrismaticJoint = (function() { - joint.PrismaticJoint = (function () { /** * Properties of a PrismaticJoint. * @memberof mirabuf.joint @@ -8688,7 +8948,8 @@ export const mirabuf = ($root.mirabuf = (() => { function PrismaticJoint(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -8697,7 +8958,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.PrismaticJoint * @instance */ - PrismaticJoint.prototype.prismaticFreedom = null + PrismaticJoint.prototype.prismaticFreedom = null; /** * Creates a new PrismaticJoint instance using the specified properties. @@ -8708,8 +8969,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.PrismaticJoint} PrismaticJoint instance */ PrismaticJoint.create = function create(properties) { - return new PrismaticJoint(properties) - } + return new PrismaticJoint(properties); + }; /** * Encodes the specified PrismaticJoint message. Does not implicitly {@link mirabuf.joint.PrismaticJoint.verify|verify} messages. @@ -8721,14 +8982,12 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PrismaticJoint.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.prismaticFreedom != null && Object.hasOwnProperty.call(message, "prismaticFreedom")) - $root.mirabuf.joint.DOF.encode( - message.prismaticFreedom, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim() - return writer - } + $root.mirabuf.joint.DOF.encode(message.prismaticFreedom, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** * Encodes the specified PrismaticJoint message, length delimited. Does not implicitly {@link mirabuf.joint.PrismaticJoint.verify|verify} messages. @@ -8740,8 +8999,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PrismaticJoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a PrismaticJoint message from the specified reader or buffer. @@ -8755,23 +9014,23 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrismaticJoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.PrismaticJoint() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.PrismaticJoint(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.prismaticFreedom = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()) - break + case 1: { + message.prismaticFreedom = $root.mirabuf.joint.DOF.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a PrismaticJoint message from the specified reader or buffer, length delimited. @@ -8784,9 +9043,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PrismaticJoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a PrismaticJoint message. @@ -8797,13 +9057,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PrismaticJoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.prismaticFreedom != null && message.hasOwnProperty("prismaticFreedom")) { - let error = $root.mirabuf.joint.DOF.verify(message.prismaticFreedom) - if (error) return "prismaticFreedom." + error + let error = $root.mirabuf.joint.DOF.verify(message.prismaticFreedom); + if (error) + return "prismaticFreedom." + error; } - return null - } + return null; + }; /** * Creates a PrismaticJoint message from a plain object. Also converts values to their respective internal types. @@ -8814,15 +9076,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.PrismaticJoint} PrismaticJoint */ PrismaticJoint.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.PrismaticJoint) return object - let message = new $root.mirabuf.joint.PrismaticJoint() + if (object instanceof $root.mirabuf.joint.PrismaticJoint) + return object; + let message = new $root.mirabuf.joint.PrismaticJoint(); if (object.prismaticFreedom != null) { if (typeof object.prismaticFreedom !== "object") - throw TypeError(".mirabuf.joint.PrismaticJoint.prismaticFreedom: object expected") - message.prismaticFreedom = $root.mirabuf.joint.DOF.fromObject(object.prismaticFreedom) + throw TypeError(".mirabuf.joint.PrismaticJoint.prismaticFreedom: object expected"); + message.prismaticFreedom = $root.mirabuf.joint.DOF.fromObject(object.prismaticFreedom); } - return message - } + return message; + }; /** * Creates a plain object from a PrismaticJoint message. Also converts values to other types if specified. @@ -8834,13 +9097,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ PrismaticJoint.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.defaults) object.prismaticFreedom = null + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.prismaticFreedom = null; if (message.prismaticFreedom != null && message.hasOwnProperty("prismaticFreedom")) - object.prismaticFreedom = $root.mirabuf.joint.DOF.toObject(message.prismaticFreedom, options) - return object - } + object.prismaticFreedom = $root.mirabuf.joint.DOF.toObject(message.prismaticFreedom, options); + return object; + }; /** * Converts this PrismaticJoint to JSON. @@ -8850,8 +9115,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ PrismaticJoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for PrismaticJoint @@ -8863,15 +9128,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ PrismaticJoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.PrismaticJoint" - } + return typeUrlPrefix + "/mirabuf.joint.PrismaticJoint"; + }; - return PrismaticJoint - })() + return PrismaticJoint; + })(); + + joint.RigidGroup = (function() { - joint.RigidGroup = (function () { /** * Properties of a RigidGroup. * @memberof mirabuf.joint @@ -8889,10 +9155,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.joint.IRigidGroup=} [properties] Properties to set */ function RigidGroup(properties) { - this.occurrences = [] + this.occurrences = []; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -8901,7 +9168,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.RigidGroup * @instance */ - RigidGroup.prototype.name = "" + RigidGroup.prototype.name = ""; /** * RigidGroup occurrences. @@ -8909,7 +9176,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.joint.RigidGroup * @instance */ - RigidGroup.prototype.occurrences = $util.emptyArray + RigidGroup.prototype.occurrences = $util.emptyArray; /** * Creates a new RigidGroup instance using the specified properties. @@ -8920,8 +9187,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.RigidGroup} RigidGroup instance */ RigidGroup.create = function create(properties) { - return new RigidGroup(properties) - } + return new RigidGroup(properties); + }; /** * Encodes the specified RigidGroup message. Does not implicitly {@link mirabuf.joint.RigidGroup.verify|verify} messages. @@ -8933,14 +9200,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ RigidGroup.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.occurrences != null && message.occurrences.length) for (let i = 0; i < message.occurrences.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.occurrences[i]) - return writer - } + writer.uint32(/* id 2, wireType 2 =*/18).string(message.occurrences[i]); + return writer; + }; /** * Encodes the specified RigidGroup message, length delimited. Does not implicitly {@link mirabuf.joint.RigidGroup.verify|verify} messages. @@ -8952,8 +9220,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ RigidGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a RigidGroup message from the specified reader or buffer. @@ -8967,28 +9235,29 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RigidGroup.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.joint.RigidGroup() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.joint.RigidGroup(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string() - break + case 1: { + message.name = reader.string(); + break; } - case 2: { - if (!(message.occurrences && message.occurrences.length)) message.occurrences = [] - message.occurrences.push(reader.string()) - break + case 2: { + if (!(message.occurrences && message.occurrences.length)) + message.occurrences = []; + message.occurrences.push(reader.string()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a RigidGroup message from the specified reader or buffer, length delimited. @@ -9001,9 +9270,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ RigidGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a RigidGroup message. @@ -9014,16 +9284,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ RigidGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) return "name: string expected" + if (!$util.isString(message.name)) + return "name: string expected"; if (message.occurrences != null && message.hasOwnProperty("occurrences")) { - if (!Array.isArray(message.occurrences)) return "occurrences: array expected" + if (!Array.isArray(message.occurrences)) + return "occurrences: array expected"; for (let i = 0; i < message.occurrences.length; ++i) - if (!$util.isString(message.occurrences[i])) return "occurrences: string[] expected" + if (!$util.isString(message.occurrences[i])) + return "occurrences: string[] expected"; } - return null - } + return null; + }; /** * Creates a RigidGroup message from a plain object. Also converts values to their respective internal types. @@ -9034,18 +9308,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.joint.RigidGroup} RigidGroup */ RigidGroup.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.joint.RigidGroup) return object - let message = new $root.mirabuf.joint.RigidGroup() - if (object.name != null) message.name = String(object.name) + if (object instanceof $root.mirabuf.joint.RigidGroup) + return object; + let message = new $root.mirabuf.joint.RigidGroup(); + if (object.name != null) + message.name = String(object.name); if (object.occurrences) { if (!Array.isArray(object.occurrences)) - throw TypeError(".mirabuf.joint.RigidGroup.occurrences: array expected") - message.occurrences = [] + throw TypeError(".mirabuf.joint.RigidGroup.occurrences: array expected"); + message.occurrences = []; for (let i = 0; i < object.occurrences.length; ++i) - message.occurrences[i] = String(object.occurrences[i]) + message.occurrences[i] = String(object.occurrences[i]); } - return message - } + return message; + }; /** * Creates a plain object from a RigidGroup message. Also converts values to other types if specified. @@ -9057,17 +9333,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ RigidGroup.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.arrays || options.defaults) object.occurrences = [] - if (options.defaults) object.name = "" - if (message.name != null && message.hasOwnProperty("name")) object.name = message.name + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.occurrences = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.occurrences && message.occurrences.length) { - object.occurrences = [] - for (let j = 0; j < message.occurrences.length; ++j) object.occurrences[j] = message.occurrences[j] + object.occurrences = []; + for (let j = 0; j < message.occurrences.length; ++j) + object.occurrences[j] = message.occurrences[j]; } - return object - } + return object; + }; /** * Converts this RigidGroup to JSON. @@ -9077,8 +9358,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ RigidGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for RigidGroup @@ -9090,24 +9371,25 @@ export const mirabuf = ($root.mirabuf = (() => { */ RigidGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.joint.RigidGroup" - } + return typeUrlPrefix + "/mirabuf.joint.RigidGroup"; + }; - return RigidGroup - })() + return RigidGroup; + })(); - return joint - })() + return joint; + })(); + + mirabuf.motor = (function() { - mirabuf.motor = (function () { /** * Namespace motor. * @memberof mirabuf * @namespace */ - const motor = {} + const motor = {}; /** * Duty Cycles for electric motors @@ -9121,17 +9403,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} INTERMITTENT_PERIODIC=2 S3 * @property {number} CONTINUOUS_PERIODIC=3 S6 Continuous Operation with Periodic Duty */ - motor.DutyCycles = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "CONTINUOUS_RUNNING")] = 0 - values[(valuesById[1] = "SHORT_TIME")] = 1 - values[(valuesById[2] = "INTERMITTENT_PERIODIC")] = 2 - values[(valuesById[3] = "CONTINUOUS_PERIODIC")] = 3 - return values - })() + motor.DutyCycles = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTINUOUS_RUNNING"] = 0; + values[valuesById[1] = "SHORT_TIME"] = 1; + values[valuesById[2] = "INTERMITTENT_PERIODIC"] = 2; + values[valuesById[3] = "CONTINUOUS_PERIODIC"] = 3; + return values; + })(); + + motor.Motor = (function() { - motor.Motor = (function () { /** * Properties of a Motor. * @memberof mirabuf.motor @@ -9153,7 +9435,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Motor(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -9162,7 +9445,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.Motor * @instance */ - Motor.prototype.info = null + Motor.prototype.info = null; /** * Motor dcMotor. @@ -9170,7 +9453,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.Motor * @instance */ - Motor.prototype.dcMotor = null + Motor.prototype.dcMotor = null; /** * Motor simpleMotor. @@ -9178,10 +9461,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.Motor * @instance */ - Motor.prototype.simpleMotor = null + Motor.prototype.simpleMotor = null; // OneOf field names bound to virtual getters and setters - let $oneOfFields + let $oneOfFields; /** * Motor motorType. @@ -9190,9 +9473,9 @@ export const mirabuf = ($root.mirabuf = (() => { * @instance */ Object.defineProperty(Motor.prototype, "motorType", { - get: $util.oneOfGetter(($oneOfFields = ["dcMotor", "simpleMotor"])), - set: $util.oneOfSetter($oneOfFields), - }) + get: $util.oneOfGetter($oneOfFields = ["dcMotor", "simpleMotor"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Motor instance using the specified properties. @@ -9203,8 +9486,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.Motor} Motor instance */ Motor.create = function create(properties) { - return new Motor(properties) - } + return new Motor(properties); + }; /** * Encodes the specified Motor message. Does not implicitly {@link mirabuf.motor.Motor.verify|verify} messages. @@ -9216,21 +9499,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Motor.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.dcMotor != null && Object.hasOwnProperty.call(message, "dcMotor")) - $root.mirabuf.motor.DCMotor.encode( - message.dcMotor, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.motor.DCMotor.encode(message.dcMotor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.simpleMotor != null && Object.hasOwnProperty.call(message, "simpleMotor")) - $root.mirabuf.motor.SimpleMotor.encode( - message.simpleMotor, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() - return writer - } + $root.mirabuf.motor.SimpleMotor.encode(message.simpleMotor, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** * Encodes the specified Motor message, length delimited. Does not implicitly {@link mirabuf.motor.Motor.verify|verify} messages. @@ -9242,8 +9520,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Motor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Motor message from the specified reader or buffer. @@ -9257,31 +9535,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Motor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.motor.Motor() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.motor.Motor(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.dcMotor = $root.mirabuf.motor.DCMotor.decode(reader, reader.uint32()) - break + case 2: { + message.dcMotor = $root.mirabuf.motor.DCMotor.decode(reader, reader.uint32()); + break; } - case 3: { - message.simpleMotor = $root.mirabuf.motor.SimpleMotor.decode(reader, reader.uint32()) - break + case 3: { + message.simpleMotor = $root.mirabuf.motor.SimpleMotor.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Motor message from the specified reader or buffer, length delimited. @@ -9294,9 +9572,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Motor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Motor message. @@ -9307,29 +9586,34 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Motor.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" - let properties = {} + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.dcMotor != null && message.hasOwnProperty("dcMotor")) { - properties.motorType = 1 + properties.motorType = 1; { - let error = $root.mirabuf.motor.DCMotor.verify(message.dcMotor) - if (error) return "dcMotor." + error + let error = $root.mirabuf.motor.DCMotor.verify(message.dcMotor); + if (error) + return "dcMotor." + error; } } if (message.simpleMotor != null && message.hasOwnProperty("simpleMotor")) { - if (properties.motorType === 1) return "motorType: multiple values" - properties.motorType = 1 + if (properties.motorType === 1) + return "motorType: multiple values"; + properties.motorType = 1; { - let error = $root.mirabuf.motor.SimpleMotor.verify(message.simpleMotor) - if (error) return "simpleMotor." + error + let error = $root.mirabuf.motor.SimpleMotor.verify(message.simpleMotor); + if (error) + return "simpleMotor." + error; } } - return null - } + return null; + }; /** * Creates a Motor message from a plain object. Also converts values to their respective internal types. @@ -9340,24 +9624,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.Motor} Motor */ Motor.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.motor.Motor) return object - let message = new $root.mirabuf.motor.Motor() + if (object instanceof $root.mirabuf.motor.Motor) + return object; + let message = new $root.mirabuf.motor.Motor(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.motor.Motor.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.motor.Motor.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.dcMotor != null) { if (typeof object.dcMotor !== "object") - throw TypeError(".mirabuf.motor.Motor.dcMotor: object expected") - message.dcMotor = $root.mirabuf.motor.DCMotor.fromObject(object.dcMotor) + throw TypeError(".mirabuf.motor.Motor.dcMotor: object expected"); + message.dcMotor = $root.mirabuf.motor.DCMotor.fromObject(object.dcMotor); } if (object.simpleMotor != null) { if (typeof object.simpleMotor !== "object") - throw TypeError(".mirabuf.motor.Motor.simpleMotor: object expected") - message.simpleMotor = $root.mirabuf.motor.SimpleMotor.fromObject(object.simpleMotor) + throw TypeError(".mirabuf.motor.Motor.simpleMotor: object expected"); + message.simpleMotor = $root.mirabuf.motor.SimpleMotor.fromObject(object.simpleMotor); } - return message - } + return message; + }; /** * Creates a plain object from a Motor message. Also converts values to other types if specified. @@ -9369,21 +9655,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Motor.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.defaults) object.info = null + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.info = null; if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.dcMotor != null && message.hasOwnProperty("dcMotor")) { - object.dcMotor = $root.mirabuf.motor.DCMotor.toObject(message.dcMotor, options) - if (options.oneofs) object.motorType = "dcMotor" + object.dcMotor = $root.mirabuf.motor.DCMotor.toObject(message.dcMotor, options); + if (options.oneofs) + object.motorType = "dcMotor"; } if (message.simpleMotor != null && message.hasOwnProperty("simpleMotor")) { - object.simpleMotor = $root.mirabuf.motor.SimpleMotor.toObject(message.simpleMotor, options) - if (options.oneofs) object.motorType = "simpleMotor" + object.simpleMotor = $root.mirabuf.motor.SimpleMotor.toObject(message.simpleMotor, options); + if (options.oneofs) + object.motorType = "simpleMotor"; } - return object - } + return object; + }; /** * Converts this Motor to JSON. @@ -9393,8 +9683,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Motor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Motor @@ -9406,15 +9696,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Motor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.motor.Motor" - } + return typeUrlPrefix + "/mirabuf.motor.Motor"; + }; + + return Motor; + })(); - return Motor - })() + motor.SimpleMotor = (function() { - motor.SimpleMotor = (function () { /** * Properties of a SimpleMotor. * @memberof mirabuf.motor @@ -9438,7 +9729,8 @@ export const mirabuf = ($root.mirabuf = (() => { function SimpleMotor(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -9447,7 +9739,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.SimpleMotor * @instance */ - SimpleMotor.prototype.stallTorque = 0 + SimpleMotor.prototype.stallTorque = 0; /** * The target velocity in RPM, will use stall_torque relationship to reach each step @@ -9455,7 +9747,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.SimpleMotor * @instance */ - SimpleMotor.prototype.maxVelocity = 0 + SimpleMotor.prototype.maxVelocity = 0; /** * (Optional) 0 - 1, the relationship of stall_torque used to perserve the position of this motor @@ -9463,7 +9755,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.SimpleMotor * @instance */ - SimpleMotor.prototype.brakingConstant = 0 + SimpleMotor.prototype.brakingConstant = 0; /** * Creates a new SimpleMotor instance using the specified properties. @@ -9474,8 +9766,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.SimpleMotor} SimpleMotor instance */ SimpleMotor.create = function create(properties) { - return new SimpleMotor(properties) - } + return new SimpleMotor(properties); + }; /** * Encodes the specified SimpleMotor message. Does not implicitly {@link mirabuf.motor.SimpleMotor.verify|verify} messages. @@ -9487,15 +9779,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ SimpleMotor.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.stallTorque != null && Object.hasOwnProperty.call(message, "stallTorque")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.stallTorque) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.stallTorque); if (message.maxVelocity != null && Object.hasOwnProperty.call(message, "maxVelocity")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.maxVelocity) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.maxVelocity); if (message.brakingConstant != null && Object.hasOwnProperty.call(message, "brakingConstant")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.brakingConstant) - return writer - } + writer.uint32(/* id 3, wireType 5 =*/29).float(message.brakingConstant); + return writer; + }; /** * Encodes the specified SimpleMotor message, length delimited. Does not implicitly {@link mirabuf.motor.SimpleMotor.verify|verify} messages. @@ -9507,8 +9800,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ SimpleMotor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a SimpleMotor message from the specified reader or buffer. @@ -9522,31 +9815,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SimpleMotor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.motor.SimpleMotor() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.motor.SimpleMotor(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.stallTorque = reader.float() - break + case 1: { + message.stallTorque = reader.float(); + break; } - case 2: { - message.maxVelocity = reader.float() - break + case 2: { + message.maxVelocity = reader.float(); + break; } - case 3: { - message.brakingConstant = reader.float() - break + case 3: { + message.brakingConstant = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a SimpleMotor message from the specified reader or buffer, length delimited. @@ -9559,9 +9852,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SimpleMotor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a SimpleMotor message. @@ -9572,15 +9866,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SimpleMotor.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.stallTorque != null && message.hasOwnProperty("stallTorque")) - if (typeof message.stallTorque !== "number") return "stallTorque: number expected" + if (typeof message.stallTorque !== "number") + return "stallTorque: number expected"; if (message.maxVelocity != null && message.hasOwnProperty("maxVelocity")) - if (typeof message.maxVelocity !== "number") return "maxVelocity: number expected" + if (typeof message.maxVelocity !== "number") + return "maxVelocity: number expected"; if (message.brakingConstant != null && message.hasOwnProperty("brakingConstant")) - if (typeof message.brakingConstant !== "number") return "brakingConstant: number expected" - return null - } + if (typeof message.brakingConstant !== "number") + return "brakingConstant: number expected"; + return null; + }; /** * Creates a SimpleMotor message from a plain object. Also converts values to their respective internal types. @@ -9591,13 +9889,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.SimpleMotor} SimpleMotor */ SimpleMotor.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.motor.SimpleMotor) return object - let message = new $root.mirabuf.motor.SimpleMotor() - if (object.stallTorque != null) message.stallTorque = Number(object.stallTorque) - if (object.maxVelocity != null) message.maxVelocity = Number(object.maxVelocity) - if (object.brakingConstant != null) message.brakingConstant = Number(object.brakingConstant) - return message - } + if (object instanceof $root.mirabuf.motor.SimpleMotor) + return object; + let message = new $root.mirabuf.motor.SimpleMotor(); + if (object.stallTorque != null) + message.stallTorque = Number(object.stallTorque); + if (object.maxVelocity != null) + message.maxVelocity = Number(object.maxVelocity); + if (object.brakingConstant != null) + message.brakingConstant = Number(object.brakingConstant); + return message; + }; /** * Creates a plain object from a SimpleMotor message. Also converts values to other types if specified. @@ -9609,30 +9911,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ SimpleMotor.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.stallTorque = 0 - object.maxVelocity = 0 - object.brakingConstant = 0 + object.stallTorque = 0; + object.maxVelocity = 0; + object.brakingConstant = 0; } if (message.stallTorque != null && message.hasOwnProperty("stallTorque")) - object.stallTorque = - options.json && !isFinite(message.stallTorque) - ? String(message.stallTorque) - : message.stallTorque + object.stallTorque = options.json && !isFinite(message.stallTorque) ? String(message.stallTorque) : message.stallTorque; if (message.maxVelocity != null && message.hasOwnProperty("maxVelocity")) - object.maxVelocity = - options.json && !isFinite(message.maxVelocity) - ? String(message.maxVelocity) - : message.maxVelocity + object.maxVelocity = options.json && !isFinite(message.maxVelocity) ? String(message.maxVelocity) : message.maxVelocity; if (message.brakingConstant != null && message.hasOwnProperty("brakingConstant")) - object.brakingConstant = - options.json && !isFinite(message.brakingConstant) - ? String(message.brakingConstant) - : message.brakingConstant - return object - } + object.brakingConstant = options.json && !isFinite(message.brakingConstant) ? String(message.brakingConstant) : message.brakingConstant; + return object; + }; /** * Converts this SimpleMotor to JSON. @@ -9642,8 +9936,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ SimpleMotor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for SimpleMotor @@ -9655,15 +9949,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ SimpleMotor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.motor.SimpleMotor" - } + return typeUrlPrefix + "/mirabuf.motor.SimpleMotor"; + }; - return SimpleMotor - })() + return SimpleMotor; + })(); + + motor.DCMotor = (function() { - motor.DCMotor = (function () { /** * Properties of a DCMotor. * @memberof mirabuf.motor @@ -9691,7 +9986,8 @@ export const mirabuf = ($root.mirabuf = (() => { function DCMotor(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -9700,7 +9996,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.referenceUrl = "" + DCMotor.prototype.referenceUrl = ""; /** * m-Nm/Amp @@ -9708,7 +10004,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.torqueConstant = 0 + DCMotor.prototype.torqueConstant = 0; /** * mV/rad/sec @@ -9716,7 +10012,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.emfConstant = 0 + DCMotor.prototype.emfConstant = 0; /** * Resistance of Motor - Optional if other values are known @@ -9724,7 +10020,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.resistance = 0 + DCMotor.prototype.resistance = 0; /** * measure in percentage of 100 - generally around 60 - measured under optimal load @@ -9732,7 +10028,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.maximumEffeciency = 0 + DCMotor.prototype.maximumEffeciency = 0; /** * measured in Watts @@ -9740,7 +10036,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.maximumPower = 0 + DCMotor.prototype.maximumPower = 0; /** * Stated Duty Cycle of motor @@ -9748,7 +10044,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.dutyCycle = 0 + DCMotor.prototype.dutyCycle = 0; /** * Optional data that can give a better relationship to the simulation @@ -9756,7 +10052,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor * @instance */ - DCMotor.prototype.advanced = null + DCMotor.prototype.advanced = null; /** * Creates a new DCMotor instance using the specified properties. @@ -9767,8 +10063,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.DCMotor} DCMotor instance */ DCMotor.create = function create(properties) { - return new DCMotor(properties) - } + return new DCMotor(properties); + }; /** * Encodes the specified DCMotor message. Does not implicitly {@link mirabuf.motor.DCMotor.verify|verify} messages. @@ -9780,28 +10076,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ DCMotor.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.referenceUrl != null && Object.hasOwnProperty.call(message, "referenceUrl")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.referenceUrl) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.referenceUrl); if (message.torqueConstant != null && Object.hasOwnProperty.call(message, "torqueConstant")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.torqueConstant) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.torqueConstant); if (message.emfConstant != null && Object.hasOwnProperty.call(message, "emfConstant")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.emfConstant) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.emfConstant); if (message.resistance != null && Object.hasOwnProperty.call(message, "resistance")) - writer.uint32(/* id 5, wireType 5 =*/ 45).float(message.resistance) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.resistance); if (message.maximumEffeciency != null && Object.hasOwnProperty.call(message, "maximumEffeciency")) - writer.uint32(/* id 6, wireType 0 =*/ 48).uint32(message.maximumEffeciency) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.maximumEffeciency); if (message.maximumPower != null && Object.hasOwnProperty.call(message, "maximumPower")) - writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.maximumPower) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.maximumPower); if (message.dutyCycle != null && Object.hasOwnProperty.call(message, "dutyCycle")) - writer.uint32(/* id 8, wireType 0 =*/ 64).int32(message.dutyCycle) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.dutyCycle); if (message.advanced != null && Object.hasOwnProperty.call(message, "advanced")) - $root.mirabuf.motor.DCMotor.Advanced.encode( - message.advanced, - writer.uint32(/* id 16, wireType 2 =*/ 130).fork() - ).ldelim() - return writer - } + $root.mirabuf.motor.DCMotor.Advanced.encode(message.advanced, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; /** * Encodes the specified DCMotor message, length delimited. Does not implicitly {@link mirabuf.motor.DCMotor.verify|verify} messages. @@ -9813,8 +10107,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ DCMotor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a DCMotor message from the specified reader or buffer. @@ -9828,51 +10122,51 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DCMotor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.motor.DCMotor() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.motor.DCMotor(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.referenceUrl = reader.string() - break + case 2: { + message.referenceUrl = reader.string(); + break; } - case 3: { - message.torqueConstant = reader.float() - break + case 3: { + message.torqueConstant = reader.float(); + break; } - case 4: { - message.emfConstant = reader.float() - break + case 4: { + message.emfConstant = reader.float(); + break; } - case 5: { - message.resistance = reader.float() - break + case 5: { + message.resistance = reader.float(); + break; } - case 6: { - message.maximumEffeciency = reader.uint32() - break + case 6: { + message.maximumEffeciency = reader.uint32(); + break; } - case 7: { - message.maximumPower = reader.uint32() - break + case 7: { + message.maximumPower = reader.uint32(); + break; } - case 8: { - message.dutyCycle = reader.int32() - break + case 8: { + message.dutyCycle = reader.int32(); + break; } - case 16: { - message.advanced = $root.mirabuf.motor.DCMotor.Advanced.decode(reader, reader.uint32()) - break + case 16: { + message.advanced = $root.mirabuf.motor.DCMotor.Advanced.decode(reader, reader.uint32()); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a DCMotor message from the specified reader or buffer, length delimited. @@ -9885,9 +10179,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DCMotor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a DCMotor message. @@ -9898,35 +10193,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DCMotor.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.referenceUrl != null && message.hasOwnProperty("referenceUrl")) - if (!$util.isString(message.referenceUrl)) return "referenceUrl: string expected" + if (!$util.isString(message.referenceUrl)) + return "referenceUrl: string expected"; if (message.torqueConstant != null && message.hasOwnProperty("torqueConstant")) - if (typeof message.torqueConstant !== "number") return "torqueConstant: number expected" + if (typeof message.torqueConstant !== "number") + return "torqueConstant: number expected"; if (message.emfConstant != null && message.hasOwnProperty("emfConstant")) - if (typeof message.emfConstant !== "number") return "emfConstant: number expected" + if (typeof message.emfConstant !== "number") + return "emfConstant: number expected"; if (message.resistance != null && message.hasOwnProperty("resistance")) - if (typeof message.resistance !== "number") return "resistance: number expected" + if (typeof message.resistance !== "number") + return "resistance: number expected"; if (message.maximumEffeciency != null && message.hasOwnProperty("maximumEffeciency")) - if (!$util.isInteger(message.maximumEffeciency)) return "maximumEffeciency: integer expected" + if (!$util.isInteger(message.maximumEffeciency)) + return "maximumEffeciency: integer expected"; if (message.maximumPower != null && message.hasOwnProperty("maximumPower")) - if (!$util.isInteger(message.maximumPower)) return "maximumPower: integer expected" + if (!$util.isInteger(message.maximumPower)) + return "maximumPower: integer expected"; if (message.dutyCycle != null && message.hasOwnProperty("dutyCycle")) switch (message.dutyCycle) { - default: - return "dutyCycle: enum value expected" - case 0: - case 1: - case 2: - case 3: - break + default: + return "dutyCycle: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } if (message.advanced != null && message.hasOwnProperty("advanced")) { - let error = $root.mirabuf.motor.DCMotor.Advanced.verify(message.advanced) - if (error) return "advanced." + error + let error = $root.mirabuf.motor.DCMotor.Advanced.verify(message.advanced); + if (error) + return "advanced." + error; } - return null - } + return null; + }; /** * Creates a DCMotor message from a plain object. Also converts values to their respective internal types. @@ -9937,45 +10240,52 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.DCMotor} DCMotor */ DCMotor.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.motor.DCMotor) return object - let message = new $root.mirabuf.motor.DCMotor() - if (object.referenceUrl != null) message.referenceUrl = String(object.referenceUrl) - if (object.torqueConstant != null) message.torqueConstant = Number(object.torqueConstant) - if (object.emfConstant != null) message.emfConstant = Number(object.emfConstant) - if (object.resistance != null) message.resistance = Number(object.resistance) - if (object.maximumEffeciency != null) message.maximumEffeciency = object.maximumEffeciency >>> 0 - if (object.maximumPower != null) message.maximumPower = object.maximumPower >>> 0 + if (object instanceof $root.mirabuf.motor.DCMotor) + return object; + let message = new $root.mirabuf.motor.DCMotor(); + if (object.referenceUrl != null) + message.referenceUrl = String(object.referenceUrl); + if (object.torqueConstant != null) + message.torqueConstant = Number(object.torqueConstant); + if (object.emfConstant != null) + message.emfConstant = Number(object.emfConstant); + if (object.resistance != null) + message.resistance = Number(object.resistance); + if (object.maximumEffeciency != null) + message.maximumEffeciency = object.maximumEffeciency >>> 0; + if (object.maximumPower != null) + message.maximumPower = object.maximumPower >>> 0; switch (object.dutyCycle) { - default: - if (typeof object.dutyCycle === "number") { - message.dutyCycle = object.dutyCycle - break - } - break - case "CONTINUOUS_RUNNING": - case 0: - message.dutyCycle = 0 - break - case "SHORT_TIME": - case 1: - message.dutyCycle = 1 - break - case "INTERMITTENT_PERIODIC": - case 2: - message.dutyCycle = 2 - break - case "CONTINUOUS_PERIODIC": - case 3: - message.dutyCycle = 3 - break + default: + if (typeof object.dutyCycle === "number") { + message.dutyCycle = object.dutyCycle; + break; + } + break; + case "CONTINUOUS_RUNNING": + case 0: + message.dutyCycle = 0; + break; + case "SHORT_TIME": + case 1: + message.dutyCycle = 1; + break; + case "INTERMITTENT_PERIODIC": + case 2: + message.dutyCycle = 2; + break; + case "CONTINUOUS_PERIODIC": + case 3: + message.dutyCycle = 3; + break; } if (object.advanced != null) { if (typeof object.advanced !== "object") - throw TypeError(".mirabuf.motor.DCMotor.advanced: object expected") - message.advanced = $root.mirabuf.motor.DCMotor.Advanced.fromObject(object.advanced) + throw TypeError(".mirabuf.motor.DCMotor.advanced: object expected"); + message.advanced = $root.mirabuf.motor.DCMotor.Advanced.fromObject(object.advanced); } - return message - } + return message; + }; /** * Creates a plain object from a DCMotor message. Also converts values to other types if specified. @@ -9987,48 +10297,37 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ DCMotor.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.referenceUrl = "" - object.torqueConstant = 0 - object.emfConstant = 0 - object.resistance = 0 - object.maximumEffeciency = 0 - object.maximumPower = 0 - object.dutyCycle = options.enums === String ? "CONTINUOUS_RUNNING" : 0 - object.advanced = null + object.referenceUrl = ""; + object.torqueConstant = 0; + object.emfConstant = 0; + object.resistance = 0; + object.maximumEffeciency = 0; + object.maximumPower = 0; + object.dutyCycle = options.enums === String ? "CONTINUOUS_RUNNING" : 0; + object.advanced = null; } if (message.referenceUrl != null && message.hasOwnProperty("referenceUrl")) - object.referenceUrl = message.referenceUrl + object.referenceUrl = message.referenceUrl; if (message.torqueConstant != null && message.hasOwnProperty("torqueConstant")) - object.torqueConstant = - options.json && !isFinite(message.torqueConstant) - ? String(message.torqueConstant) - : message.torqueConstant + object.torqueConstant = options.json && !isFinite(message.torqueConstant) ? String(message.torqueConstant) : message.torqueConstant; if (message.emfConstant != null && message.hasOwnProperty("emfConstant")) - object.emfConstant = - options.json && !isFinite(message.emfConstant) - ? String(message.emfConstant) - : message.emfConstant + object.emfConstant = options.json && !isFinite(message.emfConstant) ? String(message.emfConstant) : message.emfConstant; if (message.resistance != null && message.hasOwnProperty("resistance")) - object.resistance = - options.json && !isFinite(message.resistance) ? String(message.resistance) : message.resistance + object.resistance = options.json && !isFinite(message.resistance) ? String(message.resistance) : message.resistance; if (message.maximumEffeciency != null && message.hasOwnProperty("maximumEffeciency")) - object.maximumEffeciency = message.maximumEffeciency + object.maximumEffeciency = message.maximumEffeciency; if (message.maximumPower != null && message.hasOwnProperty("maximumPower")) - object.maximumPower = message.maximumPower + object.maximumPower = message.maximumPower; if (message.dutyCycle != null && message.hasOwnProperty("dutyCycle")) - object.dutyCycle = - options.enums === String - ? $root.mirabuf.motor.DutyCycles[message.dutyCycle] === undefined - ? message.dutyCycle - : $root.mirabuf.motor.DutyCycles[message.dutyCycle] - : message.dutyCycle + object.dutyCycle = options.enums === String ? $root.mirabuf.motor.DutyCycles[message.dutyCycle] === undefined ? message.dutyCycle : $root.mirabuf.motor.DutyCycles[message.dutyCycle] : message.dutyCycle; if (message.advanced != null && message.hasOwnProperty("advanced")) - object.advanced = $root.mirabuf.motor.DCMotor.Advanced.toObject(message.advanced, options) - return object - } + object.advanced = $root.mirabuf.motor.DCMotor.Advanced.toObject(message.advanced, options); + return object; + }; /** * Converts this DCMotor to JSON. @@ -10038,8 +10337,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ DCMotor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for DCMotor @@ -10051,12 +10350,13 @@ export const mirabuf = ($root.mirabuf = (() => { */ DCMotor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.motor.DCMotor" - } + return typeUrlPrefix + "/mirabuf.motor.DCMotor"; + }; + + DCMotor.Advanced = (function() { - DCMotor.Advanced = (function () { /** * Properties of an Advanced. * @memberof mirabuf.motor.DCMotor @@ -10080,7 +10380,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Advanced(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -10089,7 +10390,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.freeCurrent = 0 + Advanced.prototype.freeCurrent = 0; /** * measured in RPM @@ -10097,7 +10398,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.freeSpeed = 0 + Advanced.prototype.freeSpeed = 0; /** * measure in AMPs @@ -10105,7 +10406,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.stallCurrent = 0 + Advanced.prototype.stallCurrent = 0; /** * measured in Nm @@ -10113,7 +10414,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.stallTorque = 0 + Advanced.prototype.stallTorque = 0; /** * measured in Volts DC @@ -10121,7 +10422,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.inputVoltage = 0 + Advanced.prototype.inputVoltage = 0; /** * between (K * (N / 4)) and (K * ((N-2) / 4)) where N is number of poles - leave at 0 if unknown @@ -10129,7 +10430,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.motor.DCMotor.Advanced * @instance */ - Advanced.prototype.resistanceVariation = 0 + Advanced.prototype.resistanceVariation = 0; /** * Creates a new Advanced instance using the specified properties. @@ -10140,8 +10441,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.DCMotor.Advanced} Advanced instance */ Advanced.create = function create(properties) { - return new Advanced(properties) - } + return new Advanced(properties); + }; /** * Encodes the specified Advanced message. Does not implicitly {@link mirabuf.motor.DCMotor.Advanced.verify|verify} messages. @@ -10153,24 +10454,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Advanced.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.freeCurrent != null && Object.hasOwnProperty.call(message, "freeCurrent")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.freeCurrent) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.freeCurrent); if (message.freeSpeed != null && Object.hasOwnProperty.call(message, "freeSpeed")) - writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.freeSpeed) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.freeSpeed); if (message.stallCurrent != null && Object.hasOwnProperty.call(message, "stallCurrent")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.stallCurrent) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.stallCurrent); if (message.stallTorque != null && Object.hasOwnProperty.call(message, "stallTorque")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.stallTorque) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.stallTorque); if (message.inputVoltage != null && Object.hasOwnProperty.call(message, "inputVoltage")) - writer.uint32(/* id 5, wireType 0 =*/ 40).uint32(message.inputVoltage) - if ( - message.resistanceVariation != null && - Object.hasOwnProperty.call(message, "resistanceVariation") - ) - writer.uint32(/* id 7, wireType 5 =*/ 61).float(message.resistanceVariation) - return writer - } + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.inputVoltage); + if (message.resistanceVariation != null && Object.hasOwnProperty.call(message, "resistanceVariation")) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.resistanceVariation); + return writer; + }; /** * Encodes the specified Advanced message, length delimited. Does not implicitly {@link mirabuf.motor.DCMotor.Advanced.verify|verify} messages. @@ -10182,8 +10481,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Advanced.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes an Advanced message from the specified reader or buffer. @@ -10197,43 +10496,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Advanced.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.motor.DCMotor.Advanced() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.motor.DCMotor.Advanced(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.freeCurrent = reader.float() - break + case 1: { + message.freeCurrent = reader.float(); + break; } - case 2: { - message.freeSpeed = reader.uint32() - break + case 2: { + message.freeSpeed = reader.uint32(); + break; } - case 3: { - message.stallCurrent = reader.float() - break + case 3: { + message.stallCurrent = reader.float(); + break; } - case 4: { - message.stallTorque = reader.float() - break + case 4: { + message.stallTorque = reader.float(); + break; } - case 5: { - message.inputVoltage = reader.uint32() - break + case 5: { + message.inputVoltage = reader.uint32(); + break; } - case 7: { - message.resistanceVariation = reader.float() - break + case 7: { + message.resistanceVariation = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes an Advanced message from the specified reader or buffer, length delimited. @@ -10246,9 +10545,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Advanced.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies an Advanced message. @@ -10259,22 +10559,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Advanced.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.freeCurrent != null && message.hasOwnProperty("freeCurrent")) - if (typeof message.freeCurrent !== "number") return "freeCurrent: number expected" + if (typeof message.freeCurrent !== "number") + return "freeCurrent: number expected"; if (message.freeSpeed != null && message.hasOwnProperty("freeSpeed")) - if (!$util.isInteger(message.freeSpeed)) return "freeSpeed: integer expected" + if (!$util.isInteger(message.freeSpeed)) + return "freeSpeed: integer expected"; if (message.stallCurrent != null && message.hasOwnProperty("stallCurrent")) - if (typeof message.stallCurrent !== "number") return "stallCurrent: number expected" + if (typeof message.stallCurrent !== "number") + return "stallCurrent: number expected"; if (message.stallTorque != null && message.hasOwnProperty("stallTorque")) - if (typeof message.stallTorque !== "number") return "stallTorque: number expected" + if (typeof message.stallTorque !== "number") + return "stallTorque: number expected"; if (message.inputVoltage != null && message.hasOwnProperty("inputVoltage")) - if (!$util.isInteger(message.inputVoltage)) return "inputVoltage: integer expected" + if (!$util.isInteger(message.inputVoltage)) + return "inputVoltage: integer expected"; if (message.resistanceVariation != null && message.hasOwnProperty("resistanceVariation")) if (typeof message.resistanceVariation !== "number") - return "resistanceVariation: number expected" - return null - } + return "resistanceVariation: number expected"; + return null; + }; /** * Creates an Advanced message from a plain object. Also converts values to their respective internal types. @@ -10285,17 +10591,23 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.motor.DCMotor.Advanced} Advanced */ Advanced.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.motor.DCMotor.Advanced) return object - let message = new $root.mirabuf.motor.DCMotor.Advanced() - if (object.freeCurrent != null) message.freeCurrent = Number(object.freeCurrent) - if (object.freeSpeed != null) message.freeSpeed = object.freeSpeed >>> 0 - if (object.stallCurrent != null) message.stallCurrent = Number(object.stallCurrent) - if (object.stallTorque != null) message.stallTorque = Number(object.stallTorque) - if (object.inputVoltage != null) message.inputVoltage = object.inputVoltage >>> 0 + if (object instanceof $root.mirabuf.motor.DCMotor.Advanced) + return object; + let message = new $root.mirabuf.motor.DCMotor.Advanced(); + if (object.freeCurrent != null) + message.freeCurrent = Number(object.freeCurrent); + if (object.freeSpeed != null) + message.freeSpeed = object.freeSpeed >>> 0; + if (object.stallCurrent != null) + message.stallCurrent = Number(object.stallCurrent); + if (object.stallTorque != null) + message.stallTorque = Number(object.stallTorque); + if (object.inputVoltage != null) + message.inputVoltage = object.inputVoltage >>> 0; if (object.resistanceVariation != null) - message.resistanceVariation = Number(object.resistanceVariation) - return message - } + message.resistanceVariation = Number(object.resistanceVariation); + return message; + }; /** * Creates a plain object from an Advanced message. Also converts values to other types if specified. @@ -10307,42 +10619,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Advanced.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.freeCurrent = 0 - object.freeSpeed = 0 - object.stallCurrent = 0 - object.stallTorque = 0 - object.inputVoltage = 0 - object.resistanceVariation = 0 + object.freeCurrent = 0; + object.freeSpeed = 0; + object.stallCurrent = 0; + object.stallTorque = 0; + object.inputVoltage = 0; + object.resistanceVariation = 0; } if (message.freeCurrent != null && message.hasOwnProperty("freeCurrent")) - object.freeCurrent = - options.json && !isFinite(message.freeCurrent) - ? String(message.freeCurrent) - : message.freeCurrent + object.freeCurrent = options.json && !isFinite(message.freeCurrent) ? String(message.freeCurrent) : message.freeCurrent; if (message.freeSpeed != null && message.hasOwnProperty("freeSpeed")) - object.freeSpeed = message.freeSpeed + object.freeSpeed = message.freeSpeed; if (message.stallCurrent != null && message.hasOwnProperty("stallCurrent")) - object.stallCurrent = - options.json && !isFinite(message.stallCurrent) - ? String(message.stallCurrent) - : message.stallCurrent + object.stallCurrent = options.json && !isFinite(message.stallCurrent) ? String(message.stallCurrent) : message.stallCurrent; if (message.stallTorque != null && message.hasOwnProperty("stallTorque")) - object.stallTorque = - options.json && !isFinite(message.stallTorque) - ? String(message.stallTorque) - : message.stallTorque + object.stallTorque = options.json && !isFinite(message.stallTorque) ? String(message.stallTorque) : message.stallTorque; if (message.inputVoltage != null && message.hasOwnProperty("inputVoltage")) - object.inputVoltage = message.inputVoltage + object.inputVoltage = message.inputVoltage; if (message.resistanceVariation != null && message.hasOwnProperty("resistanceVariation")) - object.resistanceVariation = - options.json && !isFinite(message.resistanceVariation) - ? String(message.resistanceVariation) - : message.resistanceVariation - return object - } + object.resistanceVariation = options.json && !isFinite(message.resistanceVariation) ? String(message.resistanceVariation) : message.resistanceVariation; + return object; + }; /** * Converts this Advanced to JSON. @@ -10352,8 +10653,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Advanced.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Advanced @@ -10365,29 +10666,31 @@ export const mirabuf = ($root.mirabuf = (() => { */ Advanced.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.motor.DCMotor.Advanced" - } + return typeUrlPrefix + "/mirabuf.motor.DCMotor.Advanced"; + }; - return Advanced - })() + return Advanced; + })(); - return DCMotor - })() + return DCMotor; + })(); - return motor - })() + return motor; + })(); + + mirabuf.material = (function() { - mirabuf.material = (function () { /** * Namespace material. * @memberof mirabuf * @namespace */ - const material = {} + const material = {}; + + material.Materials = (function() { - material.Materials = (function () { /** * Properties of a Materials. * @memberof mirabuf.material @@ -10401,18 +10704,19 @@ export const mirabuf = ($root.mirabuf = (() => { * Constructs a new Materials. * @memberof mirabuf.material * @classdesc Represents a File or Set of Materials with Appearances and Physical Data - * + * * Can be Stored in AssemblyData * @implements IMaterials * @constructor * @param {mirabuf.material.IMaterials=} [properties] Properties to set */ function Materials(properties) { - this.physicalMaterials = {} - this.appearances = {} + this.physicalMaterials = {}; + this.appearances = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -10421,7 +10725,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Materials * @instance */ - Materials.prototype.info = null + Materials.prototype.info = null; /** * Map of Physical Materials @@ -10429,7 +10733,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Materials * @instance */ - Materials.prototype.physicalMaterials = $util.emptyObject + Materials.prototype.physicalMaterials = $util.emptyObject; /** * Map of Appearances that are purely visual @@ -10437,7 +10741,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Materials * @instance */ - Materials.prototype.appearances = $util.emptyObject + Materials.prototype.appearances = $util.emptyObject; /** * Creates a new Materials instance using the specified properties. @@ -10448,8 +10752,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.Materials} Materials instance */ Materials.create = function create(properties) { - return new Materials(properties) - } + return new Materials(properties); + }; /** * Encodes the specified Materials message. Does not implicitly {@link mirabuf.material.Materials.verify|verify} messages. @@ -10461,39 +10765,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Materials.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.physicalMaterials != null && Object.hasOwnProperty.call(message, "physicalMaterials")) for (let keys = Object.keys(message.physicalMaterials), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 2, wireType 2 =*/ 18) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.material.PhysicalMaterial.encode( - message.physicalMaterials[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.material.PhysicalMaterial.encode(message.physicalMaterials[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.appearances != null && Object.hasOwnProperty.call(message, "appearances")) for (let keys = Object.keys(message.appearances), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 3, wireType 2 =*/ 26) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.material.Appearance.encode( - message.appearances[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.material.Appearance.encode(message.appearances[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - return writer - } + return writer; + }; /** * Encodes the specified Materials message, length delimited. Does not implicitly {@link mirabuf.material.Materials.verify|verify} messages. @@ -10505,8 +10792,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Materials.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Materials message from the specified reader or buffer. @@ -10520,69 +10807,69 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Materials.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.Materials(), - key, - value + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.Materials(), key, value; while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - if (message.physicalMaterials === $util.emptyObject) message.physicalMaterials = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 2: { + if (message.physicalMaterials === $util.emptyObject) + message.physicalMaterials = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.material.PhysicalMaterial.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.material.PhysicalMaterial.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.physicalMaterials[key] = value - break + message.physicalMaterials[key] = value; + break; } - case 3: { - if (message.appearances === $util.emptyObject) message.appearances = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 3: { + if (message.appearances === $util.emptyObject) + message.appearances = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.material.Appearance.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.material.Appearance.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.appearances[key] = value - break + message.appearances[key] = value; + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Materials message from the specified reader or buffer, length delimited. @@ -10595,9 +10882,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Materials.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Materials message. @@ -10608,29 +10896,35 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Materials.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.physicalMaterials != null && message.hasOwnProperty("physicalMaterials")) { - if (!$util.isObject(message.physicalMaterials)) return "physicalMaterials: object expected" - let key = Object.keys(message.physicalMaterials) + if (!$util.isObject(message.physicalMaterials)) + return "physicalMaterials: object expected"; + let key = Object.keys(message.physicalMaterials); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.material.PhysicalMaterial.verify(message.physicalMaterials[key[i]]) - if (error) return "physicalMaterials." + error + let error = $root.mirabuf.material.PhysicalMaterial.verify(message.physicalMaterials[key[i]]); + if (error) + return "physicalMaterials." + error; } } if (message.appearances != null && message.hasOwnProperty("appearances")) { - if (!$util.isObject(message.appearances)) return "appearances: object expected" - let key = Object.keys(message.appearances) + if (!$util.isObject(message.appearances)) + return "appearances: object expected"; + let key = Object.keys(message.appearances); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.material.Appearance.verify(message.appearances[key[i]]) - if (error) return "appearances." + error + let error = $root.mirabuf.material.Appearance.verify(message.appearances[key[i]]); + if (error) + return "appearances." + error; } } - return null - } + return null; + }; /** * Creates a Materials message from a plain object. Also converts values to their respective internal types. @@ -10641,39 +10935,36 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.Materials} Materials */ Materials.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.Materials) return object - let message = new $root.mirabuf.material.Materials() + if (object instanceof $root.mirabuf.material.Materials) + return object; + let message = new $root.mirabuf.material.Materials(); if (object.info != null) { if (typeof object.info !== "object") - throw TypeError(".mirabuf.material.Materials.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + throw TypeError(".mirabuf.material.Materials.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.physicalMaterials) { if (typeof object.physicalMaterials !== "object") - throw TypeError(".mirabuf.material.Materials.physicalMaterials: object expected") - message.physicalMaterials = {} + throw TypeError(".mirabuf.material.Materials.physicalMaterials: object expected"); + message.physicalMaterials = {}; for (let keys = Object.keys(object.physicalMaterials), i = 0; i < keys.length; ++i) { if (typeof object.physicalMaterials[keys[i]] !== "object") - throw TypeError(".mirabuf.material.Materials.physicalMaterials: object expected") - message.physicalMaterials[keys[i]] = $root.mirabuf.material.PhysicalMaterial.fromObject( - object.physicalMaterials[keys[i]] - ) + throw TypeError(".mirabuf.material.Materials.physicalMaterials: object expected"); + message.physicalMaterials[keys[i]] = $root.mirabuf.material.PhysicalMaterial.fromObject(object.physicalMaterials[keys[i]]); } } if (object.appearances) { if (typeof object.appearances !== "object") - throw TypeError(".mirabuf.material.Materials.appearances: object expected") - message.appearances = {} + throw TypeError(".mirabuf.material.Materials.appearances: object expected"); + message.appearances = {}; for (let keys = Object.keys(object.appearances), i = 0; i < keys.length; ++i) { if (typeof object.appearances[keys[i]] !== "object") - throw TypeError(".mirabuf.material.Materials.appearances: object expected") - message.appearances[keys[i]] = $root.mirabuf.material.Appearance.fromObject( - object.appearances[keys[i]] - ) + throw TypeError(".mirabuf.material.Materials.appearances: object expected"); + message.appearances[keys[i]] = $root.mirabuf.material.Appearance.fromObject(object.appearances[keys[i]]); } } - return message - } + return message; + }; /** * Creates a plain object from a Materials message. Also converts values to other types if specified. @@ -10685,34 +10976,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Materials.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.objects || options.defaults) { - object.physicalMaterials = {} - object.appearances = {} + object.physicalMaterials = {}; + object.appearances = {}; } - if (options.defaults) object.info = null + if (options.defaults) + object.info = null; if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - let keys2 + object.info = $root.mirabuf.Info.toObject(message.info, options); + let keys2; if (message.physicalMaterials && (keys2 = Object.keys(message.physicalMaterials)).length) { - object.physicalMaterials = {} + object.physicalMaterials = {}; for (let j = 0; j < keys2.length; ++j) - object.physicalMaterials[keys2[j]] = $root.mirabuf.material.PhysicalMaterial.toObject( - message.physicalMaterials[keys2[j]], - options - ) + object.physicalMaterials[keys2[j]] = $root.mirabuf.material.PhysicalMaterial.toObject(message.physicalMaterials[keys2[j]], options); } if (message.appearances && (keys2 = Object.keys(message.appearances)).length) { - object.appearances = {} + object.appearances = {}; for (let j = 0; j < keys2.length; ++j) - object.appearances[keys2[j]] = $root.mirabuf.material.Appearance.toObject( - message.appearances[keys2[j]], - options - ) + object.appearances[keys2[j]] = $root.mirabuf.material.Appearance.toObject(message.appearances[keys2[j]], options); } - return object - } + return object; + }; /** * Converts this Materials to JSON. @@ -10722,8 +11009,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Materials.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Materials @@ -10735,15 +11022,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Materials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.Materials" - } + return typeUrlPrefix + "/mirabuf.material.Materials"; + }; + + return Materials; + })(); - return Materials - })() + material.Appearance = (function() { - material.Appearance = (function () { /** * Properties of an Appearance. * @memberof mirabuf.material @@ -10767,7 +11055,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Appearance(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -10776,7 +11065,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Appearance * @instance */ - Appearance.prototype.info = null + Appearance.prototype.info = null; /** * albedo map RGBA 0-255 @@ -10784,7 +11073,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Appearance * @instance */ - Appearance.prototype.albedo = null + Appearance.prototype.albedo = null; /** * roughness value 0-1 @@ -10792,7 +11081,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Appearance * @instance */ - Appearance.prototype.roughness = 0 + Appearance.prototype.roughness = 0; /** * metallic value 0-1 @@ -10800,7 +11089,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Appearance * @instance */ - Appearance.prototype.metallic = 0 + Appearance.prototype.metallic = 0; /** * specular value 0-1 @@ -10808,7 +11097,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.Appearance * @instance */ - Appearance.prototype.specular = 0 + Appearance.prototype.specular = 0; /** * Creates a new Appearance instance using the specified properties. @@ -10819,8 +11108,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.Appearance} Appearance instance */ Appearance.create = function create(properties) { - return new Appearance(properties) - } + return new Appearance(properties); + }; /** * Encodes the specified Appearance message. Does not implicitly {@link mirabuf.material.Appearance.verify|verify} messages. @@ -10832,22 +11121,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Appearance.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.albedo != null && Object.hasOwnProperty.call(message, "albedo")) - $root.mirabuf.Color.encode( - message.albedo, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim() + $root.mirabuf.Color.encode(message.albedo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.roughness != null && Object.hasOwnProperty.call(message, "roughness")) - writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.roughness) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.roughness); if (message.metallic != null && Object.hasOwnProperty.call(message, "metallic")) - writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.metallic) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.metallic); if (message.specular != null && Object.hasOwnProperty.call(message, "specular")) - writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.specular) - return writer - } + writer.uint32(/* id 5, wireType 1 =*/41).double(message.specular); + return writer; + }; /** * Encodes the specified Appearance message, length delimited. Does not implicitly {@link mirabuf.material.Appearance.verify|verify} messages. @@ -10859,8 +11146,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Appearance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes an Appearance message from the specified reader or buffer. @@ -10874,39 +11161,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Appearance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.Appearance() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.Appearance(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.albedo = $root.mirabuf.Color.decode(reader, reader.uint32()) - break + case 2: { + message.albedo = $root.mirabuf.Color.decode(reader, reader.uint32()); + break; } - case 3: { - message.roughness = reader.double() - break + case 3: { + message.roughness = reader.double(); + break; } - case 4: { - message.metallic = reader.double() - break + case 4: { + message.metallic = reader.double(); + break; } - case 5: { - message.specular = reader.double() - break + case 5: { + message.specular = reader.double(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes an Appearance message from the specified reader or buffer, length delimited. @@ -10919,9 +11206,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Appearance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies an Appearance message. @@ -10932,23 +11220,29 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Appearance.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.albedo != null && message.hasOwnProperty("albedo")) { - let error = $root.mirabuf.Color.verify(message.albedo) - if (error) return "albedo." + error + let error = $root.mirabuf.Color.verify(message.albedo); + if (error) + return "albedo." + error; } if (message.roughness != null && message.hasOwnProperty("roughness")) - if (typeof message.roughness !== "number") return "roughness: number expected" + if (typeof message.roughness !== "number") + return "roughness: number expected"; if (message.metallic != null && message.hasOwnProperty("metallic")) - if (typeof message.metallic !== "number") return "metallic: number expected" + if (typeof message.metallic !== "number") + return "metallic: number expected"; if (message.specular != null && message.hasOwnProperty("specular")) - if (typeof message.specular !== "number") return "specular: number expected" - return null - } + if (typeof message.specular !== "number") + return "specular: number expected"; + return null; + }; /** * Creates an Appearance message from a plain object. Also converts values to their respective internal types. @@ -10959,23 +11253,27 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.Appearance} Appearance */ Appearance.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.Appearance) return object - let message = new $root.mirabuf.material.Appearance() + if (object instanceof $root.mirabuf.material.Appearance) + return object; + let message = new $root.mirabuf.material.Appearance(); if (object.info != null) { if (typeof object.info !== "object") - throw TypeError(".mirabuf.material.Appearance.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + throw TypeError(".mirabuf.material.Appearance.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.albedo != null) { if (typeof object.albedo !== "object") - throw TypeError(".mirabuf.material.Appearance.albedo: object expected") - message.albedo = $root.mirabuf.Color.fromObject(object.albedo) + throw TypeError(".mirabuf.material.Appearance.albedo: object expected"); + message.albedo = $root.mirabuf.Color.fromObject(object.albedo); } - if (object.roughness != null) message.roughness = Number(object.roughness) - if (object.metallic != null) message.metallic = Number(object.metallic) - if (object.specular != null) message.specular = Number(object.specular) - return message - } + if (object.roughness != null) + message.roughness = Number(object.roughness); + if (object.metallic != null) + message.metallic = Number(object.metallic); + if (object.specular != null) + message.specular = Number(object.specular); + return message; + }; /** * Creates a plain object from an Appearance message. Also converts values to other types if specified. @@ -10987,30 +11285,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Appearance.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.albedo = null - object.roughness = 0 - object.metallic = 0 - object.specular = 0 + object.info = null; + object.albedo = null; + object.roughness = 0; + object.metallic = 0; + object.specular = 0; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.albedo != null && message.hasOwnProperty("albedo")) - object.albedo = $root.mirabuf.Color.toObject(message.albedo, options) + object.albedo = $root.mirabuf.Color.toObject(message.albedo, options); if (message.roughness != null && message.hasOwnProperty("roughness")) - object.roughness = - options.json && !isFinite(message.roughness) ? String(message.roughness) : message.roughness + object.roughness = options.json && !isFinite(message.roughness) ? String(message.roughness) : message.roughness; if (message.metallic != null && message.hasOwnProperty("metallic")) - object.metallic = - options.json && !isFinite(message.metallic) ? String(message.metallic) : message.metallic + object.metallic = options.json && !isFinite(message.metallic) ? String(message.metallic) : message.metallic; if (message.specular != null && message.hasOwnProperty("specular")) - object.specular = - options.json && !isFinite(message.specular) ? String(message.specular) : message.specular - return object - } + object.specular = options.json && !isFinite(message.specular) ? String(message.specular) : message.specular; + return object; + }; /** * Converts this Appearance to JSON. @@ -11020,8 +11316,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Appearance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Appearance @@ -11033,15 +11329,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Appearance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.Appearance" - } + return typeUrlPrefix + "/mirabuf.material.Appearance"; + }; - return Appearance - })() + return Appearance; + })(); + + material.PhysicalMaterial = (function() { - material.PhysicalMaterial = (function () { /** * Properties of a PhysicalMaterial. * @memberof mirabuf.material @@ -11069,7 +11366,8 @@ export const mirabuf = ($root.mirabuf = (() => { function PhysicalMaterial(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -11078,7 +11376,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.info = null + PhysicalMaterial.prototype.info = null; /** * short description of physical material @@ -11086,7 +11384,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.description = "" + PhysicalMaterial.prototype.description = ""; /** * Thermal Physical properties of the model OPTIONAL @@ -11094,7 +11392,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.thermal = null + PhysicalMaterial.prototype.thermal = null; /** * Mechanical properties of the model OPTIONAL @@ -11102,7 +11400,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.mechanical = null + PhysicalMaterial.prototype.mechanical = null; /** * Physical Strength properties of the model OPTIONAL @@ -11110,7 +11408,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.strength = null + PhysicalMaterial.prototype.strength = null; /** * Frictional force for dampening - Interpolate (0-1) @@ -11118,7 +11416,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.dynamicFriction = 0 + PhysicalMaterial.prototype.dynamicFriction = 0; /** * Frictional force override at stop - Interpolate (0-1) @@ -11126,7 +11424,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.staticFriction = 0 + PhysicalMaterial.prototype.staticFriction = 0; /** * Restitution of the object - Interpolate (0-1) @@ -11134,7 +11432,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.restitution = 0 + PhysicalMaterial.prototype.restitution = 0; /** * should this object deform when encountering large forces - TODO: This needs a proper message and equation field @@ -11142,7 +11440,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.deformable = false + PhysicalMaterial.prototype.deformable = false; /** * generic type to assign some default params @@ -11150,7 +11448,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial * @instance */ - PhysicalMaterial.prototype.matType = 0 + PhysicalMaterial.prototype.matType = 0; /** * Creates a new PhysicalMaterial instance using the specified properties. @@ -11161,8 +11459,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial} PhysicalMaterial instance */ PhysicalMaterial.create = function create(properties) { - return new PhysicalMaterial(properties) - } + return new PhysicalMaterial(properties); + }; /** * Encodes the specified PhysicalMaterial message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.verify|verify} messages. @@ -11174,38 +11472,30 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PhysicalMaterial.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.description) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); if (message.thermal != null && Object.hasOwnProperty.call(message, "thermal")) - $root.mirabuf.material.PhysicalMaterial.Thermal.encode( - message.thermal, - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim() + $root.mirabuf.material.PhysicalMaterial.Thermal.encode(message.thermal, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.mechanical != null && Object.hasOwnProperty.call(message, "mechanical")) - $root.mirabuf.material.PhysicalMaterial.Mechanical.encode( - message.mechanical, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim() + $root.mirabuf.material.PhysicalMaterial.Mechanical.encode(message.mechanical, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.strength != null && Object.hasOwnProperty.call(message, "strength")) - $root.mirabuf.material.PhysicalMaterial.Strength.encode( - message.strength, - writer.uint32(/* id 5, wireType 2 =*/ 42).fork() - ).ldelim() + $root.mirabuf.material.PhysicalMaterial.Strength.encode(message.strength, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.dynamicFriction != null && Object.hasOwnProperty.call(message, "dynamicFriction")) - writer.uint32(/* id 6, wireType 5 =*/ 53).float(message.dynamicFriction) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.dynamicFriction); if (message.staticFriction != null && Object.hasOwnProperty.call(message, "staticFriction")) - writer.uint32(/* id 7, wireType 5 =*/ 61).float(message.staticFriction) + writer.uint32(/* id 7, wireType 5 =*/61).float(message.staticFriction); if (message.restitution != null && Object.hasOwnProperty.call(message, "restitution")) - writer.uint32(/* id 8, wireType 5 =*/ 69).float(message.restitution) + writer.uint32(/* id 8, wireType 5 =*/69).float(message.restitution); if (message.deformable != null && Object.hasOwnProperty.call(message, "deformable")) - writer.uint32(/* id 9, wireType 0 =*/ 72).bool(message.deformable) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deformable); if (message.matType != null && Object.hasOwnProperty.call(message, "matType")) - writer.uint32(/* id 10, wireType 0 =*/ 80).int32(message.matType) - return writer - } + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.matType); + return writer; + }; /** * Encodes the specified PhysicalMaterial message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.verify|verify} messages. @@ -11217,8 +11507,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ PhysicalMaterial.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a PhysicalMaterial message from the specified reader or buffer. @@ -11232,68 +11522,59 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PhysicalMaterial.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.PhysicalMaterial() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.PhysicalMaterial(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.description = reader.string() - break + case 2: { + message.description = reader.string(); + break; } - case 3: { - message.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.decode( - reader, - reader.uint32() - ) - break + case 3: { + message.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.decode(reader, reader.uint32()); + break; } - case 4: { - message.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.decode( - reader, - reader.uint32() - ) - break + case 4: { + message.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.decode(reader, reader.uint32()); + break; } - case 5: { - message.strength = $root.mirabuf.material.PhysicalMaterial.Strength.decode( - reader, - reader.uint32() - ) - break + case 5: { + message.strength = $root.mirabuf.material.PhysicalMaterial.Strength.decode(reader, reader.uint32()); + break; } - case 6: { - message.dynamicFriction = reader.float() - break + case 6: { + message.dynamicFriction = reader.float(); + break; } - case 7: { - message.staticFriction = reader.float() - break + case 7: { + message.staticFriction = reader.float(); + break; } - case 8: { - message.restitution = reader.float() - break + case 8: { + message.restitution = reader.float(); + break; } - case 9: { - message.deformable = reader.bool() - break + case 9: { + message.deformable = reader.bool(); + break; } - case 10: { - message.matType = reader.int32() - break + case 10: { + message.matType = reader.int32(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a PhysicalMaterial message from the specified reader or buffer, length delimited. @@ -11306,9 +11587,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PhysicalMaterial.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a PhysicalMaterial message. @@ -11319,43 +11601,53 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PhysicalMaterial.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) return "description: string expected" + if (!$util.isString(message.description)) + return "description: string expected"; if (message.thermal != null && message.hasOwnProperty("thermal")) { - let error = $root.mirabuf.material.PhysicalMaterial.Thermal.verify(message.thermal) - if (error) return "thermal." + error + let error = $root.mirabuf.material.PhysicalMaterial.Thermal.verify(message.thermal); + if (error) + return "thermal." + error; } if (message.mechanical != null && message.hasOwnProperty("mechanical")) { - let error = $root.mirabuf.material.PhysicalMaterial.Mechanical.verify(message.mechanical) - if (error) return "mechanical." + error + let error = $root.mirabuf.material.PhysicalMaterial.Mechanical.verify(message.mechanical); + if (error) + return "mechanical." + error; } if (message.strength != null && message.hasOwnProperty("strength")) { - let error = $root.mirabuf.material.PhysicalMaterial.Strength.verify(message.strength) - if (error) return "strength." + error + let error = $root.mirabuf.material.PhysicalMaterial.Strength.verify(message.strength); + if (error) + return "strength." + error; } if (message.dynamicFriction != null && message.hasOwnProperty("dynamicFriction")) - if (typeof message.dynamicFriction !== "number") return "dynamicFriction: number expected" + if (typeof message.dynamicFriction !== "number") + return "dynamicFriction: number expected"; if (message.staticFriction != null && message.hasOwnProperty("staticFriction")) - if (typeof message.staticFriction !== "number") return "staticFriction: number expected" + if (typeof message.staticFriction !== "number") + return "staticFriction: number expected"; if (message.restitution != null && message.hasOwnProperty("restitution")) - if (typeof message.restitution !== "number") return "restitution: number expected" + if (typeof message.restitution !== "number") + return "restitution: number expected"; if (message.deformable != null && message.hasOwnProperty("deformable")) - if (typeof message.deformable !== "boolean") return "deformable: boolean expected" + if (typeof message.deformable !== "boolean") + return "deformable: boolean expected"; if (message.matType != null && message.hasOwnProperty("matType")) switch (message.matType) { - default: - return "matType: enum value expected" - case 0: - case 1: - break + default: + return "matType: enum value expected"; + case 0: + case 1: + break; } - return null - } + return null; + }; /** * Creates a PhysicalMaterial message from a plain object. Also converts values to their respective internal types. @@ -11366,53 +11658,57 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial} PhysicalMaterial */ PhysicalMaterial.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.PhysicalMaterial) return object - let message = new $root.mirabuf.material.PhysicalMaterial() + if (object instanceof $root.mirabuf.material.PhysicalMaterial) + return object; + let message = new $root.mirabuf.material.PhysicalMaterial(); if (object.info != null) { if (typeof object.info !== "object") - throw TypeError(".mirabuf.material.PhysicalMaterial.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + throw TypeError(".mirabuf.material.PhysicalMaterial.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } - if (object.description != null) message.description = String(object.description) + if (object.description != null) + message.description = String(object.description); if (object.thermal != null) { if (typeof object.thermal !== "object") - throw TypeError(".mirabuf.material.PhysicalMaterial.thermal: object expected") - message.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.fromObject(object.thermal) + throw TypeError(".mirabuf.material.PhysicalMaterial.thermal: object expected"); + message.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.fromObject(object.thermal); } if (object.mechanical != null) { if (typeof object.mechanical !== "object") - throw TypeError(".mirabuf.material.PhysicalMaterial.mechanical: object expected") - message.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.fromObject( - object.mechanical - ) + throw TypeError(".mirabuf.material.PhysicalMaterial.mechanical: object expected"); + message.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.fromObject(object.mechanical); } if (object.strength != null) { if (typeof object.strength !== "object") - throw TypeError(".mirabuf.material.PhysicalMaterial.strength: object expected") - message.strength = $root.mirabuf.material.PhysicalMaterial.Strength.fromObject(object.strength) - } - if (object.dynamicFriction != null) message.dynamicFriction = Number(object.dynamicFriction) - if (object.staticFriction != null) message.staticFriction = Number(object.staticFriction) - if (object.restitution != null) message.restitution = Number(object.restitution) - if (object.deformable != null) message.deformable = Boolean(object.deformable) + throw TypeError(".mirabuf.material.PhysicalMaterial.strength: object expected"); + message.strength = $root.mirabuf.material.PhysicalMaterial.Strength.fromObject(object.strength); + } + if (object.dynamicFriction != null) + message.dynamicFriction = Number(object.dynamicFriction); + if (object.staticFriction != null) + message.staticFriction = Number(object.staticFriction); + if (object.restitution != null) + message.restitution = Number(object.restitution); + if (object.deformable != null) + message.deformable = Boolean(object.deformable); switch (object.matType) { - default: - if (typeof object.matType === "number") { - message.matType = object.matType - break - } - break - case "METAL": - case 0: - message.matType = 0 - break - case "PLASTIC": - case 1: - message.matType = 1 - break + default: + if (typeof object.matType === "number") { + message.matType = object.matType; + break; + } + break; + case "METAL": + case 0: + message.matType = 0; + break; + case "PLASTIC": + case 1: + message.matType = 1; + break; } - return message - } + return message; + }; /** * Creates a plain object from a PhysicalMaterial message. Also converts values to other types if specified. @@ -11424,62 +11720,43 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ PhysicalMaterial.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.description = "" - object.thermal = null - object.mechanical = null - object.strength = null - object.dynamicFriction = 0 - object.staticFriction = 0 - object.restitution = 0 - object.deformable = false - object.matType = options.enums === String ? "METAL" : 0 + object.info = null; + object.description = ""; + object.thermal = null; + object.mechanical = null; + object.strength = null; + object.dynamicFriction = 0; + object.staticFriction = 0; + object.restitution = 0; + object.deformable = false; + object.matType = options.enums === String ? "METAL" : 0; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description + object.description = message.description; if (message.thermal != null && message.hasOwnProperty("thermal")) - object.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.toObject(message.thermal, options) + object.thermal = $root.mirabuf.material.PhysicalMaterial.Thermal.toObject(message.thermal, options); if (message.mechanical != null && message.hasOwnProperty("mechanical")) - object.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.toObject( - message.mechanical, - options - ) + object.mechanical = $root.mirabuf.material.PhysicalMaterial.Mechanical.toObject(message.mechanical, options); if (message.strength != null && message.hasOwnProperty("strength")) - object.strength = $root.mirabuf.material.PhysicalMaterial.Strength.toObject( - message.strength, - options - ) + object.strength = $root.mirabuf.material.PhysicalMaterial.Strength.toObject(message.strength, options); if (message.dynamicFriction != null && message.hasOwnProperty("dynamicFriction")) - object.dynamicFriction = - options.json && !isFinite(message.dynamicFriction) - ? String(message.dynamicFriction) - : message.dynamicFriction + object.dynamicFriction = options.json && !isFinite(message.dynamicFriction) ? String(message.dynamicFriction) : message.dynamicFriction; if (message.staticFriction != null && message.hasOwnProperty("staticFriction")) - object.staticFriction = - options.json && !isFinite(message.staticFriction) - ? String(message.staticFriction) - : message.staticFriction + object.staticFriction = options.json && !isFinite(message.staticFriction) ? String(message.staticFriction) : message.staticFriction; if (message.restitution != null && message.hasOwnProperty("restitution")) - object.restitution = - options.json && !isFinite(message.restitution) - ? String(message.restitution) - : message.restitution + object.restitution = options.json && !isFinite(message.restitution) ? String(message.restitution) : message.restitution; if (message.deformable != null && message.hasOwnProperty("deformable")) - object.deformable = message.deformable + object.deformable = message.deformable; if (message.matType != null && message.hasOwnProperty("matType")) - object.matType = - options.enums === String - ? $root.mirabuf.material.PhysicalMaterial.MaterialType[message.matType] === undefined - ? message.matType - : $root.mirabuf.material.PhysicalMaterial.MaterialType[message.matType] - : message.matType - return object - } + object.matType = options.enums === String ? $root.mirabuf.material.PhysicalMaterial.MaterialType[message.matType] === undefined ? message.matType : $root.mirabuf.material.PhysicalMaterial.MaterialType[message.matType] : message.matType; + return object; + }; /** * Converts this PhysicalMaterial to JSON. @@ -11489,8 +11766,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ PhysicalMaterial.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for PhysicalMaterial @@ -11502,10 +11779,10 @@ export const mirabuf = ($root.mirabuf = (() => { */ PhysicalMaterial.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial" - } + return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial"; + }; /** * MaterialType enum. @@ -11514,15 +11791,15 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} METAL=0 METAL value * @property {number} PLASTIC=1 PLASTIC value */ - PhysicalMaterial.MaterialType = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "METAL")] = 0 - values[(valuesById[1] = "PLASTIC")] = 1 - return values - })() + PhysicalMaterial.MaterialType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METAL"] = 0; + values[valuesById[1] = "PLASTIC"] = 1; + return values; + })(); + + PhysicalMaterial.Thermal = (function() { - PhysicalMaterial.Thermal = (function () { /** * Properties of a Thermal. * @memberof mirabuf.material.PhysicalMaterial @@ -11543,7 +11820,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Thermal(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -11552,7 +11830,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Thermal * @instance */ - Thermal.prototype.thermalConductivity = 0 + Thermal.prototype.thermalConductivity = 0; /** * J/(g*C) @@ -11560,7 +11838,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Thermal * @instance */ - Thermal.prototype.specificHeat = 0 + Thermal.prototype.specificHeat = 0; /** * um/(m*C) @@ -11568,7 +11846,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Thermal * @instance */ - Thermal.prototype.thermalExpansionCoefficient = 0 + Thermal.prototype.thermalExpansionCoefficient = 0; /** * Creates a new Thermal instance using the specified properties. @@ -11579,8 +11857,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Thermal} Thermal instance */ Thermal.create = function create(properties) { - return new Thermal(properties) - } + return new Thermal(properties); + }; /** * Encodes the specified Thermal message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Thermal.verify|verify} messages. @@ -11592,21 +11870,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Thermal.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() - if ( - message.thermalConductivity != null && - Object.hasOwnProperty.call(message, "thermalConductivity") - ) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.thermalConductivity) + if (!writer) + writer = $Writer.create(); + if (message.thermalConductivity != null && Object.hasOwnProperty.call(message, "thermalConductivity")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.thermalConductivity); if (message.specificHeat != null && Object.hasOwnProperty.call(message, "specificHeat")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.specificHeat) - if ( - message.thermalExpansionCoefficient != null && - Object.hasOwnProperty.call(message, "thermalExpansionCoefficient") - ) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.thermalExpansionCoefficient) - return writer - } + writer.uint32(/* id 2, wireType 5 =*/21).float(message.specificHeat); + if (message.thermalExpansionCoefficient != null && Object.hasOwnProperty.call(message, "thermalExpansionCoefficient")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.thermalExpansionCoefficient); + return writer; + }; /** * Encodes the specified Thermal message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Thermal.verify|verify} messages. @@ -11618,8 +11891,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Thermal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Thermal message from the specified reader or buffer. @@ -11633,31 +11906,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Thermal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.PhysicalMaterial.Thermal() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.PhysicalMaterial.Thermal(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.thermalConductivity = reader.float() - break + case 1: { + message.thermalConductivity = reader.float(); + break; } - case 2: { - message.specificHeat = reader.float() - break + case 2: { + message.specificHeat = reader.float(); + break; } - case 3: { - message.thermalExpansionCoefficient = reader.float() - break + case 3: { + message.thermalExpansionCoefficient = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Thermal message from the specified reader or buffer, length delimited. @@ -11670,9 +11943,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Thermal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Thermal message. @@ -11683,20 +11957,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Thermal.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.thermalConductivity != null && message.hasOwnProperty("thermalConductivity")) if (typeof message.thermalConductivity !== "number") - return "thermalConductivity: number expected" + return "thermalConductivity: number expected"; if (message.specificHeat != null && message.hasOwnProperty("specificHeat")) - if (typeof message.specificHeat !== "number") return "specificHeat: number expected" - if ( - message.thermalExpansionCoefficient != null && - message.hasOwnProperty("thermalExpansionCoefficient") - ) + if (typeof message.specificHeat !== "number") + return "specificHeat: number expected"; + if (message.thermalExpansionCoefficient != null && message.hasOwnProperty("thermalExpansionCoefficient")) if (typeof message.thermalExpansionCoefficient !== "number") - return "thermalExpansionCoefficient: number expected" - return null - } + return "thermalExpansionCoefficient: number expected"; + return null; + }; /** * Creates a Thermal message from a plain object. Also converts values to their respective internal types. @@ -11707,15 +11980,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Thermal} Thermal */ Thermal.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.PhysicalMaterial.Thermal) return object - let message = new $root.mirabuf.material.PhysicalMaterial.Thermal() + if (object instanceof $root.mirabuf.material.PhysicalMaterial.Thermal) + return object; + let message = new $root.mirabuf.material.PhysicalMaterial.Thermal(); if (object.thermalConductivity != null) - message.thermalConductivity = Number(object.thermalConductivity) - if (object.specificHeat != null) message.specificHeat = Number(object.specificHeat) + message.thermalConductivity = Number(object.thermalConductivity); + if (object.specificHeat != null) + message.specificHeat = Number(object.specificHeat); if (object.thermalExpansionCoefficient != null) - message.thermalExpansionCoefficient = Number(object.thermalExpansionCoefficient) - return message - } + message.thermalExpansionCoefficient = Number(object.thermalExpansionCoefficient); + return message; + }; /** * Creates a plain object from a Thermal message. Also converts values to other types if specified. @@ -11727,33 +12002,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Thermal.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.thermalConductivity = 0 - object.specificHeat = 0 - object.thermalExpansionCoefficient = 0 + object.thermalConductivity = 0; + object.specificHeat = 0; + object.thermalExpansionCoefficient = 0; } if (message.thermalConductivity != null && message.hasOwnProperty("thermalConductivity")) - object.thermalConductivity = - options.json && !isFinite(message.thermalConductivity) - ? String(message.thermalConductivity) - : message.thermalConductivity + object.thermalConductivity = options.json && !isFinite(message.thermalConductivity) ? String(message.thermalConductivity) : message.thermalConductivity; if (message.specificHeat != null && message.hasOwnProperty("specificHeat")) - object.specificHeat = - options.json && !isFinite(message.specificHeat) - ? String(message.specificHeat) - : message.specificHeat - if ( - message.thermalExpansionCoefficient != null && - message.hasOwnProperty("thermalExpansionCoefficient") - ) - object.thermalExpansionCoefficient = - options.json && !isFinite(message.thermalExpansionCoefficient) - ? String(message.thermalExpansionCoefficient) - : message.thermalExpansionCoefficient - return object - } + object.specificHeat = options.json && !isFinite(message.specificHeat) ? String(message.specificHeat) : message.specificHeat; + if (message.thermalExpansionCoefficient != null && message.hasOwnProperty("thermalExpansionCoefficient")) + object.thermalExpansionCoefficient = options.json && !isFinite(message.thermalExpansionCoefficient) ? String(message.thermalExpansionCoefficient) : message.thermalExpansionCoefficient; + return object; + }; /** * Converts this Thermal to JSON. @@ -11763,8 +12027,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Thermal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Thermal @@ -11776,15 +12040,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Thermal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Thermal" - } + return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Thermal"; + }; + + return Thermal; + })(); - return Thermal - })() + PhysicalMaterial.Mechanical = (function() { - PhysicalMaterial.Mechanical = (function () { /** * Properties of a Mechanical. * @memberof mirabuf.material.PhysicalMaterial @@ -11807,7 +12072,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Mechanical(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -11816,7 +12082,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Mechanical * @instance */ - Mechanical.prototype.youngMod = 0 + Mechanical.prototype.youngMod = 0; /** * ? @@ -11824,7 +12090,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Mechanical * @instance */ - Mechanical.prototype.poissonRatio = 0 + Mechanical.prototype.poissonRatio = 0; /** * MPa @@ -11832,7 +12098,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Mechanical * @instance */ - Mechanical.prototype.shearMod = 0 + Mechanical.prototype.shearMod = 0; /** * g/cm^3 @@ -11840,7 +12106,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Mechanical * @instance */ - Mechanical.prototype.density = 0 + Mechanical.prototype.density = 0; /** * ? @@ -11848,7 +12114,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Mechanical * @instance */ - Mechanical.prototype.dampingCoefficient = 0 + Mechanical.prototype.dampingCoefficient = 0; /** * Creates a new Mechanical instance using the specified properties. @@ -11859,8 +12125,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Mechanical} Mechanical instance */ Mechanical.create = function create(properties) { - return new Mechanical(properties) - } + return new Mechanical(properties); + }; /** * Encodes the specified Mechanical message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Mechanical.verify|verify} messages. @@ -11872,19 +12138,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Mechanical.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.youngMod != null && Object.hasOwnProperty.call(message, "youngMod")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.youngMod) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.youngMod); if (message.poissonRatio != null && Object.hasOwnProperty.call(message, "poissonRatio")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.poissonRatio) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.poissonRatio); if (message.shearMod != null && Object.hasOwnProperty.call(message, "shearMod")) - writer.uint32(/* id 3, wireType 5 =*/ 29).float(message.shearMod) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.shearMod); if (message.density != null && Object.hasOwnProperty.call(message, "density")) - writer.uint32(/* id 4, wireType 5 =*/ 37).float(message.density) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.density); if (message.dampingCoefficient != null && Object.hasOwnProperty.call(message, "dampingCoefficient")) - writer.uint32(/* id 5, wireType 5 =*/ 45).float(message.dampingCoefficient) - return writer - } + writer.uint32(/* id 5, wireType 5 =*/45).float(message.dampingCoefficient); + return writer; + }; /** * Encodes the specified Mechanical message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Mechanical.verify|verify} messages. @@ -11896,8 +12163,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Mechanical.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Mechanical message from the specified reader or buffer. @@ -11911,39 +12178,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Mechanical.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.PhysicalMaterial.Mechanical() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.PhysicalMaterial.Mechanical(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.youngMod = reader.float() - break + case 1: { + message.youngMod = reader.float(); + break; } - case 2: { - message.poissonRatio = reader.float() - break + case 2: { + message.poissonRatio = reader.float(); + break; } - case 3: { - message.shearMod = reader.float() - break + case 3: { + message.shearMod = reader.float(); + break; } - case 4: { - message.density = reader.float() - break + case 4: { + message.density = reader.float(); + break; } - case 5: { - message.dampingCoefficient = reader.float() - break + case 5: { + message.dampingCoefficient = reader.float(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Mechanical message from the specified reader or buffer, length delimited. @@ -11956,9 +12223,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Mechanical.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Mechanical message. @@ -11969,19 +12237,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Mechanical.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.youngMod != null && message.hasOwnProperty("youngMod")) - if (typeof message.youngMod !== "number") return "youngMod: number expected" + if (typeof message.youngMod !== "number") + return "youngMod: number expected"; if (message.poissonRatio != null && message.hasOwnProperty("poissonRatio")) - if (typeof message.poissonRatio !== "number") return "poissonRatio: number expected" + if (typeof message.poissonRatio !== "number") + return "poissonRatio: number expected"; if (message.shearMod != null && message.hasOwnProperty("shearMod")) - if (typeof message.shearMod !== "number") return "shearMod: number expected" + if (typeof message.shearMod !== "number") + return "shearMod: number expected"; if (message.density != null && message.hasOwnProperty("density")) - if (typeof message.density !== "number") return "density: number expected" + if (typeof message.density !== "number") + return "density: number expected"; if (message.dampingCoefficient != null && message.hasOwnProperty("dampingCoefficient")) - if (typeof message.dampingCoefficient !== "number") return "dampingCoefficient: number expected" - return null - } + if (typeof message.dampingCoefficient !== "number") + return "dampingCoefficient: number expected"; + return null; + }; /** * Creates a Mechanical message from a plain object. Also converts values to their respective internal types. @@ -11992,16 +12266,21 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Mechanical} Mechanical */ Mechanical.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.PhysicalMaterial.Mechanical) return object - let message = new $root.mirabuf.material.PhysicalMaterial.Mechanical() - if (object.youngMod != null) message.youngMod = Number(object.youngMod) - if (object.poissonRatio != null) message.poissonRatio = Number(object.poissonRatio) - if (object.shearMod != null) message.shearMod = Number(object.shearMod) - if (object.density != null) message.density = Number(object.density) + if (object instanceof $root.mirabuf.material.PhysicalMaterial.Mechanical) + return object; + let message = new $root.mirabuf.material.PhysicalMaterial.Mechanical(); + if (object.youngMod != null) + message.youngMod = Number(object.youngMod); + if (object.poissonRatio != null) + message.poissonRatio = Number(object.poissonRatio); + if (object.shearMod != null) + message.shearMod = Number(object.shearMod); + if (object.density != null) + message.density = Number(object.density); if (object.dampingCoefficient != null) - message.dampingCoefficient = Number(object.dampingCoefficient) - return message - } + message.dampingCoefficient = Number(object.dampingCoefficient); + return message; + }; /** * Creates a plain object from a Mechanical message. Also converts values to other types if specified. @@ -12013,36 +12292,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Mechanical.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.youngMod = 0 - object.poissonRatio = 0 - object.shearMod = 0 - object.density = 0 - object.dampingCoefficient = 0 + object.youngMod = 0; + object.poissonRatio = 0; + object.shearMod = 0; + object.density = 0; + object.dampingCoefficient = 0; } if (message.youngMod != null && message.hasOwnProperty("youngMod")) - object.youngMod = - options.json && !isFinite(message.youngMod) ? String(message.youngMod) : message.youngMod + object.youngMod = options.json && !isFinite(message.youngMod) ? String(message.youngMod) : message.youngMod; if (message.poissonRatio != null && message.hasOwnProperty("poissonRatio")) - object.poissonRatio = - options.json && !isFinite(message.poissonRatio) - ? String(message.poissonRatio) - : message.poissonRatio + object.poissonRatio = options.json && !isFinite(message.poissonRatio) ? String(message.poissonRatio) : message.poissonRatio; if (message.shearMod != null && message.hasOwnProperty("shearMod")) - object.shearMod = - options.json && !isFinite(message.shearMod) ? String(message.shearMod) : message.shearMod + object.shearMod = options.json && !isFinite(message.shearMod) ? String(message.shearMod) : message.shearMod; if (message.density != null && message.hasOwnProperty("density")) - object.density = - options.json && !isFinite(message.density) ? String(message.density) : message.density + object.density = options.json && !isFinite(message.density) ? String(message.density) : message.density; if (message.dampingCoefficient != null && message.hasOwnProperty("dampingCoefficient")) - object.dampingCoefficient = - options.json && !isFinite(message.dampingCoefficient) - ? String(message.dampingCoefficient) - : message.dampingCoefficient - return object - } + object.dampingCoefficient = options.json && !isFinite(message.dampingCoefficient) ? String(message.dampingCoefficient) : message.dampingCoefficient; + return object; + }; /** * Converts this Mechanical to JSON. @@ -12052,8 +12323,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Mechanical.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Mechanical @@ -12065,15 +12336,16 @@ export const mirabuf = ($root.mirabuf = (() => { */ Mechanical.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Mechanical" - } + return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Mechanical"; + }; + + return Mechanical; + })(); - return Mechanical - })() + PhysicalMaterial.Strength = (function() { - PhysicalMaterial.Strength = (function () { /** * Properties of a Strength. * @memberof mirabuf.material.PhysicalMaterial @@ -12094,7 +12366,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Strength(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -12103,7 +12376,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Strength * @instance */ - Strength.prototype.yieldStrength = 0 + Strength.prototype.yieldStrength = 0; /** * MPa @@ -12111,7 +12384,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Strength * @instance */ - Strength.prototype.tensileStrength = 0 + Strength.prototype.tensileStrength = 0; /** * yes / no @@ -12119,7 +12392,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.material.PhysicalMaterial.Strength * @instance */ - Strength.prototype.thermalTreatment = false + Strength.prototype.thermalTreatment = false; /** * Creates a new Strength instance using the specified properties. @@ -12130,8 +12403,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Strength} Strength instance */ Strength.create = function create(properties) { - return new Strength(properties) - } + return new Strength(properties); + }; /** * Encodes the specified Strength message. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Strength.verify|verify} messages. @@ -12143,15 +12416,16 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Strength.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.yieldStrength != null && Object.hasOwnProperty.call(message, "yieldStrength")) - writer.uint32(/* id 1, wireType 5 =*/ 13).float(message.yieldStrength) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.yieldStrength); if (message.tensileStrength != null && Object.hasOwnProperty.call(message, "tensileStrength")) - writer.uint32(/* id 2, wireType 5 =*/ 21).float(message.tensileStrength) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.tensileStrength); if (message.thermalTreatment != null && Object.hasOwnProperty.call(message, "thermalTreatment")) - writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.thermalTreatment) - return writer - } + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.thermalTreatment); + return writer; + }; /** * Encodes the specified Strength message, length delimited. Does not implicitly {@link mirabuf.material.PhysicalMaterial.Strength.verify|verify} messages. @@ -12163,8 +12437,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Strength.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Strength message from the specified reader or buffer. @@ -12178,31 +12452,31 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Strength.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.material.PhysicalMaterial.Strength() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.material.PhysicalMaterial.Strength(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.yieldStrength = reader.float() - break + case 1: { + message.yieldStrength = reader.float(); + break; } - case 2: { - message.tensileStrength = reader.float() - break + case 2: { + message.tensileStrength = reader.float(); + break; } - case 3: { - message.thermalTreatment = reader.bool() - break + case 3: { + message.thermalTreatment = reader.bool(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Strength message from the specified reader or buffer, length delimited. @@ -12215,9 +12489,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Strength.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Strength message. @@ -12228,15 +12503,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Strength.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.yieldStrength != null && message.hasOwnProperty("yieldStrength")) - if (typeof message.yieldStrength !== "number") return "yieldStrength: number expected" + if (typeof message.yieldStrength !== "number") + return "yieldStrength: number expected"; if (message.tensileStrength != null && message.hasOwnProperty("tensileStrength")) - if (typeof message.tensileStrength !== "number") return "tensileStrength: number expected" + if (typeof message.tensileStrength !== "number") + return "tensileStrength: number expected"; if (message.thermalTreatment != null && message.hasOwnProperty("thermalTreatment")) - if (typeof message.thermalTreatment !== "boolean") return "thermalTreatment: boolean expected" - return null - } + if (typeof message.thermalTreatment !== "boolean") + return "thermalTreatment: boolean expected"; + return null; + }; /** * Creates a Strength message from a plain object. Also converts values to their respective internal types. @@ -12247,13 +12526,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.material.PhysicalMaterial.Strength} Strength */ Strength.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.material.PhysicalMaterial.Strength) return object - let message = new $root.mirabuf.material.PhysicalMaterial.Strength() - if (object.yieldStrength != null) message.yieldStrength = Number(object.yieldStrength) - if (object.tensileStrength != null) message.tensileStrength = Number(object.tensileStrength) - if (object.thermalTreatment != null) message.thermalTreatment = Boolean(object.thermalTreatment) - return message - } + if (object instanceof $root.mirabuf.material.PhysicalMaterial.Strength) + return object; + let message = new $root.mirabuf.material.PhysicalMaterial.Strength(); + if (object.yieldStrength != null) + message.yieldStrength = Number(object.yieldStrength); + if (object.tensileStrength != null) + message.tensileStrength = Number(object.tensileStrength); + if (object.thermalTreatment != null) + message.thermalTreatment = Boolean(object.thermalTreatment); + return message; + }; /** * Creates a plain object from a Strength message. Also converts values to other types if specified. @@ -12265,27 +12548,22 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Strength.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.yieldStrength = 0 - object.tensileStrength = 0 - object.thermalTreatment = false + object.yieldStrength = 0; + object.tensileStrength = 0; + object.thermalTreatment = false; } if (message.yieldStrength != null && message.hasOwnProperty("yieldStrength")) - object.yieldStrength = - options.json && !isFinite(message.yieldStrength) - ? String(message.yieldStrength) - : message.yieldStrength + object.yieldStrength = options.json && !isFinite(message.yieldStrength) ? String(message.yieldStrength) : message.yieldStrength; if (message.tensileStrength != null && message.hasOwnProperty("tensileStrength")) - object.tensileStrength = - options.json && !isFinite(message.tensileStrength) - ? String(message.tensileStrength) - : message.tensileStrength + object.tensileStrength = options.json && !isFinite(message.tensileStrength) ? String(message.tensileStrength) : message.tensileStrength; if (message.thermalTreatment != null && message.hasOwnProperty("thermalTreatment")) - object.thermalTreatment = message.thermalTreatment - return object - } + object.thermalTreatment = message.thermalTreatment; + return object; + }; /** * Converts this Strength to JSON. @@ -12295,8 +12573,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Strength.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Strength @@ -12308,29 +12586,31 @@ export const mirabuf = ($root.mirabuf = (() => { */ Strength.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Strength" - } + return typeUrlPrefix + "/mirabuf.material.PhysicalMaterial.Strength"; + }; + + return Strength; + })(); - return Strength - })() + return PhysicalMaterial; + })(); - return PhysicalMaterial - })() + return material; + })(); - return material - })() + mirabuf.signal = (function() { - mirabuf.signal = (function () { /** * Namespace signal. * @memberof mirabuf * @namespace */ - const signal = {} + const signal = {}; + + signal.Signals = (function() { - signal.Signals = (function () { /** * Properties of a Signals. * @memberof mirabuf.signal @@ -12348,10 +12628,11 @@ export const mirabuf = ($root.mirabuf = (() => { * @param {mirabuf.signal.ISignals=} [properties] Properties to set */ function Signals(properties) { - this.signalMap = {} + this.signalMap = {}; if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -12360,7 +12641,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signals * @instance */ - Signals.prototype.info = null + Signals.prototype.info = null; /** * Contains a full collection of symbols @@ -12368,7 +12649,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signals * @instance */ - Signals.prototype.signalMap = $util.emptyObject + Signals.prototype.signalMap = $util.emptyObject; /** * Creates a new Signals instance using the specified properties. @@ -12379,8 +12660,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.signal.Signals} Signals instance */ Signals.create = function create(properties) { - return new Signals(properties) - } + return new Signals(properties); + }; /** * Encodes the specified Signals message. Does not implicitly {@link mirabuf.signal.Signals.verify|verify} messages. @@ -12392,25 +12673,17 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Signals.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.signalMap != null && Object.hasOwnProperty.call(message, "signalMap")) for (let keys = Object.keys(message.signalMap), i = 0; i < keys.length; ++i) { - writer - .uint32(/* id 2, wireType 2 =*/ 18) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - $root.mirabuf.signal.Signal.encode( - message.signalMap[keys[i]], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ) - .ldelim() - .ldelim() + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.mirabuf.signal.Signal.encode(message.signalMap[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - return writer - } + return writer; + }; /** * Encodes the specified Signals message, length delimited. Does not implicitly {@link mirabuf.signal.Signals.verify|verify} messages. @@ -12422,8 +12695,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Signals.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Signals message from the specified reader or buffer. @@ -12437,47 +12710,46 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Signals.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.signal.Signals(), - key, - value + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.signal.Signals(), key, value; while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - if (message.signalMap === $util.emptyObject) message.signalMap = {} - let end2 = reader.uint32() + reader.pos - key = "" - value = null + case 2: { + if (message.signalMap === $util.emptyObject) + message.signalMap = {}; + let end2 = reader.uint32() + reader.pos; + key = ""; + value = null; while (reader.pos < end2) { - let tag2 = reader.uint32() + let tag2 = reader.uint32(); switch (tag2 >>> 3) { - case 1: - key = reader.string() - break - case 2: - value = $root.mirabuf.signal.Signal.decode(reader, reader.uint32()) - break - default: - reader.skipType(tag2 & 7) - break + case 1: + key = reader.string(); + break; + case 2: + value = $root.mirabuf.signal.Signal.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; } } - message.signalMap[key] = value - break + message.signalMap[key] = value; + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Signals message from the specified reader or buffer, length delimited. @@ -12490,9 +12762,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Signals.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Signals message. @@ -12503,21 +12776,25 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Signals.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.signalMap != null && message.hasOwnProperty("signalMap")) { - if (!$util.isObject(message.signalMap)) return "signalMap: object expected" - let key = Object.keys(message.signalMap) + if (!$util.isObject(message.signalMap)) + return "signalMap: object expected"; + let key = Object.keys(message.signalMap); for (let i = 0; i < key.length; ++i) { - let error = $root.mirabuf.signal.Signal.verify(message.signalMap[key[i]]) - if (error) return "signalMap." + error + let error = $root.mirabuf.signal.Signal.verify(message.signalMap[key[i]]); + if (error) + return "signalMap." + error; } } - return null - } + return null; + }; /** * Creates a Signals message from a plain object. Also converts values to their respective internal types. @@ -12528,25 +12805,26 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.signal.Signals} Signals */ Signals.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.signal.Signals) return object - let message = new $root.mirabuf.signal.Signals() + if (object instanceof $root.mirabuf.signal.Signals) + return object; + let message = new $root.mirabuf.signal.Signals(); if (object.info != null) { if (typeof object.info !== "object") - throw TypeError(".mirabuf.signal.Signals.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + throw TypeError(".mirabuf.signal.Signals.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } if (object.signalMap) { if (typeof object.signalMap !== "object") - throw TypeError(".mirabuf.signal.Signals.signalMap: object expected") - message.signalMap = {} + throw TypeError(".mirabuf.signal.Signals.signalMap: object expected"); + message.signalMap = {}; for (let keys = Object.keys(object.signalMap), i = 0; i < keys.length; ++i) { if (typeof object.signalMap[keys[i]] !== "object") - throw TypeError(".mirabuf.signal.Signals.signalMap: object expected") - message.signalMap[keys[i]] = $root.mirabuf.signal.Signal.fromObject(object.signalMap[keys[i]]) + throw TypeError(".mirabuf.signal.Signals.signalMap: object expected"); + message.signalMap[keys[i]] = $root.mirabuf.signal.Signal.fromObject(object.signalMap[keys[i]]); } } - return message - } + return message; + }; /** * Creates a plain object from a Signals message. Also converts values to other types if specified. @@ -12558,23 +12836,23 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Signals.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} - if (options.objects || options.defaults) object.signalMap = {} - if (options.defaults) object.info = null + if (!options) + options = {}; + let object = {}; + if (options.objects || options.defaults) + object.signalMap = {}; + if (options.defaults) + object.info = null; if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) - let keys2 + object.info = $root.mirabuf.Info.toObject(message.info, options); + let keys2; if (message.signalMap && (keys2 = Object.keys(message.signalMap)).length) { - object.signalMap = {} + object.signalMap = {}; for (let j = 0; j < keys2.length; ++j) - object.signalMap[keys2[j]] = $root.mirabuf.signal.Signal.toObject( - message.signalMap[keys2[j]], - options - ) + object.signalMap[keys2[j]] = $root.mirabuf.signal.Signal.toObject(message.signalMap[keys2[j]], options); } - return object - } + return object; + }; /** * Converts this Signals to JSON. @@ -12584,8 +12862,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Signals.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Signals @@ -12597,13 +12875,13 @@ export const mirabuf = ($root.mirabuf = (() => { */ Signals.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.signal.Signals" - } + return typeUrlPrefix + "/mirabuf.signal.Signals"; + }; - return Signals - })() + return Signals; + })(); /** * IOType is a way to specify Input or Output. @@ -12612,13 +12890,12 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} INPUT=0 Input Signal * @property {number} OUTPUT=1 Output Signal */ - signal.IOType = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "INPUT")] = 0 - values[(valuesById[1] = "OUTPUT")] = 1 - return values - })() + signal.IOType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INPUT"] = 0; + values[valuesById[1] = "OUTPUT"] = 1; + return values; + })(); /** * DeviceType needs to be a type of device that has a supported connection @@ -12632,19 +12909,19 @@ export const mirabuf = ($root.mirabuf = (() => { * @property {number} CANBUS=4 CANBUS value * @property {number} CUSTOM=5 CUSTOM value */ - signal.DeviceType = (function () { - const valuesById = {}, - values = Object.create(valuesById) - values[(valuesById[0] = "PWM")] = 0 - values[(valuesById[1] = "Digital")] = 1 - values[(valuesById[2] = "Analog")] = 2 - values[(valuesById[3] = "I2C")] = 3 - values[(valuesById[4] = "CANBUS")] = 4 - values[(valuesById[5] = "CUSTOM")] = 5 - return values - })() + signal.DeviceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PWM"] = 0; + values[valuesById[1] = "Digital"] = 1; + values[valuesById[2] = "Analog"] = 2; + values[valuesById[3] = "I2C"] = 3; + values[valuesById[4] = "CANBUS"] = 4; + values[valuesById[5] = "CUSTOM"] = 5; + return values; + })(); + + signal.Signal = (function() { - signal.Signal = (function () { /** * Properties of a Signal. * @memberof mirabuf.signal @@ -12660,7 +12937,7 @@ export const mirabuf = ($root.mirabuf = (() => { * Constructs a new Signal. * @memberof mirabuf.signal * @classdesc Signal is a way to define a controlling signal. - * + * * TODO: Add Origin * TODO: Decide how this is linked to a exported object * @implements ISignal @@ -12670,7 +12947,8 @@ export const mirabuf = ($root.mirabuf = (() => { function Signal(properties) { if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]] + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -12679,7 +12957,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signal * @instance */ - Signal.prototype.info = null + Signal.prototype.info = null; /** * Is this a Input or Output @@ -12687,7 +12965,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signal * @instance */ - Signal.prototype.io = 0 + Signal.prototype.io = 0; /** * The name of a custom input type that is not listed as a device type @@ -12695,7 +12973,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signal * @instance */ - Signal.prototype.customType = "" + Signal.prototype.customType = ""; /** * ID for a given signal that exists... PWM 2, CANBUS 4 @@ -12703,7 +12981,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signal * @instance */ - Signal.prototype.signalId = 0 + Signal.prototype.signalId = 0; /** * Enum for device type that should always be set @@ -12711,7 +12989,7 @@ export const mirabuf = ($root.mirabuf = (() => { * @memberof mirabuf.signal.Signal * @instance */ - Signal.prototype.deviceType = 0 + Signal.prototype.deviceType = 0; /** * Creates a new Signal instance using the specified properties. @@ -12722,8 +13000,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.signal.Signal} Signal instance */ Signal.create = function create(properties) { - return new Signal(properties) - } + return new Signal(properties); + }; /** * Encodes the specified Signal message. Does not implicitly {@link mirabuf.signal.Signal.verify|verify} messages. @@ -12735,19 +13013,20 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Signal.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create() + if (!writer) + writer = $Writer.create(); if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim() + $root.mirabuf.Info.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.io != null && Object.hasOwnProperty.call(message, "io")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.io) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.io); if (message.customType != null && Object.hasOwnProperty.call(message, "customType")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.customType) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customType); if (message.signalId != null && Object.hasOwnProperty.call(message, "signalId")) - writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.signalId) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.signalId); if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) - writer.uint32(/* id 5, wireType 0 =*/ 40).int32(message.deviceType) - return writer - } + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.deviceType); + return writer; + }; /** * Encodes the specified Signal message, length delimited. Does not implicitly {@link mirabuf.signal.Signal.verify|verify} messages. @@ -12759,8 +13038,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {$protobuf.Writer} Writer */ Signal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim() - } + return this.encode(message, writer).ldelim(); + }; /** * Decodes a Signal message from the specified reader or buffer. @@ -12774,39 +13053,39 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Signal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader) - let end = length === undefined ? reader.len : reader.pos + length, - message = new $root.mirabuf.signal.Signal() + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.mirabuf.signal.Signal(); while (reader.pos < end) { - let tag = reader.uint32() + let tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.info = $root.mirabuf.Info.decode(reader, reader.uint32()) - break + case 1: { + message.info = $root.mirabuf.Info.decode(reader, reader.uint32()); + break; } - case 2: { - message.io = reader.int32() - break + case 2: { + message.io = reader.int32(); + break; } - case 3: { - message.customType = reader.string() - break + case 3: { + message.customType = reader.string(); + break; } - case 4: { - message.signalId = reader.uint32() - break + case 4: { + message.signalId = reader.uint32(); + break; } - case 5: { - message.deviceType = reader.int32() - break + case 5: { + message.deviceType = reader.int32(); + break; } - default: - reader.skipType(tag & 7) - break + default: + reader.skipType(tag & 7); + break; } } - return message - } + return message; + }; /** * Decodes a Signal message from the specified reader or buffer, length delimited. @@ -12819,9 +13098,10 @@ export const mirabuf = ($root.mirabuf = (() => { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Signal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader) - return this.decode(reader, reader.uint32()) - } + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** * Verifies a Signal message. @@ -12832,37 +13112,41 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Signal.verify = function verify(message) { - if (typeof message !== "object" || message === null) return "object expected" + if (typeof message !== "object" || message === null) + return "object expected"; if (message.info != null && message.hasOwnProperty("info")) { - let error = $root.mirabuf.Info.verify(message.info) - if (error) return "info." + error + let error = $root.mirabuf.Info.verify(message.info); + if (error) + return "info." + error; } if (message.io != null && message.hasOwnProperty("io")) switch (message.io) { - default: - return "io: enum value expected" - case 0: - case 1: - break + default: + return "io: enum value expected"; + case 0: + case 1: + break; } if (message.customType != null && message.hasOwnProperty("customType")) - if (!$util.isString(message.customType)) return "customType: string expected" + if (!$util.isString(message.customType)) + return "customType: string expected"; if (message.signalId != null && message.hasOwnProperty("signalId")) - if (!$util.isInteger(message.signalId)) return "signalId: integer expected" + if (!$util.isInteger(message.signalId)) + return "signalId: integer expected"; if (message.deviceType != null && message.hasOwnProperty("deviceType")) switch (message.deviceType) { - default: - return "deviceType: enum value expected" - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break + default: + return "deviceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; } - return null - } + return null; + }; /** * Creates a Signal message from a plain object. Also converts values to their respective internal types. @@ -12873,64 +13157,68 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {mirabuf.signal.Signal} Signal */ Signal.fromObject = function fromObject(object) { - if (object instanceof $root.mirabuf.signal.Signal) return object - let message = new $root.mirabuf.signal.Signal() + if (object instanceof $root.mirabuf.signal.Signal) + return object; + let message = new $root.mirabuf.signal.Signal(); if (object.info != null) { - if (typeof object.info !== "object") throw TypeError(".mirabuf.signal.Signal.info: object expected") - message.info = $root.mirabuf.Info.fromObject(object.info) + if (typeof object.info !== "object") + throw TypeError(".mirabuf.signal.Signal.info: object expected"); + message.info = $root.mirabuf.Info.fromObject(object.info); } switch (object.io) { - default: - if (typeof object.io === "number") { - message.io = object.io - break - } - break - case "INPUT": - case 0: - message.io = 0 - break - case "OUTPUT": - case 1: - message.io = 1 - break - } - if (object.customType != null) message.customType = String(object.customType) - if (object.signalId != null) message.signalId = object.signalId >>> 0 + default: + if (typeof object.io === "number") { + message.io = object.io; + break; + } + break; + case "INPUT": + case 0: + message.io = 0; + break; + case "OUTPUT": + case 1: + message.io = 1; + break; + } + if (object.customType != null) + message.customType = String(object.customType); + if (object.signalId != null) + message.signalId = object.signalId >>> 0; switch (object.deviceType) { - default: - if (typeof object.deviceType === "number") { - message.deviceType = object.deviceType - break - } - break - case "PWM": - case 0: - message.deviceType = 0 - break - case "Digital": - case 1: - message.deviceType = 1 - break - case "Analog": - case 2: - message.deviceType = 2 - break - case "I2C": - case 3: - message.deviceType = 3 - break - case "CANBUS": - case 4: - message.deviceType = 4 - break - case "CUSTOM": - case 5: - message.deviceType = 5 - break - } - return message - } + default: + if (typeof object.deviceType === "number") { + message.deviceType = object.deviceType; + break; + } + break; + case "PWM": + case 0: + message.deviceType = 0; + break; + case "Digital": + case 1: + message.deviceType = 1; + break; + case "Analog": + case 2: + message.deviceType = 2; + break; + case "I2C": + case 3: + message.deviceType = 3; + break; + case "CANBUS": + case 4: + message.deviceType = 4; + break; + case "CUSTOM": + case 5: + message.deviceType = 5; + break; + } + return message; + }; /** * Creates a plain object from a Signal message. Also converts values to other types if specified. @@ -12942,36 +13230,28 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} Plain object */ Signal.toObject = function toObject(message, options) { - if (!options) options = {} - let object = {} + if (!options) + options = {}; + let object = {}; if (options.defaults) { - object.info = null - object.io = options.enums === String ? "INPUT" : 0 - object.customType = "" - object.signalId = 0 - object.deviceType = options.enums === String ? "PWM" : 0 + object.info = null; + object.io = options.enums === String ? "INPUT" : 0; + object.customType = ""; + object.signalId = 0; + object.deviceType = options.enums === String ? "PWM" : 0; } if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.mirabuf.Info.toObject(message.info, options) + object.info = $root.mirabuf.Info.toObject(message.info, options); if (message.io != null && message.hasOwnProperty("io")) - object.io = - options.enums === String - ? $root.mirabuf.signal.IOType[message.io] === undefined - ? message.io - : $root.mirabuf.signal.IOType[message.io] - : message.io + object.io = options.enums === String ? $root.mirabuf.signal.IOType[message.io] === undefined ? message.io : $root.mirabuf.signal.IOType[message.io] : message.io; if (message.customType != null && message.hasOwnProperty("customType")) - object.customType = message.customType - if (message.signalId != null && message.hasOwnProperty("signalId")) object.signalId = message.signalId + object.customType = message.customType; + if (message.signalId != null && message.hasOwnProperty("signalId")) + object.signalId = message.signalId; if (message.deviceType != null && message.hasOwnProperty("deviceType")) - object.deviceType = - options.enums === String - ? $root.mirabuf.signal.DeviceType[message.deviceType] === undefined - ? message.deviceType - : $root.mirabuf.signal.DeviceType[message.deviceType] - : message.deviceType - return object - } + object.deviceType = options.enums === String ? $root.mirabuf.signal.DeviceType[message.deviceType] === undefined ? message.deviceType : $root.mirabuf.signal.DeviceType[message.deviceType] : message.deviceType; + return object; + }; /** * Converts this Signal to JSON. @@ -12981,8 +13261,8 @@ export const mirabuf = ($root.mirabuf = (() => { * @returns {Object.} JSON object */ Signal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions) - } + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** * Gets the default type url for Signal @@ -12994,18 +13274,18 @@ export const mirabuf = ($root.mirabuf = (() => { */ Signal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com" + typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/mirabuf.signal.Signal" - } + return typeUrlPrefix + "/mirabuf.signal.Signal"; + }; - return Signal - })() + return Signal; + })(); - return signal - })() + return signal; + })(); - return mirabuf -})()) + return mirabuf; +})(); -export { $root as default } +export { $root as default }; diff --git a/fission/src/samples/JoltExample.tsx b/fission/src/samples/JoltExample.tsx index 13a3c3a10e..130f4562e2 100644 --- a/fission/src/samples/JoltExample.tsx +++ b/fission/src/samples/JoltExample.tsx @@ -2,112 +2,113 @@ * This example will be used to showcase how Jolt physics works. */ -import * as THREE from "three" -import Stats from "stats.js" -import JOLT from "../util/loading/JoltSyncLoader.ts" -import { OrbitControls } from "three/addons/controls/OrbitControls.js" +import * as THREE from 'three'; +import Stats from 'stats.js'; +import JOLT from '../util/loading/JoltSyncLoader.ts'; +import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; -import { useEffect, useRef } from "react" -import Jolt from "@barclah/jolt-physics" +import { useEffect, useRef } from 'react'; +import Jolt from '@barclah/jolt-physics'; import { mirabuf } from "../proto/mirabuf" -import { LoadMirabufRemote } from "../mirabuf/MirabufLoader.ts" -import { JoltVec3_ThreeVector3, JoltQuat_ThreeQuaternion } from "../util/TypeConversions.ts" -import { COUNT_OBJECT_LAYERS, LAYER_MOVING, LAYER_NOT_MOVING } from "../util/threejs/MeshCreation.ts" -import MirabufInstance from "../mirabuf/MirabufInstance.ts" -import MirabufParser, { ParseErrorSeverity } from "../mirabuf/MirabufParser.ts" +import { LoadMirabufRemote } from '../mirabuf/MirabufLoader.ts'; +import { JoltVec3_ThreeVector3, JoltQuat_ThreeQuaternion } from '../util/TypeConversions.ts'; +import { COUNT_OBJECT_LAYERS, LAYER_MOVING, LAYER_NOT_MOVING } from '../util/threejs/MeshCreation.ts'; +import MirabufInstance from '../mirabuf/MirabufInstance.ts'; +import MirabufParser, { ParseErrorSeverity } from '../mirabuf/MirabufParser.ts'; -const clock = new THREE.Clock() -let time = 0 +const clock = new THREE.Clock(); +let time = 0; -let stats: Stats +let stats: Stats; -let renderer: THREE.WebGLRenderer -let camera: THREE.PerspectiveCamera -let scene: THREE.Scene +let renderer: THREE.WebGLRenderer; +let camera: THREE.PerspectiveCamera; +let scene: THREE.Scene; -let joltInterface: Jolt.JoltInterface +let joltInterface: Jolt.JoltInterface; // let physicsSystem: Jolt.PhysicsSystem; // let bodyInterface: Jolt.BodyInterface; -const dynamicObjects: THREE.Mesh[] = [] +const dynamicObjects: THREE.Mesh[] = []; const MIRA_FILE = "test_mira/Team_2471_(2018)_v7.mira" // const MIRA_FILE = "test_mira/Dozer_v2.mira" -let controls: OrbitControls +let controls: OrbitControls; + // vvv Below are the functions required to initialize everything and draw a basic floor with collisions. vvv function setupCollisionFiltering(settings: Jolt.JoltSettings) { - const objectFilter = new JOLT.ObjectLayerPairFilterTable(COUNT_OBJECT_LAYERS) - objectFilter.EnableCollision(LAYER_NOT_MOVING, LAYER_MOVING) - objectFilter.EnableCollision(LAYER_MOVING, LAYER_MOVING) - - const BP_LAYER_NOT_MOVING = new JOLT.BroadPhaseLayer(LAYER_NOT_MOVING) - const BP_LAYER_MOVING = new JOLT.BroadPhaseLayer(LAYER_MOVING) - const COUNT_BROAD_PHASE_LAYERS = 2 - - const bpInterface = new JOLT.BroadPhaseLayerInterfaceTable(COUNT_OBJECT_LAYERS, COUNT_BROAD_PHASE_LAYERS) - bpInterface.MapObjectToBroadPhaseLayer(LAYER_NOT_MOVING, BP_LAYER_NOT_MOVING) - bpInterface.MapObjectToBroadPhaseLayer(LAYER_MOVING, BP_LAYER_MOVING) - - settings.mObjectLayerPairFilter = objectFilter - settings.mBroadPhaseLayerInterface = bpInterface - settings.mObjectVsBroadPhaseLayerFilter = new JOLT.ObjectVsBroadPhaseLayerFilterTable( - settings.mBroadPhaseLayerInterface, - COUNT_BROAD_PHASE_LAYERS, - settings.mObjectLayerPairFilter, - COUNT_OBJECT_LAYERS - ) + const objectFilter = new JOLT.ObjectLayerPairFilterTable(COUNT_OBJECT_LAYERS); + objectFilter.EnableCollision(LAYER_NOT_MOVING, LAYER_MOVING); + objectFilter.EnableCollision(LAYER_MOVING, LAYER_MOVING); + + const BP_LAYER_NOT_MOVING = new JOLT.BroadPhaseLayer(LAYER_NOT_MOVING); + const BP_LAYER_MOVING = new JOLT.BroadPhaseLayer(LAYER_MOVING); + const COUNT_BROAD_PHASE_LAYERS = 2; + + const bpInterface = new JOLT.BroadPhaseLayerInterfaceTable(COUNT_OBJECT_LAYERS, COUNT_BROAD_PHASE_LAYERS); + bpInterface.MapObjectToBroadPhaseLayer(LAYER_NOT_MOVING, BP_LAYER_NOT_MOVING); + bpInterface.MapObjectToBroadPhaseLayer(LAYER_MOVING, BP_LAYER_MOVING); + + settings.mObjectLayerPairFilter = objectFilter; + settings.mBroadPhaseLayerInterface = bpInterface; + settings.mObjectVsBroadPhaseLayerFilter = new JOLT.ObjectVsBroadPhaseLayerFilterTable(settings.mBroadPhaseLayerInterface, COUNT_BROAD_PHASE_LAYERS, settings.mObjectLayerPairFilter, COUNT_OBJECT_LAYERS); } function initPhysics() { - const settings = new JOLT.JoltSettings() - setupCollisionFiltering(settings) - joltInterface = new JOLT.JoltInterface(settings) - JOLT.destroy(settings) + const settings = new JOLT.JoltSettings(); + setupCollisionFiltering(settings); + joltInterface = new JOLT.JoltInterface(settings); + JOLT.destroy(settings); // physicsSystem = joltInterface.GetPhysicsSystem(); // bodyInterface = physicsSystem.GetBodyInterface(); } function initGraphics() { - camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) - - camera.position.set(-5, 4, 5) - - scene = new THREE.Scene() - - renderer = new THREE.WebGLRenderer() - renderer.setClearColor(0x121212) - renderer.setPixelRatio(window.devicePixelRatio) - renderer.shadowMap.enabled = true - renderer.shadowMap.type = THREE.PCFSoftShadowMap - renderer.setSize(window.innerWidth, window.innerHeight) - - controls = new OrbitControls(camera, renderer.domElement) - controls.update() - - const directionalLight = new THREE.DirectionalLight(0xffffff, 3.0) - directionalLight.position.set(-1.0, 3.0, 2.0) - directionalLight.castShadow = true - scene.add(directionalLight) - - const shadowMapSize = Math.min(4096, renderer.capabilities.maxTextureSize) - const shadowCamSize = 15 - console.debug(`Shadow Map Size: ${shadowMapSize}`) - - directionalLight.shadow.camera.top = shadowCamSize - directionalLight.shadow.camera.bottom = -shadowCamSize - directionalLight.shadow.camera.left = -shadowCamSize - directionalLight.shadow.camera.right = shadowCamSize - directionalLight.shadow.mapSize = new THREE.Vector2(shadowMapSize, shadowMapSize) - directionalLight.shadow.blurSamples = 16 - directionalLight.shadow.normalBias = 0.01 - directionalLight.shadow.bias = 0.0 - - const ambientLight = new THREE.AmbientLight(0xffffff, 0.1) - scene.add(ambientLight) + camera = new THREE.PerspectiveCamera( + 75, + window.innerWidth / window.innerHeight, + 0.1, + 1000 + ); + + camera.position.set(-5, 4, 5); + + scene = new THREE.Scene(); + + renderer = new THREE.WebGLRenderer(); + renderer.setClearColor(0x121212); + renderer.setPixelRatio(window.devicePixelRatio); + renderer.shadowMap.enabled = true; + renderer.shadowMap.type = THREE.PCFSoftShadowMap; + renderer.setSize(window.innerWidth, window.innerHeight); + + controls = new OrbitControls(camera, renderer.domElement); + controls.update(); + + const directionalLight = new THREE.DirectionalLight(0xffffff, 3.0); + directionalLight.position.set(-1.0, 3.0, 2.0); + directionalLight.castShadow = true; + scene.add(directionalLight); + + const shadowMapSize = Math.min(4096, renderer.capabilities.maxTextureSize); + const shadowCamSize = 15; + console.debug(`Shadow Map Size: ${shadowMapSize}`); + + directionalLight.shadow.camera.top = shadowCamSize; + directionalLight.shadow.camera.bottom = -shadowCamSize; + directionalLight.shadow.camera.left = -shadowCamSize; + directionalLight.shadow.camera.right = shadowCamSize; + directionalLight.shadow.mapSize = new THREE.Vector2(shadowMapSize, shadowMapSize); + directionalLight.shadow.blurSamples = 16; + directionalLight.shadow.normalBias = 0.01; + directionalLight.shadow.bias = 0.00; + + const ambientLight = new THREE.AmbientLight(0xffffff, 0.1); + scene.add(ambientLight); // TODO: Add controls. @@ -116,99 +117,101 @@ function initGraphics() { function updatePhysics(deltaTime: number) { // If below 55hz run 2 steps. Otherwise things run very slow. - const numSteps = deltaTime > 1.0 / 55.0 ? 2 : 1 - joltInterface.Step(deltaTime, numSteps) + const numSteps = deltaTime > 1.0 / 55.0 ? 2 : 1; + joltInterface.Step(deltaTime, numSteps); } function render() { - stats.update() - requestAnimationFrame(render) - controls.update() + stats.update(); + requestAnimationFrame(render); + controls.update(); // Prevents a problem when rendering at 30hz. Referred to as the spiral of death. - let deltaTime = clock.getDelta() - deltaTime = Math.min(deltaTime, 1.0 / 30.0) + let deltaTime = clock.getDelta(); + deltaTime = Math.min(deltaTime, 1.0 / 30.0); // Update transforms. for (let i = 0, j = dynamicObjects.length; i < j; i++) { - const threeObj = dynamicObjects[i] - const body = threeObj.userData.body - threeObj.position.copy(JoltVec3_ThreeVector3(body.GetPosition())) - threeObj.quaternion.copy(JoltQuat_ThreeQuaternion(body.GetRotation())) + const threeObj = dynamicObjects[i]; + const body = threeObj.userData.body; + threeObj.position.copy(JoltVec3_ThreeVector3(body.GetPosition())); + threeObj.quaternion.copy(JoltQuat_ThreeQuaternion(body.GetRotation())); if (body.GetBodyType() === JOLT.EBodyType_SoftBody) { // TODO: Special soft body handle. } } - time += deltaTime - updatePhysics(1.0 / 60.0) + time += deltaTime; + updatePhysics(1.0 / 60.0); // controls.update(deltaTime); // TODO: Add controls? - renderer.render(scene, camera) + renderer.render(scene, camera); } function MyThree() { - console.log("Running...") + console.log("Running..."); - const refContainer = useRef(null) - const urlParams = new URLSearchParams(document.location.search) - let mira_path = MIRA_FILE + const refContainer = useRef(null); + const urlParams = new URLSearchParams(document.location.search); + let mira_path = MIRA_FILE; - urlParams.forEach((v, k) => console.debug(`${k}: ${v}`)) + urlParams.forEach((v, k) => console.debug(`${k}: ${v}`)); if (urlParams.has("mira")) { - mira_path = `test_mira/${urlParams.get("mira")!}` - console.debug(`Selected Mirabuf File: ${mira_path}`) + mira_path = `test_mira/${urlParams.get("mira")!}`; + console.debug(`Selected Mirabuf File: ${mira_path}`); } console.log(urlParams) const addMiraToScene = (assembly: mirabuf.Assembly | undefined) => { if (!assembly) { - console.error("Assembly is undefined") - return + console.error('Assembly is undefined'); + return; } - const parser = new MirabufParser(assembly) + const parser = new MirabufParser(assembly); if (parser.maxErrorSeverity >= ParseErrorSeverity.Unimportable) { - console.error(`Assembly Parser produced significant errors for '${assembly.info!.name!}'`) - return + console.error(`Assembly Parser produced significant errors for '${assembly.info!.name!}'`); + return; } - - const instance = new MirabufInstance(parser) - instance.AddToScene(scene) + + const instance = new MirabufInstance(parser); + instance.AddToScene(scene); } useEffect(() => { LoadMirabufRemote(mira_path) - .then((assembly: mirabuf.Assembly | undefined) => addMiraToScene(assembly)) - .catch(_ => - LoadMirabufRemote(MIRA_FILE).then((assembly: mirabuf.Assembly | undefined) => addMiraToScene(assembly)) - ) - .catch(console.error) - - initGraphics() - + .then( + (assembly: mirabuf.Assembly | undefined) => addMiraToScene(assembly) + ).catch( + _ => LoadMirabufRemote(MIRA_FILE).then( + (assembly: mirabuf.Assembly | undefined) => addMiraToScene(assembly) + ) + ).catch(console.error); + + initGraphics(); + if (refContainer.current) { - refContainer.current.innerHTML = "" + refContainer.current.innerHTML = ""; refContainer.current.appendChild(renderer.domElement) - stats = new Stats() - stats.dom.style.position = "absolute" - stats.dom.style.top = "0px" - refContainer.current.appendChild(stats.dom) + stats = new Stats(); + stats.dom.style.position = 'absolute'; + stats.dom.style.top = '0px'; + refContainer.current.appendChild(stats.dom); } - initPhysics() - render() + initPhysics(); + render(); // createFloor(); - }, []) + }, []); return (
- ) + ); } -export default MyThree +export default MyThree; diff --git a/fission/src/systems/World.ts b/fission/src/systems/World.ts index 3619788f31..4b25755a52 100644 --- a/fission/src/systems/World.ts +++ b/fission/src/systems/World.ts @@ -1,58 +1,53 @@ -import * as THREE from "three" +import * as THREE from "three"; -import PhysicsSystem from "./physics/PhysicsSystem" -import SceneRenderer from "./scene/SceneRenderer" -import SimulationSystem from "./simulation/SimulationSystem" +import PhysicsSystem from "./physics/PhysicsSystem"; +import SceneRenderer from "./scene/SceneRenderer"; +import SimulationSystem from "./simulation/SimulationSystem"; class World { - private static _isAlive: boolean = false - private static _clock: THREE.Clock - - private static _sceneRenderer: SceneRenderer - private static _physicsSystem: PhysicsSystem - private static _simulationSystem: SimulationSystem - - public static get isAlive() { - return World._isAlive - } - - public static get SceneRenderer() { - return World._sceneRenderer - } - public static get PhysicsSystem() { - return World._physicsSystem - } - public static get SimulationSystem() { - return World._simulationSystem - } + private static _isAlive: boolean = false; + private static _clock: THREE.Clock; + + private static _sceneRenderer: SceneRenderer; + private static _physicsSystem: PhysicsSystem; + private static _simulationSystem: SimulationSystem; + + public static get isAlive() { return World._isAlive; } + + public static get SceneRenderer() { return World._sceneRenderer; } + public static get PhysicsSystem() { return World._physicsSystem; } + public static get SimulationSystem() { return World._simulationSystem; } + public static InitWorld() { - if (World._isAlive) return + if (World._isAlive) + return; - World._clock = new THREE.Clock() - World._isAlive = true + World._clock = new THREE.Clock(); + World._isAlive = true; - World._sceneRenderer = new SceneRenderer() - World._physicsSystem = new PhysicsSystem() - World._simulationSystem = new SimulationSystem() + World._sceneRenderer = new SceneRenderer(); + World._physicsSystem = new PhysicsSystem(); + World._simulationSystem = new SimulationSystem(); } public static DestroyWorld() { - if (!World._isAlive) return + if (!World._isAlive) + return; - World._isAlive = false + World._isAlive = false; - World._physicsSystem.Destroy() - World._sceneRenderer.Destroy() - World._simulationSystem.Destroy() + World._physicsSystem.Destroy(); + World._sceneRenderer.Destroy(); + World._simulationSystem.Destroy(); } public static UpdateWorld() { - const deltaT = World._clock.getDelta() - World._simulationSystem.Update(deltaT) - World._physicsSystem.Update(deltaT) - World._sceneRenderer.Update(deltaT) + const deltaT = World._clock.getDelta(); + World._simulationSystem.Update(deltaT); + World._physicsSystem.Update(deltaT); + World._sceneRenderer.Update(deltaT); } } -export default World +export default World; \ No newline at end of file diff --git a/fission/src/systems/WorldSystem.ts b/fission/src/systems/WorldSystem.ts index 7da09611b2..f45891980c 100644 --- a/fission/src/systems/WorldSystem.ts +++ b/fission/src/systems/WorldSystem.ts @@ -1,5 +1,5 @@ abstract class WorldSystem { - public abstract Update(deltaT: number): void - public abstract Destroy(): void + public abstract Update(deltaT: number): void; + public abstract Destroy(): void; } -export default WorldSystem +export default WorldSystem; \ No newline at end of file diff --git a/fission/src/systems/physics/Mechanism.ts b/fission/src/systems/physics/Mechanism.ts index 0761203f4c..1aaa31cfec 100644 --- a/fission/src/systems/physics/Mechanism.ts +++ b/fission/src/systems/physics/Mechanism.ts @@ -1,29 +1,29 @@ -import Jolt from "@barclah/jolt-physics" -import { LayerReserve } from "./PhysicsSystem" +import Jolt from "@barclah/jolt-physics"; +import { LayerReserve } from "./PhysicsSystem"; export interface MechanismConstraint { - parentBody: Jolt.BodyID - childBody: Jolt.BodyID + parentBody: Jolt.BodyID, + childBody: Jolt.BodyID, constraint: Jolt.Constraint } class Mechanism { - public rootBody: string - public nodeToBody: Map - public constraints: Array - public stepListeners: Array - public layerReserve: LayerReserve | undefined + public rootBody: string; + public nodeToBody: Map; + public constraints: Array; + public stepListeners: Array; + public layerReserve: LayerReserve | undefined; public constructor(rootBody: string, bodyMap: Map, layerReserve?: LayerReserve) { - this.rootBody = rootBody - this.nodeToBody = bodyMap - this.constraints = [] - this.stepListeners = [] - this.layerReserve = layerReserve + this.rootBody = rootBody; + this.nodeToBody = bodyMap; + this.constraints = []; + this.stepListeners = []; + this.layerReserve = layerReserve; } public AddConstraint(mechConstraint: MechanismConstraint) { - this.constraints.push(mechConstraint) + this.constraints.push(mechConstraint); } public AddStepListener(listener: Jolt.PhysicsStepListener) { @@ -31,8 +31,8 @@ class Mechanism { } public GetBodyByNodeId(nodeId: string) { - return this.nodeToBody.get(nodeId) + return this.nodeToBody.get(nodeId); } } -export default Mechanism +export default Mechanism; \ No newline at end of file diff --git a/fission/src/systems/physics/PhysicsSystem.ts b/fission/src/systems/physics/PhysicsSystem.ts index 3a0f164f5a..d6d8256385 100644 --- a/fission/src/systems/physics/PhysicsSystem.ts +++ b/fission/src/systems/physics/PhysicsSystem.ts @@ -1,34 +1,26 @@ -import { - MirabufFloatArr_JoltVec3, - MirabufVector3_JoltVec3, - ThreeMatrix4_JoltMat44, - ThreeVector3_JoltVec3, - _JoltQuat, -} from "../../util/TypeConversions" -import JOLT from "../../util/loading/JoltSyncLoader" -import Jolt from "@barclah/jolt-physics" -import * as THREE from "three" -import { mirabuf } from "../../proto/mirabuf" -import MirabufParser, { GAMEPIECE_SUFFIX, GROUNDED_JOINT_ID, RigidNodeReadOnly } from "../../mirabuf/MirabufParser" -import WorldSystem from "../WorldSystem" -import Mechanism from "./Mechanism" +import { MirabufFloatArr_JoltVec3, MirabufVector3_JoltVec3, ThreeMatrix4_JoltMat44, ThreeVector3_JoltVec3, _JoltQuat } from "../../util/TypeConversions"; +import JOLT from "../../util/loading/JoltSyncLoader"; +import Jolt from "@barclah/jolt-physics"; +import * as THREE from 'three'; +import { mirabuf } from '../../proto/mirabuf'; +import MirabufParser, { GAMEPIECE_SUFFIX, GROUNDED_JOINT_ID, RigidNodeReadOnly } from "../../mirabuf/MirabufParser"; +import WorldSystem from "../WorldSystem"; +import Mechanism from "./Mechanism"; /** * Layers used for determining enabled/disabled collisions. */ -const LAYER_FIELD = 0 // Used for grounded rigid node of a field as well as any rigid nodes jointed to it. -const LAYER_GENERAL_DYNAMIC = 1 // Used for game pieces or any general dynamic objects that can collide with anything and everything. -const RobotLayers: number[] = [ - // Reserved layers for robots. Robot layers have no collision with themselves but have collision with everything else. - 2, - 3, 4, 5, 6, 7, 8, 9, -] +const LAYER_FIELD = 0; // Used for grounded rigid node of a field as well as any rigid nodes jointed to it. +const LAYER_GENERAL_DYNAMIC = 1; // Used for game pieces or any general dynamic objects that can collide with anything and everything. +const RobotLayers: number[] = [ // Reserved layers for robots. Robot layers have no collision with themselves but have collision with everything else. + 2, 3, 4, 5, 6, 7, 8, 9 +]; // Please update this accordingly. -const COUNT_OBJECT_LAYERS = 10 +const COUNT_OBJECT_LAYERS = 10; -export const SIMULATION_PERIOD = 1.0 / 120.0 -const STANDARD_SUB_STEPS = 3 +export const SIMULATION_PERIOD = 1.0 / 120.0; +const STANDARD_SUB_STEPS = 3; /** * The PhysicsSystem handles all Jolt Phyiscs interactions within Synthesis. @@ -36,45 +28,41 @@ const STANDARD_SUB_STEPS = 3 * Fields, and Game pieces, and simulate them. */ class PhysicsSystem extends WorldSystem { - private _joltInterface: Jolt.JoltInterface - private _joltPhysSystem: Jolt.PhysicsSystem - private _joltBodyInterface: Jolt.BodyInterface - private _bodies: Array + + private _joltInterface: Jolt.JoltInterface; + private _joltPhysSystem: Jolt.PhysicsSystem; + private _joltBodyInterface: Jolt.BodyInterface; + private _bodies: Array; private _constraints: Array /** * Creates a PhysicsSystem object. */ constructor() { - super() + super(); - this._bodies = [] - this._constraints = [] + this._bodies = []; + this._constraints = []; - const joltSettings = new JOLT.JoltSettings() - SetupCollisionFiltering(joltSettings) + const joltSettings = new JOLT.JoltSettings(); + SetupCollisionFiltering(joltSettings); - this._joltInterface = new JOLT.JoltInterface(joltSettings) - JOLT.destroy(joltSettings) + this._joltInterface = new JOLT.JoltInterface(joltSettings); + JOLT.destroy(joltSettings); - this._joltPhysSystem = this._joltInterface.GetPhysicsSystem() - this._joltBodyInterface = this._joltPhysSystem.GetBodyInterface() + this._joltPhysSystem = this._joltInterface.GetPhysicsSystem(); + this._joltBodyInterface = this._joltPhysSystem.GetBodyInterface(); - this._joltPhysSystem.SetGravity(new JOLT.Vec3(0, -9.8, 0)) + this._joltPhysSystem.SetGravity(new JOLT.Vec3(0, -9.8, 0)); - const ground = this.CreateBox( - new THREE.Vector3(5.0, 0.5, 5.0), - undefined, - new THREE.Vector3(0.0, -2.0, 0.0), - undefined - ) - this._joltBodyInterface.AddBody(ground.GetID(), JOLT.EActivation_Activate) + const ground = this.CreateBox(new THREE.Vector3(5.0, 0.5, 5.0), undefined, new THREE.Vector3(0.0, -2.0, 0.0), undefined); + this._joltBodyInterface.AddBody(ground.GetID(), JOLT.EActivation_Activate); } /** * TEMPORARY * Create a box. - * + * * @param halfExtents The half extents of the Box. * @param mass Mass of the Box. Leave undefined to make Box static. * @param position Posiition of the Box (default: 0, 0, 0) @@ -82,39 +70,38 @@ class PhysicsSystem extends WorldSystem { * @returns Reference to Jolt Body */ public CreateBox( - halfExtents: THREE.Vector3, - mass: number | undefined, - position: THREE.Vector3 | undefined, - rotation: THREE.Euler | THREE.Quaternion | undefined - ) { - const size = ThreeVector3_JoltVec3(halfExtents) - const shape = new JOLT.BoxShape(size, 0.1) - JOLT.destroy(size) - - const pos = position ? ThreeVector3_JoltVec3(position) : new JOLT.Vec3(0.0, 0.0, 0.0) - const rot = _JoltQuat(rotation) + halfExtents: THREE.Vector3, + mass: number | undefined, + position: THREE.Vector3 | undefined, + rotation: THREE.Euler | THREE.Quaternion | undefined) { + const size = ThreeVector3_JoltVec3(halfExtents); + const shape = new JOLT.BoxShape(size, 0.1); + JOLT.destroy(size); + + const pos = position ? ThreeVector3_JoltVec3(position) : new JOLT.Vec3(0.0, 0.0, 0.0); + const rot = _JoltQuat(rotation); const creationSettings = new JOLT.BodyCreationSettings( shape, pos, rot, mass ? JOLT.EMotionType_Dynamic : JOLT.EMotionType_Static, mass ? LAYER_GENERAL_DYNAMIC : LAYER_FIELD - ) + ); if (mass) { - creationSettings.mMassPropertiesOverride.mMass = mass + creationSettings.mMassPropertiesOverride.mMass = mass; } - const body = this._joltBodyInterface.CreateBody(creationSettings) - JOLT.destroy(pos) - JOLT.destroy(rot) - JOLT.destroy(creationSettings) + const body = this._joltBodyInterface.CreateBody(creationSettings); + JOLT.destroy(pos); + JOLT.destroy(rot); + JOLT.destroy(creationSettings); - this._bodies.push(body.GetID()) - return body + this._bodies.push(body.GetID()); + return body; } /** * This creates a body in Jolt. Mostly used for Unit test validation. - * + * * @param shape Shape to impart on the body. * @param mass Mass of the body. * @param position Position of the body. @@ -122,152 +109,127 @@ class PhysicsSystem extends WorldSystem { * @returns Resulting Body object. */ public CreateBody( - shape: Jolt.Shape, - mass: number | undefined, - position: THREE.Vector3 | undefined, - rotation: THREE.Euler | THREE.Quaternion | undefined - ) { - const pos = position ? ThreeVector3_JoltVec3(position) : new JOLT.Vec3(0.0, 0.0, 0.0) - const rot = _JoltQuat(rotation) + shape: Jolt.Shape, + mass: number | undefined, + position: THREE.Vector3 | undefined, + rotation: THREE.Euler | THREE.Quaternion | undefined) { + const pos = position ? ThreeVector3_JoltVec3(position) : new JOLT.Vec3(0.0, 0.0, 0.0); + const rot = _JoltQuat(rotation); const creationSettings = new JOLT.BodyCreationSettings( shape, pos, rot, mass ? JOLT.EMotionType_Dynamic : JOLT.EMotionType_Static, mass ? LAYER_GENERAL_DYNAMIC : LAYER_FIELD - ) + ); if (mass) { - creationSettings.mMassPropertiesOverride.mMass = mass + creationSettings.mMassPropertiesOverride.mMass = mass; } - const body = this._joltBodyInterface.CreateBody(creationSettings) - JOLT.destroy(pos) - JOLT.destroy(rot) - JOLT.destroy(creationSettings) + const body = this._joltBodyInterface.CreateBody(creationSettings); + JOLT.destroy(pos); + JOLT.destroy(rot); + JOLT.destroy(creationSettings); - this._bodies.push(body.GetID()) - return body + this._bodies.push(body.GetID()); + return body; } /** * Utility function for creating convex hulls. Mostly used for Unit test validation. - * + * * @param points Flat pack array of vector 3 components. * @param density Density of the convex hull. * @returns Resulting shape. */ public CreateConvexHull(points: Float32Array, density: number = 1.0): Jolt.ShapeResult { if (points.length % 3) { - throw new Error(`Invalid size of points: ${points.length}`) + throw new Error(`Invalid size of points: ${points.length}`); } - const settings = new JOLT.ConvexHullShapeSettings() - settings.mPoints.clear() - settings.mPoints.reserve(points.length / 3.0) + const settings = new JOLT.ConvexHullShapeSettings(); + settings.mPoints.clear(); + settings.mPoints.reserve(points.length / 3.0); for (let i = 0; i < points.length; i += 3) { - settings.mPoints.push_back(new JOLT.Vec3(points[i], points[i + 1], points[i + 2])) + settings.mPoints.push_back(new JOLT.Vec3(points[i], points[i + 1], points[i + 2])); } - settings.mDensity = density - return settings.Create() + settings.mDensity = density; + return settings.Create(); } public CreateMechanismFromParser(parser: MirabufParser): Mechanism { - const layer = parser.assembly.dynamic ? new LayerReserve() : undefined + const layer = parser.assembly.dynamic ? new LayerReserve() : undefined; // const layer = undefined; console.log(`Using layer ${layer?.layer}`) - const bodyMap = this.CreateBodiesFromParser(parser, layer) - const rootBody = parser.rootNode - const mechanism = new Mechanism(rootBody, bodyMap, layer) - this.CreateJointsFromParser(parser, mechanism) - return mechanism + const bodyMap = this.CreateBodiesFromParser(parser, layer); + const rootBody = parser.rootNode; + const mechanism = new Mechanism(rootBody, bodyMap, layer); + this.CreateJointsFromParser(parser, mechanism); + return mechanism; } /** * Creates all the joints for a mirabuf assembly given an already compiled mapping of rigid nodes to bodies. - * + * * @param parser Mirabuf parser with complete set of rigid nodes and assembly data. * @param mechainsm Mapping of the name of rigid groups to Jolt bodies. Retrieved from CreateBodiesFromParser. */ public CreateJointsFromParser(parser: MirabufParser, mechanism: Mechanism) { - const jointData = parser.assembly.data!.joints! - for (const [jGuid, jInst] of Object.entries(jointData.jointInstances!) as [ - string, - mirabuf.joint.JointInstance, - ][]) { - if (jGuid == GROUNDED_JOINT_ID) continue + const jointData = parser.assembly.data!.joints!; + for (const [jGuid, jInst] of (Object.entries(jointData.jointInstances!) as [string, mirabuf.joint.JointInstance][])) { + if (jGuid == GROUNDED_JOINT_ID) + continue; - const rnA = parser.partToNodeMap.get(jInst.parentPart!) - const rnB = parser.partToNodeMap.get(jInst.childPart!) + const rnA = parser.partToNodeMap.get(jInst.parentPart!); + const rnB = parser.partToNodeMap.get(jInst.childPart!); if (!rnA || !rnB) { - console.warn(`Skipping joint '${jInst.info!.name!}'. Couldn't find associated rigid nodes.`) - continue + console.warn(`Skipping joint '${jInst.info!.name!}'. Couldn't find associated rigid nodes.`); + continue; } else if (rnA.id == rnB.id) { - console.warn( - `Skipping joint '${jInst.info!.name!}'. Jointing the same parts. Likely in issue with Fusion Design structure.` - ) - continue + console.warn(`Skipping joint '${jInst.info!.name!}'. Jointing the same parts. Likely in issue with Fusion Design structure.`); + continue; } - const jDef = parser.assembly.data!.joints!.jointDefinitions![jInst.jointReference!]! as mirabuf.joint.Joint - const bodyIdA = mechanism.GetBodyByNodeId(rnA.id) - const bodyIdB = mechanism.GetBodyByNodeId(rnB.id) + const jDef = parser.assembly.data!.joints!.jointDefinitions![jInst.jointReference!]! as mirabuf.joint.Joint; + const bodyIdA = mechanism.GetBodyByNodeId(rnA.id); + const bodyIdB = mechanism.GetBodyByNodeId(rnB.id); if (!bodyIdA || !bodyIdB) { - console.warn(`Skipping joint '${jInst.info!.name!}'. Failed to find rigid nodes' associated bodies.`) - continue + console.warn(`Skipping joint '${jInst.info!.name!}'. Failed to find rigid nodes' associated bodies.`); + continue; } - const bodyA = this.GetBody(bodyIdA) - const bodyB = this.GetBody(bodyIdB) + const bodyA = this.GetBody(bodyIdA); + const bodyB = this.GetBody(bodyIdB); const constraints: Jolt.Constraint[] = [] - let listener: Jolt.PhysicsStepListener | undefined = undefined + let listener: Jolt.PhysicsStepListener | undefined = undefined; switch (jDef.jointMotionType!) { case mirabuf.joint.JointMotion.REVOLUTE: if (this.IsWheel(jDef)) { if (parser.directedGraph.GetAdjacencyList(rnA.id).length > 0) { - const res = this.CreateWheelConstraint( - jInst, - jDef, - bodyA, - bodyB, - parser.assembly.info!.version! - ) + const res = this.CreateWheelConstraint(jInst, jDef, bodyA, bodyB, parser.assembly.info!.version!); constraints.push(res[0]) constraints.push(res[1]) listener = res[2] } else { - const res = this.CreateWheelConstraint( - jInst, - jDef, - bodyB, - bodyA, - parser.assembly.info!.version! - ) + const res = this.CreateWheelConstraint(jInst, jDef, bodyB, bodyA, parser.assembly.info!.version!); constraints.push(res[0]) constraints.push(res[1]) listener = res[2] } } else { - constraints.push( - this.CreateHingeConstraint(jInst, jDef, bodyA, bodyB, parser.assembly.info!.version!) - ) + constraints.push(this.CreateHingeConstraint(jInst, jDef, bodyA, bodyB, parser.assembly.info!.version!)); } - break + break; case mirabuf.joint.JointMotion.SLIDER: - constraints.push(this.CreateSliderConstraint(jInst, jDef, bodyA, bodyB)) - break + constraints.push(this.CreateSliderConstraint(jInst, jDef, bodyA, bodyB)); + break; default: - console.debug("Unsupported joint detected. Skipping...") - break + console.debug('Unsupported joint detected. Skipping...'); + break; } if (constraints.length > 0) { - constraints.forEach(x => - mechanism.AddConstraint({ - parentBody: bodyIdA, - childBody: bodyIdB, - constraint: x, - }) - ) + constraints.forEach(x => mechanism.AddConstraint({ parentBody: bodyIdA, childBody: bodyIdB, constraint: x })) } if (listener) { mechanism.AddStepListener(listener) @@ -277,7 +239,7 @@ class PhysicsSystem extends WorldSystem { /** * Creates a Hinge constraint. - * + * * @param jointInstance Joint instance. * @param jointDefinition Joint definition. * @param bodyA Parent body to connect. @@ -286,305 +248,283 @@ class PhysicsSystem extends WorldSystem { * @returns Resulting Jolt Hinge Constraint. */ private CreateHingeConstraint( - jointInstance: mirabuf.joint.JointInstance, - jointDefinition: mirabuf.joint.Joint, - bodyA: Jolt.Body, - bodyB: Jolt.Body, - versionNum: number - ): Jolt.Constraint { + jointInstance: mirabuf.joint.JointInstance, jointDefinition: mirabuf.joint.Joint, + bodyA: Jolt.Body, bodyB: Jolt.Body, versionNum: number): Jolt.Constraint { // HINGE CONSTRAINT - const hingeConstraintSettings = new JOLT.HingeConstraintSettings() - + const hingeConstraintSettings = new JOLT.HingeConstraintSettings(); + const jointOrigin = jointDefinition.origin ? MirabufVector3_JoltVec3(jointDefinition.origin as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); // TODO: Offset transformation for robot builder. const jointOriginOffset = jointInstance.offset ? MirabufVector3_JoltVec3(jointInstance.offset as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); - const anchorPoint = jointOrigin.Add(jointOriginOffset) - hingeConstraintSettings.mPoint1 = hingeConstraintSettings.mPoint2 = anchorPoint + const anchorPoint = jointOrigin.Add(jointOriginOffset); + hingeConstraintSettings.mPoint1 = hingeConstraintSettings.mPoint2 = anchorPoint; - const rotationalFreedom = jointDefinition.rotational!.rotationalFreedom! + const rotationalFreedom = jointDefinition.rotational!.rotationalFreedom!; - const miraAxis = rotationalFreedom.axis! as mirabuf.Vector3 - let axis: Jolt.Vec3 + const miraAxis = rotationalFreedom.axis! as mirabuf.Vector3; + let axis: Jolt.Vec3; // No scaling, these are unit vectors if (versionNum < 5) { - axis = new JOLT.Vec3(-miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z! ?? 0) + axis = new JOLT.Vec3(-miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z! ?? 0); } else { - axis = new JOLT.Vec3(miraAxis.x! ?? 0, miraAxis.y! ?? 0, miraAxis.z! ?? 0) + axis = new JOLT.Vec3(miraAxis.x! ?? 0, miraAxis.y! ?? 0, miraAxis.z! ?? 0); } - hingeConstraintSettings.mHingeAxis1 = hingeConstraintSettings.mHingeAxis2 = axis.Normalized() - hingeConstraintSettings.mNormalAxis1 = hingeConstraintSettings.mNormalAxis2 = getPerpendicular( - hingeConstraintSettings.mHingeAxis1 - ) + hingeConstraintSettings.mHingeAxis1 = hingeConstraintSettings.mHingeAxis2 + = axis.Normalized(); + hingeConstraintSettings.mNormalAxis1 = hingeConstraintSettings.mNormalAxis2 + = getPerpendicular(hingeConstraintSettings.mHingeAxis1); // Some values that are meant to be exactly PI are perceived as being past it, causing unexpected beavior. // This safety check caps the values to be within [-PI, PI] wth minimal difference in precision. - const piSafetyCheck = (v: number) => Math.min(3.14158, Math.max(-3.14158, v)) - - if ( - rotationalFreedom.limits && - Math.abs((rotationalFreedom.limits.upper ?? 0) - (rotationalFreedom.limits.lower ?? 0)) > 0.001 - ) { - const currentPos = piSafetyCheck(rotationalFreedom.value ?? 0) - const upper = piSafetyCheck(rotationalFreedom.limits.upper ?? 0) - currentPos - const lower = piSafetyCheck(rotationalFreedom.limits.lower ?? 0) - currentPos - - hingeConstraintSettings.mLimitsMin = -upper - hingeConstraintSettings.mLimitsMax = -lower - } + const piSafetyCheck = (v: number) => Math.min(3.14158, Math.max(-3.14158, v)); - const constraint = hingeConstraintSettings.Create(bodyA, bodyB) - this._joltPhysSystem.AddConstraint(constraint) + if (rotationalFreedom.limits && Math.abs((rotationalFreedom.limits.upper ?? 0) - (rotationalFreedom.limits.lower ?? 0)) > 0.001) { + const currentPos = piSafetyCheck(rotationalFreedom.value ?? 0); + const upper = piSafetyCheck(rotationalFreedom.limits.upper ?? 0) - currentPos; + const lower = piSafetyCheck(rotationalFreedom.limits.lower ?? 0) - currentPos; - return constraint + hingeConstraintSettings.mLimitsMin = -upper; + hingeConstraintSettings.mLimitsMax = -lower; + } + + const constraint = hingeConstraintSettings.Create(bodyA, bodyB); + this._joltPhysSystem.AddConstraint(constraint); + + return constraint; } /** * Creates a new slider constraint. - * + * * @param jointInstance Joint instance. * @param jointDefinition Joint definition. * @param bodyA Parent body to connect. * @param bodyB Child body to connect. - * + * * @returns Resulting Jolt constraint. */ private CreateSliderConstraint( - jointInstance: mirabuf.joint.JointInstance, - jointDefinition: mirabuf.joint.Joint, - bodyA: Jolt.Body, - bodyB: Jolt.Body - ): Jolt.Constraint { - const sliderConstraintSettings = new JOLT.SliderConstraintSettings() + jointInstance: mirabuf.joint.JointInstance, jointDefinition: mirabuf.joint.Joint, + bodyA: Jolt.Body, bodyB: Jolt.Body): Jolt.Constraint { + const sliderConstraintSettings = new JOLT.SliderConstraintSettings(); + const jointOrigin = jointDefinition.origin ? MirabufVector3_JoltVec3(jointDefinition.origin as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); // TODO: Offset transformation for robot builder. const jointOriginOffset = jointInstance.offset ? MirabufVector3_JoltVec3(jointInstance.offset as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); - const anchorPoint = jointOrigin.Add(jointOriginOffset) - sliderConstraintSettings.mPoint1 = sliderConstraintSettings.mPoint2 = anchorPoint + const anchorPoint = jointOrigin.Add(jointOriginOffset); + sliderConstraintSettings.mPoint1 = sliderConstraintSettings.mPoint2 = anchorPoint; - const prismaticFreedom = jointDefinition.prismatic!.prismaticFreedom! + const prismaticFreedom = jointDefinition.prismatic!.prismaticFreedom!; - const miraAxis = prismaticFreedom.axis! as mirabuf.Vector3 - const axis = new JOLT.Vec3(miraAxis.x! ?? 0, miraAxis.y! ?? 0, miraAxis.z! ?? 0) + const miraAxis = prismaticFreedom.axis! as mirabuf.Vector3; + const axis = new JOLT.Vec3(miraAxis.x! ?? 0, miraAxis.y! ?? 0, miraAxis.z! ?? 0); - sliderConstraintSettings.mSliderAxis1 = sliderConstraintSettings.mSliderAxis2 = axis.Normalized() - sliderConstraintSettings.mNormalAxis1 = sliderConstraintSettings.mNormalAxis2 = getPerpendicular( - sliderConstraintSettings.mSliderAxis1 - ) + sliderConstraintSettings.mSliderAxis1 = sliderConstraintSettings.mSliderAxis2 + = axis.Normalized(); + sliderConstraintSettings.mNormalAxis1 = sliderConstraintSettings.mNormalAxis2 + = getPerpendicular(sliderConstraintSettings.mSliderAxis1); - if ( - prismaticFreedom.limits && - Math.abs((prismaticFreedom.limits.upper ?? 0) - (prismaticFreedom.limits.lower ?? 0)) > 0.001 - ) { - const currentPos = (prismaticFreedom.value ?? 0) * 0.01 - const upper = (prismaticFreedom.limits.upper ?? 0) * 0.01 - currentPos - const lower = (prismaticFreedom.limits.lower ?? 0) * 0.01 - currentPos + if (prismaticFreedom.limits && Math.abs((prismaticFreedom.limits.upper ?? 0) - (prismaticFreedom.limits.lower ?? 0)) > 0.001) { - // Calculate mid point - const midPoint = (upper + lower) / 2.0 - const halfRange = Math.abs((upper - lower) / 2.0) + const currentPos = (prismaticFreedom.value ?? 0) * 0.01; + const upper = ((prismaticFreedom.limits.upper ?? 0) * 0.01) - currentPos; + const lower = ((prismaticFreedom.limits.lower ?? 0) * 0.01) - currentPos; + // Calculate mid point + const midPoint = (upper + lower) / 2.0; + const halfRange = Math.abs((upper - lower) / 2.0); + // Move the anchor points - sliderConstraintSettings.mPoint2 = anchorPoint.Add(axis.Normalized().Mul(midPoint)) + sliderConstraintSettings.mPoint2 + = anchorPoint.Add(axis.Normalized().Mul(midPoint)); - sliderConstraintSettings.mLimitsMax = halfRange - sliderConstraintSettings.mLimitsMin = -halfRange + sliderConstraintSettings.mLimitsMax = halfRange; + sliderConstraintSettings.mLimitsMin = -halfRange; } + + const constraint = sliderConstraintSettings.Create(bodyA, bodyB); + + this._constraints.push(constraint); + this._joltPhysSystem.AddConstraint(constraint); - const constraint = sliderConstraintSettings.Create(bodyA, bodyB) - - this._constraints.push(constraint) - this._joltPhysSystem.AddConstraint(constraint) - - return constraint + return constraint; } + public CreateWheelConstraint( - jointInstance: mirabuf.joint.JointInstance, - jointDefinition: mirabuf.joint.Joint, - bodyMain: Jolt.Body, - bodyWheel: Jolt.Body, - versionNum: number - ): [Jolt.Constraint, Jolt.VehicleConstraint, Jolt.PhysicsStepListener] { + jointInstance: mirabuf.joint.JointInstance, jointDefinition: mirabuf.joint.Joint, + bodyMain: Jolt.Body, bodyWheel: Jolt.Body, versionNum: number): [Jolt.Constraint, Jolt.VehicleConstraint, Jolt.PhysicsStepListener] { // HINGE CONSTRAINT - const fixedSettings = new JOLT.FixedConstraintSettings() - + const fixedSettings = new JOLT.FixedConstraintSettings(); + const jointOrigin = jointDefinition.origin ? MirabufVector3_JoltVec3(jointDefinition.origin as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); const jointOriginOffset = jointInstance.offset ? MirabufVector3_JoltVec3(jointInstance.offset as mirabuf.Vector3) - : new JOLT.Vec3(0, 0, 0) + : new JOLT.Vec3(0, 0, 0); - const anchorPoint = jointOrigin.Add(jointOriginOffset) - fixedSettings.mPoint1 = fixedSettings.mPoint2 = anchorPoint + const anchorPoint = jointOrigin.Add(jointOriginOffset); + fixedSettings.mPoint1 = fixedSettings.mPoint2 = anchorPoint; - const rotationalFreedom = jointDefinition.rotational!.rotationalFreedom! + const rotationalFreedom = jointDefinition.rotational!.rotationalFreedom!; - const miraAxis = rotationalFreedom.axis! as mirabuf.Vector3 - let axis: Jolt.Vec3 + const miraAxis = rotationalFreedom.axis! as mirabuf.Vector3; + let axis: Jolt.Vec3; // No scaling, these are unit vectors if (versionNum < 5) { - axis = new JOLT.Vec3(-miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z ?? 0) + axis = new JOLT.Vec3(-miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z ?? 0); } else { - axis = new JOLT.Vec3(miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z ?? 0) + axis = new JOLT.Vec3(miraAxis.x ?? 0, miraAxis.y ?? 0, miraAxis.z ?? 0); } - const bounds = bodyWheel.GetShape().GetLocalBounds() - const radius = (bounds.mMax.GetY() - bounds.mMin.GetY()) / 2.0 - - const wheelSettings = new JOLT.WheelSettingsWV() - wheelSettings.mPosition = anchorPoint.Add(axis.Mul(0.1)) - wheelSettings.mMaxSteerAngle = 0.0 - wheelSettings.mMaxHandBrakeTorque = 0.0 - wheelSettings.mRadius = radius * 1.05 - wheelSettings.mWidth = 0.1 - wheelSettings.mSuspensionMinLength = 0.0000003 - wheelSettings.mSuspensionMaxLength = 0.0000006 - wheelSettings.mInertia = 1 - - const friction = new JOLT.LinearCurve() - friction.Clear() - friction.AddPoint(1, 1) - friction.AddPoint(0, 1) - wheelSettings.mLongitudinalFriction = friction - - const vehicleSettings = new JOLT.VehicleConstraintSettings() - - vehicleSettings.mWheels.clear() - vehicleSettings.mWheels.push_back(wheelSettings) - - const controllerSettings = new JOLT.WheeledVehicleControllerSettings() - controllerSettings.mEngine.mMaxTorque = 1500.0 - controllerSettings.mTransmission.mClutchStrength = 10.0 - controllerSettings.mTransmission.mGearRatios.clear() - controllerSettings.mTransmission.mGearRatios.push_back(2) - controllerSettings.mTransmission.mMode = JOLT.ETransmissionMode_Auto - vehicleSettings.mController = controllerSettings - - vehicleSettings.mAntiRollBars.clear() - - const vehicleConstraint = new JOLT.VehicleConstraint(bodyMain, vehicleSettings) - const fixedConstraint = JOLT.castObject(fixedSettings.Create(bodyMain, bodyWheel), JOLT.TwoBodyConstraint) + const bounds = bodyWheel.GetShape().GetLocalBounds(); + const radius = (bounds.mMax.GetY() - bounds.mMin.GetY()) / 2.0; + + const wheelSettings = new JOLT.WheelSettingsWV(); + wheelSettings.mPosition = anchorPoint.Add(axis.Mul(0.1)); + wheelSettings.mMaxSteerAngle = 0.0; + wheelSettings.mMaxHandBrakeTorque = 0.0; + wheelSettings.mRadius = radius * 1.05; + wheelSettings.mWidth = 0.1; + wheelSettings.mSuspensionMinLength = 0.0000003; + wheelSettings.mSuspensionMaxLength = 0.0000006; + wheelSettings.mInertia = 1; + + const friction = new JOLT.LinearCurve(); + friction.Clear(); + friction.AddPoint(1,1); + friction.AddPoint(0,1); + wheelSettings.mLongitudinalFriction = friction; + + const vehicleSettings = new JOLT.VehicleConstraintSettings(); + + vehicleSettings.mWheels.clear(); + vehicleSettings.mWheels.push_back(wheelSettings); + + const controllerSettings = new JOLT.WheeledVehicleControllerSettings(); + controllerSettings.mEngine.mMaxTorque = 1500.0; + controllerSettings.mTransmission.mClutchStrength = 10.0; + controllerSettings.mTransmission.mGearRatios.clear(); + controllerSettings.mTransmission.mGearRatios.push_back(2); + controllerSettings.mTransmission.mMode = JOLT.ETransmissionMode_Auto; + vehicleSettings.mController = controllerSettings; + + vehicleSettings.mAntiRollBars.clear(); + + const vehicleConstraint = new JOLT.VehicleConstraint(bodyMain, vehicleSettings); + const fixedConstraint = JOLT.castObject(fixedSettings.Create(bodyMain, bodyWheel), JOLT.TwoBodyConstraint); // Wheel Collision Tester - const tester = new JOLT.VehicleCollisionTesterCastCylinder(bodyWheel.GetObjectLayer(), 0.05) - vehicleConstraint.SetVehicleCollisionTester(tester) - const listener = new JOLT.VehicleConstraintStepListener(vehicleConstraint) - this._joltPhysSystem.AddStepListener(listener) + const tester = new JOLT.VehicleCollisionTesterCastCylinder(bodyWheel.GetObjectLayer(), 0.05); + vehicleConstraint.SetVehicleCollisionTester(tester); + const listener = new JOLT.VehicleConstraintStepListener(vehicleConstraint); + this._joltPhysSystem.AddStepListener(listener); - this._joltPhysSystem.AddConstraint(vehicleConstraint) - this._joltPhysSystem.AddConstraint(fixedConstraint) + this._joltPhysSystem.AddConstraint(vehicleConstraint); + this._joltPhysSystem.AddConstraint(fixedConstraint); - this._constraints.push(fixedConstraint, vehicleConstraint) - return [fixedConstraint, vehicleConstraint, listener] + this._constraints.push(fixedConstraint, vehicleConstraint); + return [fixedConstraint, vehicleConstraint, listener]; } private IsWheel(jDef: mirabuf.joint.Joint) { - return ( - jDef.info!.name! != "grounded" && - jDef.userData && - (new Map(Object.entries(jDef.userData.data!)).get("wheel") ?? "false") == "true" - ) + return (jDef.info!.name! != 'grounded') && (jDef.userData) && ((new Map(Object.entries(jDef.userData.data!)).get('wheel') ?? 'false') == 'true') } /** * Creates a map, mapping the name of RigidNodes to Jolt BodyIDs - * + * * @param parser MirabufParser containing properly parsed RigidNodes * @returns Mapping of Jolt BodyIDs */ public CreateBodiesFromParser(parser: MirabufParser, layerReserve?: LayerReserve): Map { - const rnToBodies = new Map() + const rnToBodies = new Map(); if ((parser.assembly.dynamic && !layerReserve) || layerReserve?.isReleased) { - throw new Error("No layer reserve for dynamic assembly") + throw new Error('No layer reserve for dynamic assembly'); } - const reservedLayer: number | undefined = layerReserve?.layer - + const reservedLayer: number | undefined = layerReserve?.layer; + filterNonPhysicsNodes(parser.rigidNodes, parser.assembly).forEach(rn => { - const compoundShapeSettings = new JOLT.StaticCompoundShapeSettings() - let shapesAdded = 0 - let totalMass = 0 - const comAccum = new mirabuf.Vector3() + const compoundShapeSettings = new JOLT.StaticCompoundShapeSettings(); + let shapesAdded = 0; + + let totalMass = 0; + const comAccum = new mirabuf.Vector3(); - const minBounds = new JOLT.Vec3(1000000.0, 1000000.0, 1000000.0) - const maxBounds = new JOLT.Vec3(-1000000.0, -1000000.0, -1000000.0) + const minBounds = new JOLT.Vec3(1000000.0, 1000000.0, 1000000.0); + const maxBounds = new JOLT.Vec3(-1000000.0, -1000000.0, -1000000.0); const rnLayer: number = reservedLayer ? reservedLayer - : rn.id.endsWith(GAMEPIECE_SUFFIX) - ? LAYER_GENERAL_DYNAMIC - : LAYER_FIELD + : (rn.id.endsWith(GAMEPIECE_SUFFIX) ? LAYER_GENERAL_DYNAMIC : LAYER_FIELD); rn.parts.forEach(partId => { - const partInstance = parser.assembly.data!.parts!.partInstances![partId]! - if ( - partInstance.skipCollider == null || - partInstance == undefined || - partInstance.skipCollider == false - ) { - const partDefinition = - parser.assembly.data!.parts!.partDefinitions![partInstance.partDefinitionReference!]! - - const partShapeResult = this.CreateShapeSettingsFromPart(partDefinition) - + const partInstance = parser.assembly.data!.parts!.partInstances![partId]!; + if (partInstance.skipCollider == null || partInstance == undefined || partInstance.skipCollider == false) { + const partDefinition = parser.assembly.data!.parts!.partDefinitions![partInstance.partDefinitionReference!]!; + + const partShapeResult = this.CreateShapeSettingsFromPart(partDefinition); + if (partShapeResult) { - const [shapeSettings, partMin, partMax] = partShapeResult - - const transform = ThreeMatrix4_JoltMat44(parser.globalTransforms.get(partId)!) - const translation = transform.GetTranslation() - const rotation = transform.GetQuaternion() - compoundShapeSettings.AddShape(translation, rotation, shapeSettings, 0) - shapesAdded++ - - this.UpdateMinMaxBounds(transform.Multiply3x3(partMin), minBounds, maxBounds) - this.UpdateMinMaxBounds(transform.Multiply3x3(partMax), minBounds, maxBounds) - - JOLT.destroy(partMin) - JOLT.destroy(partMax) - JOLT.destroy(transform) - - if ( - partDefinition.physicalData && - partDefinition.physicalData.com && - partDefinition.physicalData.mass - ) { - const mass = partDefinition.massOverride - ? partDefinition.massOverride! - : partDefinition.physicalData.mass! - totalMass += mass - comAccum.x += (partDefinition.physicalData.com.x! * mass) / 100.0 - comAccum.y += (partDefinition.physicalData.com.y! * mass) / 100.0 - comAccum.z += (partDefinition.physicalData.com.z! * mass) / 100.0 + + const [shapeSettings, partMin, partMax] = partShapeResult; + + const transform = ThreeMatrix4_JoltMat44(parser.globalTransforms.get(partId)!); + const translation = transform.GetTranslation(); + const rotation = transform.GetQuaternion(); + compoundShapeSettings.AddShape( + translation, + rotation, + shapeSettings, + 0 + ); + shapesAdded++; + + this.UpdateMinMaxBounds(transform.Multiply3x3(partMin), minBounds, maxBounds); + this.UpdateMinMaxBounds(transform.Multiply3x3(partMax), minBounds, maxBounds); + + JOLT.destroy(partMin); + JOLT.destroy(partMax); + JOLT.destroy(transform); + + if (partDefinition.physicalData && partDefinition.physicalData.com && partDefinition.physicalData.mass) { + const mass = partDefinition.massOverride ? partDefinition.massOverride! : partDefinition.physicalData.mass!; + totalMass += mass; + comAccum.x += partDefinition.physicalData.com.x! * mass / 100.0; + comAccum.y += partDefinition.physicalData.com.y! * mass / 100.0; + comAccum.z += partDefinition.physicalData.com.z! * mass / 100.0; } } } - }) + }); if (shapesAdded > 0) { - const shapeResult = compoundShapeSettings.Create() + + const shapeResult = compoundShapeSettings.Create(); if (!shapeResult.IsValid || shapeResult.HasError()) { - console.error(`Failed to create shape for RigidNode ${rn.id}\n${shapeResult.GetError().c_str()}`) + console.error(`Failed to create shape for RigidNode ${rn.id}\n${shapeResult.GetError().c_str()}`); } - const shape = shapeResult.Get() + const shape = shapeResult.Get(); if (rn.isDynamic) { - shape.GetMassProperties().mMass = totalMass == 0.0 ? 1 : totalMass + shape.GetMassProperties().mMass = totalMass == 0.0 ? 1 : totalMass; } const bodySettings = new JOLT.BodyCreationSettings( @@ -593,94 +533,98 @@ class PhysicsSystem extends WorldSystem { new JOLT.Quat(0, 0, 0, 1), rn.isDynamic ? JOLT.EMotionType_Dynamic : JOLT.EMotionType_Static, rnLayer - ) - const body = this._joltBodyInterface.CreateBody(bodySettings) - this._joltBodyInterface.AddBody(body.GetID(), JOLT.EActivation_Activate) - body.SetAllowSleeping(false) - rnToBodies.set(rn.id, body.GetID()) + ); + const body = this._joltBodyInterface.CreateBody(bodySettings); + this._joltBodyInterface.AddBody(body.GetID(), JOLT.EActivation_Activate); + body.SetAllowSleeping(false); + rnToBodies.set(rn.id, body.GetID()); // Little testing components - body.SetRestitution(0.4) + body.SetRestitution(0.4); } // Cleanup - JOLT.destroy(compoundShapeSettings) - }) + JOLT.destroy(compoundShapeSettings); + }); - return rnToBodies + return rnToBodies; } /** * Creates the Jolt ShapeSettings for a given part using the Part Definition of said part. - * + * * @param partDefinition Definition of the part to create. * @returns If successful, the created convex hull shape settings from the given Part Definition. */ - private CreateShapeSettingsFromPart( - partDefinition: mirabuf.IPartDefinition - ): [Jolt.ShapeSettings, Jolt.Vec3, Jolt.Vec3] | undefined | null { - const settings = new JOLT.ConvexHullShapeSettings() + private CreateShapeSettingsFromPart(partDefinition: mirabuf.IPartDefinition): [Jolt.ShapeSettings, Jolt.Vec3, Jolt.Vec3] | undefined | null { + const settings = new JOLT.ConvexHullShapeSettings(); - const min = new JOLT.Vec3(1000000.0, 1000000.0, 1000000.0) - const max = new JOLT.Vec3(-1000000.0, -1000000.0, -1000000.0) + const min = new JOLT.Vec3(1000000.0, 1000000.0, 1000000.0); + const max = new JOLT.Vec3(-1000000.0, -1000000.0, -1000000.0); - const points = settings.mPoints + const points = settings.mPoints; partDefinition.bodies!.forEach(body => { if (body.triangleMesh && body.triangleMesh.mesh && body.triangleMesh.mesh.verts) { - const vertArr = body.triangleMesh.mesh.verts + const vertArr = body.triangleMesh.mesh.verts; for (let i = 0; i < body.triangleMesh.mesh.verts.length; i += 3) { - const vert = MirabufFloatArr_JoltVec3(vertArr, i) - points.push_back(vert) - this.UpdateMinMaxBounds(vert, min, max) - JOLT.destroy(vert) + const vert = MirabufFloatArr_JoltVec3(vertArr, i); + points.push_back(vert); + this.UpdateMinMaxBounds(vert, min, max); + JOLT.destroy(vert); } } - }) + }); if (points.size() < 4) { - JOLT.destroy(settings) - JOLT.destroy(min) - JOLT.destroy(max) - return + JOLT.destroy(settings); + JOLT.destroy(min); + JOLT.destroy(max); + return; } else { - return [settings, min, max] + return [settings, min, max]; } } /** * Helper function to update min and max vector bounds. - * + * * @param v Vector to add to min, max, bounds. * @param min Minimum vector of the bounds. * @param max Maximum vector of the bounds. */ private UpdateMinMaxBounds(v: Jolt.Vec3, min: Jolt.Vec3, max: Jolt.Vec3) { - if (v.GetX() < min.GetX()) min.SetX(v.GetX()) - if (v.GetY() < min.GetY()) min.SetY(v.GetY()) - if (v.GetZ() < min.GetZ()) min.SetZ(v.GetZ()) - - if (v.GetX() > max.GetX()) max.SetX(v.GetX()) - if (v.GetY() > max.GetY()) max.SetY(v.GetY()) - if (v.GetZ() > max.GetZ()) max.SetZ(v.GetZ()) + if (v.GetX() < min.GetX()) + min.SetX(v.GetX()); + if (v.GetY() < min.GetY()) + min.SetY(v.GetY()); + if (v.GetZ() < min.GetZ()) + min.SetZ(v.GetZ()); + + if (v.GetX() > max.GetX()) + max.SetX(v.GetX()); + if (v.GetY() > max.GetY()) + max.SetY(v.GetY()); + if (v.GetZ() > max.GetZ()) + max.SetZ(v.GetZ()); } /** * Destroys bodies. - * + * * @param bodies Bodies to destroy. */ public DestroyBodies(...bodies: Jolt.Body[]) { bodies.forEach(x => { - this._joltBodyInterface.RemoveBody(x.GetID()) - this._joltBodyInterface.DestroyBody(x.GetID()) - }) + this._joltBodyInterface.RemoveBody(x.GetID()); + this._joltBodyInterface.DestroyBody(x.GetID()); + }); } public DestroyBodyIds(...bodies: Jolt.BodyID[]) { bodies.forEach(x => { - this._joltBodyInterface.RemoveBody(x) - this._joltBodyInterface.DestroyBody(x) - }) + this._joltBodyInterface.RemoveBody(x); + this._joltBodyInterface.DestroyBody(x); + }); } public DestroyMechanism(mech: Mechanism) { @@ -689,48 +633,44 @@ class PhysicsSystem extends WorldSystem { }) mech.constraints.forEach(x => { this._joltPhysSystem.RemoveConstraint(x.constraint) - }) + }); mech.nodeToBody.forEach(x => { - this._joltBodyInterface.RemoveBody(x) + this._joltBodyInterface.RemoveBody(x); // this._joltBodyInterface.DestroyBody(x); - }) - console.log("Mechanism destroyed") + }); + console.log('Mechanism destroyed') } public GetBody(bodyId: Jolt.BodyID) { - return this._joltPhysSystem.GetBodyLockInterface().TryGetBody(bodyId) + return this._joltPhysSystem.GetBodyLockInterface().TryGetBody(bodyId); } public Update(_: number): void { - this._joltInterface.Step(SIMULATION_PERIOD, STANDARD_SUB_STEPS) + this._joltInterface.Step(SIMULATION_PERIOD, STANDARD_SUB_STEPS); } public Destroy(): void { this._constraints.forEach(x => { - this._joltPhysSystem.RemoveConstraint(x) + this._joltPhysSystem.RemoveConstraint(x); // JOLT.destroy(x); - }) - this._constraints = [] + }); + this._constraints = []; // Destroy Jolt Bodies. - this.DestroyBodyIds(...this._bodies) - this._bodies = [] + this.DestroyBodyIds(...this._bodies); + this._bodies = []; - JOLT.destroy(this._joltBodyInterface) - JOLT.destroy(this._joltInterface) + JOLT.destroy(this._joltBodyInterface); + JOLT.destroy(this._joltInterface); } } export class LayerReserve { - private _layer: number - private _isReleased: boolean + private _layer: number; + private _isReleased: boolean; - public get layer() { - return this._layer - } - public get isReleased() { - return this._isReleased - } + public get layer() { return this._layer } + public get isReleased() { return this._isReleased } public constructor() { this._layer = RobotLayers.shift()! @@ -739,91 +679,92 @@ export class LayerReserve { public Release() { if (!this._isReleased) { - RobotLayers.push(this._layer) - this._isReleased = true + RobotLayers.push(this._layer); + this._isReleased = true; } } } /** * Initialize collision groups and filtering for Jolt. - * + * * @param settings Jolt object used for applying filters. */ function SetupCollisionFiltering(settings: Jolt.JoltSettings) { - const objectFilter = new JOLT.ObjectLayerPairFilterTable(COUNT_OBJECT_LAYERS) - + const objectFilter = new JOLT.ObjectLayerPairFilterTable(COUNT_OBJECT_LAYERS); + // Enable Field layer collisions - objectFilter.EnableCollision(LAYER_GENERAL_DYNAMIC, LAYER_GENERAL_DYNAMIC) - objectFilter.EnableCollision(LAYER_FIELD, LAYER_GENERAL_DYNAMIC) + objectFilter.EnableCollision(LAYER_GENERAL_DYNAMIC, LAYER_GENERAL_DYNAMIC); + objectFilter.EnableCollision(LAYER_FIELD, LAYER_GENERAL_DYNAMIC); for (let i = 0; i < RobotLayers.length; i++) { - objectFilter.EnableCollision(LAYER_FIELD, RobotLayers[i]) - objectFilter.EnableCollision(LAYER_GENERAL_DYNAMIC, RobotLayers[i]) + objectFilter.EnableCollision(LAYER_FIELD, RobotLayers[i]); + objectFilter.EnableCollision(LAYER_GENERAL_DYNAMIC, RobotLayers[i]); } // Enable Collisions between other robots for (let i = 0; i < RobotLayers.length - 1; i++) { for (let j = i + 1; j < RobotLayers.length; j++) { - objectFilter.EnableCollision(RobotLayers[i], RobotLayers[j]) + objectFilter.EnableCollision(RobotLayers[i], RobotLayers[j]); } } - const BP_LAYER_FIELD = new JOLT.BroadPhaseLayer(LAYER_FIELD) - const BP_LAYER_GENERAL_DYNAMIC = new JOLT.BroadPhaseLayer(LAYER_GENERAL_DYNAMIC) + const BP_LAYER_FIELD = new JOLT.BroadPhaseLayer(LAYER_FIELD); + const BP_LAYER_GENERAL_DYNAMIC = new JOLT.BroadPhaseLayer(LAYER_GENERAL_DYNAMIC); - const bpRobotLayers = new Array(RobotLayers.length) + const bpRobotLayers = new Array(RobotLayers.length); for (let i = 0; i < bpRobotLayers.length; i++) { - bpRobotLayers[i] = new JOLT.BroadPhaseLayer(RobotLayers[i]) + bpRobotLayers[i] = new JOLT.BroadPhaseLayer(RobotLayers[i]); } - const COUNT_BROAD_PHASE_LAYERS = 2 + RobotLayers.length - - const bpInterface = new JOLT.BroadPhaseLayerInterfaceTable(COUNT_OBJECT_LAYERS, COUNT_BROAD_PHASE_LAYERS) + const COUNT_BROAD_PHASE_LAYERS = 2 + RobotLayers.length; - bpInterface.MapObjectToBroadPhaseLayer(LAYER_FIELD, BP_LAYER_FIELD) - bpInterface.MapObjectToBroadPhaseLayer(LAYER_GENERAL_DYNAMIC, BP_LAYER_GENERAL_DYNAMIC) + const bpInterface = new JOLT.BroadPhaseLayerInterfaceTable(COUNT_OBJECT_LAYERS, COUNT_BROAD_PHASE_LAYERS); + + bpInterface.MapObjectToBroadPhaseLayer(LAYER_FIELD, BP_LAYER_FIELD); + bpInterface.MapObjectToBroadPhaseLayer(LAYER_GENERAL_DYNAMIC, BP_LAYER_GENERAL_DYNAMIC); for (let i = 0; i < bpRobotLayers.length; i++) { - bpInterface.MapObjectToBroadPhaseLayer(RobotLayers[i], bpRobotLayers[i]) + bpInterface.MapObjectToBroadPhaseLayer(RobotLayers[i], bpRobotLayers[i]); } - settings.mObjectLayerPairFilter = objectFilter - settings.mBroadPhaseLayerInterface = bpInterface + settings.mObjectLayerPairFilter = objectFilter; + settings.mBroadPhaseLayerInterface = bpInterface; settings.mObjectVsBroadPhaseLayerFilter = new JOLT.ObjectVsBroadPhaseLayerFilterTable( settings.mBroadPhaseLayerInterface, COUNT_BROAD_PHASE_LAYERS, settings.mObjectLayerPairFilter, COUNT_OBJECT_LAYERS - ) + ); } function filterNonPhysicsNodes(nodes: RigidNodeReadOnly[], mira: mirabuf.Assembly): RigidNodeReadOnly[] { return nodes.filter(x => { for (const part of x.parts) { - const inst = mira.data!.parts!.partInstances![part]! - const def = mira.data!.parts!.partDefinitions![inst.partDefinitionReference!]! + const inst = mira.data!.parts!.partInstances![part]!; + const def = mira.data!.parts!.partDefinitions![inst.partDefinitionReference!]!; if (def.bodies && def.bodies.length > 0) { - return true + return true; } } - return false - }) + return false; + }); } function getPerpendicular(vec: Jolt.Vec3): Jolt.Vec3 { - return tryGetPerpendicular(vec, new JOLT.Vec3(0, 1, 0)) ?? tryGetPerpendicular(vec, new JOLT.Vec3(0, 0, 1))! + return tryGetPerpendicular(vec, new JOLT.Vec3(0, 1, 0)) + ?? tryGetPerpendicular(vec, new JOLT.Vec3(0, 0, 1))!; } function tryGetPerpendicular(vec: Jolt.Vec3, toCheck: Jolt.Vec3): Jolt.Vec3 | undefined { if (Math.abs(Math.abs(vec.Dot(toCheck)) - 1.0) < 0.0001) { - return undefined + return undefined; } - const a = vec.Dot(toCheck) + const a = vec.Dot(toCheck); return new JOLT.Vec3( toCheck.GetX() - vec.GetX() * a, toCheck.GetY() - vec.GetY() * a, toCheck.GetZ() - vec.GetZ() * a - ).Normalized() + ).Normalized(); } -export default PhysicsSystem +export default PhysicsSystem; \ No newline at end of file diff --git a/fission/src/systems/scene/SceneObject.ts b/fission/src/systems/scene/SceneObject.ts index be714b6c12..9c1f175835 100644 --- a/fission/src/systems/scene/SceneObject.ts +++ b/fission/src/systems/scene/SceneObject.ts @@ -1,29 +1,30 @@ abstract class SceneObject { - private _id: number | null = null + private _id: number | null = null; public get id() { - return this._id! + return this._id!; } public set id(sceneId: number) { - if (this._id) return - this._id = sceneId + if (this._id) + return; + this._id = sceneId; } /** * Setup is executed after an ID is assigned and the SceneObject is registered with the SceneRenderer */ - public abstract Setup(): void + public abstract Setup(): void; /** * Update is executed just before rendering of the scene to allow for uniform and rendering parameter updates. */ - public abstract Update(): void + public abstract Update(): void; /** * Dispose is executed just before the SceneObject is unregistered and removed from the SceneRenderer. */ - public abstract Dispose(): void + public abstract Dispose(): void; } -export default SceneObject +export default SceneObject; \ No newline at end of file diff --git a/fission/src/systems/scene/SceneRenderer.ts b/fission/src/systems/scene/SceneRenderer.ts index ef27f40eec..daaf2fdf4f 100644 --- a/fission/src/systems/scene/SceneRenderer.ts +++ b/fission/src/systems/scene/SceneRenderer.ts @@ -1,94 +1,101 @@ -import * as THREE from "three" -import SceneObject from "./SceneObject" -import WorldSystem from "../WorldSystem" +import * as THREE from 'three'; +import SceneObject from './SceneObject'; +import WorldSystem from '../WorldSystem'; -const CLEAR_COLOR = 0x121212 -const GROUND_COLOR = 0x73937e +const CLEAR_COLOR = 0x121212; +const GROUND_COLOR = 0x73937E -let nextSceneObjectId = 1 +let nextSceneObjectId = 1; class SceneRenderer extends WorldSystem { - private _mainCamera: THREE.PerspectiveCamera - private _scene: THREE.Scene - private _renderer: THREE.WebGLRenderer - private _sceneObjects: Map + private _mainCamera: THREE.PerspectiveCamera; + private _scene: THREE.Scene; + private _renderer: THREE.WebGLRenderer; + + private _sceneObjects: Map; public get sceneObjects() { - return this._sceneObjects + return this._sceneObjects; } public get mainCamera() { - return this._mainCamera + return this._mainCamera; } public get scene() { - return this._scene + return this._scene; } public get renderer(): THREE.WebGLRenderer { - return this._renderer + return this._renderer; } public constructor() { - super() - - this._sceneObjects = new Map() - - this._mainCamera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) - this._mainCamera.position.set(-2.5, 2, 2.5) - - this._scene = new THREE.Scene() - - this._renderer = new THREE.WebGLRenderer() - this._renderer.setClearColor(CLEAR_COLOR) - this._renderer.setPixelRatio(window.devicePixelRatio) - this._renderer.shadowMap.enabled = true - this._renderer.shadowMap.type = THREE.PCFSoftShadowMap - this._renderer.setSize(window.innerWidth, window.innerHeight) - - const directionalLight = new THREE.DirectionalLight(0xffffff, 3.0) - directionalLight.position.set(-1.0, 3.0, 2.0) - directionalLight.castShadow = true - this._scene.add(directionalLight) - - const shadowMapSize = Math.min(4096, this._renderer.capabilities.maxTextureSize) - const shadowCamSize = 15 - console.debug(`Shadow Map Size: ${shadowMapSize}`) - - directionalLight.shadow.camera.top = shadowCamSize - directionalLight.shadow.camera.bottom = -shadowCamSize - directionalLight.shadow.camera.left = -shadowCamSize - directionalLight.shadow.camera.right = shadowCamSize - directionalLight.shadow.mapSize = new THREE.Vector2(shadowMapSize, shadowMapSize) - directionalLight.shadow.blurSamples = 16 - directionalLight.shadow.normalBias = 0.01 - directionalLight.shadow.bias = 0.0 - - const ambientLight = new THREE.AmbientLight(0xffffff, 0.1) - this._scene.add(ambientLight) - - const ground = new THREE.Mesh(new THREE.BoxGeometry(10, 1, 10), this.CreateToonMaterial(GROUND_COLOR)) - ground.position.set(0.0, -2.0, 0.0) - ground.receiveShadow = true - ground.castShadow = true - this._scene.add(ground) + super(); + + this._sceneObjects = new Map(); + + this._mainCamera = new THREE.PerspectiveCamera( + 75, + window.innerWidth / window.innerHeight, + 0.1, + 1000 + ); + this._mainCamera.position.set(-2.5, 2, 2.5); + + + this._scene = new THREE.Scene(); + + this._renderer = new THREE.WebGLRenderer(); + this._renderer.setClearColor(CLEAR_COLOR); + this._renderer.setPixelRatio(window.devicePixelRatio); + this._renderer.shadowMap.enabled = true; + this._renderer.shadowMap.type = THREE.PCFSoftShadowMap; + this._renderer.setSize(window.innerWidth, window.innerHeight); + + const directionalLight = new THREE.DirectionalLight(0xffffff, 3.0); + directionalLight.position.set(-1.0, 3.0, 2.0); + directionalLight.castShadow = true; + this._scene.add(directionalLight); + + const shadowMapSize = Math.min(4096, this._renderer.capabilities.maxTextureSize); + const shadowCamSize = 15; + console.debug(`Shadow Map Size: ${shadowMapSize}`); + + directionalLight.shadow.camera.top = shadowCamSize; + directionalLight.shadow.camera.bottom = -shadowCamSize; + directionalLight.shadow.camera.left = -shadowCamSize; + directionalLight.shadow.camera.right = shadowCamSize; + directionalLight.shadow.mapSize = new THREE.Vector2(shadowMapSize, shadowMapSize); + directionalLight.shadow.blurSamples = 16; + directionalLight.shadow.normalBias = 0.01; + directionalLight.shadow.bias = 0.00; + + const ambientLight = new THREE.AmbientLight(0xffffff, 0.1); + this._scene.add(ambientLight); + + const ground = new THREE.Mesh(new THREE.BoxGeometry(10, 1, 10), this.CreateToonMaterial(GROUND_COLOR)); + ground.position.set(0.0, -2.0, 0.0); + ground.receiveShadow = true; + ground.castShadow = true; + this._scene.add(ground); } public UpdateCanvasSize() { - this._renderer.setSize(window.innerWidth, window.innerHeight) + this._renderer.setSize(window.innerWidth, window.innerHeight); // No idea why height would be zero, but just incase. - this._mainCamera.aspect = window.innerWidth / window.innerHeight - this._mainCamera.updateProjectionMatrix() + this._mainCamera.aspect = window.innerWidth / window.innerHeight; + this._mainCamera.updateProjectionMatrix(); } public Update(_: number): void { this._sceneObjects.forEach(obj => { - obj.Update() - }) + obj.Update(); + }); // controls.update(deltaTime); // TODO: Add controls? - this._renderer.render(this._scene, this._mainCamera) + this._renderer.render(this._scene, this._mainCamera); } public Destroy(): void { @@ -96,47 +103,44 @@ class SceneRenderer extends WorldSystem { } public RegisterSceneObject(obj: T): number { - const id = nextSceneObjectId++ - obj.id = id - this._sceneObjects.set(id, obj) - obj.Setup() - return id + const id = nextSceneObjectId++; + obj.id = id; + this._sceneObjects.set(id, obj); + obj.Setup(); + return id; } public RemoveAllSceneObjects() { - this._sceneObjects.forEach(obj => obj.Dispose()) - this._sceneObjects.clear() + this._sceneObjects.forEach(obj => obj.Dispose()); + this._sceneObjects.clear(); } public RemoveSceneObject(id: number) { const obj = this._sceneObjects.get(id) if (this._sceneObjects.delete(id)) { - obj!.Dispose() + obj!.Dispose(); } } public CreateSphere(radius: number, material?: THREE.Material | undefined): THREE.Mesh { - const geo = new THREE.SphereGeometry(radius) + const geo = new THREE.SphereGeometry(radius); if (material) { - return new THREE.Mesh(geo, material) + return new THREE.Mesh(geo, material); } else { - return new THREE.Mesh(geo, this.CreateToonMaterial()) + return new THREE.Mesh(geo, this.CreateToonMaterial()); } } public CreateToonMaterial(color: THREE.ColorRepresentation = 0xff00aa, steps: number = 5): THREE.MeshToonMaterial { - const format = this._renderer.capabilities.isWebGL2 ? THREE.RedFormat : THREE.LuminanceFormat - const colors = new Uint8Array(steps) - for (let c = 0; c < colors.length; c++) { - colors[c] = 128 + (c / colors.length) * 128 + const format = ( this._renderer.capabilities.isWebGL2 ) ? THREE.RedFormat : THREE.LuminanceFormat; + const colors = new Uint8Array(steps); + for ( let c = 0; c < colors.length; c ++ ) { + colors[c] = 128 + (c / colors.length) * 128; } - const gradientMap = new THREE.DataTexture(colors, colors.length, 1, format) - gradientMap.needsUpdate = true - return new THREE.MeshToonMaterial({ - color: color, - gradientMap: gradientMap, - }) + const gradientMap = new THREE.DataTexture(colors, colors.length, 1, format); + gradientMap.needsUpdate = true; + return new THREE.MeshToonMaterial({color: color, gradientMap: gradientMap}); } } -export default SceneRenderer +export default SceneRenderer; \ No newline at end of file diff --git a/fission/src/systems/simulation/Brain.ts b/fission/src/systems/simulation/Brain.ts index a047d65671..82bcf94dd9 100644 --- a/fission/src/systems/simulation/Brain.ts +++ b/fission/src/systems/simulation/Brain.ts @@ -1,16 +1,17 @@ -import Mechanism from "../physics/Mechanism" +import Mechanism from "../physics/Mechanism"; abstract class Brain { - protected _mechanism: Mechanism - + + protected _mechanism: Mechanism; + constructor(mechansim: Mechanism) { - this._mechanism = mechansim + this._mechanism = mechansim; } - public abstract Update(deltaT: number): void + public abstract Update(deltaT: number): void; - public abstract Enable(): void - public abstract Disable(): void + public abstract Enable(): void; + public abstract Disable(): void; } -export default Brain +export default Brain; \ No newline at end of file diff --git a/fission/src/systems/simulation/SimulationSystem.ts b/fission/src/systems/simulation/SimulationSystem.ts index a512eadc6d..ce95d15d46 100644 --- a/fission/src/systems/simulation/SimulationSystem.ts +++ b/fission/src/systems/simulation/SimulationSystem.ts @@ -1,110 +1,113 @@ -import JOLT from "@/util/loading/JoltSyncLoader" -import Mechanism from "../physics/Mechanism" -import WorldSystem from "../WorldSystem" -import Brain from "./Brain" -import Driver from "./driver/Driver" -import Stimulus from "./stimulus/Stimulus" -import HingeDriver from "./driver/HingeDriver" -import WheelDriver from "./driver/WheelDriver" -import SliderDriver from "./driver/SliderDriver" -import HingeStimulus from "./stimulus/HingeStimulus" -import WheelRotationStimulus from "./stimulus/WheelStimulus" -import SliderStimulus from "./stimulus/SliderStimulus" -import ChassisStimulus from "./stimulus/ChassisStimulus" +import JOLT from "@/util/loading/JoltSyncLoader"; +import Mechanism from "../physics/Mechanism"; +import WorldSystem from "../WorldSystem"; +import Brain from "./Brain"; +import Driver from "./driver/Driver"; +import Stimulus from "./stimulus/Stimulus"; +import HingeDriver from "./driver/HingeDriver"; +import WheelDriver from "./driver/WheelDriver"; +import SliderDriver from "./driver/SliderDriver"; +import HingeStimulus from "./stimulus/HingeStimulus"; +import WheelRotationStimulus from "./stimulus/WheelStimulus"; +import SliderStimulus from "./stimulus/SliderStimulus"; +import ChassisStimulus from "./stimulus/ChassisStimulus"; class SimulationSystem extends WorldSystem { - private _simMechanisms: Map + + private _simMechanisms: Map; constructor() { - super() + super(); - this._simMechanisms = new Map() + this._simMechanisms = new Map(); } public RegisterMechanism(mechanism: Mechanism) { - if (this._simMechanisms.has(mechanism)) return + if (this._simMechanisms.has(mechanism)) + return; - this._simMechanisms.set(mechanism, new SimulationLayer(mechanism)) + this._simMechanisms.set(mechanism, new SimulationLayer(mechanism)); } public GetSimulationLayer(mechanism: Mechanism): SimulationLayer | undefined { - return this._simMechanisms.get(mechanism) + return this._simMechanisms.get(mechanism); } public Update(deltaT: number): void { - this._simMechanisms.forEach(simLayer => simLayer.Update(deltaT)) + this._simMechanisms.forEach(simLayer => simLayer.Update(deltaT)); } public Destroy(): void { - this._simMechanisms.forEach(simLayer => simLayer.SetBrain(undefined)) - this._simMechanisms.clear() + this._simMechanisms.forEach(simLayer => simLayer.SetBrain(undefined)); + this._simMechanisms.clear(); } public UnregisterMechanism(mech: Mechanism): boolean { - const layer = this._simMechanisms.get(mech) + const layer = this._simMechanisms.get(mech); if (this._simMechanisms.delete(mech)) { layer?.SetBrain(undefined) - return true + return true; } else { - return false + return false; } } + } class SimulationLayer { - private _mechanism: Mechanism - private _brain?: Brain + private _mechanism: Mechanism; + private _brain?: Brain; - private _drivers: Driver[] - private _stimuli: Stimulus[] + private _drivers: Driver[]; + private _stimuli: Stimulus[]; - public get brain() { - return this._brain - } + public get brain() { return this._brain; } constructor(mechanism: Mechanism) { - this._mechanism = mechanism + this._mechanism = mechanism; // Generate standard drivers and stimuli - this._drivers = [] - this._stimuli = [] + this._drivers = []; + this._stimuli = []; this._mechanism.constraints.forEach(x => { if (x.constraint.GetSubType() == JOLT.EConstraintSubType_Hinge) { - const hinge = JOLT.castObject(x.constraint, JOLT.HingeConstraint) - const driver = new HingeDriver(hinge) - this._drivers.push(driver) - const stim = new HingeStimulus(hinge) - this._stimuli.push(stim) + const hinge = JOLT.castObject(x.constraint, JOLT.HingeConstraint); + const driver = new HingeDriver(hinge); + this._drivers.push(driver); + const stim = new HingeStimulus(hinge); + this._stimuli.push(stim); } else if (x.constraint.GetSubType() == JOLT.EConstraintSubType_Vehicle) { - const vehicle = JOLT.castObject(x.constraint, JOLT.VehicleConstraint) - const driver = new WheelDriver(vehicle) - this._drivers.push(driver) - const stim = new WheelRotationStimulus(vehicle.GetWheel(0)) - this._stimuli.push(stim) + const vehicle = JOLT.castObject(x.constraint, JOLT.VehicleConstraint); + const driver = new WheelDriver(vehicle); + this._drivers.push(driver); + const stim = new WheelRotationStimulus(vehicle.GetWheel(0)); + this._stimuli.push(stim); } else if (x.constraint.GetSubType() == JOLT.EConstraintSubType_Slider) { - const slider = JOLT.castObject(x.constraint, JOLT.SliderConstraint) - const driver = new SliderDriver(slider) - this._drivers.push(driver) - const stim = new SliderStimulus(slider) - this._stimuli.push(stim) + const slider = JOLT.castObject(x.constraint, JOLT.SliderConstraint); + const driver = new SliderDriver(slider); + this._drivers.push(driver); + const stim = new SliderStimulus(slider); + this._stimuli.push(stim); } - }) - this._stimuli.push(new ChassisStimulus(mechanism.nodeToBody.get(mechanism.rootBody)!)) + }); + this._stimuli.push(new ChassisStimulus(mechanism.nodeToBody.get(mechanism.rootBody)!)); } public Update(deltaT: number) { - this._brain?.Update(deltaT) - this._drivers.forEach(x => x.Update(deltaT)) - this._stimuli.forEach(x => x.Update(deltaT)) + this._brain?.Update(deltaT); + this._drivers.forEach(x => x.Update(deltaT)); + this._stimuli.forEach(x => x.Update(deltaT)); } public SetBrain(brain: T | undefined) { - if (this._brain) this._brain.Disable() - - this._brain = brain + if (this._brain) + this._brain.Disable(); - if (this._brain) this._brain.Enable() + this._brain = brain; + + if (this._brain) + this._brain.Enable(); } } -export default SimulationSystem +export default SimulationSystem; \ No newline at end of file diff --git a/fission/src/systems/simulation/driver/Driver.ts b/fission/src/systems/simulation/driver/Driver.ts index 39c3aefa0e..19361c0361 100644 --- a/fission/src/systems/simulation/driver/Driver.ts +++ b/fission/src/systems/simulation/driver/Driver.ts @@ -1,5 +1,5 @@ abstract class Driver { - public abstract Update(deltaT: number): void + public abstract Update(deltaT: number): void; } -export default Driver +export default Driver; \ No newline at end of file diff --git a/fission/src/systems/simulation/driver/HingeDriver.ts b/fission/src/systems/simulation/driver/HingeDriver.ts index 172a7cc095..5e5c680baf 100644 --- a/fission/src/systems/simulation/driver/HingeDriver.ts +++ b/fission/src/systems/simulation/driver/HingeDriver.ts @@ -1,89 +1,91 @@ -import Jolt from "@barclah/jolt-physics" -import Driver from "./Driver" -import { SIMULATION_PERIOD } from "@/systems/physics/PhysicsSystem" -import JOLT from "@/util/loading/JoltSyncLoader" +import Jolt from "@barclah/jolt-physics"; +import Driver from "./Driver"; +import { SIMULATION_PERIOD } from "@/systems/physics/PhysicsSystem"; +import JOLT from "@/util/loading/JoltSyncLoader"; class HingeDriver extends Driver { - private _constraint: Jolt.HingeConstraint - private _controlMode: DriverControlMode = DriverControlMode.Velocity - private _targetVelocity: number = 0.0 - private _targetAngle: number + private _constraint: Jolt.HingeConstraint; + + private _controlMode: DriverControlMode = DriverControlMode.Velocity; + private _targetVelocity: number = 0.0; + private _targetAngle: number; public get targetVelocity(): number { - return this._targetVelocity + return this._targetVelocity; } public set targetVelocity(radsPerSec: number) { - this._targetVelocity = radsPerSec + this._targetVelocity = radsPerSec; } public get targetAngle(): number { - return this._targetAngle + return this._targetAngle; } public set targetAngle(rads: number) { - this._targetAngle = rads + this._targetAngle = rads; } public set minTorqueLimit(nm: number) { - const motorSettings = this._constraint.GetMotorSettings() - motorSettings.mMinTorqueLimit = nm + const motorSettings = this._constraint.GetMotorSettings(); + motorSettings.mMinTorqueLimit = nm; } public set maxTorqueLimit(nm: number) { - const motorSettings = this._constraint.GetMotorSettings() - motorSettings.mMaxTorqueLimit = nm + const motorSettings = this._constraint.GetMotorSettings(); + motorSettings.mMaxTorqueLimit = nm; } public get controlMode(): DriverControlMode { - return this._controlMode + return this._controlMode; } public set controlMode(mode: DriverControlMode) { - this._controlMode = mode + this._controlMode = mode; switch (mode) { case DriverControlMode.Velocity: - this._constraint.SetMotorState(JOLT.EMotorState_Velocity) - break + this._constraint.SetMotorState(JOLT.EMotorState_Velocity); + break; case DriverControlMode.Position: - this._constraint.SetMotorState(JOLT.EMotorState_Position) - break + this._constraint.SetMotorState(JOLT.EMotorState_Position); + break; default: // idk - break + break; } } public constructor(constraint: Jolt.HingeConstraint) { - super() + super(); - this._constraint = constraint + this._constraint = constraint; - const motorSettings = this._constraint.GetMotorSettings() - const springSettings = motorSettings.mSpringSettings + const motorSettings = this._constraint.GetMotorSettings(); + const springSettings = motorSettings.mSpringSettings; // These values were selected based on the suggestions of the documentation for stiff control. - springSettings.mFrequency = 20 * (1.0 / SIMULATION_PERIOD) - springSettings.mDamping = 0.995 + springSettings.mFrequency = 20 * (1.0 / SIMULATION_PERIOD); + springSettings.mDamping = 0.995; - motorSettings.mSpringSettings = springSettings - motorSettings.mMinTorqueLimit = -50.0 - motorSettings.mMaxTorqueLimit = 50.0 + motorSettings.mSpringSettings = springSettings; + motorSettings.mMinTorqueLimit = -50.0; + motorSettings.mMaxTorqueLimit = 50.0; - this._targetAngle = this._constraint.GetCurrentAngle() + this._targetAngle = this._constraint.GetCurrentAngle(); - this.controlMode = DriverControlMode.Velocity + this.controlMode = DriverControlMode.Velocity; } public Update(_: number): void { if (this._controlMode == DriverControlMode.Velocity) { - this._constraint.SetTargetAngularVelocity(this._targetVelocity) + this._constraint.SetTargetAngularVelocity(this._targetVelocity); } else if (this._controlMode == DriverControlMode.Position) { - this._constraint.SetTargetAngle(this._targetAngle) + this._constraint.SetTargetAngle(this._targetAngle); } + } } export enum DriverControlMode { Velocity = 0, - Position = 1, + Position = 1 } -export default HingeDriver +export default HingeDriver; \ No newline at end of file diff --git a/fission/src/systems/simulation/driver/SliderDriver.ts b/fission/src/systems/simulation/driver/SliderDriver.ts index 3fb4aa5d5a..9e6891f974 100644 --- a/fission/src/systems/simulation/driver/SliderDriver.ts +++ b/fission/src/systems/simulation/driver/SliderDriver.ts @@ -1,53 +1,51 @@ -import Jolt from "@barclah/jolt-physics" -import Driver from "./Driver" -import { SIMULATION_PERIOD } from "@/systems/physics/PhysicsSystem" -import JOLT from "@/util/loading/JoltSyncLoader" +import Jolt from "@barclah/jolt-physics"; +import Driver from "./Driver"; +import { SIMULATION_PERIOD } from "@/systems/physics/PhysicsSystem"; +import JOLT from "@/util/loading/JoltSyncLoader"; class SliderDriver extends Driver { - private _constraint: Jolt.SliderConstraint - private _targetPosition: number = 0.0 + + private _constraint: Jolt.SliderConstraint; + private _targetPosition: number = 0.0; public get targetPosition(): number { - return this._targetPosition + return this._targetPosition; } public set targetPosition(position: number) { - this._targetPosition = Math.max( - this._constraint.GetLimitsMin(), - Math.min(this._constraint.GetLimitsMax(), position) - ) + this._targetPosition = Math.max(this._constraint.GetLimitsMin(), Math.min(this._constraint.GetLimitsMax(), position)); } public set minForceLimit(newtons: number) { - const motorSettings = this._constraint.GetMotorSettings() - motorSettings.mMinForceLimit = newtons + const motorSettings = this._constraint.GetMotorSettings(); + motorSettings.mMinForceLimit = newtons; } public set maxForceLimit(newtons: number) { - const motorSettings = this._constraint.GetMotorSettings() - motorSettings.mMaxForceLimit = newtons + const motorSettings = this._constraint.GetMotorSettings(); + motorSettings.mMaxForceLimit = newtons; } public constructor(constraint: Jolt.SliderConstraint) { - super() + super(); - this._constraint = constraint + this._constraint = constraint; - const motorSettings = this._constraint.GetMotorSettings() - const springSettings = motorSettings.mSpringSettings - springSettings.mFrequency = 20 * (1.0 / SIMULATION_PERIOD) - springSettings.mDamping = 0.995 + const motorSettings = this._constraint.GetMotorSettings(); + const springSettings = motorSettings.mSpringSettings; + springSettings.mFrequency = 20 * (1.0 / SIMULATION_PERIOD); + springSettings.mDamping = 0.995; - motorSettings.mSpringSettings = springSettings - motorSettings.mMinForceLimit = -125.0 - motorSettings.mMaxForceLimit = 125.0 + motorSettings.mSpringSettings = springSettings; + motorSettings.mMinForceLimit = -125.0; + motorSettings.mMaxForceLimit = 125.0; - this._constraint.SetMotorState(JOLT.EMotorState_Position) + this._constraint.SetMotorState(JOLT.EMotorState_Position); - this.targetPosition = this._constraint.GetCurrentPosition() + this.targetPosition = this._constraint.GetCurrentPosition(); } public Update(_: number): void { - this._constraint.SetTargetPosition(this._targetPosition) + this._constraint.SetTargetPosition(this._targetPosition); } } -export default SliderDriver +export default SliderDriver; \ No newline at end of file diff --git a/fission/src/systems/simulation/driver/WheelDriver.ts b/fission/src/systems/simulation/driver/WheelDriver.ts index c39433ff18..d2b8c492ee 100644 --- a/fission/src/systems/simulation/driver/WheelDriver.ts +++ b/fission/src/systems/simulation/driver/WheelDriver.ts @@ -1,37 +1,38 @@ -import Jolt from "@barclah/jolt-physics" -import Driver from "./Driver" -import JOLT from "@/util/loading/JoltSyncLoader" +import Jolt from "@barclah/jolt-physics"; +import Driver from "./Driver"; +import JOLT from "@/util/loading/JoltSyncLoader"; class WheelDriver extends Driver { - private _constraint: Jolt.VehicleConstraint - private _wheel: Jolt.WheelWV - private _targetWheelSpeed: number = 0.0 + private _constraint: Jolt.VehicleConstraint; + private _wheel: Jolt.WheelWV; + + private _targetWheelSpeed: number = 0.0; public get targetWheelSpeed(): number { - return this._targetWheelSpeed + return this._targetWheelSpeed; } public set targetWheelSpeed(radsPerSec: number) { - this._targetWheelSpeed = radsPerSec + this._targetWheelSpeed = radsPerSec; } public constructor(constraint: Jolt.VehicleConstraint) { - super() - - this._constraint = constraint - this._wheel = JOLT.castObject(this._constraint.GetWheel(0), JOLT.WheelWV) + super(); - console.log(`Wheel X: ${constraint.GetVehicleBody().GetCenterOfMassPosition().GetX().toFixed(5)}`) + this._constraint = constraint; + this._wheel = JOLT.castObject(this._constraint.GetWheel(0), JOLT.WheelWV); + + console.log(`Wheel X: ${constraint.GetVehicleBody().GetCenterOfMassPosition().GetX().toFixed(5)}`); if (constraint.GetVehicleBody().GetCenterOfMassPosition().GetX() < 0) { - this._targetWheelSpeed = 10.0 + this._targetWheelSpeed = 10.0; } else { - this._targetWheelSpeed = 10.0 + this._targetWheelSpeed = 10.0; } } public Update(_: number): void { - this._wheel.SetAngularVelocity(this._targetWheelSpeed) + this._wheel.SetAngularVelocity(this._targetWheelSpeed); } } -export default WheelDriver +export default WheelDriver; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/ChassisStimulus.ts b/fission/src/systems/simulation/stimulus/ChassisStimulus.ts index fa59a64f1b..6149ec2779 100644 --- a/fission/src/systems/simulation/stimulus/ChassisStimulus.ts +++ b/fission/src/systems/simulation/stimulus/ChassisStimulus.ts @@ -1,32 +1,32 @@ -import Jolt from "@barclah/jolt-physics" -import Stimulus from "./Stimulus" -import World from "@/systems/World" +import Jolt from "@barclah/jolt-physics"; +import Stimulus from "./Stimulus"; +import World from "@/systems/World"; class ChassisStimulus extends Stimulus { - private _body: Jolt.Body - private _mass: number + private _body: Jolt.Body; + private _mass: number; public get linearVelocity(): Jolt.Vec3 { - return this._body.GetLinearVelocity() + return this._body.GetLinearVelocity(); } public get angularVelocity(): Jolt.Vec3 { - return this._body.GetAngularVelocity() + return this._body.GetAngularVelocity(); } public get acceleration(): Jolt.Vec3 { - return this._body.GetAccumulatedForce().Div(this._mass) + return this._body.GetAccumulatedForce().Div(this._mass); } public get rotation(): Jolt.Vec3 { - return this._body.GetRotation().GetEulerAngles() + return this._body.GetRotation().GetEulerAngles(); } public constructor(bodyId: Jolt.BodyID) { - super() - - this._body = World.PhysicsSystem.GetBody(bodyId) - this._mass = this._body.GetShape().GetMassProperties().mMass + super(); + + this._body = World.PhysicsSystem.GetBody(bodyId); + this._mass = this._body.GetShape().GetMassProperties().mMass; } - - public Update(_: number): void {} + + public Update(_: number): void { } } -export default ChassisStimulus +export default ChassisStimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/EncoderStimulus.ts b/fission/src/systems/simulation/stimulus/EncoderStimulus.ts index bee93b4923..1daf39b438 100644 --- a/fission/src/systems/simulation/stimulus/EncoderStimulus.ts +++ b/fission/src/systems/simulation/stimulus/EncoderStimulus.ts @@ -1,14 +1,15 @@ -import Stimulus from "./Stimulus" +import Stimulus from "./Stimulus"; abstract class EncoderStimulus extends Stimulus { - public abstract get positionValue(): number - public abstract get velocityValue(): number + + public abstract get positionValue(): number; + public abstract get velocityValue(): number; protected constructor() { - super() + super(); } - public abstract Update(_: number): void + public abstract Update(_: number): void; } -export default EncoderStimulus +export default EncoderStimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/HingeStimulus.ts b/fission/src/systems/simulation/stimulus/HingeStimulus.ts index bcb8464275..91770de696 100644 --- a/fission/src/systems/simulation/stimulus/HingeStimulus.ts +++ b/fission/src/systems/simulation/stimulus/HingeStimulus.ts @@ -1,45 +1,43 @@ -import Jolt from "@barclah/jolt-physics" -import EncoderStimulus from "./EncoderStimulus" +import Jolt from "@barclah/jolt-physics"; +import EncoderStimulus from "./EncoderStimulus"; class HingeStimulus extends EncoderStimulus { - private _accum: boolean = false - private _hingeAngleAccum: number = 0.0 - private _hinge: Jolt.HingeConstraint + private _accum: boolean = false; + private _hingeAngleAccum: number = 0.0; + private _hinge: Jolt.HingeConstraint; public get positionValue(): number { if (this._accum) { - return this._hingeAngleAccum + return this._hingeAngleAccum; } else { - return this._hinge.GetCurrentAngle() + return this._hinge.GetCurrentAngle(); } } public get velocityValue(): number { - return 0.0 + return 0.0; } public set accum(shouldAccum: boolean) { if (!this._accum && shouldAccum) { - this.resetAccum() + this.resetAccum(); } - this._accum = shouldAccum + this._accum = shouldAccum; } public constructor(hinge: Jolt.HingeConstraint) { - super() - - this._hinge = hinge - } + super(); + this._hinge = hinge; + } + public Update(deltaT: number): void { if (this._accum) { - this._hingeAngleAccum += this._hinge.GetTargetAngularVelocity() * deltaT + this._hingeAngleAccum += this._hinge.GetTargetAngularVelocity() * deltaT; } } - public resetAccum() { - this._hingeAngleAccum = 0.0 - } + public resetAccum() { this._hingeAngleAccum = 0.0; } } -export default HingeStimulus +export default HingeStimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/SliderStimulus.ts b/fission/src/systems/simulation/stimulus/SliderStimulus.ts index 0e66eb63b6..6567aed629 100644 --- a/fission/src/systems/simulation/stimulus/SliderStimulus.ts +++ b/fission/src/systems/simulation/stimulus/SliderStimulus.ts @@ -1,28 +1,29 @@ -import Jolt from "@barclah/jolt-physics" -import EncoderStimulus from "./EncoderStimulus" +import Jolt from "@barclah/jolt-physics"; +import EncoderStimulus from "./EncoderStimulus"; class SliderStimulus extends EncoderStimulus { - private _slider: Jolt.SliderConstraint - private _velocity: number = 0.0 + + private _slider: Jolt.SliderConstraint; + private _velocity: number = 0.0; public get positionValue(): number { - return this._slider.GetCurrentPosition() + return this._slider.GetCurrentPosition(); } public get velocityValue(): number { - return this._velocity + return this._velocity; } - + public constructor(slider: Jolt.SliderConstraint) { - super() + super(); - this._slider = slider + this._slider = slider; } - private _lastPosition: number = 0.0 + private _lastPosition: number = 0.0; public Update(deltaT: number): void { - this._velocity = (this._slider.GetCurrentPosition() - this._lastPosition) / deltaT - this._lastPosition = this._slider.GetCurrentPosition() + this._velocity = (this._slider.GetCurrentPosition() - this._lastPosition) / deltaT; + this._lastPosition = this._slider.GetCurrentPosition(); } } -export default SliderStimulus +export default SliderStimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/Stimulus.ts b/fission/src/systems/simulation/stimulus/Stimulus.ts index 5dd744cce8..576cf632f8 100644 --- a/fission/src/systems/simulation/stimulus/Stimulus.ts +++ b/fission/src/systems/simulation/stimulus/Stimulus.ts @@ -1,5 +1,5 @@ abstract class Stimulus { - public abstract Update(deltaT: number): void + public abstract Update(deltaT: number): void; } -export default Stimulus +export default Stimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/stimulus/WheelStimulus.ts b/fission/src/systems/simulation/stimulus/WheelStimulus.ts index cfb6206085..4edce43cd1 100644 --- a/fission/src/systems/simulation/stimulus/WheelStimulus.ts +++ b/fission/src/systems/simulation/stimulus/WheelStimulus.ts @@ -1,48 +1,46 @@ -import Jolt from "@barclah/jolt-physics" -import EncoderStimulus from "./EncoderStimulus" +import Jolt from "@barclah/jolt-physics"; +import EncoderStimulus from "./EncoderStimulus"; /** - * + * */ class WheelRotationStimulus extends EncoderStimulus { - private _accum: boolean = true - private _wheelRotationAccum = 0.0 - private _wheel: Jolt.Wheel - + private _accum: boolean = true; + private _wheelRotationAccum = 0.0; + private _wheel: Jolt.Wheel; + public get positionValue(): number { if (this._accum) { - return this._wheelRotationAccum + return this._wheelRotationAccum; } else { - return this._wheel.GetRotationAngle() + return this._wheel.GetRotationAngle(); } } public get velocityValue(): number { - return this._wheel.GetAngularVelocity() + return this._wheel.GetAngularVelocity(); } public set accum(shouldAccum: boolean) { if (!this._accum && shouldAccum) { - this.resetAccum() + this.resetAccum(); } - this._accum = shouldAccum + this._accum = shouldAccum; } public constructor(wheel: Jolt.Wheel) { - super() + super(); - this._wheel = wheel + this._wheel = wheel; } public Update(deltaT: number): void { if (this._accum) { - this._wheelRotationAccum += this._wheel.GetAngularVelocity() * deltaT + this._wheelRotationAccum += this._wheel.GetAngularVelocity() * deltaT; } } - public resetAccum() { - this._wheelRotationAccum = 0.0 - } + public resetAccum() { this._wheelRotationAccum = 0.0; } } -export default WheelRotationStimulus +export default WheelRotationStimulus; \ No newline at end of file diff --git a/fission/src/systems/simulation/synthesis_brain/Behavior.ts b/fission/src/systems/simulation/synthesis_brain/Behavior.ts index 5745035a0c..90fb1b1bdc 100644 --- a/fission/src/systems/simulation/synthesis_brain/Behavior.ts +++ b/fission/src/systems/simulation/synthesis_brain/Behavior.ts @@ -1,21 +1,18 @@ -import Driver from "../driver/Driver" -import Stimulus from "../stimulus/Stimulus" +import Driver from "../driver/Driver"; +import Stimulus from "../stimulus/Stimulus"; abstract class Behavior { - private _drivers: Driver[] - private _stimuli: Stimulus[] - protected get drivers() { - return this._drivers - } - protected get stimuli() { - return this._stimuli - } + private _drivers: Driver[]; + private _stimuli: Stimulus[]; + + protected get drivers() { return this._drivers; } + protected get stimuli() { return this._stimuli; } constructor(drivers: Driver[], stimuli: Stimulus[]) { - this._drivers = drivers - this._stimuli = stimuli + this._drivers = drivers; + this._stimuli = stimuli; } } -export default Behavior +export default Behavior; \ No newline at end of file diff --git a/fission/src/systems/simulation/synthesis_brain/SynthesisBrain.ts b/fission/src/systems/simulation/synthesis_brain/SynthesisBrain.ts index 5c9020ffd1..d17a1e993f 100644 --- a/fission/src/systems/simulation/synthesis_brain/SynthesisBrain.ts +++ b/fission/src/systems/simulation/synthesis_brain/SynthesisBrain.ts @@ -1,19 +1,21 @@ -import Mechanism from "@/systems/physics/Mechanism" -import Brain from "../Brain" -import Behavior from "./Behavior" +import Mechanism from "@/systems/physics/Mechanism"; +import Brain from "../Brain"; +import Behavior from "./Behavior"; class SynthesisBrain extends Brain { - public _behaviors: Behavior[] = [] + + public _behaviors: Behavior[] = []; public constructor(mechanism: Mechanism) { - super(mechanism) + super(mechanism); } - public Update(_: number): void {} - public Enable(): void {} + public Update(_: number): void { } + public Enable(): void { } public Disable(): void { - this._behaviors = [] + this._behaviors = []; } + } -export default SynthesisBrain +export default SynthesisBrain; \ No newline at end of file diff --git a/fission/src/test/MirabufParser.test.ts b/fission/src/test/MirabufParser.test.ts index 84d91a1582..881471d42f 100644 --- a/fission/src/test/MirabufParser.test.ts +++ b/fission/src/test/MirabufParser.test.ts @@ -1,47 +1,47 @@ -import { describe, test, expect } from "vitest" +import { describe, test, expect } from "vitest"; -import { mirabuf } from "../proto/mirabuf" -import MirabufParser, { RigidNodeReadOnly } from "../mirabuf/MirabufParser" -import { LoadMirabufLocal } from "../mirabuf/MirabufLoader" +import { mirabuf } from "../proto/mirabuf"; +import MirabufParser, { RigidNodeReadOnly } from "../mirabuf/MirabufParser"; +import { LoadMirabufLocal } from "../mirabuf/MirabufLoader"; -describe("Mirabuf Parser Tests", () => { - test("Generate Rigid Nodes (Dozer_v9.mira)", () => { - const spikeMira = LoadMirabufLocal("./public/Downloadables/Mira/Robots/Dozer_v9.mira") +describe('Mirabuf Parser Tests', () => { + test('Generate Rigid Nodes (Dozer_v9.mira)', () => { + const spikeMira = LoadMirabufLocal('./public/Downloadables/Mira/Robots/Dozer_v9.mira'); - const t = new MirabufParser(spikeMira) - const rn = t.rigidNodes + const t = new MirabufParser(spikeMira); + const rn = t.rigidNodes; - expect(filterNonPhysicsNodes(rn, spikeMira).length).toBe(7) - }) + expect(filterNonPhysicsNodes(rn, spikeMira).length).toBe(7); + }); - test("Generate Rigid Nodes (FRC_Field_2018_v14.mira)", () => { - const field = LoadMirabufLocal("./public/Downloadables/Mira/Fields/FRC Field 2018_v13.mira") + test('Generate Rigid Nodes (FRC_Field_2018_v14.mira)', () => { + const field = LoadMirabufLocal('./public/Downloadables/Mira/Fields/FRC Field 2018_v13.mira'); - const t = new MirabufParser(field) + const t = new MirabufParser(field); - expect(filterNonPhysicsNodes(t.rigidNodes, field).length).toBe(34) - }) + expect(filterNonPhysicsNodes(t.rigidNodes, field).length).toBe(34); + }); - test("Generate Rigid Nodes (Team_2471_(2018)_v7.mira)", () => { - const mm = LoadMirabufLocal("./public/Downloadables/Mira/Robots/Team 2471 (2018)_v7.mira") + test('Generate Rigid Nodes (Team_2471_(2018)_v7.mira)', () => { + const mm = LoadMirabufLocal('./public/Downloadables/Mira/Robots/Team 2471 (2018)_v7.mira'); - const t = new MirabufParser(mm) + const t = new MirabufParser(mm); - expect(filterNonPhysicsNodes(t.rigidNodes, mm).length).toBe(10) - }) -}) + expect(filterNonPhysicsNodes(t.rigidNodes, mm).length).toBe(10); + }); +}); function filterNonPhysicsNodes(nodes: RigidNodeReadOnly[], mira: mirabuf.Assembly): RigidNodeReadOnly[] { return nodes.filter(x => { for (const part of x.parts) { - const inst = mira.data!.parts!.partInstances![part]! - const def = mira.data!.parts!.partDefinitions![inst.partDefinitionReference!]! + const inst = mira.data!.parts!.partInstances![part]!; + const def = mira.data!.parts!.partDefinitions![inst.partDefinitionReference!]!; if (def.bodies && def.bodies.length > 0) { - return true + return true; } } - return false - }) + return false; + }); } // function printRigidNodeParts(nodes: RigidNodeReadOnly[], mira: mirabuf.Assembly) { @@ -50,4 +50,4 @@ function filterNonPhysicsNodes(nodes: RigidNodeReadOnly[], mira: mirabuf.Assembl // x.parts.forEach(y => console.log(`-> '${mira.data!.parts!.partInstances![y]!.info!.name!}'`)); // console.log(''); // }); -// } +// } \ No newline at end of file diff --git a/fission/src/test/PhysicsSystem.test.ts b/fission/src/test/PhysicsSystem.test.ts index 692989e8e9..71246ece9b 100644 --- a/fission/src/test/PhysicsSystem.test.ts +++ b/fission/src/test/PhysicsSystem.test.ts @@ -1,69 +1,85 @@ -import { test, expect, describe, assert } from "vitest" -import PhysicsSystem, { LayerReserve } from "../systems/physics/PhysicsSystem" -import { LoadMirabufLocal } from "@/mirabuf/MirabufLoader" -import MirabufParser from "@/mirabuf/MirabufParser" +import { test, expect, describe, assert } from 'vitest'; +import PhysicsSystem, { LayerReserve } from '../systems/physics/PhysicsSystem'; +import { LoadMirabufLocal } from '@/mirabuf/MirabufLoader'; +import MirabufParser from '@/mirabuf/MirabufParser'; -describe("Physics Sansity Checks", () => { - test("Convex Hull Shape (Cube)", () => { - const points: Float32Array = new Float32Array([ - 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, - 0.5, -0.5, 0.5, 0.5, -0.5, - ]) +describe('Physics Sansity Checks', () => { + test('Convex Hull Shape (Cube)', () => { + const points: Float32Array = new Float32Array( + [ + 0.5, -0.5, 0.5, + -0.5, -0.5, 0.5, + -0.5, -0.5, -0.5, + 0.5, -0.5, -0.5, + 0.5, 0.5, 0.5, + -0.5, 0.5, 0.5, + -0.5, 0.5, -0.5, + 0.5, 0.5, -0.5, + ] + ); - const system = new PhysicsSystem() - const shapeResult = system.CreateConvexHull(points) + const system = new PhysicsSystem(); + const shapeResult = system.CreateConvexHull(points); - assert(shapeResult.HasError() == false, shapeResult.GetError().c_str()) - expect(shapeResult.IsValid()).toBe(true) + assert(shapeResult.HasError() == false, shapeResult.GetError().c_str()); + expect(shapeResult.IsValid()).toBe(true); + + const shape = shapeResult.Get(); - const shape = shapeResult.Get() + expect(shape.GetVolume() - 1.0).toBeLessThan(0.001); + expect(shape.GetCenterOfMass().Length()).toBe(0.0); - expect(shape.GetVolume() - 1.0).toBeLessThan(0.001) - expect(shape.GetCenterOfMass().Length()).toBe(0.0) + shape.Release(); + system.Destroy(); - shape.Release() - system.Destroy() - }) - test("Convex Hull Shape (Tetrahedron)", () => { - const points: Float32Array = new Float32Array([0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]) + }); + test('Convex Hull Shape (Tetrahedron)', () => { + const points: Float32Array = new Float32Array( + [ + 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, + 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0 + ] + ); - const system = new PhysicsSystem() - const shapeResult = system.CreateConvexHull(points) + const system = new PhysicsSystem(); + const shapeResult = system.CreateConvexHull(points); - assert(shapeResult.HasError() == false, shapeResult.GetError().c_str()) - expect(shapeResult.IsValid()).toBe(true) + assert(shapeResult.HasError() == false, shapeResult.GetError().c_str()); + expect(shapeResult.IsValid()).toBe(true); + + const shape = shapeResult.Get(); + const bounds = shape.GetLocalBounds(); + const boxSize = bounds.mMax.Sub(bounds.mMin); + + expect(boxSize.GetX() - 1.0).toBeLessThan(0.001); + expect(boxSize.GetY() - 1.0).toBeLessThan(0.001); + expect(boxSize.GetZ() - 1.0).toBeLessThan(0.001); + expect(shape.GetVolume() - (1.0 / 6.0)).toBeLessThan(0.001); + expect(shape.GetMassProperties().mMass - 6.0).toBeLessThan(0.001); - const shape = shapeResult.Get() - const bounds = shape.GetLocalBounds() - const boxSize = bounds.mMax.Sub(bounds.mMin) + shape.Release(); + system.Destroy(); + }); +}); - expect(boxSize.GetX() - 1.0).toBeLessThan(0.001) - expect(boxSize.GetY() - 1.0).toBeLessThan(0.001) - expect(boxSize.GetZ() - 1.0).toBeLessThan(0.001) - expect(shape.GetVolume() - 1.0 / 6.0).toBeLessThan(0.001) - expect(shape.GetMassProperties().mMass - 6.0).toBeLessThan(0.001) +describe('Mirabuf Physics Loading', () => { + test('Body Loading (Dozer)', () => { + const assembly = LoadMirabufLocal('./public/Downloadables/Mira/Robots/Dozer_v9.mira'); + const parser = new MirabufParser(assembly); + const physSystem = new PhysicsSystem(); + const mapping = physSystem.CreateBodiesFromParser(parser, new LayerReserve()); - shape.Release() - system.Destroy() - }) -}) + expect(mapping.size).toBe(7); + }); -describe("Mirabuf Physics Loading", () => { - test("Body Loading (Dozer)", () => { - const assembly = LoadMirabufLocal("./public/Downloadables/Mira/Robots/Dozer_v9.mira") - const parser = new MirabufParser(assembly) - const physSystem = new PhysicsSystem() - const mapping = physSystem.CreateBodiesFromParser(parser, new LayerReserve()) + test('Body Loading (Team_2471_(2018)_v7.mira)', () => { + const assembly = LoadMirabufLocal('./public/Downloadables/Mira/Robots/Team 2471 (2018)_v7.mira'); + const parser = new MirabufParser(assembly); + const physSystem = new PhysicsSystem(); + const mapping = physSystem.CreateBodiesFromParser(parser, new LayerReserve()); - expect(mapping.size).toBe(7) - }) - - test("Body Loading (Team_2471_(2018)_v7.mira)", () => { - const assembly = LoadMirabufLocal("./public/Downloadables/Mira/Robots/Team 2471 (2018)_v7.mira") - const parser = new MirabufParser(assembly) - const physSystem = new PhysicsSystem() - const mapping = physSystem.CreateBodiesFromParser(parser, new LayerReserve()) - - expect(mapping.size).toBe(10) - }) -}) + expect(mapping.size).toBe(10); + }); +}); \ No newline at end of file diff --git a/fission/src/test/World.test.ts b/fission/src/test/World.test.ts index b3c4bdfcaf..2ffb335834 100644 --- a/fission/src/test/World.test.ts +++ b/fission/src/test/World.test.ts @@ -1,18 +1,19 @@ -import World from "@/systems/World" -import { describe, test, expect, beforeEach, vi } from "vitest" +import World from "@/systems/World"; +import { describe, test, expect, beforeEach, vi } from "vitest"; + +describe('World Tests', () => { -describe("World Tests", () => { beforeEach(() => { - vi.resetAllMocks() - }) + vi.resetAllMocks(); + }); - test("World Sanity Check", () => { - expect(World.isAlive).toBeFalsy() + test('World Sanity Check', () => { + expect(World.isAlive).toBeFalsy(); // TODO: Find a way to mock window global // World.InitWorld(); // expect(World.isAlive).toBeTruthy(); // expect(World.SceneRenderer).toBeTruthy(); // expect(World.DestroyWorld).toBeTruthy(); - }) -}) + }); +}) \ No newline at end of file diff --git a/fission/src/test/aps/APS.test.ts b/fission/src/test/aps/APS.test.ts index 2721a33633..3e7da5f219 100644 --- a/fission/src/test/aps/APS.test.ts +++ b/fission/src/test/aps/APS.test.ts @@ -1,11 +1,11 @@ -import APS from "@/aps/APS" -import { describe, expect, test } from "vitest" +import APS from "@/aps/APS"; +import { describe, expect, test } from "vitest"; -describe("APS", () => { - test("Generate Random Strings (10)", () => { - const s = APS.genRandomString(10) +describe('APS', () => { + test('Generate Random Strings (10)', () => { + const s = APS.genRandomString(10); - ;(async () => { + (async () => { const [v, c] = await APS.codeChallenge() console.log(`${v}`) console.log(`${c}`) @@ -18,7 +18,7 @@ describe("APS", () => { expect(matches![0]).toBe(s) }) - test("Generate Random Strings (50)", () => { + test('Generate Random Strings (50)', () => { const s = APS.genRandomString(50) expect(s.length).toBe(50) @@ -28,7 +28,7 @@ describe("APS", () => { expect(matches![0]).toBe(s) }) - test("Generate Random Strings (75)", () => { + test('Generate Random Strings (75)', () => { const s = APS.genRandomString(75) expect(s.length).toBe(75) @@ -37,4 +37,4 @@ describe("APS", () => { expect(matches!.length).toBeGreaterThanOrEqual(1) expect(matches![0]).toBe(s) }) -}) +}) \ No newline at end of file diff --git a/fission/src/test/util/Queue.test.ts b/fission/src/test/util/Queue.test.ts index c9a4cde694..13b0a9f985 100644 --- a/fission/src/test/util/Queue.test.ts +++ b/fission/src/test/util/Queue.test.ts @@ -1,76 +1,76 @@ -import { test, expect, describe } from "vitest" +import { test, expect, describe } from 'vitest'; -import Queue from "../../util/Queue" -import { Random } from "../../util/Random" +import Queue from '../../util/Queue'; +import { Random } from '../../util/Random'; -describe("Queue Tests", () => { - test("Create Empty", () => { - const q = new Queue() - expect(q.Dequeue()).toBeUndefined() - expect(q.size).toBe(0) - }) +describe('Queue Tests', () => { + test('Create Empty', () => { + const q = new Queue(); + expect(q.Dequeue()).toBeUndefined(); + expect(q.size).toBe(0); + }); - test("Single Element", () => { - const q = new Queue() - const element = 5 - q.Enqueue(element) + test('Single Element', () => { + const q = new Queue(); + const element = 5; + q.Enqueue(element); - expect(q.size).toBe(1) - expect(q.Dequeue()).toBe(element) - expect(q.size).toBe(0) - }) + expect(q.size).toBe(1); + expect(q.Dequeue()).toBe(element); + expect(q.size).toBe(0); + }); - test("Five Elements", () => { - const q = new Queue() - const elements = [1, 4, 5, 2, 6] - q.Enqueue(...elements) + test('Five Elements', () => { + const q = new Queue(); + const elements = [ 1, 4, 5, 2, 6 ]; + q.Enqueue(...elements); - let expectedSize = elements.length + let expectedSize = elements.length; for (const element of elements) { - expect(q.size).toBe(expectedSize) - expect(q.Dequeue()).toBe(element) - expectedSize-- + expect(q.size).toBe(expectedSize); + expect(q.Dequeue()).toBe(element); + expectedSize--; } - expect(q.size).toBe(0) - expect(q.Dequeue()).toBeUndefined() - }) + expect(q.size).toBe(0); + expect(q.Dequeue()).toBeUndefined(); + }); - test("Add 5, Remove 3, Add 8, Remove All", () => { - const q = new Queue() - const elementsA = [1, 4, 5, 2, 6] - const elementsB = [1, 4, 5, 2, 6, 9, 10, 54] + test('Add 5, Remove 3, Add 8, Remove All', () => { + const q = new Queue(); + const elementsA = [ 1, 4, 5, 2, 6 ]; + const elementsB = [ 1, 4, 5, 2, 6, 9, 10, 54 ]; - q.Enqueue(...elementsA) - expect(q.size).toBe(5) + q.Enqueue(...elementsA); + expect(q.size).toBe(5); for (let i = 0; i < 3; i++) { - expect(q.Dequeue()).toBe(elementsA[i]) - expect(q.size).toBe(elementsA.length - (i + 1)) + expect(q.Dequeue()).toBe(elementsA[i]); + expect(q.size).toBe(elementsA.length - (i + 1)); } - q.Enqueue(...elementsB) - expect(q.size).toBe(10) + q.Enqueue(...elementsB); + expect(q.size).toBe(10); for (let i = 0; i < 2; i++) { - expect(q.Dequeue()).toBe(elementsA[i + 3]) - expect(q.size).toBe(9 - i) + expect(q.Dequeue()).toBe(elementsA[i + 3]); + expect(q.size).toBe(9 - i); } for (let i = 0; i < 8; i++) { - expect(q.Dequeue()).toBe(elementsB[i]) - expect(q.size).toBe(7 - i) + expect(q.Dequeue()).toBe(elementsB[i]); + expect(q.size).toBe(7 - i); } - expect(q.size).toBe(0) - expect(q.Dequeue()).toBeUndefined() - }) + expect(q.size).toBe(0); + expect(q.Dequeue()).toBeUndefined(); + }); - test("Queue Clone (100 Elements)", () => { - const q1 = new Queue() + test('Queue Clone (100 Elements)', () => { + const q1 = new Queue(); for (let i = 0; i < 100; i++) { - q1.Enqueue(Math.floor(Random() * 400)) + q1.Enqueue(Math.floor(Random() * 400)); } - const q2 = q1.Clone() - expect(q2.size).toBe(q1.size) + const q2 = q1.Clone(); + expect(q2.size).toBe(q1.size); for (let i = 0; i < q1.size; i++) { - expect(q2.Dequeue()).toBe(q1.Dequeue()) + expect(q2.Dequeue()).toBe(q1.Dequeue()); } - }) -}) + }); +}); \ No newline at end of file diff --git a/fission/src/test/util/Random.test.ts b/fission/src/test/util/Random.test.ts index e26c78f1eb..c19ab10d68 100644 --- a/fission/src/test/util/Random.test.ts +++ b/fission/src/test/util/Random.test.ts @@ -1,13 +1,13 @@ -import { test, expect, describe } from "vitest" -import * as Random from "../../util/Random" +import { test, expect, describe } from 'vitest'; +import * as Random from '../../util/Random'; -describe("Random Number Generator Tests", () => { - test("Range Compliance", () => { - Random.SeedRandomGen(67542431) +describe('Random Number Generator Tests', () => { + test('Range Compliance', () => { + Random.SeedRandomGen(67542431); for (let i = 0; i < 99; i++) { - const a = Random.Random() - expect(a).toBeLessThan(1.0) - expect(a).toBeGreaterThanOrEqual(0.0) + const a = Random.Random(); + expect(a).toBeLessThan(1.0); + expect(a).toBeGreaterThanOrEqual(0.0); } - }) -}) + }); +}); \ No newline at end of file diff --git a/fission/src/test/util/TypeConversions.test.ts b/fission/src/test/util/TypeConversions.test.ts index 7988c2905c..a3049957b2 100644 --- a/fission/src/test/util/TypeConversions.test.ts +++ b/fission/src/test/util/TypeConversions.test.ts @@ -1,151 +1,165 @@ -import { test, expect, describe } from "vitest" -import * as THREE from "three" -import { - JoltMat44_ThreeMatrix4, - MirabufTransform_ThreeMatrix4, - ThreeEuler_JoltQuat, - ThreeMatrix4_JoltMat44, - ThreeQuaternion_JoltQuat, - ThreeVector3_JoltVec3, - _JoltQuat, -} from "../../util/TypeConversions" -import { mirabuf } from "../../proto/mirabuf" -import JOLT from "../../util/loading/JoltSyncLoader" -import Jolt from "@barclah/jolt-physics" - -describe("Three to Jolt Conversions", async () => { +import { test, expect, describe } from 'vitest'; +import * as THREE from 'three'; +import { JoltMat44_ThreeMatrix4, MirabufTransform_ThreeMatrix4, ThreeEuler_JoltQuat, ThreeMatrix4_JoltMat44, ThreeQuaternion_JoltQuat, ThreeVector3_JoltVec3, _JoltQuat } from '../../util/TypeConversions'; +import { mirabuf } from '../../proto/mirabuf'; +import JOLT from '../../util/loading/JoltSyncLoader'; +import Jolt from '@barclah/jolt-physics'; + +describe('Three to Jolt Conversions', async () => { + function compareMat(tM: THREE.Matrix4, jM: Jolt.Mat44) { - const threeArr = tM.toArray() + const threeArr = tM.toArray(); for (let c = 0; c < 4; c++) { - const column = jM.GetColumn4(c) + const column = jM.GetColumn4(c); for (let r = 0; r < 4; r++) { - expect(threeArr[c * 4 + r]).toBeCloseTo(column.GetComponent(r), 4) + expect(threeArr[c * 4 + r]).toBeCloseTo(column.GetComponent(r), 4); } - JOLT.destroy(column) + JOLT.destroy(column); } - const threeTranslation = new THREE.Vector3() - const threeRotation = new THREE.Quaternion() - const threeScale = new THREE.Vector3() - tM.decompose(threeTranslation, threeRotation, threeScale) + const threeTranslation = new THREE.Vector3(); + const threeRotation = new THREE.Quaternion(); + const threeScale = new THREE.Vector3(); + tM.decompose(threeTranslation, threeRotation, threeScale); - const joltTranslation = jM.GetTranslation() - const joltRotation = jM.GetQuaternion() - const joltScale = new JOLT.Vec3(1, 1, 1) + const joltTranslation = jM.GetTranslation(); + const joltRotation = jM.GetQuaternion(); + const joltScale = new JOLT.Vec3(1, 1, 1); - expect(joltTranslation.GetX()).toBeCloseTo(threeTranslation.x, 4) - expect(joltTranslation.GetY()).toBeCloseTo(threeTranslation.y, 4) - expect(joltTranslation.GetZ()).toBeCloseTo(threeTranslation.z, 4) + expect(joltTranslation.GetX()).toBeCloseTo(threeTranslation.x, 4); + expect(joltTranslation.GetY()).toBeCloseTo(threeTranslation.y, 4); + expect(joltTranslation.GetZ()).toBeCloseTo(threeTranslation.z, 4); // JOLT.destroy(joltTranslation); // Causes error for some reason? - expect(joltRotation.GetX()).toBeCloseTo(threeRotation.x, 4) - expect(joltRotation.GetY()).toBeCloseTo(threeRotation.y, 4) - expect(joltRotation.GetZ()).toBeCloseTo(threeRotation.z, 4) - expect(joltRotation.GetW()).toBeCloseTo(threeRotation.w, 4) - JOLT.destroy(joltRotation) - expect(joltScale.GetX()).toBeCloseTo(threeScale.x, 4) - expect(joltScale.GetY()).toBeCloseTo(threeScale.y, 4) - expect(joltScale.GetZ()).toBeCloseTo(threeScale.z, 4) - JOLT.destroy(joltScale) + expect(joltRotation.GetX()).toBeCloseTo(threeRotation.x, 4); + expect(joltRotation.GetY()).toBeCloseTo(threeRotation.y, 4); + expect(joltRotation.GetZ()).toBeCloseTo(threeRotation.z, 4); + expect(joltRotation.GetW()).toBeCloseTo(threeRotation.w, 4); + JOLT.destroy(joltRotation); + expect(joltScale.GetX()).toBeCloseTo(threeScale.x, 4); + expect(joltScale.GetY()).toBeCloseTo(threeScale.y, 4); + expect(joltScale.GetZ()).toBeCloseTo(threeScale.z, 4); + JOLT.destroy(joltScale); } - test("THREE.Vector3 -> Jolt.Vec3", () => { - const a = new THREE.Vector3(2, 4, 1) - const joltVec = ThreeVector3_JoltVec3(a) - - expect(joltVec.GetX()).toBe(a.x) - expect(joltVec.GetY()).toBe(a.y) - expect(joltVec.GetZ()).toBe(a.z) - expect(joltVec.Length() - a.length()).toBeLessThan(0.0001) - }) - - test("THREE.Euler -> Jolt.Quat", () => { - const a = new THREE.Euler(30, 60, 15) - const joltQuat = ThreeEuler_JoltQuat(a) - const threeQuat = new THREE.Quaternion() - threeQuat.setFromEuler(a) - - expect(joltQuat.GetX() - threeQuat.x).toBeLessThan(0.0001) - expect(joltQuat.GetY() - threeQuat.y).toBeLessThan(0.0001) - expect(joltQuat.GetZ() - threeQuat.z).toBeLessThan(0.0001) - expect(joltQuat.GetW() - threeQuat.w).toBeLessThan(0.0001) - }) - - test("THREE.Quaternion -> Jolt.Quat", () => { - const a = new THREE.Quaternion(0.285, 0.45, 0.237, 0.812) - a.normalize() - const joltQuat = ThreeQuaternion_JoltQuat(a) - - expect(joltQuat.GetX() - a.x).toBeLessThan(0.0001) - expect(joltQuat.GetY() - a.y).toBeLessThan(0.0001) - expect(joltQuat.GetZ() - a.z).toBeLessThan(0.0001) - expect(joltQuat.GetW() - a.w).toBeLessThan(0.0001) - }) - - test("THREE.Quaterion -> Jolt.Quat (General Func)", () => { - const a = new THREE.Quaternion(0.285, 0.45, 0.237, 0.812) - a.normalize() - const joltQuat = _JoltQuat(a) - - expect(joltQuat.GetX() - a.x).toBeLessThan(0.0001) - expect(joltQuat.GetY() - a.y).toBeLessThan(0.0001) - expect(joltQuat.GetZ() - a.z).toBeLessThan(0.0001) - expect(joltQuat.GetW() - a.w).toBeLessThan(0.0001) - }) - - test("THREE.Euler -> Jolt.Quat (General Func)", () => { - const a = new THREE.Euler(30, 60, 15) - const joltQuat = _JoltQuat(a) - const threeQuat = new THREE.Quaternion() - threeQuat.setFromEuler(a) - - expect(joltQuat.GetX() - threeQuat.x).toBeLessThan(0.0001) - expect(joltQuat.GetY() - threeQuat.y).toBeLessThan(0.0001) - expect(joltQuat.GetZ() - threeQuat.z).toBeLessThan(0.0001) - expect(joltQuat.GetW() - threeQuat.w).toBeLessThan(0.0001) - }) - - test("undefined -> Jolt.Quat (General Func)", () => { - const joltQuat = _JoltQuat(undefined) - - expect(joltQuat.GetX()).toBe(0.0) - expect(joltQuat.GetY()).toBe(0.0) - expect(joltQuat.GetZ()).toBe(0.0) - expect(joltQuat.GetW()).toBe(1.0) - }) - - test("THREE.Matrix4 [Identity] -> Jolt.Mat44", () => { - const threeMat = new THREE.Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) - - const jMat = ThreeMatrix4_JoltMat44(threeMat) - - compareMat(threeMat, jMat) - }) - - test("THREE.Matrix4 [+X Axis Rotation] -> Jolt.Mat44", () => { - const threeMat = new THREE.Matrix4(1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1) - - const jMat = ThreeMatrix4_JoltMat44(threeMat) - - compareMat(threeMat, jMat) - }) - - test("THREE.Matrix4 [-X Axis Rotation] -> Jolt.Mat44", () => { - const threeMat = new THREE.Matrix4(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1) - - const jMat = ThreeMatrix4_JoltMat44(threeMat) - - compareMat(threeMat, jMat) - }) - - test("THREE.Matrix4 [XY Translation] -> Jolt.Mat44", () => { - const threeMat = new THREE.Matrix4(1, 0, 0, 3, 0, 1, 0, 5, 0, 0, 1, 0, 0, 0, 0, 1) - - const jMat = ThreeMatrix4_JoltMat44(threeMat) - - compareMat(threeMat, jMat) - }) -}) + test('THREE.Vector3 -> Jolt.Vec3', () => { + const a = new THREE.Vector3(2, 4, 1); + const joltVec = ThreeVector3_JoltVec3(a); + + expect(joltVec.GetX()).toBe(a.x); + expect(joltVec.GetY()).toBe(a.y); + expect(joltVec.GetZ()).toBe(a.z); + expect(joltVec.Length() - a.length()).toBeLessThan(0.0001); + }); + + test('THREE.Euler -> Jolt.Quat', () => { + const a = new THREE.Euler(30, 60, 15); + const joltQuat = ThreeEuler_JoltQuat(a); + const threeQuat = new THREE.Quaternion(); + threeQuat.setFromEuler(a); + + expect(joltQuat.GetX() - threeQuat.x).toBeLessThan(0.0001); + expect(joltQuat.GetY() - threeQuat.y).toBeLessThan(0.0001); + expect(joltQuat.GetZ() - threeQuat.z).toBeLessThan(0.0001); + expect(joltQuat.GetW() - threeQuat.w).toBeLessThan(0.0001); + }); + + test('THREE.Quaternion -> Jolt.Quat', () => { + const a = new THREE.Quaternion(0.285, 0.450, 0.237, 0.812); + a.normalize(); + const joltQuat = ThreeQuaternion_JoltQuat(a); + + expect(joltQuat.GetX() - a.x).toBeLessThan(0.0001); + expect(joltQuat.GetY() - a.y).toBeLessThan(0.0001); + expect(joltQuat.GetZ() - a.z).toBeLessThan(0.0001); + expect(joltQuat.GetW() - a.w).toBeLessThan(0.0001); + }); + + test('THREE.Quaterion -> Jolt.Quat (General Func)', () => { + const a = new THREE.Quaternion(0.285, 0.450, 0.237, 0.812); + a.normalize(); + const joltQuat = _JoltQuat(a); + + expect(joltQuat.GetX() - a.x).toBeLessThan(0.0001); + expect(joltQuat.GetY() - a.y).toBeLessThan(0.0001); + expect(joltQuat.GetZ() - a.z).toBeLessThan(0.0001); + expect(joltQuat.GetW() - a.w).toBeLessThan(0.0001); + }); + + test('THREE.Euler -> Jolt.Quat (General Func)', () => { + const a = new THREE.Euler(30, 60, 15); + const joltQuat = _JoltQuat(a); + const threeQuat = new THREE.Quaternion(); + threeQuat.setFromEuler(a); + + expect(joltQuat.GetX() - threeQuat.x).toBeLessThan(0.0001); + expect(joltQuat.GetY() - threeQuat.y).toBeLessThan(0.0001); + expect(joltQuat.GetZ() - threeQuat.z).toBeLessThan(0.0001); + expect(joltQuat.GetW() - threeQuat.w).toBeLessThan(0.0001); + }); + + test('undefined -> Jolt.Quat (General Func)', () => { + const joltQuat = _JoltQuat(undefined); + + expect(joltQuat.GetX()).toBe(0.0); + expect(joltQuat.GetY()).toBe(0.0); + expect(joltQuat.GetZ()).toBe(0.0); + expect(joltQuat.GetW()).toBe(1.0); + }); + + test('THREE.Matrix4 [Identity] -> Jolt.Mat44', () => { + const threeMat = new THREE.Matrix4( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + const jMat = ThreeMatrix4_JoltMat44(threeMat); + + compareMat(threeMat, jMat); + }); + + test('THREE.Matrix4 [+X Axis Rotation] -> Jolt.Mat44', () => { + const threeMat = new THREE.Matrix4( + 1, 0, 0, 0, + 0, 0, 1, 0, + 0,-1, 0, 0, + 0, 0, 0, 1 + ); + + const jMat = ThreeMatrix4_JoltMat44(threeMat); + + compareMat(threeMat, jMat); + }); + + test('THREE.Matrix4 [-X Axis Rotation] -> Jolt.Mat44', () => { + const threeMat = new THREE.Matrix4( + 1, 0, 0, 0, + 0, 0,-1, 0, + 0, 1, 0, 0, + 0, 0, 0, 1 + ); + + const jMat = ThreeMatrix4_JoltMat44(threeMat); + + compareMat(threeMat, jMat); + }); + + test('THREE.Matrix4 [XY Translation] -> Jolt.Mat44', () => { + const threeMat = new THREE.Matrix4( + 1, 0, 0, 3, + 0, 1, 0, 5, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + const jMat = ThreeMatrix4_JoltMat44(threeMat); + + compareMat(threeMat, jMat); + }); + +}); // function matToString(mat: THREE.Matrix4) { // const arr = mat.toArray(); @@ -163,168 +177,184 @@ describe("Three to Jolt Conversions", async () => { // + `${arr[12].toFixed(4)}, ${arr[13].toFixed(4)}, ${arr[14].toFixed(4)}, ${arr[15].toFixed(4)},\n]` // } -describe("Mirabuf to Three Conversions", () => { - test("Mirabuf.Transform [Identity] -> THREE.Matrix4", () => { - const miraMat = new mirabuf.Transform() - miraMat.spatialMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] +describe('Mirabuf to Three Conversions', () => { + test('Mirabuf.Transform [Identity] -> THREE.Matrix4', () => { + const miraMat = new mirabuf.Transform(); + miraMat.spatialMatrix = [ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ]; // console.debug(`Mira: ${miraMatToString(miraMat)}`); - const threeMat = MirabufTransform_ThreeMatrix4(miraMat) + const threeMat = MirabufTransform_ThreeMatrix4(miraMat); // console.debug(`Three: ${matToString(threeMat)}`); - const miraArr = miraMat.spatialMatrix - const threeArr = threeMat.transpose().toArray() // To Array gives column major for some reason. See docs + const miraArr = miraMat.spatialMatrix; + const threeArr = threeMat.transpose().toArray(); // To Array gives column major for some reason. See docs for (let i = 0; i < 16; i++) { - expect(threeArr[i]).toBe(miraArr[i]) + expect(threeArr[i]).toBe(miraArr[i]); } - }) + }); - test("Mirabuf.Transform [+X Axis Rotation] -> THREE.Matrix4", () => { - const miraMat = new mirabuf.Transform() - miraMat.spatialMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1] + test('Mirabuf.Transform [+X Axis Rotation] -> THREE.Matrix4', () => { + const miraMat = new mirabuf.Transform(); + miraMat.spatialMatrix = [ + 1, 0, 0, 0, + 0, 0, 1, 0, + 0,-1, 0, 0, + 0, 0, 0, 1 + ]; // console.debug(`Mira: ${miraMatToString(miraMat)}`); - const threeMat = MirabufTransform_ThreeMatrix4(miraMat) + const threeMat = MirabufTransform_ThreeMatrix4(miraMat); // console.debug(`Three: ${matToString(threeMat)}`); - const miraArr = miraMat.spatialMatrix - const threeArr = threeMat.transpose().toArray() // To Array gives column major for some reason. See docs + const miraArr = miraMat.spatialMatrix; + const threeArr = threeMat.transpose().toArray(); // To Array gives column major for some reason. See docs for (let i = 0; i < 16; i++) { - expect(threeArr[i]).toBeCloseTo(miraArr[i]) + expect(threeArr[i]).toBeCloseTo(miraArr[i]); } - }) + }); - test("Mirabuf.Transform [-X Axis Rotation] -> THREE.Matrix4", () => { - const miraMat = new mirabuf.Transform() - miraMat.spatialMatrix = [1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1] + test('Mirabuf.Transform [-X Axis Rotation] -> THREE.Matrix4', () => { + const miraMat = new mirabuf.Transform(); + miraMat.spatialMatrix = [ + 1, 0, 0, 0, + 0, 0,-1, 0, + 0, 1, 0, 0, + 0, 0, 0, 1 + ]; // console.debug(`Mira: ${miraMatToString(miraMat)}`); - const threeMat = MirabufTransform_ThreeMatrix4(miraMat) + const threeMat = MirabufTransform_ThreeMatrix4(miraMat); // console.debug(`Three: ${matToString(threeMat)}`); - const miraArr = miraMat.spatialMatrix - const threeArr = threeMat.transpose().toArray() // To Array gives column major for some reason. See docs + const miraArr = miraMat.spatialMatrix; + const threeArr = threeMat.transpose().toArray(); // To Array gives column major for some reason. See docs for (let i = 0; i < 16; i++) { - expect(threeArr[i]).toBeCloseTo(miraArr[i]) + expect(threeArr[i]).toBeCloseTo(miraArr[i]); } - }) -}) + }); +}); + +describe('Jolt to Three Conversions', () => { -describe("Jolt to Three Conversions", () => { function compareMat(jM: Jolt.Mat44, tM: THREE.Matrix4) { - const threeArr = tM.toArray() + const threeArr = tM.toArray(); for (let c = 0; c < 4; c++) { - const column = jM.GetColumn4(c) + const column = jM.GetColumn4(c); for (let r = 0; r < 4; r++) { - expect(threeArr[c * 4 + r]).toBeCloseTo(column.GetComponent(r), 4) + expect(threeArr[c * 4 + r]).toBeCloseTo(column.GetComponent(r), 4); } - JOLT.destroy(column) + JOLT.destroy(column); } - const threeTranslation = new THREE.Vector3() - const threeRotation = new THREE.Quaternion() - const threeScale = new THREE.Vector3() - tM.decompose(threeTranslation, threeRotation, threeScale) + const threeTranslation = new THREE.Vector3(); + const threeRotation = new THREE.Quaternion(); + const threeScale = new THREE.Vector3(); + tM.decompose(threeTranslation, threeRotation, threeScale); - const joltTranslation = jM.GetTranslation() - const joltRotation = jM.GetQuaternion() - const joltScale = new JOLT.Vec3(1, 1, 1) + const joltTranslation = jM.GetTranslation(); + const joltRotation = jM.GetQuaternion(); + const joltScale = new JOLT.Vec3(1, 1, 1); - expect(threeTranslation.x).toBeCloseTo(joltTranslation.GetX(), 4) - expect(threeTranslation.y).toBeCloseTo(joltTranslation.GetY(), 4) - expect(threeTranslation.z).toBeCloseTo(joltTranslation.GetZ(), 4) + expect(threeTranslation.x).toBeCloseTo(joltTranslation.GetX(), 4); + expect(threeTranslation.y).toBeCloseTo(joltTranslation.GetY(), 4); + expect(threeTranslation.z).toBeCloseTo(joltTranslation.GetZ(), 4); // JOLT.destroy(joltTranslation); // Causes error for some reason? - expect(threeRotation.x).toBeCloseTo(joltRotation.GetX(), 4) - expect(threeRotation.y).toBeCloseTo(joltRotation.GetY(), 4) - expect(threeRotation.z).toBeCloseTo(joltRotation.GetZ(), 4) - expect(threeRotation.w).toBeCloseTo(joltRotation.GetW(), 4) - JOLT.destroy(joltRotation) - expect(threeScale.x).toBeCloseTo(joltScale.GetX(), 4) - expect(threeScale.y).toBeCloseTo(joltScale.GetY(), 4) - expect(threeScale.z).toBeCloseTo(joltScale.GetZ(), 4) - JOLT.destroy(joltScale) + expect(threeRotation.x).toBeCloseTo(joltRotation.GetX(), 4); + expect(threeRotation.y).toBeCloseTo(joltRotation.GetY(), 4); + expect(threeRotation.z).toBeCloseTo(joltRotation.GetZ(), 4); + expect(threeRotation.w).toBeCloseTo(joltRotation.GetW(), 4); + JOLT.destroy(joltRotation); + expect(threeScale.x).toBeCloseTo(joltScale.GetX(), 4); + expect(threeScale.y).toBeCloseTo(joltScale.GetY(), 4); + expect(threeScale.z).toBeCloseTo(joltScale.GetZ(), 4); + JOLT.destroy(joltScale); } - test("Jolt.Mat44 [Identity] -> THREE.Matrix4", () => { - const tmp = new JOLT.Mat44() - const joltMat = tmp.sIdentity() - const threeMat = JoltMat44_ThreeMatrix4(joltMat) - - compareMat(joltMat, threeMat) - - JOLT.destroy(joltMat) - }) - - test("Jolt.Mat44 [+X Axis Rotation] -> THREE.Matrix4", () => { - const joltMat = new JOLT.Mat44() - const c0 = new JOLT.Vec4(1, 0, 0, 0) - const c1 = new JOLT.Vec4(0, 0, -1, 0) - const c2 = new JOLT.Vec4(0, 1, 0, 0) - const c3 = new JOLT.Vec4(0, 0, 0, 1) - joltMat.SetColumn4(0, c0) - joltMat.SetColumn4(1, c1) - joltMat.SetColumn4(2, c2) - joltMat.SetColumn4(3, c3) - JOLT.destroy(c0) - JOLT.destroy(c1) - JOLT.destroy(c2) - JOLT.destroy(c3) - - const threeMat = JoltMat44_ThreeMatrix4(joltMat) - - compareMat(joltMat, threeMat) - - JOLT.destroy(joltMat) - }) - - test("Jolt.Mat44 [-X Axis Rotation] -> THREE.Matrix4", () => { - const joltMat = new JOLT.Mat44() - const c0 = new JOLT.Vec4(1, 0, 0, 0) - const c1 = new JOLT.Vec4(0, 0, 1, 0) - const c2 = new JOLT.Vec4(0, -1, 0, 0) - const c3 = new JOLT.Vec4(0, 0, 0, 1) - joltMat.SetColumn4(0, c0) - joltMat.SetColumn4(1, c1) - joltMat.SetColumn4(2, c2) - joltMat.SetColumn4(3, c3) - JOLT.destroy(c0) - JOLT.destroy(c1) - JOLT.destroy(c2) - JOLT.destroy(c3) - - const threeMat = JoltMat44_ThreeMatrix4(joltMat) - - compareMat(joltMat, threeMat) - - JOLT.destroy(joltMat) - }) - - test("Jolt.Mat44 [X,Y Translation] -> THREE.Matrix4", () => { - const joltMat = new JOLT.Mat44() - const c0 = new JOLT.Vec4(1, 0, 0, 0) - const c1 = new JOLT.Vec4(0, 1, 0, 0) - const c2 = new JOLT.Vec4(0, 0, 1, 0) - const c3 = new JOLT.Vec4(5, 3, 0, 1) - joltMat.SetColumn4(0, c0) - joltMat.SetColumn4(1, c1) - joltMat.SetColumn4(2, c2) - joltMat.SetColumn4(3, c3) - JOLT.destroy(c0) - JOLT.destroy(c1) - JOLT.destroy(c2) - JOLT.destroy(c3) - - const threeMat = JoltMat44_ThreeMatrix4(joltMat) - - compareMat(joltMat, threeMat) - - JOLT.destroy(joltMat) - }) -}) + test('Jolt.Mat44 [Identity] -> THREE.Matrix4', () => { + const tmp = new JOLT.Mat44(); + const joltMat = tmp.sIdentity(); + const threeMat = JoltMat44_ThreeMatrix4(joltMat); + + compareMat(joltMat, threeMat); + + JOLT.destroy(joltMat); + }); + + test('Jolt.Mat44 [+X Axis Rotation] -> THREE.Matrix4', () => { + const joltMat = new JOLT.Mat44(); + const c0 = new JOLT.Vec4(1, 0, 0, 0); + const c1 = new JOLT.Vec4(0, 0,-1, 0); + const c2 = new JOLT.Vec4(0, 1, 0, 0); + const c3 = new JOLT.Vec4(0, 0, 0, 1); + joltMat.SetColumn4(0, c0); + joltMat.SetColumn4(1, c1); + joltMat.SetColumn4(2, c2); + joltMat.SetColumn4(3, c3); + JOLT.destroy(c0); + JOLT.destroy(c1); + JOLT.destroy(c2); + JOLT.destroy(c3); + + const threeMat = JoltMat44_ThreeMatrix4(joltMat); + + compareMat(joltMat, threeMat); + + JOLT.destroy(joltMat); + }); + + test('Jolt.Mat44 [-X Axis Rotation] -> THREE.Matrix4', () => { + const joltMat = new JOLT.Mat44(); + const c0 = new JOLT.Vec4(1, 0, 0, 0); + const c1 = new JOLT.Vec4(0, 0, 1, 0); + const c2 = new JOLT.Vec4(0,-1, 0, 0); + const c3 = new JOLT.Vec4(0, 0, 0, 1); + joltMat.SetColumn4(0, c0); + joltMat.SetColumn4(1, c1); + joltMat.SetColumn4(2, c2); + joltMat.SetColumn4(3, c3); + JOLT.destroy(c0); + JOLT.destroy(c1); + JOLT.destroy(c2); + JOLT.destroy(c3); + + const threeMat = JoltMat44_ThreeMatrix4(joltMat); + + compareMat(joltMat, threeMat); + + JOLT.destroy(joltMat); + }); + + test('Jolt.Mat44 [X,Y Translation] -> THREE.Matrix4', () => { + const joltMat = new JOLT.Mat44(); + const c0 = new JOLT.Vec4(1, 0, 0, 0); + const c1 = new JOLT.Vec4(0, 1, 0, 0); + const c2 = new JOLT.Vec4(0, 0, 1, 0); + const c3 = new JOLT.Vec4(5, 3, 0, 1); + joltMat.SetColumn4(0, c0); + joltMat.SetColumn4(1, c1); + joltMat.SetColumn4(2, c2); + joltMat.SetColumn4(3, c3); + JOLT.destroy(c0); + JOLT.destroy(c1); + JOLT.destroy(c2); + JOLT.destroy(c3); + + const threeMat = JoltMat44_ThreeMatrix4(joltMat); + + compareMat(joltMat, threeMat); + + JOLT.destroy(joltMat); + }); +}); \ No newline at end of file diff --git a/fission/src/ui/ModalContext.tsx b/fission/src/ui/ModalContext.tsx index d0fe266274..2b0db95579 100644 --- a/fission/src/ui/ModalContext.tsx +++ b/fission/src/ui/ModalContext.tsx @@ -1,7 +1,19 @@ -import React, { createContext, useState, useEffect, useCallback, useContext, ReactNode, ReactElement } from "react" +import React, { + createContext, + useState, + useEffect, + useCallback, + useContext, + ReactNode, + ReactElement, +} from "react" type ModalControlContextType = { - openModal: (modalId: string, onOpen?: () => void, onClose?: () => void) => void + openModal: ( + modalId: string, + onOpen?: () => void, + onClose?: () => void + ) => void closeModal: () => void children?: ReactNode } @@ -10,12 +22,22 @@ const ModalControlContext = createContext(null) export const useModalControlContext = () => { const context = useContext(ModalControlContext) - if (!context) throw new Error("useModalControlContext must be used within a ModalControlProvider") + if (!context) + throw new Error( + "useModalControlContext must be used within a ModalControlProvider" + ) return context } -export const ModalControlProvider: React.FC = ({ children, ...methods }) => { - return {children} +export const ModalControlProvider: React.FC = ({ + children, + ...methods +}) => { + return ( + + {children} + + ) } type ModalInstance = { diff --git a/fission/src/ui/PanelContext.tsx b/fission/src/ui/PanelContext.tsx index 63aae1b058..9e3a40eaad 100644 --- a/fission/src/ui/PanelContext.tsx +++ b/fission/src/ui/PanelContext.tsx @@ -1,4 +1,12 @@ -import React, { createContext, useState, useEffect, useCallback, useContext, ReactNode, ReactElement } from "react" +import React, { + createContext, + useState, + useEffect, + useCallback, + useContext, + ReactNode, + ReactElement, +} from "react" type PanelControlContextType = { openPanel: (panelId: string) => void @@ -10,12 +18,22 @@ const PanelControlContext = createContext(null) export const usePanelControlContext = () => { const context = useContext(PanelControlContext) - if (!context) throw new Error("usePanelControlContext must be used within a PanelControlProvider") + if (!context) + throw new Error( + "usePanelControlContext must be used within a PanelControlProvider" + ) return context } -export const PanelControlProvider: React.FC = ({ children, ...methods }) => { - return {children} +export const PanelControlProvider: React.FC = ({ + children, + ...methods +}) => { + return ( + + {children} + + ) } type PanelInstance = { diff --git a/fission/src/ui/ThemeContext.tsx b/fission/src/ui/ThemeContext.tsx index ef33d33fac..901b76ce19 100644 --- a/fission/src/ui/ThemeContext.tsx +++ b/fission/src/ui/ThemeContext.tsx @@ -34,13 +34,11 @@ export type ColorName = | "ToastError" export const colorNameToTailwind = (colorName: ColorName) => { - return ( - "bg" + + return "bg" + colorName .replace(/([A-Z]+)/g, "-$1") .replace(/(?<=[A-Z])([A-Z])(?![A-Z]|$)/g, "-$1") .toLowerCase() - ) } export const colorNameToProp = (colorName: ColorName) => { return ( @@ -51,9 +49,7 @@ export const colorNameToProp = (colorName: ColorName) => { .toLowerCase() ) } -export type Theme = { - [name in ColorName]: { color: RgbaColor; above: (ColorName | string)[] } -} +export type Theme = { [name in ColorName]: { color: RgbaColor, above: (ColorName | string)[] } } export type Themes = { [name: string]: Theme } type ThemeContextType = { @@ -62,7 +58,11 @@ type ThemeContextType = { defaultTheme: Theme currentTheme: string setTheme: (themeName: string) => void - updateColor: (themeName: string, colorName: ColorName, rgbaColor: RgbaColor) => void + updateColor: ( + themeName: string, + colorName: ColorName, + rgbaColor: RgbaColor + ) => void createTheme: (themeName: string) => void deleteTheme: (themeName: string) => void deleteAllThemes: () => void @@ -78,53 +78,62 @@ type ThemeProviderProps = { const ThemeContext = createContext(undefined) -export const ThemeProvider: React.FC = ({ initialThemeName, themes, defaultTheme, children }) => { - const [currentTheme, setCurrentTheme] = useState(initialThemeName) +export const ThemeProvider: React.FC = ({ + initialThemeName, + themes, + defaultTheme, + children, +}) => { + const [currentTheme, setCurrentTheme] = useState(initialThemeName); - addGlobalFunc("getTheme", () => themes[currentTheme]) + addGlobalFunc('getTheme', () => themes[currentTheme]) // potentially dumb algorithm const findUnusedColor = () => { - if (process.env.NODE_ENV !== "production") return - const MAX_VALUE = 255 - const sortFunc = (a: number, b: number) => a - b - const themeValue: RgbaColor[] = Object.values(themes[currentTheme]).map(v => v.color) - const reds = themeValue.map(c => c.r).sort(sortFunc) - const greens = themeValue.map(c => c.g).sort(sortFunc) - const blues = themeValue.map(c => c.b).sort(sortFunc) + if (process.env.NODE_ENV !== "production") return; + const MAX_VALUE = 255; + const sortFunc = (a: number, b: number) => a - b; + const themeValue: RgbaColor[] = Object.values(themes[currentTheme]).map(v => v.color); + const reds = themeValue.map((c) => c.r).sort(sortFunc); + const greens = themeValue.map((c) => c.g).sort(sortFunc); + const blues = themeValue.map((c) => c.b).sort(sortFunc); - const values = [] + const values = []; for (const colorArr of [reds, greens, blues]) { - const color = Array.from(new Set(colorArr)) - let lower = -1 - let largestGap = -1 + const color = Array.from(new Set(colorArr)); + let lower = -1; + let largestGap = -1; for (let i = 0; i < color.length - 1; i++) { - const col1 = color[i] - const col2 = color[i + 1] + const col1 = color[i]; + const col2 = color[i + 1]; if (col2 - col1 > largestGap) { - largestGap = col2 - col1 - lower = col1 + largestGap = col2 - col1; + lower = col1; } } - const col1 = color[color.length - 1] - const col2 = color[0] + MAX_VALUE + const col1 = color[color.length - 1]; + const col2 = color[0] + MAX_VALUE; if (col1 - col2 > largestGap) { - largestGap = col2 - col1 - lower = col1 + largestGap = col2 - col1; + lower = col1; } - values.push((lower + largestGap / 2) % MAX_VALUE) + values.push((lower + largestGap / 2) % MAX_VALUE); } - document.body.style.background = `rgba(${values[0]}, ${values[1]}, ${values[2]}, ${MAX_VALUE})` + document.body.style.background = `rgba(${values[0]}, ${values[1]}, ${values[2]}, ${MAX_VALUE})`; } - const updateColor = (themeName: string, colorName: ColorName, rgbaColor: RgbaColor) => { + const updateColor = ( + themeName: string, + colorName: ColorName, + rgbaColor: RgbaColor + ) => { if (themes[themeName]) { themes[themeName][colorName].color = rgbaColor } @@ -157,9 +166,12 @@ export const ThemeProvider: React.FC = ({ initialThemeName, const root = document.documentElement Object.entries(themeObject).map(([n, c]) => { const propName = colorNameToProp(n as ColorName) - root.style.setProperty(propName, `rgba(${c.color.r}, ${c.color.g}, ${c.color.b}, ${c.color.a})`) + root.style.setProperty( + propName, + `rgba(${c.color.r}, ${c.color.g}, ${c.color.b}, ${c.color.a})` + ) }) - findUnusedColor() + findUnusedColor(); } return ( diff --git a/fission/src/ui/ToastContext.tsx b/fission/src/ui/ToastContext.tsx index 8964ba2d30..39af7a9069 100644 --- a/fission/src/ui/ToastContext.tsx +++ b/fission/src/ui/ToastContext.tsx @@ -1,5 +1,11 @@ -import React, { createContext, useState, useContext, useCallback, ReactNode } from "react" -import Toast from "./components/Toast" +import React, { + createContext, + useState, + useContext, + useCallback, + ReactNode, +} from "react" +import Toast from "@/components/Toast" import { AnimatePresence, motion } from "framer-motion" export type ToastType = "info" | "warning" | "error" @@ -21,33 +27,43 @@ const ToastContext = createContext(null) export const useToastContext = () => { const context = useContext(ToastContext) - if (!context) throw new Error("useToastContext must be used within a ToastProvider") + if (!context) + throw new Error("useToastContext must be used within a ToastProvider") return context } -export const ToastProvider: React.FC<{ children: ReactNode }> = ({ children }) => { +export const ToastProvider: React.FC<{ children: ReactNode }> = ({ + children, +}) => { const [toasts, setToasts] = useState([]) - const addToast = useCallback((type: ToastType, title: string, description: string) => { - // divide by 10 so that it's harder to have duplicates? could make smaller or remove - const id = "toast-" + Math.floor(Date.now() / 10).toString() - const newToast: ToastData = { - id, - type, - title, - description, - } - setToasts(prevToasts => { - if (prevToasts.some(t => t.id == id)) return prevToasts - return [...prevToasts, newToast] - }) - }, []) + const addToast = useCallback( + (type: ToastType, title: string, description: string) => { + // divide by 10 so that it's harder to have duplicates? could make smaller or remove + const id = "toast-" + Math.floor(Date.now() / 10).toString() + const newToast: ToastData = { + id, + type, + title, + description, + } + setToasts(prevToasts => { + if (prevToasts.some(t => t.id == id)) return prevToasts + return [...prevToasts, newToast] + }) + }, + [] + ) const removeToast = useCallback((toastId: string) => { setToasts(prevToasts => prevToasts.filter(t => t.id !== toastId)) }, []) - return {children} + return ( + + {children} + + ) } export const ToastContainer: React.FC = () => { @@ -80,7 +96,12 @@ export const ToastContainer: React.FC = () => { key={t.id} className="w-fit" > - + ))}
diff --git a/fission/src/ui/TooltipContext.tsx b/fission/src/ui/TooltipContext.tsx index 24c859c580..a3a78cebb0 100644 --- a/fission/src/ui/TooltipContext.tsx +++ b/fission/src/ui/TooltipContext.tsx @@ -1,6 +1,12 @@ import Tooltip from "@/components/Tooltip" import { AnimatePresence, motion } from "framer-motion" -import React, { ReactNode, createContext, useCallback, useContext, useState } from "react" +import React, { + ReactNode, + createContext, + useCallback, + useContext, + useState, +} from "react" export type TooltipControl = { control: string; description: string } export type TooltipType = "controls" @@ -8,21 +14,33 @@ export type TooltipType = "controls" export const TOOLTIP_DURATION: number = 7_000 type TooltipControlContextType = { - showTooltip: (type: TooltipType, controls?: TooltipControl[], duration?: number) => void + showTooltip: ( + type: TooltipType, + controls?: TooltipControl[], + duration?: number + ) => void children?: ReactNode } -const TooltipControlContext = createContext(null) +const TooltipControlContext = createContext( + null +) export const useTooltipControlContext = () => { const context = useContext(TooltipControlContext) - if (!context) throw new Error("useTooltipControlContext must be used within a TooltipControlProvider") + if (!context) + throw new Error( + "useTooltipControlContext must be used within a TooltipControlProvider" + ) return context } let tooltip: ReactNode -export const TooltipControlProvider: React.FC = ({ children, ...methods }) => { +export const TooltipControlProvider: React.FC = ({ + children, + ...methods +}) => { return ( @@ -66,7 +84,11 @@ export const useTooltipManager = () => { const [timeout, setTimeoutState] = useState(null) const showTooltip = useCallback( - (type: TooltipType, controls?: TooltipControl[], duration: number = TOOLTIP_DURATION) => { + ( + type: TooltipType, + controls?: TooltipControl[], + duration: number = TOOLTIP_DURATION + ) => { tooltip = setDuration(duration) diff --git a/fission/src/ui/components/Button.tsx b/fission/src/ui/components/Button.tsx index 3d18c026ad..5e3e16971b 100644 --- a/fission/src/ui/components/Button.tsx +++ b/fission/src/ui/components/Button.tsx @@ -1,5 +1,4 @@ import React from "react" -import { Button as BaseButton } from "@mui/base/Button" export enum ButtonSize { Small, @@ -10,13 +9,19 @@ export enum ButtonSize { type ButtonProps = { value: string - colorOverrideClass?: string + colorClass?: string size?: ButtonSize onClick?: () => void className?: string } -const Button: React.FC = ({ value, colorOverrideClass, size, onClick, className }) => { +const Button: React.FC = ({ + value, + colorClass, + size, + onClick, + className, +}) => { let sizeClassNames if (!size) size = ButtonSize.Medium as ButtonSize @@ -37,18 +42,18 @@ const Button: React.FC = ({ value, colorOverrideClass, size, onClic } return ( - - {value} - + /> ) } diff --git a/fission/src/ui/components/Checkbox.tsx b/fission/src/ui/components/Checkbox.tsx index 59acc610a4..1d6ad3c6c4 100644 --- a/fission/src/ui/components/Checkbox.tsx +++ b/fission/src/ui/components/Checkbox.tsx @@ -1,7 +1,6 @@ -import React from "react" +import React, { useState } from "react" import Stack, { StackDirection } from "./Stack" import Label, { LabelSize } from "./Label" -import { Switch } from "@mui/base/Switch" type CheckboxProps = { label: string @@ -11,44 +10,35 @@ type CheckboxProps = { onClick?: (checked: boolean) => void } -const Checkbox: React.FC = ({ label, className, onClick }) => { +const Checkbox: React.FC = ({ + label, + className, + defaultState, + stateOverride, + onClick, +}) => { + const [state, setState] = useState(defaultState) return ( - ) } -// { -// const checked = (e.target as HTMLInputElement).checked -// setState(checked) -// if (onClick) onClick(checked) -// }} -// className="bg-interactive-background translate-y-1/4 duration-200 cursor-pointer appearance-none w-5 h-5 rounded-full checked:bg-gradient-to-br checked:from-interactive-element-left checked:to-interactive-element-right" -// checked={stateOverride != null ? stateOverride : undefined} -// /> export default Checkbox diff --git a/fission/src/ui/components/Dropdown.tsx b/fission/src/ui/components/Dropdown.tsx index ab26a92236..23d8cebcfc 100644 --- a/fission/src/ui/components/Dropdown.tsx +++ b/fission/src/ui/components/Dropdown.tsx @@ -1,26 +1,6 @@ import React, { ReactNode, useState } from "react" +import { FaChevronDown, FaChevronUp } from "react-icons/fa" import Label, { LabelSize } from "./Label" -import { Select as BaseSelect, SelectProps, SelectRootSlotProps } from "@mui/base/Select" -import { Option as BaseOption } from "@mui/base/Option" -import { styled } from "@mui/system" -import { Button } from "@mui/base/Button" -import UnfoldMoreRoundedIcon from "@mui/icons-material/UnfoldMoreRounded" - -const Select = React.forwardRef(function Select, Multiple extends boolean>( - props: SelectProps, - ref: React.ForwardedRef -) { - const slots: SelectProps["slots"] = { - root: CustomButton, - listbox: Listbox, - popup: Popup, - ...props.slots, - } - - return -}) as , Multiple extends boolean>( - props: SelectProps & React.RefAttributes -) => JSX.Element type DropdownProps = { children?: ReactNode @@ -30,114 +10,64 @@ type DropdownProps = { onSelect: (opt: string) => void } -const Dropdown: React.FC = ({ label, options, onSelect }) => { - const [optionList, _setOptionList] = useState(options) +const Dropdown: React.FC = ({ + label, + className, + options, + onSelect, +}) => { + const [expanded, setExpanded] = useState(false) + const [optionList, setOptionList] = useState(options) + + type DropdownOptionProps = { + value: string + children?: ReactNode + className?: string + } + + const DropdownOption: React.FC = ({ + children, + value, + className, + }) => ( + { + const newOptions = options.filter(item => item !== value) + newOptions.unshift(value) + setOptionList(newOptions) + if (onSelect) onSelect(value) + }} + className={`block relative duration-100 hover:backdrop-brightness-90 w-full h-full px-2 py-2 ${className}`} + > + {children} + + ) return ( <> {label && } -
-
) } -const CustomButton = React.forwardRef(function CustomButton, Multiple extends boolean>( - props: SelectRootSlotProps, - ref: React.ForwardedRef -) { - return ( - - {props.children} - - - ) -}) - -const StyledButton = styled(Button)` - position: relative; - text-align: left; - width: 100%; - background-image: linear-gradient(to right, var(--interactive-element-left), var(--interactive-element-right)); - border-radius: 0.375rem; - border: none; - outline: none; - padding-left: calc(0.8em + 8px); - - &:hover, - &:focus { - outline: none; - } - - & > svg { - font-size: 1rem; - position: absolute; - height: 100%; - top: 0; - right: 10px; - } -` - -const Listbox = styled("ul")` - box-sizing: border-box; - width: 100%; - background-image: linear-gradient(to right, var(--interactive-element-right), var(--interactive-element-left)); - border-radius: 1rem; - padding: 8px; -` - -const Option = styled(BaseOption)` - list-style: none; - cursor: default; - padding: 0.6em 0.8em; - border-radius: 1rem; - cursor: pointer; - &:hover { - backdrop-filter: brightness(90%); - } - &:hover, - &:focus { - outline: none; - } -` - -const Popup = styled("div")` - position: relative; - z-index: 1; - width: 100%; -` - -//
setExpanded(!expanded)} -// className={`relative flex flex-col gap-2 select-none cursor-pointer bg-gradient-to-r from-interactive-element-left to-interactive-element-right w-full rounded-md ${className}`} -// > -// -// {optionList[0]} -// {optionList.length > 1 && ( -//
-// -// -//
-// )} -//
-// {expanded && -// optionList.slice(1).map(o => ( -// -// {o} -// -// ))} -//
- export default Dropdown diff --git a/fission/src/ui/components/Input.tsx b/fission/src/ui/components/Input.tsx index 03e35e5f14..5bc7978345 100644 --- a/fission/src/ui/components/Input.tsx +++ b/fission/src/ui/components/Input.tsx @@ -1,53 +1,54 @@ import React from "react" import Label, { LabelSize } from "./Label" -import { Input as BaseInput } from "@mui/base/Input" type InputProps = { placeholder: string + value?: string defaultValue?: string + numeric?: boolean + validate?: (s: string) => boolean label?: string onInput?: (value: string) => void className?: string } -const Input: React.FC = ({ placeholder, defaultValue, label, onInput, className }) => { +const Input: React.FC = ({ + placeholder, + value, + defaultValue, + numeric, + validate, + label, + onInput, + className, +}) => { return ( <> {label && } - ) => onInput && onInput(e.target.value)} - className={className} - slotProps={{ - input: { - className: `w-full text-sm font-normal font-sans leading-5 px-3 py-2 rounded-lg shadow-md text-main-text bg-background-secondary focus-visible:outline-0 border border-solid border-interactive-element-right dark:border-interactive-element-right hover:border-interactive-element-solid dark:hover:border-interactive-element-solid focus:border-interactive-solid dark:focus:border-interactive-element-solid`, - }, + defaultValue={defaultValue} + value={value} + onKeyPress={e => { + if ( + e.key != null && + numeric && + !"1234567890,.".includes(e.key) + ) { + e.preventDefault() + } + + if (validate && !validate(e.key)) e.preventDefault() }} + onChange={e => { + if (onInput) onInput(e.target.value) + }} + className={`bg-interactive-background px-2 py-1 bg-[length:200%_100%] w-min rounded-md font-semibold cursor-pointer placeholder:italic ${ + className || "" + }`} /> ) } -// { -// if ( -// e.key != null && -// numeric && -// !"1234567890,.".includes(e.key) -// ) { -// e.preventDefault() -// } - -// if (validate && !validate(e.key)) e.preventDefault() -// }} -// onChange={e => { -// if (onInput) onInput(e.target.value) -// }} -// className={`bg-interactive-background px-2 py-1 bg-[length:200%_100%] w-min rounded-md font-semibold cursor-pointer placeholder:italic ${className || "" -// }`} -// /> export default Input diff --git a/fission/src/ui/components/Label.tsx b/fission/src/ui/components/Label.tsx index 1aa786aacd..e8269a98f9 100644 --- a/fission/src/ui/components/Label.tsx +++ b/fission/src/ui/components/Label.tsx @@ -29,7 +29,13 @@ type LabelProps = { } const Label: React.FC = ({ children, size, className }) => ( - {children} + + {children} + ) export default Label diff --git a/fission/src/ui/components/LabeledButton.tsx b/fission/src/ui/components/LabeledButton.tsx index d9fac91f70..3840309dc8 100644 --- a/fission/src/ui/components/LabeledButton.tsx +++ b/fission/src/ui/components/LabeledButton.tsx @@ -29,19 +29,36 @@ const LabeledButton: React.FC = ({ labelClassName, buttonClassName, }) => { - const buttonComponent = + + ) } -export let MainHUD_AddToast: (type: ToastType, title: string, description: string) => void = (_a, _b, _c) => {} +export let MainHUD_AddToast: (type: ToastType, title: string, description: string) => void = (a, b, c) => { } const variants = { open: { opacity: 1, y: "-50%", x: 0 }, @@ -49,6 +63,7 @@ const variants = { } const MainHUD: React.FC = () => { + // console.debug('Creating MainHUD'); const { openModal } = useModalControlContext() @@ -58,12 +73,12 @@ const MainHUD: React.FC = () => { MainHUD_AddToast = addToast - const [userInfo, setUserInfo] = useState(APS.userInfo) + const [userInfo, setUserInfo] = useState(APS.userInfo); useEffect(() => { document.addEventListener(APS_USER_INFO_UPDATE_EVENT, () => { setUserInfo(APS.userInfo) - }) + }); }, []) return ( @@ -71,9 +86,12 @@ const MainHUD: React.FC = () => { {!isOpen && ( )} { >
- +
{ icon={} onClick={() => openModal("manage-assembles")} /> - } onClick={() => openModal("settings")} /> - } onClick={() => openModal("view")} /> + } + onClick={() => openModal("settings")} + /> + } + onClick={() => openModal("view")} + /> } onClick={() => openModal("change-inputs")} /> - } onClick={() => openPanel("multibot")} /> + } + onClick={() => openPanel("multibot")} + /> } @@ -123,37 +154,54 @@ const MainHUD: React.FC = () => { icon={} onClick={() => openModal("download-assets")} /> - } onClick={() => openModal("roborio")} /> + } + onClick={() => openModal("roborio")} + /> } onClick={() => openPanel("driver-station")} /> - } onClick={() => openModal("drivetrain")} /> + } + onClick={() => openModal("drivetrain")} + /> } onClick={() => { - const type: ToastType = ["info", "warning", "error"][Math.floor(Random() * 3)] as ToastType - addToast(type, type, "This is a test toast to test the toast system") + const type: ToastType = [ + "info", + "warning", + "error", + ][Math.floor(Random() * 3)] as ToastType + addToast( + type, + type, + "This is a test toast to test the toast system" + ) }} /> - {userInfo ? ( - } - larger={true} - onClick={() => APS.logout()} - /> - ) : ( - } - larger={true} - onClick={() => APS.requestAuthCode()} - /> - )} + {userInfo + ? + } + larger={true} + onClick={() => APS.logout()} + /> + : + } + larger={true} + onClick={() => APS.requestAuthCode()} + /> + }
) diff --git a/fission/src/ui/components/Modal.tsx b/fission/src/ui/components/Modal.tsx index ca2d1cfa02..72a76a46ce 100644 --- a/fission/src/ui/components/Modal.tsx +++ b/fission/src/ui/components/Modal.tsx @@ -1,6 +1,5 @@ import React, { ReactNode } from "react" -import { useModalControlContext } from "../ModalContext" -import { ClickAwayListener } from "@mui/base/ClickAwayListener" +import { useModalControlContext } from "@/ui/ModalContext" export type ModalPropsImpl = { modalId: string @@ -48,72 +47,82 @@ const Modal: React.FC = ({ }) => { const { closeModal } = useModalControlContext() - const iconEl: ReactNode = typeof icon === "string" ? Icon : icon + const iconEl: ReactNode = + typeof icon === "string" ? ( + Icon + ) : ( + icon + ) return ( - closeModal()}> +
+ {name && ( + + )}
- {name && ( - - )} -
- {children} -
- + + /> + )}
- +
) } diff --git a/fission/src/ui/components/NumberInput.tsx b/fission/src/ui/components/NumberInput.tsx deleted file mode 100644 index e98bed2991..0000000000 --- a/fission/src/ui/components/NumberInput.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React from "react" -import Label, { LabelSize } from "./Label" -import { Unstable_NumberInput as BaseNumberInput, } from "@mui/base/Unstable_NumberInput" - -type InputProps = { - placeholder: string - defaultValue?: number - label?: string - onInput?: (value: number | null) => void - className?: string -} - -const NumberInput: React.FC = ({ placeholder, defaultValue, label, onInput }) => { - return ( - <> - {label && } - onInput && onInput(val)} - slotProps={{ - root: ownerState => { - return { - className: `grid grid-cols-[1fr_8px] grid-rows-2 overflow-hidden rounded-lg text-main-text dark:text-main-text bg-background-secondary border border-solid hover:border-interactive-element-solid dark:hover:border-interactive-element-solid focus-visible:outline-0 p-1 ${ownerState.focused ? "border-interactive-element-solid dark:border-interactive-element-solid" : "border-interactive-element-right dark:border-interactive-element-right"}`, - } - }, - input: { - className: - "col-start-1 col-end-2 row-start-1 row-end-3 text-sm font-sans leading-normal text-main-text dark:text-main-text bg-inherit border-0 rounded-[inherit] px-3 py-2 outline-0 focus-visible:outline-0 focus-visible:outline-none", - }, - incrementButton: { - children: "â–´", - className: - "font-[system-ui] flex flex-row flex-nowrap justify-center items-center p-0 w-[19px] h-[19px] col-start-3 col-end-3 row-start-1 row-end-2 border border-solid outline-none text-sm box-border leading-[1.2] rounded-t-md rounded-b-none bg-interactive-secondary border-interactive-element-right dark:border-interactive-element-right bg-background-secondary text-main-text transition-all duration-[120ms] hover:cursor-pointer hover:border-interactive-element-right hover:bg-interactive-hover", - }, - decrementButton: { - children: "â–¾", - className: - "font-[system-ui] flex flex-row flex-nowrap justify-center items-center p-0 w-[19px] h-[19px] col-start-3 col-end-3 row-start-2 row-end-3 border border-solid outline-none text-sm box-border leading-[1.2] rounded-b-md rounded-t-none border-t-0 border-interactive-element-right dark:border-interactive-element-right bg-background-secondary text-main-text transition-all duration-[120ms] hover:cursor-pointer hover:border-interactive-element-right hover:bg-interactive-hover", - }, - }} - /> - - ) -} - -// { -// if ( -// e.key != null && -// numeric && -// !"1234567890,.".includes(e.key) -// ) { -// e.preventDefault() -// } - -// if (validate && !validate(e.key)) e.preventDefault() -// }} -// onChange={e => { -// if (onInput) onInput(e.target.value) -// }} -// className={`bg-interactive-background px-2 py-1 bg-[length:200%_100%] w-min rounded-md font-semibold cursor-pointer placeholder:italic ${className || "" -// }`} -// /> -export default NumberInput diff --git a/fission/src/ui/components/Panel.tsx b/fission/src/ui/components/Panel.tsx index ad8b34e5fe..6438bb8129 100644 --- a/fission/src/ui/components/Panel.tsx +++ b/fission/src/ui/components/Panel.tsx @@ -1,81 +1,12 @@ import React, { ReactNode } from "react" -import { usePanelControlContext } from "../PanelContext" - -export type OpenLocation = - | "top-left" - | "top" - | "top-right" - | "left" - | "center" - | "right" - | "bottom-left" - | "bottom" - | "bottom-right" - -type LocationOptions = { className: string; styles: { [key: string]: string } } - -const getLocationClasses = (openLocation: OpenLocation, sidePadding: number): LocationOptions => { - // Can't use tailwind left-[custom] because it won't generate the classes since we're using them dynamically with string templating - const paddingStyle = `${sidePadding}px` - switch (openLocation) { - case "top-left": - return { - className: ``, - styles: { left: paddingStyle, top: paddingStyle }, - } - case "top": - return { - className: `left-1/2 -translate-x-1/2`, - styles: { top: paddingStyle }, - } - case "top-right": - return { - className: ``, - styles: { right: paddingStyle, top: paddingStyle }, - } - case "left": - return { - className: `top-1/2 -translate-y-1/2`, - styles: { left: paddingStyle }, - } - case "center": - return { - className: `left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2`, - styles: {}, - } - case "right": - return { - className: `top-1/2 -translate-y-1/2`, - styles: { right: paddingStyle }, - } - case "bottom-left": - return { - className: ``, - styles: { left: paddingStyle, bottom: paddingStyle }, - } - case "bottom": - return { - className: `left-1/2 -translate-x-1/2`, - styles: { bottom: paddingStyle }, - } - case "bottom-right": - return { - className: ``, - styles: { right: paddingStyle, bottom: paddingStyle }, - } - } -} +import { usePanelControlContext } from "@/ui/PanelContext" export type PanelPropsImpl = { panelId: string - openLocation?: OpenLocation - sidePadding?: number } type PanelProps = { panelId: string - openLocation?: OpenLocation - sidePadding?: number name?: string icon?: ReactNode | string onCancel?: () => void @@ -100,8 +31,6 @@ const Panel: React.FC = ({ name, icon, panelId, - openLocation, - sidePadding, onCancel, onMiddle, onAccept, @@ -118,81 +47,88 @@ const Panel: React.FC = ({ contentClassName, }) => { const { closePanel } = usePanelControlContext() - const iconEl: ReactNode = typeof icon === "string" ? Icon : icon - openLocation ||= "center" - sidePadding ||= 16 - const locationClasses = getLocationClasses(openLocation, sidePadding) + const iconEl: ReactNode = + typeof icon === "string" ? ( + Icon + ) : ( + icon + ) return ( -
+
+ {name && ( + + )}
- {name && ( - - )} + {children} +
+ {(cancelEnabled || middleEnabled || acceptEnabled) && (
- {children} + {cancelEnabled && ( + { + closePanel(panelId) + if (!cancelBlocked && onCancel) onCancel() + }} + className={`${ + cancelBlocked + ? "bg-interactive-background" + : "bg-cancel-button" + } rounded-md cursor-pointer px-4 py-1 font-bold duration-100 hover:brightness-90`} + /> + )} + {middleEnabled && ( + { + if (!middleBlocked && onMiddle) onMiddle() + }} + className={`${ + middleBlocked + ? "bg-interactive-background" + : "bg-accept-button" + } rounded-md cursor-pointer px-4 py-1 font-bold duration-100 hover:brightness-90`} + /> + )} + {acceptEnabled && ( + { + closePanel(panelId) + if (!acceptBlocked && onAccept) onAccept() + }} + className={`${ + acceptBlocked + ? "bg-interactive-background" + : "bg-accept-button" + } rounded-md cursor-pointer px-4 py-1 font-bold duration-100 hover:brightness-90`} + /> + )}
- {(cancelEnabled || middleEnabled || acceptEnabled) && ( - - )} -
+ )}
) } -//
-//
export default Panel diff --git a/fission/src/ui/components/Radio.tsx b/fission/src/ui/components/Radio.tsx index da5a6d368c..fd23c43c24 100644 --- a/fission/src/ui/components/Radio.tsx +++ b/fission/src/ui/components/Radio.tsx @@ -9,11 +9,19 @@ type RadioProps = { onClick?: () => void } -const Radio: React.FC = ({ label, className, defaultState, onClick }) => { +const Radio: React.FC = ({ + label, + className, + defaultState, + onClick, +}) => { const [, setState] = useState(defaultState) return ( - - diff --git a/fission/src/ui/components/UserIcon.tsx b/fission/src/ui/components/UserIcon.tsx index 3d8f359abb..4fce62d302 100644 --- a/fission/src/ui/components/UserIcon.tsx +++ b/fission/src/ui/components/UserIcon.tsx @@ -1,12 +1,13 @@ -import APS, { APS_USER_INFO_UPDATE_EVENT } from "@/aps/APS" -import { useEffect, useState } from "react" -import { FaQuestion } from "react-icons/fa" +import APS, { APS_USER_INFO_UPDATE_EVENT } from "@/aps/APS"; +import { useEffect, useState } from "react"; +import { FaQuestion } from "react-icons/fa"; interface UserIconProps { - className: string + className: string; } export function UserIcon({ className }: UserIconProps) { + const [userInfo, setUserInfo] = useState(APS.userInfo) useEffect(() => { @@ -14,8 +15,8 @@ export function UserIcon({ className }: UserIconProps) { }, []) if (!userInfo) { - return + return () } else { - return + return () } -} +} \ No newline at end of file diff --git a/fission/src/ui/modals/DownloadAssetsModal.tsx b/fission/src/ui/modals/DownloadAssetsModal.tsx index 875857c5ef..b37f5bfc89 100644 --- a/fission/src/ui/modals/DownloadAssetsModal.tsx +++ b/fission/src/ui/modals/DownloadAssetsModal.tsx @@ -10,17 +10,49 @@ const DownloadAssetsModal: React.FC = ({ modalId }) => ( - - - - + + + + - - - - + + + + diff --git a/fission/src/ui/modals/ExitSynthesisModal.tsx b/fission/src/ui/modals/ExitSynthesisModal.tsx index 1014e7a442..90803210c8 100644 --- a/fission/src/ui/modals/ExitSynthesisModal.tsx +++ b/fission/src/ui/modals/ExitSynthesisModal.tsx @@ -6,9 +6,16 @@ import Label from "@/components/Label" const ExitSynthesisModal: React.FC = ({ modalId }) => { const isOnMainMenu = false return ( - } modalId={modalId} acceptName="Exit"> + } + modalId={modalId} + acceptName="Exit" + > ) diff --git a/fission/src/ui/modals/UpdateAvailableModal.tsx b/fission/src/ui/modals/UpdateAvailableModal.tsx index 6cbeb3cd27..5d6dda5cad 100644 --- a/fission/src/ui/modals/UpdateAvailableModal.tsx +++ b/fission/src/ui/modals/UpdateAvailableModal.tsx @@ -5,7 +5,12 @@ import Label from "@/components/Label" const UpdateAvailableModal: React.FC = ({ modalId }) => { return ( - } modalId={modalId} acceptName="Update"> + } + modalId={modalId} + acceptName="Update" + > diff --git a/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx b/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx index 51f037ac93..73b9558ca0 100644 --- a/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx +++ b/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx @@ -21,7 +21,10 @@ const ConnectToMultiplayerModal: React.FC = ({ modalId }) => ( - {}} /> + {}} + />