Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawParallaxBuffers ¶
func GetParallaxBuffers ¶
func GetParallaxBuffers(arr []ParallaxRect) (parallaxPositionBuffer, parallaxTranslationBuffer, parallaxTranslationRatioBuffer, parallaxAngleBuffer, parallaxScaleBuffer, parallaxColorBuffer gl.Buffer)
Types ¶
type OrbitingRect ¶
func NewOrbitingRect ¶
func (*OrbitingRect) DrawOrbit ¶
func (r *OrbitingRect) DrawOrbit()
func (*OrbitingRect) Update ¶
func (r *OrbitingRect) Update()
type ParallaxRect ¶
type ParallaxRect struct { model.Model Target camera.CameraI // Essentially, how this object moves in comparison to the camera. // 1 is the same speed. 0.2 is 20% of camera speed. // The larger the number, the further away the object appears to be. For example, a ratio of 0.95 means the object // barely move when the camera moves - just like something that's very far away. // Negative numbers will make it move in the opposite direction, which isn't recommended. TranslationRatio float32 }
func GenParallaxRects ¶
func GenParallaxRects(target camera.CameraI, count int, minWidth, maxWidth, minSpeedRatio, maxSpeedRatio float32) []ParallaxRect
type Shape ¶
type Shape interface { // Draw draws an outline of a Shape using line segments. DrawWireframe() // DrawFilled draws a filled in Shape using triangles. DrawFilled() // SetCenter sets the Shape to the specified position. SetCenter(x, y float32) // ModifyCenter moves the Shape by the specified amount. ModifyCenter(x, y float32) // Center is a point about which all actions, like rotation, are defined. // TODO: Consider the ability to modify the center point for rotating. Position() mgl32.Vec3 }
Click to show internal directories.
Click to hide internal directories.