Documentation ¶
Index ¶
- Constants
- Variables
- func DetectRectCollision(rect1 Rect, rect2 Rect) bool
- func HSLToRGB(h, s, l float64) (r, g, b uint8, err error)
- func NewColorFromGradient(offset float64, brightness float64) color.RGBA
- type Circle
- func (c *Circle) DetectCircleCollision(otherCircle Circle) bool
- func (c *Circle) DetectMouseCollision() bool
- func (c *Circle) DetectPointCollision(position Vector2) bool
- func (c *Circle) DrawCross(color color.RGBA)
- func (c *Circle) DrawLines(color color.RGBA, LineAngle float32)
- func (c *Circle) Fill(color color.RGBA)
- type Rect
- func GetInnerHorizontalrect(sourceRect Rect, padding float32) Rect
- func GetInnerRect(sourceRect Rect, padding float32) Rect
- func GetMouseRect() Rect
- func GetWindowRect() Rect
- func NewRect(x float32, y float32, width float32, height float32) Rect
- func NewRectFromVector(position Vector2, size Vector2) Rect
- type Shader
- type Vector2
- func (v Vector2) Add(otherVector Vector2) Vector2
- func (v Vector2) GetAngle() float64
- func (v Vector2) GetNorm() float32
- func (v Vector2) Scale(scale float32) Vector2
- func (v Vector2) ScaleToNorm(norm float32) Vector2
- func (v Vector2) Substract(otherVector Vector2) Vector2
- func (v Vector2) ToRaylibVector2() rl.Vector2
Constants ¶
View Source
const ANCHOR_BOTTOM int8 = 4
View Source
const ANCHOR_HORIZONTAL_MiDDLE = 2
View Source
const ANCHOR_LEFT int8 = 0
énumération des différentes ancres disponibles
View Source
const ANCHOR_RIGHT int8 = 1
View Source
const ANCHOR_TOP int8 = 3
View Source
const ANCHOR_VERTICAL_MiDDLE = 5
Variables ¶
View Source
var (
ErrOutOfRange = errors.New("colorconv: inputs out of range")
)
Functions ¶
func DetectRectCollision ¶
retourne si les deux rectangles se chevauchent
Types ¶
type Circle ¶
func (*Circle) DetectCircleCollision ¶
Fonction permettant de détecter si deux Cercles se chevauchent
func (*Circle) DetectMouseCollision ¶
func (*Circle) DetectPointCollision ¶
type Rect ¶
func GetInnerHorizontalrect ¶
même chose mais qu'avec les bords horizontaux
func GetInnerRect ¶
obtention d'un nouveau rectangle à l'intérieur d'un autre
func NewRectFromVector ¶
initialisation du rectangle avec deux vecteurs
type Shader ¶
func InitShader ¶
func (*Shader) SetValueFromUniformName ¶
func (s *Shader) SetValueFromUniformName(uniformName string, value any, uniformType rl.ShaderUniformDataType)
type Vector2 ¶
objet contenant un vecteur qui a deux dimensions, qui peut représenter une position 2d, un déplacement 2d, et quelques méthodes pratiques
func NewVector2 ¶
func (Vector2) ScaleToNorm ¶
func (Vector2) ToRaylibVector2 ¶
Click to show internal directories.
Click to hide internal directories.