Documentation
¶
Rendered for js/wasm
Index ¶
- type Matrix
- func Identity() (matrix Matrix)
- func Multiply(left, right Matrix) (matrix Matrix)
- func Perspective(aspect, fieldOfView, near, far float64) (matrix Matrix)
- func RotationX(angle float64) (matrix Matrix)
- func RotationY(angle float64) (matrix Matrix)
- func RotationZ(angle float64) (matrix Matrix)
- func Scale(x, y, z float64) (matrix Matrix)
- func Translation(x, y, z float64) (matrix Matrix)
- type OrbitCamera
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrbitCamera ¶
type OrbitCamera struct {
// contains filtered or unexported fields
}
func NewOrbitCamera ¶
func NewOrbitCamera(canvas *wasmdraw.CanvasElement) (camera *OrbitCamera)
NewOrbitCamera creates a drag-controlled camera with idle rotation.
func (*OrbitCamera) Matrix ¶
func (c *OrbitCamera) Matrix(dt, width, height, distance float64) (matrix Matrix)
Matrix returns the current perspective-view transform.
func (*OrbitCamera) WithIdleRotation ¶
func (c *OrbitCamera) WithIdleRotation(enabled bool) (camera *OrbitCamera)
WithIdleRotation controls automatic camera orbit while the mouse is released.
Click to show internal directories.
Click to hide internal directories.