back to index | | home .

b9: leg stretch, bad mx-19 update, youtube clips, deer in taiwan, vr180


    var canvas = document.getElementById("renderCanvas"); //not change  
    var ispause=false;  
    ... //skiping near var videoDome  
    camera.speed = 1000;  
    var videoDome = new BABYLON.VideoDome(  
        "videoDome",  
        ["vr180.mp4"],  
        {  
            resolution: 32,  
            size: 500,  
            clickToPlay: false,  
            halfDomeMode: true  
        },  
        scene  
    );  

//https://doc.babylonjs.com/how_to/360videodome#180-video  
    //videoDome.videoMode = BABYLON.VideoDome.MODE_MONOSCOPIC;  
    videoDome.videoMode = BABYLON.VideoDome.MODE_SIDEBYSIDE;  
    // or  
    //videoDome.videoMode = BABYLON.VideoDome.MODE_TOPBOTTOM; //^^halfDome =false  

    videoDome.videoTexture.inertia=0;  
    videoDome.videoTexture.fovMultiplier=1.5; //0.0 - 2.0  
    videoDome.videoTexture.uScale = 1;  

    scene.onKeyboardObservable.add((kbInfo) => {  
        switch (kbInfo.type) {  
            case BABYLON.KeyboardEventTypes.KEYDOWN:  
                switch (kbInfo.event.key) {  
    case "a":  
    case "A":  
        if (ispause == true){  
            ispause = false //ispause ? false : true;  
            videoDome.videoTexture.video.play();  
        }  
        else {  
        videoDome.videoTexture.video.pause();  
            ispause = true; console.log('ewe');  
        }  
    break  
    }break}});