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.
Click to show internal directories.
Click to hide internal directories.