-
Notifications
You must be signed in to change notification settings - Fork 18
Widget_OBJModel2D
ben-mkiv edited this page Feb 14, 2019
·
2 revisions
widget = component.glasses.addOBJModel2D()
-- adds a Wavefront Object Model to the 2D Overlaywidget.loadObj(String:waveFrontObjectData)
-- loads the model from the parsed object data-- load an object file to a local variable (objData)
local fh = io.open("/home/someWaveFrontObjectFile.obj", "r")
local objData = fh:read("*a")
fh:close()
glasses = require("component").glasses
widget = glasses.addOBJModel2D()
-- loads the data from the obj file to the widget
widget.loadOBJ(objData)