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

OrbitControlsModule doesn't seem to work #17

Open
albertpeiro opened this issue Nov 11, 2018 · 3 comments
Open

OrbitControlsModule doesn't seem to work #17

albertpeiro opened this issue Nov 11, 2018 · 3 comments

Comments

@albertpeiro
Copy link

albertpeiro commented Nov 11, 2018

Hi there, thanks for this cool library. Very appreciated.
I'm trying to get the OrbitControlsModule to not zoom or simply maxZoom or maxDistance. None of these below properties worked when injecting this module in my <App>. What am I doing wrong?

new WHS.OrbitControlsModule({
                            // enableZoom: false
                            // follow: false,
                            // minDistance: 3,
                            // maxDistance: 3,
                            // minZoom: 3,
                            // maxZoom: 3,
                            // enableDamping: true
                        })

Thank you

@sasha240100
Copy link
Member

sasha240100 commented Nov 11, 2018 via email

@albertpeiro
Copy link
Author

albertpeiro commented Nov 11, 2018 via email

@albertpeiro
Copy link
Author

albertpeiro commented Nov 11, 2018

This is how my app looks like:

<App
                    refApp={this.appRef}
                    modules={
                        [
                            // new WHS.ElementModule(),
                            new WHS.SceneModule(),
                            new WHS.CameraModule({
                                position: new THREE.Vector3(0, 5, 11),
                                fov: 75,
                                aspect: width / height
                            }),
                            new WHS.RenderingModule(
                                {
                                    bgColor: 0xfff,
                                    bgOpacity: 1,
                                    renderer: {
                                        alpha: true,
                                        antialias: true,
                                        shadowmap: {
                                            type: THREE.PCFSoftShadowMap
                                        }
                                    },
                                    width,
                                    height
                                },
                                { shadow: true }
                            ),
                            new WHS.OrbitControlsModule({
                                enableZoom: false
                                // follow: false,
                                // minDistance: 3,
                                // maxDistance: 3,
                                // minZoom: 3,
                                // maxZoom: 3,
                                // enableDamping: true
                            })
                        ]
                        // new WHS.ResizeModule()
                    }
                >
...

And it works like that. But the zoom or any other feature of OrbitControls is ignored. The controls do work though, just with the default values.

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

2 participants