Jump to content

Contributing to documentation 101


GameMonetize
 Share

Recommended Posts

I got here from the @deltakosh Help Wanted thread 

I'm a native English speaker, would like to contribute to the docs and have used the "fork and local clone" method but am getting 404 and 500 errors when viewing my local clone.

I can use the easier, direct edit method for now but I'd like to resolve this method as well.

 

bjsdocs-404.png

bjsdocs-shell.png

Link to comment
Share on other sites

  • 4 weeks later...

I suggest adding two points in the first post, 'cause I add issues, resolved by doing:

In a n00b point of view, it is also easier to use github desktop rather than tortoisegit I think.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Maybe a little tips to add in the first post of this thread (based on a mistake from me):

if you want update informations on the Classes part, you have to add comments directly in the source code (apparently).

For example, let's say we want add info for wrapU in BaseTexture:

@serialize()
public wrapU = Texture.WRAP_ADDRESSMODE;

/*
* yep, this is a message for the doc, about wrapU
*
* and here a nice table containing informations:
*
* | title | title |
* | ---- | ---- |
* | my text | my text |
*
*/

@serialize()
public wrapV = Texture.WRAP_ADDRESSMODE;

@serialize()
public wrapR = Texture.WRAP_ADDRESSMODE;

 

Link to comment
Share on other sites

  • 2 weeks later...

Me again, about this commit: https://github.com/BabylonJS/Babylon.js/commit/ab719c9e68f546165508893ac33f248fc6b06309

I've made a mystake and didn't know about some convention, so this could help others too:

  • don't place comment below the descripted code, but above
  • start your comment with /** instead of just /*

Sorry for be a n00b in that part, plus editing the source code is kind of scary :D (I've just made a PR to (I hope) correcting this mystake)

Link to comment
Share on other sites

Me again...

Is it normal that my try did not appear in the classes pages? http://doc.babylonjs.com/classes/3.1/basetexture

Here the github file I've updated https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/babylon.baseTexture.ts#L35

Is this because it is the file from BJS 3.2 alpha, so not yet referenced in the doc? (by writing this, it feels like this is the reason, and it seems logic too, but I still ask to be sure).

Link to comment
Share on other sites

  • 1 month later...

After changing a doc file locally with grunt serve running I get the following shell error (latest master branch of docs):

2018-03-24T02:34:43.192Z - error: 404 Error -  /css/main.css.map
2018-03-24T02:34:43.956Z - error: uncaughtException: ENOENT: no such file or directory, open 'log/bjs-doc-error.log'

 

Link to comment
Share on other sites

Not sure what I'm doing wrong, but sometimes I'd get the error above after changing any file but at other times it simply wouldn't rebuild automatically, although shell indicates it was still watching.

Was able to get around it by cancelling watch, grunt rebuild then grunt serve each time.

If anyone can shed some light on this it would be most appreciated.

Anyway, my first doc contribution is submitted for review, so yay for that. Hopefully many more to come ...

Link to comment
Share on other sites

On 24/03/2018 at 2:43 AM, inteja said:

After changing a doc file locally with grunt serve running I get the following shell error

May not be the same thing but I know if I change a file while grunt serve is watching I get pages not found if I do not wait for the build that was generated through the watch to finish since it clears files before building them. In fact my process is to note all changes I want to make on paper stop grunt serve do changes and do a rebuild

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

I want to add into the doc' default values of some defaultRenderingPipeline properties, starting by bloom properties for example. But I'm not sure which files I have to edit, 'cause the bloom seems to be dispatched and duplicated in few files, I've spot these ones:

- https://github.com/BabylonJS/Babylon.js/blob/master/src/PostProcess/babylon.bloomEffect.ts

- https://github.com/BabylonJS/Babylon.js/tree/master/src/PostProcess/RenderPipeline

Where I should edit exactly ?

And another question relative to this: for now, to get the default values, I play with the playground and write `console.log(pipeline.bloomScale)` for example, to get my default value into my browser console. But the default value is surely write into the BJS code, so... where ? :)

 

Link to comment
Share on other sites

Sure, you can edit the default rendering pipeline's bloom scale property here:

https://github.com/BabylonJS/Babylon.js/blob/master/src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts#L166 , I believe the default value should be 0.5 based on the initial value of the private variable _bloomScale.

The default rendering pipeline, during initialization, creates a new instance of bloom effect found in bloomEffect.ts which takes the _bloomScale as a parameter.

Let me know if you have further questions.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...