from ursina.prefabs.first_person_controller import FirstPersonController # Create app app = Ursina() # Terrain t = Entity(model=Terrain("heightmap-2692", skip=8), scale=(1024, 75, 1024), texture="colormap-2692") t.collider = t.model water = Entity(model=Plane(subdivisions=(6, 6)), collider="plane", color=rgb(184, 221, 247), scale=(1024, 1, 1024)) water.position = (0, 31, 0) # Misc player = FirstPersonController() player.position = (0, 75, 0) scene.fog_color = color.gray scene.fog_density = .005 Sky() # Run app app.run() # https://stackoverflow.com/questions/59867493/how-to-make-perlin-noise-color-gradient-generation-in-python-similar-to-the-nois
# nameBlock='grass') # if y == size_y - 1: # [Block(model='cube', position=(x, i, y + 1), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # elif y == 0: # [Block(model='cube', position=(x, i, y - 1), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # if x == size_x - 1: # [Block(model='cube', position=(x + 1, i, y), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # elif x == 0: # [Block(model='cube', position=(x - 1, i, y), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] inv = Inventory() inv.fillInv(order_blocks, textureListInv) player = FirstPersonController() cursorTexture = load_texture('data/texture/cursor.png') destroy(player.cursor) player.cursor = Entity(parent=camera.ui, model='quad', scale=.03, texture=cursorTexture, position_z=-0.01) player.position = (5, 0, 5) player.mouse_sensitivity = Vec2(50, 50) player.jump_duration = 0.25 player.jump_height = 1.5 file = listMap[0] # стандартная карта loadMapFromFile(file) hand = Hand() sky = Sky() fileName = 'data/map/' + genWorldName() app.run()