We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

“Append Scene” has it’s params in opposite order than shown in Dev Guide.

Home Forums Bug Reports and Feature Requests “Append Scene” has it’s params in opposite order than shown in Dev Guide.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33587
    GLiFTeK
    Customer

    Hi,
    k…
    this has been driving me nuts for like.. 3 days.
    I couldn’t understand why the parameters, callbacks etc included in the “Append Scene” method of the App class weren’t working. I was trying all sorts of things.

    the dev tools page for it reads as such:
    .appendScene (url, loadCb, progressCb, errorCb, loadCameras, loadLights) : null

    Then I went to look at the appendScene puzzle’s code it injects into the visual_logic.js file.

    which is:
    function appendScene(url, sceneName, loadCameras, loadLights, loadCb, progCb)

    as opposed to the latter … where the params “loadCb, progCb” are switched with “sceneName, loadCameras”.

    juuuuust thought i’d point this out….

    WHICH ONE IS “RIGHT” MAAAN? ;-)

    B-)

    #33592

    I think the docs are incorrect. We’ll fix this! sorry for the trouble.

    Nope, both functions are correct. These are different functions, one of them belongs to App class, while the other is generated by the Puzzles editor.

    Chief 3D Verger | LinkedIn | Twitter

    #33649
    GLiFTeK
    Customer

    I think the docs are incorrect. We’ll fix this! sorry for the trouble.
    Nope, both functions are correct. These are different functions, one of them belongs to App class, while the other is generated by the Puzzles editor.

    I see, my misunderstanding. so the app one is used as “app.appendScene()” and the puzzles one is used with what namespace? PL.appendScene()?

    #33669

    and the puzzles one is used with what namespace? PL.appendScene()?

    this one is a local function in visual_logic.js. I’m afraid it is not callable from outside. But there is no need to, as it is basically a wrapping over app.appendScene(). So I suggest you just use the latter.

    Chief 3D Verger | LinkedIn | Twitter

    #33710
    GLiFTeK
    Customer

    Ok,
    That’s interesting. There’s always so much to learn.
    I’ve been looking into the code behind certain puzzles, specifically the event puzzles, drag, move, animate etc…

    The quaternion matrix code in those are invaluable. Explains a lot that I’ve been curious and stumped on re the axis conversions needed to make THREE.js examples work in Verge etc.
    :good:

    This is important for me since I’ve been taking the clipping planes stencil code example and having the planes not be translatable (moving on axis) but rotating from the center to reveal the object in a raidial fashion.

    The dat.GUI slider values have been performing with a serious gimble-lock “”snapping” where the majority of the rotation process will be very slow in approach to the 0 point, then snap quickly over it, then to slow again, which is not desirable.

    Hopefully I can use the drag rotate puzzles’ and/or their code to remedy this.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.