Sha256: cf735da23af41f5871cde59bd3f17b9ba215562bdd78fd0fb7f6733d92b07780
Contents?: true
Size: 515 Bytes
Versions: 10
Compression:
Stored size: 515 Bytes
Contents
# Load and Display an OBJ Shape. # # The loadShape() command is used to read simple SVG (Scalable Vector Graphics) # files and OBJ (Object) files into a Processing sketch. This example loads an # OBJ file of a rocket and displays it to the screen. # attr_reader :rocket, :ry def setup size(640, 360, P3D) @ry = 0 @rocket = load_shape("rocket.obj") end def draw background(0) lights() translate(width/2, height/2 + 100, -200) rotate_z(PI) rotate_y(ry) shape(rocket) @ry += 0.02 end
Version data entries
10 entries across 10 versions & 1 rubygems