File size: 1,543 Bytes
fea495a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import * as react_jsx_runtime from 'react/jsx-runtime';
import { U as UnicornSceneProps } from './types-Bj2y1_cd.js';

/**
 * React component for rendering Unicorn Studio WebGL animations.
 *
 * @remarks
 * This component wraps Unicorn Studio's WebGL animation system for use in React applications.
 * It handles script loading, scene initialization, placeholder display, and error states.
 *
 * The component requires either a `projectId` (to load from Unicorn Studio's servers)
 * or a `jsonFilePath` (to load from a local JSON file).
 *
 * @param props - The component props
 *
 * @example
 * Basic usage with project ID:
 * ```tsx
 * <UnicornScene
 *   projectId="your-project-id"
 *   width={800}
 *   height={600}
 * />
 * ```
 *
 * @example
 * With placeholder and callbacks:
 * ```tsx
 * <UnicornScene
 *   projectId="your-project-id"
 *   placeholder="/images/loading.png"
 *   onLoad={() => console.log("Scene loaded!")}
 *   onError={(err) => console.error(err)}
 * />
 * ```
 *
 * @example
 * Using local JSON file:
 * ```tsx
 * <UnicornScene
 *   jsonFilePath="/scenes/animation.json"
 *   scale={0.5}
 *   fps={30}
 * />
 * ```
 */
declare function UnicornScene({ projectId, jsonFilePath, sdkUrl, width, height, scale, dpi, fps, altText, ariaLabel, className, lazyLoad, production, paused, placeholder, placeholderClassName, showPlaceholderOnError, showPlaceholderWhileLoading, onLoad, onError, sceneRef, }: UnicornSceneProps): react_jsx_runtime.JSX.Element;

export { UnicornScene, UnicornSceneProps, UnicornScene as default };