moved to a layer-based rendermode system, moved normal mode to base primitive
options are now handled partially in the python side, in rendermodes.py
This commit is contained in:
@@ -16,6 +16,29 @@
|
||||
from PIL import Image
|
||||
import textures
|
||||
|
||||
class RenderPrimitive(object):
|
||||
options = {}
|
||||
name = None
|
||||
def __init__(self, **kwargs):
|
||||
if self.name is None:
|
||||
raise RuntimeError("RenderPrimitive cannot be used directly")
|
||||
|
||||
self.option_values = {}
|
||||
for key, val in kwargs.iteritems():
|
||||
if not key in self.options:
|
||||
raise ValueError("primitive `{0}' has no option `{1}'".format(self.name, key))
|
||||
self.option_values[key] = val
|
||||
|
||||
class Base(RenderPrimitive):
|
||||
options = {
|
||||
"edge_opacity": "darkness of the edge lines, from 0.0 to 1.0 (default: 0.15)",
|
||||
"min_depth": "lowest level of blocks to render (default: 0)",
|
||||
"max_depth": "highest level of blocks to render (default: 127)",
|
||||
"height_fading": "darken or lighten blocks based on height (default: False)",
|
||||
"nether": "if True, remove the roof of the map. Useful on nether maps. (defualt: False)",
|
||||
}
|
||||
name = "base"
|
||||
|
||||
# Render 3 blending masks for lighting
|
||||
# first is top (+Z), second is left (-X), third is right (+Y)
|
||||
def generate_facemasks():
|
||||
|
||||
Reference in New Issue
Block a user