Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
0
Members

three.js compatibility

A topic by Ractor created Aug 14, 2017 Views: 507 Replies: 1
Viewing posts 1 to 2

Hi, I'm wondering why superpowers engine lack a lot of three.js functions. Superpowers game have three under the hood, so why we dont have possibility to use same already done scripts for three.js ?

I mean, currently i struggling with orbit controls for camera. There is tons of scripts for threejs, but non of them could work with superpowers (even if i will change prefix'es and functions names, i still lacking some of functions in superpowers ?)  Why ??? Why don't you just give easy way of updating core engine to new version of three ?

(2 edits)

I know this is old, but I'll answer it just in case for the future

Just looking at the code it seems just to be typescript and electron. So technically speaking all you have to do is find the three.js camera object it's using. Maybe they're just wrapping it with their own abstraction or something. They could be contaminating the source of three.js and modifying the behavior for their own uses like prototype, but that's really looked down upon.

[edit]

Just looked at the code here. And just as I suspected, they're wrapping the three.js class with one of their own. You should be able to access it with the property "threeCamera" or "unifiedThreeCamera" on the Superpowers camera class.