-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path23-Transparency.sb
More file actions
43 lines (32 loc) · 944 Bytes
/
23-Transparency.sb
File metadata and controls
43 lines (32 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;Babylon.sbi - Set Material Alpha (0.0 -> 1.0
EnableExplicit
IncludeFile "babylon/babylon.sbi"
Global Scene, Box, BoxTex, BoxMat
Declare LoadGame()
Declare RenderGame()
UseModule BJS
InitEngine(@LoadGame())
Procedure LoadGame()
Scene = CreateScene()
If Scene
CreateCamera("camera", 0, 10, 10, #BJS_ArcRotate)
CreateLight("light", 0, 10, 0)
Box = CreateBox("box", 4, 4, 4)
BoxTex = LoadTexture("Data/textures/crate.png")
BoxMat = CreateMaterial("crate")
SetMaterialTexture(BoxMat, #BJS_Diffuse, BoxTex)
SetMaterialAlpha(boxMat, 0.5)
SetMeshMaterial(Box, BoxMat)
RenderLoop(@RenderGame())
EndIf
EndProcedure
Procedure RenderGame()
RenderWorld()
EndProcedure
; IDE Options = SpiderBasic 2.20 (Windows - x86)
; CursorPosition = 23
; Folding = -
; iOSAppOrientation = 0
; AndroidAppOrientation = 0
; EnableXP
; CompileSourceDirectory