These are chat archives for highfidelity/hifi

22nd
Sep 2014
Jeremy
@JeroMiya
Sep 22 2014 03:37
I published an early version of the typescript docs here: http://jeromiya.github.io/hifi-typescript/. Standard pre-alpha breaking changes, incomplete, possibly inaccurate warnings and all that. If you're interested in writing scripts, it also serves as probably the most complete documentation for the JavaScript API for hifi available so far
whatSocks
@whatSocks
Sep 22 2014 03:42
:D
pretty
Jeremy
@JeroMiya
Sep 22 2014 03:42
I filed a couple of bugs to the TypeDoc project (the documentation generator I'm using), so for example the signal types aren't showing the generic callback type, making those fairly useless. He says he's working on it
whatSocks
@whatSocks
Sep 22 2014 03:43
I wrote little blurbs with some examples for the more commonly-used functions/properties, it would be good to integrate those
Jeremy
@JeroMiya
Sep 22 2014 03:43
in the meantime you may have to look at the original type declarations
whatSocks
@whatSocks
Sep 22 2014 03:43
so they get autogenerated as well
Jeremy
@JeroMiya
Sep 22 2014 03:44
awesome, that's a great idea. I'll take a look
whatSocks
@whatSocks
Sep 22 2014 03:44
i’ll send you the link
Jeremy
@JeroMiya
Sep 22 2014 03:44
are they in markdown? TypeDoc supports it
whatSocks
@whatSocks
Sep 22 2014 03:44
yeah
under functions and properties
Jeremy
@JeroMiya
Sep 22 2014 03:46
Does hifi-docs have a license?
or are these in the sample code themselves?
originally I mean
I'm using Apache 2.0 for hifi-typescript
whatSocks
@whatSocks
Sep 22 2014 03:49
grayson seems to be in charge of it
Ryan Huffman
@huffman
Sep 22 2014 03:49
Are those docs automatically generated @JeroMiya ?
Jeremy
@JeroMiya
Sep 22 2014 03:49
yes, I'm using TypeDoc (http://typedoc.io/)
Ryan Huffman
@huffman
Sep 22 2014 03:51
Err, sorry, what I mean is, the API information itself, not necessarily the web page
Jeremy
@JeroMiya
Sep 22 2014 03:52
No, I'm doing that by hand. Based on what I've seen so far, I'm not sure it could be done automatically since some of the QObject types are custom mapped to/from JS in code
but I'm not very familiar with QTScript, so maybe there is some other way
I still have a ways to go too. For example the Models global isn't mapped yet
Ryan Huffman
@huffman
Sep 22 2014 03:54
Yeah, unlikely. You might be able to generate some of it. You could generate some information at runtime but you might lose a lot of the typingi information.
Jeremy
@JeroMiya
Sep 22 2014 03:57
Some kind of json schema would be helpful - though not sure how feasible. Possibly you could start with the schema and generate the QObject classes from it, in addition to the TypeScript declarations (for me) and the official JS API documentation.
you'd probably still need custom mappings though, but at least you'd have less to maintain manually
anyway, thought I'd share my progress.
Ryan Huffman
@huffman
Sep 22 2014 04:23
Cool, well the docs are definitely nice!
Jeremy
@JeroMiya
Sep 22 2014 04:38
FYI: the globals page is actually a better starting point than the index, not sure why that isn't the default: http://jeromiya.github.io/hifi-typescript/globals.html
whatSocks
@whatSocks
Sep 22 2014 04:44
can someone read over my intro to avatar writeup
I am never sure if I should call the avatar “Avatar” or “MyAvatar” or “the avatar” or something else
Jeremy
@JeroMiya
Sep 22 2014 05:56
How about "your avatar"?
whatSocks
@whatSocks
Sep 22 2014 05:56
seems so simple and obvious :p
Thijs Wenker
@thoys
Sep 22 2014 11:45
@JeroMiya , are you gonna leave the I's in front of the interfaces, This is for javascript devs right? I'm not sure If they need to know how its named under the hood
Philip Rosedale
@PhilipRosedale
Sep 22 2014 17:37
@whatSocks loving the surfboard-riding cowboy
whatSocks
@whatSocks
Sep 22 2014 17:38
well, what cowboy surfer would be without his surf board?
Philip Rosedale
@PhilipRosedale
Sep 22 2014 17:58
indeed, indeed. Great work so far on those docs, loving them.
Philip Rosedale
@PhilipRosedale
Sep 22 2014 19:03
@ctrlaltdavid.... I'm looking at the diff between 20055 and hifi master, and maybe I'm not seeing all the rift changes?
Thijs Wenker
@thoys
Sep 22 2014 19:05
@PhilipRosedale how was the conference, got any questions answered?
David Rowe
@ctrlaltdavid
Sep 22 2014 19:17
@PhilipRosedale All the 20055 changes should be there: just SkeletonModel, MyAvatar, Avatar, and Application.cpp.
Andrew Meadows
@AndrewMeadows
Sep 22 2014 21:49
@JeroMiya (or anyone else with an opinion) now that you've got an overview of the JS API... I'm wondering if you have a opinion as to how features of the various global objects should be exposed.
Thijs Wenker
@thoys
Sep 22 2014 21:49
:+1:
Andrew Meadows
@AndrewMeadows
Sep 22 2014 21:50
In particular, Foo.setBar() vs Foo.bar vs Foo.getProperties()["bar"].
I need to expose a new feature and I'm wondering what is the best way to do it.
whatSocks
@whatSocks
Sep 22 2014 21:51
toString would be awesome in general as well
Thijs Wenker
@thoys
Sep 22 2014 21:51
sounds like .net :)
or java has that too iirc
Andrew Meadows
@AndrewMeadows
Sep 22 2014 21:53
what do you mean "toString"? Something like: MyAvatar.toString() and MyAvatar.fromString()?
@JeroMiya how best to update your script documentation? At the end of last week I removed MyAvatar.motionBehaviors and added MyAvatar.motorVelocity and MyAvatar.motorVelocityTimescale
whatSocks
@whatSocks
Sep 22 2014 22:07
@AndrewMeadows so I don’t have to write JSON.stringify(whatever) every time I want to see some property
using the console*
Andrew Meadows
@AndrewMeadows
Sep 22 2014 22:10
What I'm asking is: could you elaborate on what you mean by "toString"? Can you give an example of how it would work if you could have your way? You can answer here or on that forum thread.
whatSocks
@whatSocks
Sep 22 2014 22:11
ok