Could you share a link to the scene with the script extension not working as you intend to?
You can configure the triggers via the viewer API as well. To make an object type a custom trigger use the onNodeTypeClicked
API function: GitHub - shapespark/shapespark-viewer-api: JavaScript API for interacting with the Shapespark 3D scene.. Anchors for sphere
/sprite
triggers can be added as described in: Trigger Extensions via Javascript - #2 by jan.