react-obj-viewer

0.1.3 • Public • Published

react-obj-viewer

Installation

npm install react-obj-viewer

Import the ObjViewer component into your project

    import { ObjViewer } from 'react-obj-viewer'

The only prop that is required is the model prop, pass in the path of the model.
    <ObjViewer 
        model="your/obj/path/here.obj"
    />

If the model path is correct then model should load in the react app.


Additional props and components

The ObjViewer component takes additional props to adjust the dimensions, add a material, add axis helper or a bounding box helper.

    <ObjViewer
        model="your/obj/path/here.obj"
        material="your/material/path/here.jpg"
        width={400}
        height={400}
        axis={true}
        boundingBox={false}
    />

Future Development

If there are any requests or you need any anymore help than that provided above then feel free to get in touch

Package Sidebar

Install

npm i react-obj-viewer

Weekly Downloads

4

Version

0.1.3

License

MIT

Unpacked Size

277 kB

Total Files

7

Last publish

Collaborators

  • tonyduanesmith