The following props can be passed: onUpdate
, onError
, isPlaying
, progress
, inputState
, labels
, cameraPreset
. Also layout
and data
which will be discussed further down.
-
onUpdate
should be a function that takes one argument
onUpdate={ object => {
this.setState(object);
}}
An object containing the state of the visualizer, with the following structure, will be returned:
{progress: 1, currentSegmentNumber: 16, isPlaying: false, isInteracting: true, isHovering: false}
-
onError
If any errors are thrown within the visualizer component this function will be called (if it has been passed as a prop) with the errors object as the only argument:
onError={errors => {
console.log(errors);
}}
-
inputState
an object with structure { x:<x>, y:<y>, z:<z> }
that will be set as an arbitrary starting / position for the pulse indicator
-
isPlaying
tells the Bloch sphere component to start or stop the animation
-
progress
will have the pulse path starting at the progress percent specified. Eg: if you want to have the whole path showing on mount set progress to 1
progress={<float between 0 and 1>}
-
Labels
needs to be an object with the following structure and will control the visibility of individual labels:
{
xAxis: true,
yAxis: true,
zAxis: true,
theta: true,
thetaArc: true,
phi: true,
phiArc: true,
northPole: true,
southPole: true
}