Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing video changes aspect ratio when using LittlePlanetProjection #448

Open
pat-canex opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@pat-canex
Copy link

Description

Hi, I was previously using the EquirectProjection but wanted to switch to LittlePlanetProjection so I can zoom back and see on each side of my 360 video. I have played with the autoResize, useResizeObserver, CSS attributes the canvas, etc. but could not fix the resizing issues.

With the EquirectProjection (resizing while keeping the aspect ratio correctly) :
Peek 2024-12-12 12-08
With the LittlePlanetProjection (resizing breaks the aspect ratio) :
Peek 2024-12-12 12-07

I am using @egjs/react-view360": "4.0.0-beta.7".

Is this the expected behaviour for this projection ?

Steps to check or reproduce

  1. Create a View360 with these props :
const projection = useMemo(() => new LittlePlanetProjection({
    src: videoUrl!,
    video: {
        autoplay: false
    },
}), []);`

useEffect(() => {
    viewerRef.current?.load(projection);
}, [viewerRef.current, projection]);

<View360 style={{ height: "100%",  width: "100%"}} autoResize useResizeObserver />
  1. Resize your window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant