It is a bidirectional communication system among JavaScript and the Ruby environment.
It offers an inherent and asynchronous API for delivering message among SketchUp's Ruby environment and dialogs.
API Overview - Ruby methods:
Bridge.new(dialog)
Generates a Bridge instance for a UI::WebDialog or UI::HtmlDialog.
Bridge.decorate(dialog)
As an alternative includes the Bridge methods to a UI::WebDialog or UI::HtmlDialog.
Bridge#on(callbackname) { |deferred, *arguments| }
Registers a callback on the Bridge.
Bridge#call(js_function_name, *arguments)
Call forth s a JavaScript function with several arguments.
Bridge#get(js_function_name, *arguments).then{ |result| }
Call forth a JavaScript function and returns a promise that will be fixed with the JavaScript function's return value.
This sketchup plug can be accessed from the extension warehouse.
Published By
Arka Roy
www.sketchup4architect.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~