Polygona 3D Client
Polygona 3D Client is developed with React and GraphQL and can be embedded into any kind of web-app.
Requirements
- Node.js installed on your system.
- Valid
apiKey
and apiSecret
provided by Polygona.
Setup
- Install the library by running
npm i polygona-3d-client
- Embed it into your application (React example)
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Polygona3DClient } from 'polygona-3d-client';
const App = () => {
return (
<div>
<div id="header" style={{ height: '64px', backgroundColor: '#32aaca' }} />
<div style={{ position: 'relative', height: '95vh' }}>
<Polygona3DClient
credentials={{ apiKey: 'YOUR_API_KEY', apiSecret: 'YOUR_API_SECRET' }}
slug="customizable-minimalistic-egg-box"
colorScheme="purple"
objectColor="#b99aff"
/>
</div>
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
Theming
Available color schemes: gray
, red
, orange
, yellow
, green
, teal
, blue
, cyan
, purple
, pink
Run the example
An example of the client app is also available in example-client
folder.
To run it just follow the steps below:
> In the root directory
Compile the library
> In the example-client directory
Server ready at http://localhost:1234