-
Notifications
You must be signed in to change notification settings - Fork 17
Widget_Box2D
ben-mkiv edited this page Feb 14, 2019
·
2 revisions
widget = component.glasses.addBox2D();
-- adds a gradient Box to the 2D Overlay
-- add 2 color modifiers to specify the color
-- draw a rectangle box with a gradient from opaque red to translucent green
glasses = require("component").glasses
widget = glasses.addBox2D();
widget.setSize(100, 20)
widget.addTranslation(50, 50)
widget.addColor(1, 0, 0, 1)
widget.addColor(0, 1, 0, 0.5)