tomf
tomf

Reputation: 449

How do I create a click event in Verold?

I am experimenting with Verold (http://verold.com), a web based tool that allows you to create webgl 3d experiences. I have made this simple prototype:

http://www.verold.com/projects/54270b01497675020000007d

Right now my animation occurs on load. I'd like to "replay" the animation on click of the background (or on another object).

I could not find the appropriate event to make a "button" or click event.

Upvotes: 1

Views: 127

Answers (1)

rossmckegney
rossmckegney

Reputation: 460

You have a couple of options.

You can use an Event Handler component in Verold, and listen to the Pick event on any object in your scene.

Alternatively, if you're building an API project in Verold, you can create a button in your HTML page and trigger an event from there: VAPI.globalEvents.trigger('myEvent');

Then in Verold, add an EventHandler that listens to the myEvent Custom event.

Ross

Upvotes: 1

Related Questions