Sha256: 793eb3ebd01bdf7391887e0c65d3fea9000eef36f64937b9be64755dac6bad30

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

!#/usr/bin/env jruby

require 'arcball'

############################
# Use mouse drag to rotate
# The arcball. Use mousewheel
# to zoom. Hold down x, y, z
# to constrain rotation axis.
############################

require 'propane' # temporary local

# Include processing opengl classes that we'd like to use:
%w(PGL PGraphics3D PGraphicsOpenGL PShapeOpenGL Texture).each do |klass|
  java_import "processing.opengl.#{klass}"
end

class ArcballBox < Propane::App

def setup
  size(600, 600, P3D)
  smooth(8)
  Processing::ArcBall.init(self, 300, 300)
  fill 180
end

def draw
  background(50)  
  box(300, 300, 300)
end

end

ArcballBox.new title: 'ArcBall Box'



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
propane-0.7.0-java examples/regular/arcball_box.rb
propane-0.6.0-java examples/regular/arcball_box.rb