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.

origgin

Forum Replies Created

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • in reply to: Object clipping issues #30943
    origgin
    Participant

    Looks like you forgot app instance parameter:
    v3d.SceneUtils.getMaterialByName(v3d.apps[0], 'YourMaterial')
    As for clipping planes, it looks like you need different params for your plane. Keep in mind that Verge3D API coordinate space is different: x-left, y-up, z-forward. That means your clipping plane (0, 0, -3) is vertical, not horizontal. Use (0, -1, 0) or so.

    So, this about the Verge3D coordinate system being different was new for me and this was actually the mystery behind the problem.

    Thank you very much :)

    I hope this topic can also help other people who are trying something similar.

    in reply to: Object clipping issues #30930
    origgin
    Participant

    Hi, Looks like you forgot to enable clipping planes on the renderer: v3d.apps[0].renderer.localClippingEnabled = true

    Hi Alexander, thanks for the answer, but it also did not work for me. When I add this line to my code the result is exact the same as before (and the fps decrease a lot).

    Also, it’s not recommended to access app.materials array directly, use v3d.SceneUtils.getMaterialByName() method instead.

    This also does not work for me. It returns the following error

    v3d.js:1 Uncaught TypeError: Cannot read property 'length' of undefined
        at Object.getMaterialsByName (v3d.js:1)
        at Object.getMaterialByName (v3d.js:1)
        at <anonymous>:1:16

    Maybe I should mention that I am trying this all from the console at runtime. I do not know if there is any difference doing it so

    in reply to: My post hasn’t come through! #30894
    origgin
    Participant

    I just had the same problem :(

Viewing 3 posts - 16 through 18 (of 18 total)