-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
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
glmcz
Metadata
Metadata
Assignees
Labels
No labels