Forum Replies Created
-
AuthorPosts
-
origginParticipant
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.
origginParticipantHi, 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
origginParticipantI just had the same problem :(
-
AuthorPosts