EnterSubScene
Enter sub-scene control is displayed when an object is selected after enabling.
How to Use
- Enable the enter sub-scene control quickly by configuring
addons={["EnterSubScene"]}
- Or manually enable it by importing
import { EnterSubScene } from "@icraft/player-react"
. Manual enabling allows more flexible control over the enter sub-scene control's style.
In general, the enter sub-scene control should be used together with the exit sub-scene control
As shown in the example above, when clicking the cache element, the enter sub-scene control is displayed. Clicking the enter sub-scene control will enter the sub-scene of the cache element.
import { ICraftPlayer } from "@icraft/player-react";
const style = {
width: "100%",
height: "100%",
position: "relative" as const,
overflow: "hidden" as const,
};
export default () => {
return (
<div style={style}>
<ICraftPlayer
src='/templates/AWSCloud.iplayer'
addons={["EnterSubScene", "ExitSubScene"]}
/>
</div>
);
};
API
Name | Description | Type | Default | Required |
---|---|---|---|---|
style | Style | React.CSSProperties | false | |
className | Class name | string | false |