Documentation
¶
Index ¶
- Constants
- Variables
- func Cobineshader() rl.Shader
- type AxisCamera
- type ControllerModel
- func (con *ControllerModel) AddCollisionByBody(body *ode.Body, kinematic bool, boneId int, scaleSize float32)
- func (con *ControllerModel) CameraTargetLockTheModel(camera *rl.Camera)
- func (con *ControllerModel) DefaultLoopAnimtion(indexAnimation, speed int32)
- func (con *ControllerModel) DrawModelControll(rotationAxis rl.Vector3, rotationAngle float32, scale rl.Vector3, ...)
- func (con *ControllerModel) DrawSkeletAnimtion(scaleSize float32)
- func (con *ControllerModel) DrawSkeletBindPose(scaleSize float32)
- func (con *ControllerModel) EnableDefaultAnimtion()
- func (con *ControllerModel) FrameCountRest()
- func (con *ControllerModel) GetBoneAnimtionTranslation(boneId int, scaleSize float32) rl.Vector3
- func (con *ControllerModel) GetBoneBindPoseTranslation(boneId int, scaleSize float32) rl.Vector3
- func (con *ControllerModel) GetStatusEnableDefaultAnimtion() bool
- func (con *ControllerModel) Init(model *rl.Model, body *ode.Body, modelAnimation []rl.ModelAnimation, ...)
- func (con *ControllerModel) JointModelPostionAndDraw(model *rl.Model, boneId int, scaleSizeBone, scale float32, color rl.Color)
- func (con *ControllerModel) Move(indexAnimation int32, speedFrame int32, axisCamera AxisCamera, ...)
- func (con *ControllerModel) Once()
- func (con *ControllerModel) OnceRun(indexAnimation, speed int32)
- func (con *ControllerModel) SyncTransformTheModel(scale float64)
- func (con *ControllerModel) Unload()
- type Fog
- func (fo *Fog) AddTheMaterialToFog(models []*rl.Material, textures []*rl.Texture2D)
- func (fo *Fog) Init(ambient rl.Color, fogDensity float32)
- func (fo *Fog) SetCombineShader(CombineShader *rl.Shader)
- func (fo *Fog) Unload()
- func (fo *Fog) Update(cameraPos rl.Vector3)
- func (fo *Fog) UpdateFogDensity(fogDensity float32)
- type Instances
- type Light
- func (lt *Light) DisableLight(light *Light)
- func (lt *Light) DrawSpherelight(light *Light)
- func (lt *Light) EnableLight(light *Light)
- func (lt *Light) Init(ambientStrength float32, ambientColor rl.Vector3)
- func (lt *Light) NewLight(lightType LightType, position, direction rl.Vector3, color rl.Color, ...) Light
- func (lt *Light) SetCombineShader(CombineShader *rl.Shader)
- func (lt *Light) SetConfigPointLight(light *Light, constant, linear, quadratic float32)
- func (lt *Light) SetConfigShiness(light *Light, shiny, specularStr float32)
- func (lt *Light) SetConfigSpotLight(light *Light, cutOff, outerCutOff float32)
- func (lt *Light) SetFlashlightTexture(materials []*rl.Material, texure *rl.Texture2D)
- func (lt *Light) SetMaterialTexture(materials []*rl.Material, texture []*rl.Texture2D)
- func (lt *Light) SetMaxLight(max int)
- func (lt *Light) Unload()
- func (lt *Light) UpdateReflect(cameraPos rl.Vector3)
- func (lt *Light) UpdateValues()
- type LightType
- type Lights2d
- func (li *Lights2d) PointLight(texture *rl.Texture2D, position rl.Vector2, scale float32, color []color.RGBA)
- func (li *Lights2d) SpotLightDraw()
- func (li *Lights2d) SpotLightInit(lightRadius, ambientStrong float32, ambientColor rl.Color)
- func (li *Lights2d) Unload()
- func (li *Lights2d) UpdateOptions(lightRadius, ambientStrong float32, ambientColor rl.Color)
- func (li *Lights2d) UpdatePosition(pos rl.Vector2)
- type Mask
- type OutLine
- type Particle
- func (pa *Particle) DrawCircleParicle(speed float32, model *rl.Model, texture *rl.Texture2D, ...)
- func (pa *Particle) DrawParticles(model *rl.Model, texture *rl.Texture2D, scale rl.Vector3)
- func (pa *Particle) DrawParticles2dCircle(radius float32)
- func (pa *Particle) DrawParticles2dTexture(texture *rl.Texture2D)
- func (pa *Particle) DrawParticlesBilborid(cam *rl.Camera, texture *rl.Texture2D, size float32)
- func (pa *Particle) InitializeParticles(max int, position, speed rl.Vector3, lifetimeMin, lifetimeMax int32, ...)
- func (pa *Particle) UpdateParticles(speed rl.Vector3, lifetimeMin, lifetimeMax int32)
- type PhysicRender
- func (ph *PhysicRender) AlbedoColorModel(model *rl.Model, color rl.Color)
- func (ph *PhysicRender) AmbientColor(colorAmbient rl.Vector3, ambientValue float32)
- func (ph *PhysicRender) AoValue(value float32)
- func (ph *PhysicRender) CreateLight(typeLight int32, position rl.Vector3, target rl.Vector3, color rl.Color, ...) light
- func (ph *PhysicRender) DrawSphereLoctionLight(li light, color rl.Color)
- func (ph *PhysicRender) EmissiveColor(color rl.Color)
- func (ph *PhysicRender) EmissivePower(value float32)
- func (ph *PhysicRender) Init()
- func (ph *PhysicRender) MaxLights(value int)
- func (ph *PhysicRender) MetallicValue(value float32)
- func (ph *PhysicRender) NormalValue(value float32)
- func (ph *PhysicRender) RoughnessValue(value float32)
- func (ph *PhysicRender) SetCombineShader(CombineShader *rl.Shader)
- func (ph *PhysicRender) SetOffset(value rl.Vector2)
- func (ph *PhysicRender) SetOffsetFlashlight(value rl.Vector2)
- func (ph *PhysicRender) SetTiling(value rl.Vector2)
- func (ph *PhysicRender) SetTilingFlashlight(value rl.Vector2)
- func (ph *PhysicRender) TextureMapAlbedo(modelMaterials *rl.Material, texture rl.Texture2D)
- func (ph *PhysicRender) TextureMapMetalness(modelMaterials *rl.Material, texture rl.Texture2D)
- func (ph *PhysicRender) TextureMapNormal(modelMaterials *rl.Material, texture rl.Texture2D)
- func (ph *PhysicRender) TextureMapOcclusion(modelMaterials *rl.Material, texture rl.Texture2D)
- func (ph *PhysicRender) TextureMapRoughness(modelMaterials *rl.Material, texture rl.Texture2D)
- func (ph *PhysicRender) Unload()
- func (ph *PhysicRender) UpadteByCamera(pos rl.Vector3)
- func (ph *PhysicRender) UpdateLight(Shader rl.Shader, light light)
- func (ph *PhysicRender) UseTexAlbedo()
- func (ph *PhysicRender) UseTexEmissive()
- func (ph *PhysicRender) UseTexMRA()
- func (ph *PhysicRender) UseTexNormal()
- type SkyBox
- type Wave
Constants ¶
const ( LIGHT_DIRECTIONAL int32 = iota LIGHT_POINT LIGHT_SPOT )
Variables ¶
var MaxLights = 5
var ShaderFile sh.Shaders = sh.NewShader()
Functions ¶
func Cobineshader ¶
Types ¶
type AxisCamera ¶
type AxisCamera int8
const ( AxisCameraX AxisCamera = iota AxisCameraY AxisCameraZ )
type ControllerModel ¶
type ControllerModel struct {
Model *rl.Model
Body *ode.Body
ModelPosition *rl.Vector3
ModelAnimation []rl.ModelAnimation
CameraPosition *rl.Vector3
OnceStatus bool
CounterFrame int32
Scale float64
// contains filtered or unexported fields
}
func (*ControllerModel) AddCollisionByBody ¶
func (*ControllerModel) CameraTargetLockTheModel ¶
func (con *ControllerModel) CameraTargetLockTheModel(camera *rl.Camera)
func (*ControllerModel) DefaultLoopAnimtion ¶
func (con *ControllerModel) DefaultLoopAnimtion(indexAnimation, speed int32)
inside loop for run DefaultAnimtion
func (*ControllerModel) DrawModelControll ¶
func (*ControllerModel) DrawSkeletAnimtion ¶
func (con *ControllerModel) DrawSkeletAnimtion(scaleSize float32)
func (*ControllerModel) DrawSkeletBindPose ¶
func (con *ControllerModel) DrawSkeletBindPose(scaleSize float32)
func (*ControllerModel) EnableDefaultAnimtion ¶
func (con *ControllerModel) EnableDefaultAnimtion()
use inside rl.IsKeyReleased(...) if you want enable defualtAnimtion
func (*ControllerModel) FrameCountRest ¶
func (con *ControllerModel) FrameCountRest()
func (*ControllerModel) GetBoneAnimtionTranslation ¶
func (con *ControllerModel) GetBoneAnimtionTranslation(boneId int, scaleSize float32) rl.Vector3
func (*ControllerModel) GetBoneBindPoseTranslation ¶
func (con *ControllerModel) GetBoneBindPoseTranslation(boneId int, scaleSize float32) rl.Vector3
func (*ControllerModel) GetStatusEnableDefaultAnimtion ¶
func (con *ControllerModel) GetStatusEnableDefaultAnimtion() bool
func (*ControllerModel) Init ¶
func (con *ControllerModel) Init(model *rl.Model, body *ode.Body, modelAnimation []rl.ModelAnimation, modelPosition, cameraPosition *rl.Vector3, scaleModel float64, enableDefaultAnimtion bool)
ModelPosition set the drawModel for postion
func (*ControllerModel) JointModelPostionAndDraw ¶
func (*ControllerModel) Move ¶
func (con *ControllerModel) Move(indexAnimation int32, speedFrame int32, axisCamera AxisCamera, speedModelAndCamera rl.Vector2, angle rl.Vector3)
axisCamera is axis position and speedModelAndCamera x for camera speed and y for model speed you have to set just a angle
func (*ControllerModel) Once ¶
func (con *ControllerModel) Once()
this is for everything that just once run you should by key event
func (*ControllerModel) OnceRun ¶
func (con *ControllerModel) OnceRun(indexAnimation, speed int32)
inside loop for Once
func (*ControllerModel) SyncTransformTheModel ¶
func (con *ControllerModel) SyncTransformTheModel(scale float64)
add inside loop RlStep ode
func (*ControllerModel) Unload ¶
func (con *ControllerModel) Unload()
type Fog ¶
func (*Fog) AddTheMaterialToFog ¶
func (*Fog) SetCombineShader ¶
exce before init or set manually
func (*Fog) UpdateFogDensity ¶
type Instances ¶
func (*Instances) InitInstance ¶
init Instance and in the shader mat4 mvpi = mvp*instanceTransform; and finall gl_Position = mvpi*vec4(vertexPosition, 1.0);
type Light ¶
func (*Light) DisableLight ¶
func (*Light) DrawSpherelight ¶
func (*Light) EnableLight ¶
func (*Light) SetCombineShader ¶
exce before init or set manually
func (*Light) SetConfigPointLight ¶
func (*Light) SetConfigShiness ¶
func (*Light) SetConfigSpotLight ¶
func (*Light) SetFlashlightTexture ¶
func (*Light) SetMaterialTexture ¶
func (*Light) SetMaxLight ¶
if you want more 5 light in the light.fs change #define MAX_LIGHTS "your number"
func (*Light) UpdateReflect ¶
func (*Light) UpdateValues ¶
func (lt *Light) UpdateValues()
type Lights2d ¶
type Lights2d struct {
Shader *rl.Shader
Postion rl.Vector2
LightRadius float32
AmbientStrong float32
AmbientColor rl.Color
// contains filtered or unexported fields
}
func (*Lights2d) PointLight ¶
func (li *Lights2d) PointLight(texture *rl.Texture2D, position rl.Vector2, scale float32, color []color.RGBA)
you have to use Fade -> []color.RGBA{rl.Fade(rl.Yellow,0.3)
func (*Lights2d) SpotLightDraw ¶
func (li *Lights2d) SpotLightDraw()
func (*Lights2d) SpotLightInit ¶
func (*Lights2d) UpdateOptions ¶
func (*Lights2d) UpdatePosition ¶
type OutLine ¶
func (*OutLine) OutLineColor ¶
func (*OutLine) OutLineSize ¶
type Particle ¶
type Particle struct {
Position rl.Vector3
PositionInTheWorld rl.Vector3
Speed rl.Vector3
Color rl.Color
Lifetime float32
Particles []Particle
MaxParticles int32
CircleParicleSpeed float32
Oneshot bool
}
func (*Particle) DrawCircleParicle ¶
func (*Particle) DrawParticles ¶
func (*Particle) DrawParticles2dCircle ¶
func (*Particle) DrawParticles2dTexture ¶
func (*Particle) DrawParticlesBilborid ¶
type PhysicRender ¶
func (*PhysicRender) AlbedoColorModel ¶
func (ph *PhysicRender) AlbedoColorModel(model *rl.Model, color rl.Color)
func (*PhysicRender) AmbientColor ¶
func (ph *PhysicRender) AmbientColor(colorAmbient rl.Vector3, ambientValue float32)
func (*PhysicRender) AoValue ¶
func (ph *PhysicRender) AoValue(value float32)
func (*PhysicRender) CreateLight ¶
func (*PhysicRender) DrawSphereLoctionLight ¶
func (ph *PhysicRender) DrawSphereLoctionLight(li light, color rl.Color)
func (*PhysicRender) EmissiveColor ¶
func (ph *PhysicRender) EmissiveColor(color rl.Color)
func (*PhysicRender) EmissivePower ¶
func (ph *PhysicRender) EmissivePower(value float32)
func (*PhysicRender) MaxLights ¶
func (ph *PhysicRender) MaxLights(value int)
func (*PhysicRender) MetallicValue ¶
func (ph *PhysicRender) MetallicValue(value float32)
func (*PhysicRender) NormalValue ¶
func (ph *PhysicRender) NormalValue(value float32)
func (*PhysicRender) RoughnessValue ¶
func (ph *PhysicRender) RoughnessValue(value float32)
func (*PhysicRender) SetCombineShader ¶
func (ph *PhysicRender) SetCombineShader(CombineShader *rl.Shader)
exce before init or set manually
func (*PhysicRender) SetOffset ¶
func (ph *PhysicRender) SetOffset(value rl.Vector2)
func (*PhysicRender) SetOffsetFlashlight ¶
func (ph *PhysicRender) SetOffsetFlashlight(value rl.Vector2)
func (*PhysicRender) SetTiling ¶
func (ph *PhysicRender) SetTiling(value rl.Vector2)
func (*PhysicRender) SetTilingFlashlight ¶
func (ph *PhysicRender) SetTilingFlashlight(value rl.Vector2)
func (*PhysicRender) TextureMapAlbedo ¶
func (ph *PhysicRender) TextureMapAlbedo(modelMaterials *rl.Material, texture rl.Texture2D)
func (*PhysicRender) TextureMapMetalness ¶
func (ph *PhysicRender) TextureMapMetalness(modelMaterials *rl.Material, texture rl.Texture2D)
func (*PhysicRender) TextureMapNormal ¶
func (ph *PhysicRender) TextureMapNormal(modelMaterials *rl.Material, texture rl.Texture2D)
func (*PhysicRender) TextureMapOcclusion ¶
func (ph *PhysicRender) TextureMapOcclusion(modelMaterials *rl.Material, texture rl.Texture2D)
func (*PhysicRender) TextureMapRoughness ¶
func (ph *PhysicRender) TextureMapRoughness(modelMaterials *rl.Material, texture rl.Texture2D)
func (*PhysicRender) Unload ¶
func (ph *PhysicRender) Unload()
func (*PhysicRender) UpadteByCamera ¶
func (ph *PhysicRender) UpadteByCamera(pos rl.Vector3)
func (*PhysicRender) UpdateLight ¶
func (ph *PhysicRender) UpdateLight(Shader rl.Shader, light light)
func (*PhysicRender) UseTexAlbedo ¶
func (ph *PhysicRender) UseTexAlbedo()
func (*PhysicRender) UseTexEmissive ¶
func (ph *PhysicRender) UseTexEmissive()
func (*PhysicRender) UseTexMRA ¶
func (ph *PhysicRender) UseTexMRA()
func (*PhysicRender) UseTexNormal ¶
func (ph *PhysicRender) UseTexNormal()