Documentation ¶
Rendered for js/wasm
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶
type Basic struct { vecty.Core // Wait period is the time renderer sleeps // between unrendered frames when Animate returns false. // Default WaitPeriod on zero value is 200ms. WaitPeriod time.Duration `vecty:"prop"` // Markup should be constant during rendering. Markup []vecty.MarkupOrChild `vecty:"prop"` // Init is called upon mounting. It should not be nil. Init func(three.WebGLRenderer) `vecty:"prop"` // Animate should return true if user wants to render // the current scene. If Animate is nil then scene is rendered // as Init left it. Animate func(three.WebGLRenderer) bool `vecty:"prop"` // Shutdown is called on dismounting the vecty component. Shutdown func(three.WebGLRenderer) `vecty:"prop"` // contains filtered or unexported fields }
Basic is a Vecty Component implementation for use with the three package. Basic works by calling Animate callback between rendered frames or if a static scene is to be displayed, by a nil Animate function and a initializer Init function. Init cannot be nil.
All `vecty:"prop"` arguments should remain constant during rendering until Basic is unmounted.
func (*Basic) Render ¶
func (b *Basic) Render() vecty.ComponentOrHTML
Render implements vecty.MarkupOrChild interface.
Click to show internal directories.
Click to hide internal directories.