Online MTM2 truck viewer

Downloads: https://www.mtm2.com/~trucks/trucks.php
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Did you upload the screenshot feature version? Can't find it on your github either.
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

yeah. forgot to actually push to main repo, sorry. should be working now
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Yup this is great. Already added it to the website. Great job Kmaster.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

I feel like an unintended consequence of this is to find out when you created the pod of your truck wrong :D (see my point to Cale in general discussion, lol).
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

Thanks and yeah, I used exactly the same truck for testing 2.1 truck support (bigfoot drag test) and noticed that also. That's why i ended up using his 2.1 HD pack.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

That axle thing, the placement in the viewer compared to the game is correct. My 200, 200, 400 was a long distance ballpark estimation, probably something like 198, 198, 400 is more correct so that it actually rests into the bar.
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

i noticed the following:
Captura de pantalla 2026-06-04 a la(s) 2.08.10 a.m..jpg
Captura de pantalla 2026-06-04 a la(s) 2.08.10 a.m..jpg (191.23 KiB) Viewed 8912 times
seems like the script is not loading files from truck2.pod anymore
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Fix your cookies ;)
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

Fila wrote: Thu Jun 04, 2026 1:15 am Fix your cookies ;)
I cleared them but that didn't fix it. I saw a CORS-related error in the chrome console, and I actually fixed it by loading the truck page from mtm2.com instead of www.mtm2.com: :?

Code: Select all

truck-worker.js:29 truck2.pod not found in OPFS. Fetching from local server...
Access to fetch at 'https://mtm2.com/JSTruckViewer-main/src/worker/TRUCK2.POD' from origin 'https://www.mtm2.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
JSTruckViewer-main/?url=../~trucks/T2026/monsterpatrolnowingbymatt785.zip:1 Access to fetch at 'https://mtm2.com/JSTruckViewer-main/src/worker/TRUCK2.POD' from origin 'https://www.mtm2.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
truck-worker.js:42 Failed to download truck2.pod from server: Failed to fetch
(anonymous) @ truck-worker.js:42
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Oh interesting. Somewhere in the communication between the app and the server, it triggers CORS if you open the app from www.mtm2.com and then try to load a link using mtm2.com. It doesn't recognize it as the same server.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

I changed the truck2.pod to a relative URL so it should help a little bit but it still fails CORS when going from www to no-www.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

So apparently this a known thing and CORS does treat them as separate servers. Meh
User avatar
Cale
Member
Posts: 660
Joined: Mon Oct 27, 2003 7:28 pm

Re: Online MTM2 truck viewer

Post by Cale »

Something I've noticed, and maybe I'm missing something - the HD Truck Pack final release lets you select which truck you want to view, but the Mickey Thompson Stadium Trucks do not.

Otherwise, this is incredible, letting me cringe at my early works in full HD.
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

Cale wrote: Fri Jun 05, 2026 6:23 pm Something I've noticed, and maybe I'm missing something - the HD Truck Pack final release lets you select which truck you want to view, but the Mickey Thompson Stadium Trucks do not.
I noticed your zip truck pack contains multiple POD files
https://www.mtm2.com/~trucks/trucks.php ... on+Stadium
this is not supported yet. it currently only loads the first POD file found in the ZIP. I'll try to add support for loading multiple POD files soon across all JS utilities ✅
User avatar
Kmaster
Member
Posts: 1416
Joined: Fri Oct 10, 2003 6:19 pm
Location: Valparaíso, Chile.
Contact:

Re: Online MTM2 truck viewer

Post by Kmaster »

does anybody remember how to add dark-tinted transparent windows? it was a hardware rendering trick that you do in the binedit mapper.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Oh... I've never known that. lol
User avatar
Ford-chan
Member
Posts: 136
Joined: Sun Feb 05, 2017 5:17 am
Location: Victoria, Australia.

Re: Online MTM2 truck viewer

Post by Ford-chan »

Done some toying around with it for the first time, and I gotta say, I really love it, definitely a lot better than simply looking at the truck via pic previews.

Of course, it's not always a 100%, as there are issues with some of the trucks uploaded over the years, but the main gear grinder that I have with it at the moment, is how some POD files that contains more than one truck, the "TRUCKS IN POD" tab doesn't show up for whatever reason, therefore I can't view any of the other trucks in the POD file whatsoever.

Just as I wrote this, I noticed that you said that you were going to work on the multiple POD files viewing anyway, so all good.
Last edited by Ford-chan on Sat Jun 06, 2026 9:38 am, edited 1 time in total.
User avatar
Cale
Member
Posts: 660
Joined: Mon Oct 27, 2003 7:28 pm

Re: Online MTM2 truck viewer

Post by Cale »

Kmaster wrote: Fri Jun 05, 2026 8:28 pm does anybody remember how to add dark-tinted transparent windows? it was a hardware rendering trick that you do in the binedit mapper.
You map a Transparent face type to the corner of a black/not black pixel. The amount of not-black pixels around it determine how transparent it is.
User avatar
Fila
Member
Posts: 1548
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Re: Online MTM2 truck viewer

Post by Fila »

Ford-chan wrote: Sat Jun 06, 2026 4:27 am Done some toying around with it for the first time, and I gotta say, I really love it, definitely a lot better than simply looking at the truck via pic previews.

Of course, it's not always a 100%, as there are issues with some of the trucks uploaded over the years, but the main gear grinder that I have with it at the moment, is how some POD files that contains more than one truck, the "TRUCKS IN POD" tab doesn't show up for whatever reason, therefore I can't view any of the other trucks in the POD file whatsoever.

Just as I wrote this, I noticed that you said that you were going to work on the multiple POD files viewing anyway, so all good.
If there are multiple trucks in a single pod it should work fine. The issue is if there are multiple pods in a zip file. Can you link to an example?
User avatar
Ford-chan
Member
Posts: 136
Joined: Sun Feb 05, 2017 5:17 am
Location: Victoria, Australia.

Re: Online MTM2 truck viewer

Post by Ford-chan »

Fila wrote: Sat Jun 06, 2026 11:27 am If there are multiple trucks in a single pod it should work fine. The issue is if there are multiple pods in a zip file. Can you link to an example?
This pack in particular, with only one truck accessible, that being Scarlet Bandit, and no Bounty Hunter to gain access to.

https://www.mtm2.com/%7Etrucks/trucks.p ... andit+2001
Post Reply