@xsolla/xui-b2c-glass-cube
v0.231.0
Published
WebGL glass cube: Sol seals an item into a glass cube. Framework-agnostic core (three.js) with a thin React wrapper.
Readme
@xsolla/xui-b2c-glass-cube
WebGL animation of Sol sealing an item into a glass cube. Framework-agnostic
core on three.js (mountGlassCube) plus a thin React wrapper; falls back to
the plain item picture without WebGL2 or with prefers-reduced-motion.
yarn add @xsolla/xui-b2c-glass-cube threeimport { mountGlassCube } from "@xsolla/xui-b2c-glass-cube";
const cube = mountGlassCube(hostEl, { item: imageUrl, size: 200 });import { GlassCube } from "@xsolla/xui-b2c-glass-cube/react";
<GlassCube item={imageUrl} size={200} onComplete={showNextStep} />;Full API, assets, fallback behaviour: docs/api/components/b2c-glass-cube.md.
