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

How to successfully import a OBJ #15

Open
3 tasks done
ruohanqi opened this issue Jul 29, 2018 · 0 comments
Open
3 tasks done

How to successfully import a OBJ #15

ruohanqi opened this issue Jul 29, 2018 · 0 comments

Comments

@ruohanqi
Copy link

ruohanqi commented Jul 29, 2018

When I used Model component to render a OBJ. The OBJ loaded successfully, but wasn’t rendered. the component didn’t report error。Is there anyone could guide me how to use react-whs? Thanks a lot!

here is my way:

<App
    modules={[
        new WHS.SceneModule(),
        new WHS.DefineModule('camera', new WHS.PerspectiveCamera({
            position: {
              z: 20,
            },
        })),
        new WHS.RenderingModule({
            bgColor: 0x162129,
            renderer: {
                antialias: true,
                shadowmap: {
                    type: THREE.PCFSoftShadowMap,
                },
            },
         }, { shadow: true }),
         new WHS.OrbitControlsModule(),
    ]}
>
    <Model
        loader={new THREE.OBJLoader()}
        url={objURL}
        modules={[
            new WHS.TextureModule({
                url: textureURL,
                repeat: new THREE.Vector2(1, 1),
            }),
        ]}
        position={[0, 10, 0]}
        parser={object => object}
    />
   <PointLight  .../>
   <AmbientLight  .../>
</App>

Version:

  • v0.1.9

Issue type:

  • Bug
  • Proposal/Enhancement
  • Question
  • Discussion

Desktop

  • Chrome
@ruohanqi ruohanqi changed the title How to successfully import a Obj How to successfully import a OBJ Jul 29, 2018
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