This commit is contained in:
Dane Johnson
2021-01-23 11:54:34 -06:00
parent 14ddf47d0d
commit 776b297150
16 changed files with 199 additions and 3 deletions

View File

@@ -35,6 +35,16 @@ function init()
light.diffuse = 1.0
light.specular = 0.1
couch.Node.GetRoot().children:Append(light)
skybox = couch.Skybox.FromFiles(
"skybox/right.jpg",
"skybox/left.jpg",
"skybox/top.jpg",
"skybox/bottom.jpg",
"skybox/front.jpg",
"skybox/back.jpg"
)
couch.Node.GetRoot().children:Append(skybox)
ball = couch.Mesh.FromFile("cube.obj")
material = ball:GetMaterial(0)
@@ -44,6 +54,7 @@ function init()
couch.Node.GetRoot().children:Append(ball)
ball1 = couch.Mesh.FromFile("ball.obj")
print(material.diffuse.b)
material = ball1:GetMaterial(0)
ball1:SetMaterial(0, material)

BIN
demo/skybox/back.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 KiB

BIN
demo/skybox/bottom.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

BIN
demo/skybox/front.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

BIN
demo/skybox/left.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 KiB

BIN
demo/skybox/right.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 KiB

BIN
demo/skybox/top.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB