Introduction
Using the iCraft Player front-end component, you can easily integrate scenes edited by iCraft Editor into your project and provide rich interactive functions.
How to use
First, you need to install the @icraft/player
package:
pnpm install @icraft/player --save
Then, import the ICraftPlayer
component in your project and pass in the fileUrl
property, with the value of the .iplayer
file address exported by iCraft Editor.
import { ICraftPlayer } from "@icraft/player";
export default () => {
return <ICraftPlayer fileUrl='*.iplayer' />;
};
Open your project in a browser, and you should be able to see the scene edited by iCraft Editor embedded in the page.
License
The use of iCraft Player requires commercial licensing. If you need to obtain iCraft Player commercial licensing, please contact us
Set the authorization code before using iCraft Player
import { LicenseManager } from "@icraft/player";
LicenseManager.setLicenseKey("your license key");
// befor use ICraftPlayer