Skip to main content

ThreekitSource

ThreekitSource

Any ThreekitAsset needs authentication to enable loading. Add the ThreekitSource component to do this.

import { ThreekitSource, Asset } from '@threekit/lignin';

<ThreekitSource authToken={...} org="demo-org">
<Asset id={id} />
</ThreekitSource>

Multiple copies of ThreekitSource can exist in the hierarchy. Child assets will use the nearest ThreekitSource parent to control its environment.

<ThreekitSource env='fts' authToken={...} org="demo-org">
<Asset id={mainId} />
</ThreekitSource>
<ThreekitSource env='preview' authToken={...} org="preview-demo-org">
<Asset id={previewId} />
</ThreekitSource>

Props

authToken: String (required)

env: String, default: 'preview'

org: String

To temporarily workaround a bug in the api, provide the org (either via slug or uuid). This also makes the ThreekitSource more descriptive, since it is helpful to see what org is being referenced.