Adding items to the scene
It’s possible to add additional products/items/configurations to the scene using the insertObject
API:
By default the object is placed somewhere where it does not overlap with other items in the scene. You can also supply a position and a rotation for the object in the scene:
Position (2nd parameter) is in meters and the rotation (3rd parameter) is in radians.
Gets called when something is changed in the plan
It is possible to implement a behavior which gets called when there is something changed in the plan. It gets all objects of the plan as parameter.
React on specific plan element changes
You can react to certain plan element changes using the onPlanElementChanged(changeType)
callback.
Depending on what happened, the changeType
parameter can be:
added
: When a new plan element is added to the sceneremoved
: When an existing plan element gets removedchanged
: When a plan element is changed, like rotated or moved. But also when it is added or removedupdated
: When the configuration of a configurable product inside the scene is updated.
You can try and play around with this example here: (opens new window)
React when tooltip is closed by controls button
You can react on any time when a tooltip is closed on controls button click As a parameter you get the name of the tooltip, e.g. "stopConfiguring"
Last updated