playground:skybox
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| playground:skybox [2017/05/11 18:20] – falsam | playground:skybox [2023/03/15 15:49] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 9: | Ligne 9: | ||
| IncludeFile " | IncludeFile " | ||
| - | + | Enumeration | |
| - | Global Camera, Light0, Light1, Sky, Ground, MatGround, Torus0, Torus1, ShadowGenerator | + | #mf |
| + | #mfRender | ||
| + | EndEnumeration | ||
| + | Global Camera, Light0, Light1, Sky, Ground, TexGround, MatGround, Torus0, Torus1, ShadowGenerator | ||
| Declare LoadGame() | Declare LoadGame() | ||
| Ligne 16: | Ligne 19: | ||
| UseModule BJS | UseModule BJS | ||
| + | OpenWindow(# | ||
| + | CanvasGadget(# | ||
| - | InitEngine(@LoadGame()) | + | InitEngine(@LoadGame(), #mfRender) |
| Procedure LoadGame() | Procedure LoadGame() | ||
| + | Protected n | ||
| If CreateScene() | If CreateScene() | ||
| - | | + | |
| + | | ||
| | | ||
| - | Light0 = CreateLight(" | + | Light0 = CreateLight(" |
| - | Light1 = CreateLight(" | + | Light1 = CreateLight(" |
| | | ||
| ;SkyBox | ;SkyBox | ||
| Ligne 31: | Ligne 38: | ||
| ;Ground | ;Ground | ||
| Ground = CreateGround(" | Ground = CreateGround(" | ||
| - | | + | |
| + | MatGround = CreateMaterial(" | ||
| + | SetMaterialTexture(MatGround, | ||
| ScaleMaterial(MatGround, | ScaleMaterial(MatGround, | ||
| - | | + | |
| | | ||
| ;Torus | ;Torus | ||
| Ligne 47: | Ligne 56: | ||
| ShadowEmitter(Torus1) | ShadowEmitter(Torus1) | ||
| RenderShadows(Ground, | RenderShadows(Ground, | ||
| - | + | ||
| RenderLoop(@RenderGame()) | RenderLoop(@RenderGame()) | ||
| EndIf | EndIf | ||
| Ligne 53: | Ligne 62: | ||
| Procedure RenderGame() | Procedure RenderGame() | ||
| - | RotateMesh(Torus0, | + | RotateMesh(Torus0, |
| - | RotateMesh(Torus1, | + | RotateMesh(Torus1, |
| | | ||
| If GetCameraBeta(Camera) > 1.50 | If GetCameraBeta(Camera) > 1.50 | ||
playground/skybox.1494519656.txt.gz · Dernière modification : 2023/03/15 15:51 (modification externe)
