Disabled mouse with video texture

Home Forums Programming Disabled mouse with video texture

This topic contains 3 replies, has 2 voices, and was last updated by Yuri Kovelenov Yuri Kovelenov 1 month, 2 weeks ago.

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

    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
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi Patrick,

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

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #17570
    Avatar
    ffgraphics
    Newbie

    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
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    glad you figured it out! :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.