Three.V8

3D rendering engine using JavaScript as user script.

View on GitHub

<–Home

class GLRenderer

The OpenGL renderer displays your beautifully crafted scenes using OpenGL.

class GLRenderer

Name Description
Constructors  
GLRenderer() Creates a new GLRenderer.
Properties  
useSSAO Whether enable SSAO.
Methods  
dispose Dispose the unmanaged resource.
render Renders a scene.
renderCube Renders a scene to a cubemap.
renderTexture Render a 2d media to screen.

Constructors

GLRenderer()

GLRenderer()

Create a GLRenderer.

Properties

useSSAO

.useSSAO: Boolean

Whether enable SSAO.

Methods

dispose()

.dispose(): undefined

Dispose the unmanaged resource.

render()

.render(scene: Scene, camera: Camera): undefined

Renders scene using camera to the main view of the game-player.

Should be called from the render() callback function.

.render(scene: Scene, camera: Camera, ui3dviewer: UI3DViewer): undefined

Renders scene using camera to ui3dviewer.

Should be called from the onRender() callback function of the ui3dviewer.

.render(scene: Scene, camera: Camera, target: GLRenderTarget): undefined

Renders scene using camera to target.

renderCube()

.renderCube(scene: Scene, target: CubeRenderTarget, position: Object, near=0.1: Number, far=100.0: Number): undefined

Renders scene to a cubemap target centered at position.

renderTexture()

.renderTexure(img: GLRenderTarget/MMCamera/MMLazyVideo/MMVideo/AVCPlayer, x:Number, y:Number, width:Number, height:Number, alpha = 1.0:Number, target=undefined: UI3DViewer/GLRenderTarget): undefined

Render a 2D media to screen.

When target is not specified, the media is rendered to the main view of the game-player by default.