Jump to content

Contributing to documentation 101


Recommended Posts

  • 4 weeks later...

There is a error also at the information level for the incremental scene.

It is said : The Espilit demo on the main site uses incremental loading if you want an example.


But when we look at the Espilit demo I do not see incremental: (It loads like other scenes and is very slow to load)

The incremental should not load the scene without waiting for all meshes to be loaded and display the mesh on the fly only when the camera sees them? In other words, the scene should not be blocking and displayed right away. but it is loaded when 100% is ready to be displayed as any scene. I do not see any difference.

Espilit demo is binary, not incremental. I am a little lost in their differences. Incremental, meaning non-blocking, a bit like loading asyncrone ?


var demo = {
    scene: "Espilit",
    incremental: false,
    binary: true,
    doNotUseCDN: false,
    collisions: true,
    offline: false,
    onload: function () {
        scene.autoClear = true;
        scene.getMeshByName("Sol loin").useVertexColors = false;

        var postProcess = new BABYLON.RefractionPostProcess("Refraction", "/scenes/customs/refMap.jpg", new BABYLON.Color3(1.0, 1.0, 1.0), 0.5, 0.5, 1.0, scene.cameras[1]);


Link to comment
Share on other sites

The scene does not work DK:


Babylon.js engine (v3.3.0-alpha.8) launched
babylon.js:4 BJS - [19:25:52]: Unable to load from http://www.babylonjs.com/scenes/espilit/espilit.incremental.babylon: Scene has been disposed
t._ErrorEnabled @ babylon.js:4
u @ babylon.js:35
m @ babylon.js:35
(anonymous) @ babylon.js:4
a.oncomplete @ babylon.js:36
2www.babylonjs.com/scenes/espilit/Espilit.Panneau2.babylonmeshdata:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)
/#JA1ND3#84:1 Failed to load http://www.babylonjs.com/scenes/espilit/Espilit.Panneau2.babylonmeshdata: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.babylonjs-playground.com' is therefore not allowed access. The response had HTTP status code 502.
babylon.js:4 BJS - [19:25:56]: error on XHR request.
t._ErrorEnabled @ babylon.js:4
(anonymous) @ babylon.js:36
/#JA1ND3#84:1 Uncaught SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at babylon.js:16
    at babylon.js:4
    at XMLHttpRequest.<anonymous> (babylon.js:36)
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:4
(anonymous) @ babylon.js:36


Link to comment
Share on other sites

Ok, she's working now. But I would like to understand a little better the incremental.
There when we load the scene we have the babylon loading screen that only disappears when the scene is fully loaded. So it comes back to the same thing as if we do not use incremental. I do not see any difference.

So I am confused and do not understand the incremental. The scene should not display the first visible object for the camera and clear the loading screen then load the other models on the fly? Because here I see all the scene when it is completely charged, what the incremental is not sensible to do if I understood its ways of functioning.

Perhaps it would be necessary to add this possibility that the loading screen fades out as soon as a first object is loaded when using incremental and SceneLoader.Append or SceneLoader.Load. because when we use SceneLoader.ImportMesh, it works it looks. Or I did not understand the operation.

For example I use SceneLoader.ImportMesh instead and it looks like it does what incremental needs to be. While with SceneLoader.Append, this shows the loading screen until the scene is loaded.


thanks again

Link to comment
Share on other sites

The append is also doing it. The system just waits for the objects in the field of view to load before displaying the first render. But then if you move you will see object and textures popping (Check your f12 network profiler)

Link to comment
Share on other sites

Oh, ok, because I see almost everything instantly appearing as the loading screen closes. But it's true that when I watch the fps, they are still moving after the display, but it goes very fast, 1 to 2 seconds.


Link to comment
Share on other sites

  • 1 month later...

I have some questions to be able to show Texture.samplingMode value, and aniso too.

The content I've made is here: https://www.nothing-is-3d.com/paste/?89e245506be515a4#5x8TfmArtvKJaB5NZBJQ5Djc8YeYScDVHVKGTXnJ3go=

First, usually I put my little tables just above a @serialize() thing (like here). But I don't see it for samplingMode in texture.ts. So, where can I write the doc for samplingMode?

Then, about the content linked above, am I right?:

  • 3 values for samplingMode
  • 11 for anisotropicFilteringLevel
Also, I've copy-pasted comments from here, and I don't understand what is this mag :) Are this infos valuable both for samplingMode and aniso, or just aniso?

(for info, I've made a little PG to help myself)

Thanks for helping!


(And because I'm talking about texture, is the comment about coordinatesMode should be above @serialize() like others?)

Link to comment
Share on other sites


probably here for samplingMode: https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/babylon.texture.ts#L244

Regarding anisotropicFilteringLevel: it is a pure number between 0 and maxAnisotropic. It is not related to samplingMode value


Sampling mode is made of 3 internal possibilities: minification filter (far from the viewer), magnification filter (close to the viewer) and mip (filter used between mip map levels). Most of the time the first two are identical.

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 weeks later...

Great! I will definitely contribute when I have learned a bit more. Having dabbled in Three.js I must say BabylonJS has a steeper learning curve (as far as using the API), mainly because of it has a greater level of abstraction and not as long of a history for examples and documentation to build up. Hopefully we can all change that.

Link to comment
Share on other sites

14 hours ago, Zephos said:

BabylonJS has a steeper learning curve (as far as using the API), mainly because of it has a greater level of abstraction

That's kind of strange :) high level of abstraction means easy to learn no?

Link to comment
Share on other sites

32 minutes ago, Deltakosh said:

That's kind of strange :) high level of abstraction means easy to learn no?

Easy to learn on the surface, yes, but harder to figure out what's actually going on under the hood, which is often necessary if you need to do something that isn't directly supported by the abstraction. Another thing I have noticed about BabylonJS is that there is a lot of tightly coupled pieces, which can also make it harder to use. For example, creating a primitive mesh requires a scene object in its constructor, so you can't create a mesh and add it to the scene later... it has to be added immediately. I think you can do that with meshes you load in from a file, though. Anyway I am very new to BabylonJS so maybe it's just growing pains. Please correct me if I am wrong. I really like the framework so far and this is not meant as a criticism, just an observation. It seems to have been designed with a heavy object oriented mindset, and that's just fine. ?

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.

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.


  • Recently Browsing   0 members

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