jeromeetienne / threejs-inspector

chrome devtool extension to debug three.js
https://chrome.google.com/webstore/detail/threejs-inspector/dnhjfclbfhcbcdfpjaeacomhbdfjbebi
198 stars 46 forks source link

Versions supported? #2

Closed mrdoob closed 9 years ago

mrdoob commented 9 years ago

Would be nice to specify what versions of three.js are supported.

jeromeetienne commented 9 years ago

currently i work only on the last release. there is already quite a bit of job.

i will add something in the about tab

jeromeetienne commented 9 years ago

thanks for the pullrequest and the suggestion btw :)

have you looked at the UI ? i reused the editor code and built on top. what do you think ?

mrdoob commented 9 years ago

Looking good! 😊

jeromeetienne commented 9 years ago

i would gladly port that back to the editor btw.

mrdoob commented 9 years ago

Hmm... I'll take a look

jeromeetienne commented 9 years ago

i will email you to explain the code

mrdoob commented 9 years ago

Feel free to explain over here. I get too much email and it may get lost...

jeromeetienne commented 9 years ago

ok lets do that here.

I forked three.js editor twice already. so i got acquinted with this part of three.js. thanks for doing the hard work :) and i would like to contribute back.

So here is how the ui is done for three.js inspector

it is all based on three.js editor r71 UI. It defines all the atomic type (color, number, input text, basic texture). On top of this on top of this, three.js inspector added a layer for each type of row.

Currently in the editor, the code for each type of row (color, texture, vector3) is duplicated. Having a layer for the rows avoid this duplication. it allows better refactoring. See the texture row for example. it handles the repeat/offset/wrapST. it has upload texture and even handles drag/drop from desktop. every texture got the same widget even if it is a bumpMap within a face material :)

three.js inspector implement tabs too. you can see them on the left and right sidebars. i think it works well used for the object3d/material/geometry triplet. in the editor, we end up with a 'too long' panel. We scroll it all the time. to put object3d/geometry/material in tabs like the inspector, make it easier.

more details were added here and there. e.g. when dragging on number support shift to 10-fold, meta to 100-fold, shift+meta for 1000-fold. e.g. awesome icon for button

i likely forget other stuff. but the good part is that most of it is directly compatible with the three.js editor. I forked it twice already (thanks again :)). i believe the modification are inline with the spirit of the editor.

if we backport that to the editor, we would end up with a better UI (thanks to the tabs+texture), a cleaner code (as we reduce duplication of the row code), a richer tool to design the ui of the future version of the editor.

jeromeetienne commented 9 years ago

Folders split out

jeromeetienne commented 9 years ago

All in all, i think there is good UI in there, and three.js editor could benefit from it, i would like to contribute back to three.js.

any part interest you more than another ? i could start by porting the tabs, then to try some rows. what do you say ?

There you got it all :)

mrdoob commented 9 years ago

That sounds great! Yes, lets try to integrate these things in the next cycle (r73) 😊

jeromeetienne commented 9 years ago

Excelent!