BabylonJS / Extensions

Extensions for Babylon.js
178 stars 157 forks source link

Zoom Out create a fisheye view #247

Closed mikezero84 closed 1 year ago

mikezero84 commented 1 year ago

Using the last version if you use the mouse wheel scroll trying to zoom out the video rendered in 360 start to visualize it like fisheye, how this could be limited or fixed to avoid this?.

example: https://drive.google.com/file/d/1jI8Dc5e_sDW9sDjYdTa3WHCF4y1347Sp/view?usp=sharing

sebavan commented 1 year ago

@RaananW might have an idea ?

RaananW commented 1 year ago

Would be great to discuss that in the forum. In general, setting a max radius to the camera will solve this, but seeing the playground or some code will be more helpful. Ping me in the forum.

mikezero84 commented 1 year ago

Sure, @RaananW could you share me the link of the forum? to continue discussing this issue.

RaananW commented 1 year ago

forum.babylonjs.com

mikezero84 commented 1 year ago

done @RaananW https://forum.babylonjs.com/t/amp360video-zoom-out-create-a-fisheye-view/37764

RaananW commented 1 year ago

Sorry, didn't understand that this is related to the amp360 plugin. Will be fixed shortly

mikezero84 commented 1 year ago

Hi I downloaded the last version of the library amp-360video.js and I got now an error https://raw.githubusercontent.com/BabylonJS/Extensions/master/Amp360Video/dist/amp-360video.js

Uncaught TypeError: h.createExternalTexture is not a function
at new xi (amp-360video.js:formatted:18584:112)
at In._initTexture (amp-360video.js:formatted:28033:25)
at new Sn (amp-360video.js:formatted:27893:32)
at new In (amp-360video.js:formatted:28016:9)
at amp-360video.js:formatted:54871:32
at b.<anonymous> (amp-360video.js:formatted:54896:18)
at e (azuremediaplayer.min.js:46:29013)

`

        var myOptions = {
            nativeControlsForTouch: false,
            heuristicProfile: "HighQuality",
            autoplay: false,
            controls: true,
            width: "100%",
            height: "100%",
            poster: "",
            logo: { "enabled": false },
            techOrder: ["azureHtml5JS", "html5"],
            plugins: {
                "threeSixty": {
                    enableVR: true
                },
                "zoom": {} 
            }
        };

        var myPlayer = amp('azuremediaplayer', myOptions, function () {
            console.log('Good to go!');
            // add an event listener
            this.addEventListener('ended', function () {
                console.log('Finished!');
            });
        });

        myPlayer.src([{
            src: "video_url",
            type: "application/vnd.ms-sstr+xml"
        }]);

`

@RaananW

RaananW commented 1 year ago

What version of babylon are you using?

Let me debug this first. sorry :-)

RaananW commented 1 year ago

Should be good now. there was a missing extension in production

mikezero84 commented 1 year ago

no worries it happens sometimes, now is working and the fisheye is fixed, tyvm for your time