Class: Viewer

Viewer

represents 3D viewer

new Viewer(x, y, width, height, attrs)

3D viewer implementation
This:
Parameters:
Name Type Argument Description
x number x coordinate
y number y coordinate
width number width
height number height
attrs Object <optional>
Raphael.rect attrs
Properties:
Name Type Description
scene Raphael.Scene
skipBackFace boolean how to render back faces
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2893

Extends

  • Raphael.fn

Methods

centering() → {Raphael.fn.Viewer}

Sets camera focalPoint to the center of receiver's scene and sets scene.lcs to have origin at receiver's center
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2953
Returns:
receiver
Type
Raphael.fn.Viewer

fit() → {Raphael.fn.Viewer}

Fits camera focalPoint and zoom to fit the receiver's scene
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2936
Returns:
receiver
Type
Raphael.fn.Viewer

onUpdate()

What to do when rotated. Empty function initially
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2899

render() → {Raphael.fn.Viewer}

Render receiver's scene
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2924
Returns:
receiver
Type
Raphael.fn.Viewer

setScene(scene) → {Raphael.fn.Viewer}

Sets new scene to receiver
Parameters:
Name Type Description
scene Raphael3d.Scene new scene
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2906
Returns:
receiver
Type
Raphael.fn.Viewer

update() → {Raphael.fn.Viewer}

Updates receiver (updates and render scene)
Source:
  • /var/www/html/software/raphael3d/raphael3d.src.js, line 2914
Returns:
receiver
Type
Raphael.fn.Viewer