webmasta Posted February 4 Share Posted February 4 Всех приветствую! Поиск не принёс результатов. Задача: отображать модели танков в браузере на сайте, чтобы можно было крутить, вертеть + отображать толщину брони, приведенную броню и тд. Подобным никогда не занимался. Весь мой опыт с 3D заключался когда-то в школе делал карты для контры в Valve Hammer Editor. То есть имею очень общие представления. ИИ советуют конвертировать модельки в glTF формат и рендерить с помощью Three.js. Насколько этот совет правильный? Какие еще варианты есть? Всем спасибо за внимание. @ Quote Link to comment Short link Share on other sites More sharing options...
Bazooka Posted February 4 Share Posted February 4 (edited) The simplest option is to use Three.js. A more complicated option is to use Babylon.js. An even more complex option is to use some kind of solution based on WASM. I recommend looking at (inspect with dev tools) how this is implemented on websites like https://gamemodels3d.com/games/worldoftanks/vehicles/c18 and https://armor.wotinspector.com/en/mirtankov/13825-62/. The former uses Three.js, and the latter uses something intricate based on WASM, compiled from C++ using Emscripten. If you just need to rotate tank models, there's no need for such a complex solution. The choice of format depends on what you want to display. In general, glTF is a very good choice. Edited February 4 by Bazooka 1 @ Quote Link to comment Short link Share on other sites More sharing options...
webmasta Posted February 4 Author Share Posted February 4 Thanks a lot! What about sites like these: - https://tanks.gg/tank/su-76i/model - https://tomato.gg/tanks/60TP-3473/EU? - https://3d.skill4ltu.eu/Pl15_60TP_Lewandowskiego They support turret rotation and gun movement. But last two are more interesting, they show penetration chance in real time, depending on the angle while you rotate the model. Looks like they're using something more advanced, than glTF + Three.js. Do you know anything about those websites? @ Quote Link to comment Short link Share on other sites More sharing options...
Bazooka Posted February 4 Share Posted February 4 32 minutes ago, webmasta said: - https://tanks.gg/tank/su-76i/model - https://tomato.gg/tanks/60TP-3473/EU? - https://3d.skill4ltu.eu/Pl15_60TP_Lewandowskiego I'm not sure about the first one, but the latter two use three.js. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.