Sha256: 3b9c1da630b561a906cc92e6847d38fd99d5cb9801a736050fad4bb1e000da43

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

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.5.0-java examples/regular/arcball_box.rb
propane-0.4.0.pre-java examples/regular/arcball_box.rb