vthree

package module
v0.0.0-...-517fa4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 4 Imported by: 1

README

vthree - easily use three.js from Vecty

Running

  1. go get -u github.com/vecty/vthree
  2. Run gopherjs serve and navigate to github.com/vecty/vthree/example/basic.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WebGLRenderer

func WebGLRenderer(opts WebGLOptions, markup ...vecty.MarkupOrChild) vecty.Component

WebGLRenderer returns a Vecty component that initializes a three.js WebGL renderer for use in a Vecty application.

Types

type WebGLOptions

type WebGLOptions struct {
	// Init is called when the three.js WebGLRenderer has been created.
	//
	// This can happen multiple times during the lifecycle of an application
	// if the Vecty WebGLRenderer component was unmounted and mounted again,
	// e.g. due to navigating to a different page and back again.
	Init func(r *three.WebGLRenderer)

	// Shutdown is called before the canvas associated with the three.js
	// WebGLRenderer will be destroyed. For example, when your Vecty
	// application no longer renders the WebGLRenderer component and it is
	// being unmounted.
	Shutdown func(r *three.WebGLRenderer)
}

WebGLOptions represent options for the WebGLRenderer component.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL