source

vrml

VRML 2.0 Tutorial--button1.wrl Source

#VRML Draft #2 V2.0 utf8

WorldInfo {
	title "button1: The Shapes"
	info "
		File:          button1.wrl
		Version:       1.1
		Revisions:     1.0 June 22, 1996 -- initial cut
                     	1.1 February 16, 1997 -- updated to Final Spec
		Description:   Button shapes used in button tutorial
		Requirements:  A VRML2.0 capable browser
		Author:        Matt Leonard
                     mattl@pobox.com
                     http://www.pobox.com/~mattl
		Copyright:     This file is copyright 1996 Matt Leonard
		Tabstop:       4
	" # info
} # WorldInfo

NavigationInfo {
	type "EXAMINE"
} # NavigationInfo

Viewpoint {
	position 0.2 1.0 1
	orientation 1 0 0 -0.6
	description "Entry Viewpoint" 
} # Viewpoint

DEF BASE Transform {
	translation 0 0 0
	scale 2 1 1

	children [
		Shape {
			geometry Cylinder {
				radius 0.1
				height 0.05
			} # Cylinder
		} # Shape
	] # children
} # BASE

DEF BUTTON Transform {
	translation 0 0 0
	scale 2 1 1

	children [
		DEF POPPED Transform {
			translation 0 0.026 0
			children [
				Shape {
					geometry Cylinder {
						radius 0.07
						height 0.04
					} # Cylinder

					appearance Appearance {
						material Material {
							# green
							diffuseColor 0 255 0
						} # material
					} # appearance
				} # Shape
			] # children
		} # POPPED
	] # children
} # BUTTON

-- Back to Tutorial --

vrml navbar