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.

Disabled mouse with video texture

Home Forums Programming Disabled mouse with video texture

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17490
    ffgraphics
    Participant

    Hello there,

    I’m new to verge3D and I try to figure out if this is a suitable solution for me and my customers.
    For most of my projects it’s necessary to have a running video in my scene.
    Got that working with the post of zjbcool.

    But now when the video texture is applied my mouse isn’t working anymore.
    Keyboard still does it’s job. Can move camera up, down, left, right.

    So far I added to the .html

    <video id=”video” autoplay muted>
    <source src=”loop.mp4″ type=’video/mp4;’>
    </video>

    and to .js

    var screen, video, texture, material

    video =document.getElementById(“video”);
    screen = app.scene.getObjectByName(“screen”);
    texture = new v3d.VideoTexture(video);
    texture.minFilter = v3d.LinearFilter;
    texture.format = v3d.RGBFormat;
    material = new v3d.MeshBasicMaterial({map : texture});
    screen.material = material;

    app.animate();

    If I remove those lines, mouse works fine as aspected.

    Does someone has any idea how to fix this?

    Thank you in advance.

    Patrick

    #17501

    Hi Patrick,

    Can you attach a zip of your project (or provide a download link)?

    Chief 3D Verger | LinkedIn | Twitter

    #17570
    ffgraphics
    Participant

    Hey,

    thx for your reply.
    It’s working now. I reduced the resolution of my video.
    I didn’t notice I picked one with 2048 x 1152px.
    Felt like the video was overlapping the whole scene. I reduced it in smaller steps and with each step I could use my mouse in a larger area.

    #17571

    glad you figured it out! :good:

    Chief 3D Verger | LinkedIn | Twitter

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