diff --git a/images/pic1.png b/images/pic1.png index a5f7d01..00f1974 100644 Binary files a/images/pic1.png and b/images/pic1.png differ diff --git a/src/meshes/__init__.py b/src/meshes/__init__.py new file mode 100644 index 0000000..2995aff --- /dev/null +++ b/src/meshes/__init__.py @@ -0,0 +1,3 @@ +""" + Module +""" diff --git a/src/meshes/terrain.py b/src/meshes/terrain.py new file mode 100644 index 0000000..7bc87f7 --- /dev/null +++ b/src/meshes/terrain.py @@ -0,0 +1,17 @@ +# Python imports + +# Lib imports +from ursina import * + +# Application imports + + +class TerrainMesh(Entity): + """ docstring for TerrainMesh. """ + + def __init__(self): + super(TerrainMesh, self).__init__() + + self.model = Terrain('heightmap_1', skip=8) + self.scale = (40, 5, 20) + self.texture = 'heightmap_1' diff --git a/src/world.py b/src/world.py index 87b6af9..41777de 100644 --- a/src/world.py +++ b/src/world.py @@ -2,17 +2,22 @@ # Lib imports from ursina import * +from ursina.prefabs.first_person_controller import FirstPersonController # Application imports +from meshes.terrain import TerrainMesh class World(): """ docstring for World. """ def __init__(self): + Sky() + FirstPersonController() + TerrainMesh() + self.cube = Entity(model='cube', color=hsv(300,1,1), scale=2, collider='box') self.cube.on_click = self.spin - EditorCamera() # add camera controls for orbiting and moving the camera def spin(self): self.cube.animate('rotation_y', self.cube.rotation_y+360, duration=2, curve=curve.in_out_expo)