From: Daniel Karbach Date: Thu, 15 Oct 2015 12:02:14 +0000 (+0200) Subject: player and monster model X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=d674aafba34e07b520dfdf8c549a1669ca846346;p=blank-assets.git player and monster model lol --- diff --git a/data/default.models b/data/default.models new file mode 100644 index 0000000..2b1d425 --- /dev/null +++ b/data/default.models @@ -0,0 +1,32 @@ +player = { + root = { + shape = player_body; + textures = [ "rock-1" ]; + children = [ + { + shape = player_head; + position = [ 0, 0.375, 0 ]; + textures = [ "rock-1", "rock-face" ]; + } + ]; + }; +}; + +monster = { + root = { + shape = player_body; + textures = [ "rock-1" ]; + rgb_mod = [ 1, 1, 0 ]; + children = [{ + shape = player_head; + position = [ -0.275, 0.375, 0 ]; + textures = [ "rock-1", "rock-face" ]; + rgb_mod = [ 1, 0, 0 ]; + }, { + shape = player_head; + position = [ 0.275, 0.375, 0 ]; + textures = [ "rock-1", "rock-face" ]; + rgb_mod = [ 1, 0.5, 0 ]; + }]; + }; +}; diff --git a/data/default.shapes b/data/default.shapes index 7185db7..6706967 100644 --- a/data/default.shapes +++ b/data/default.shapes @@ -180,34 +180,72 @@ pipe_block = { }; // temporary fix for missing skeleton loader -player_head_block = { - bounds = Cuboid([ -0.5, -0.5, -0.5 ], [ 0.5, 0.5, 0.5 ]); +player_body = { + bounds = Cuboid([ -0.25, -0.25, -0.25 ], [ 0.25, 0.25, 0.25 ]); vertices = { // position normal texture - { [ -0.5, -0.5, 0.5 ], [ 0, 0, 1 ], [ 0, 1 ], 0 }, // front - { [ 0.5, -0.5, 0.5 ], [ 0, 0, 1 ], [ 1, 1 ], 0 }, - { [ -0.5, 0.5, 0.5 ], [ 0, 0, 1 ], [ 0, 0 ], 0 }, - { [ 0.5, 0.5, 0.5 ], [ 0, 0, 1 ], [ 1, 0 ], 0 }, - { [ -0.5, -0.5, -0.5 ], [ 0, 0, -1 ], [ 1, 1 ], 1 }, // back - { [ -0.5, 0.5, -0.5 ], [ 0, 0, -1 ], [ 1, 0 ], 1 }, - { [ 0.5, -0.5, -0.5 ], [ 0, 0, -1 ], [ 0, 1 ], 1 }, - { [ 0.5, 0.5, -0.5 ], [ 0, 0, -1 ], [ 0, 0 ], 1 }, - { [ -0.5, 0.5, -0.5 ], [ 0, 1, 0 ], [ 0, 0 ], 0 }, // top - { [ -0.5, 0.5, 0.5 ], [ 0, 1, 0 ], [ 0, 1 ], 0 }, - { [ 0.5, 0.5, -0.5 ], [ 0, 1, 0 ], [ 1, 0 ], 0 }, - { [ 0.5, 0.5, 0.5 ], [ 0, 1, 0 ], [ 1, 1 ], 0 }, - { [ -0.5, -0.5, -0.5 ], [ 0, -1, 0 ], [ 1, 0 ], 0 }, // bottom - { [ 0.5, -0.5, -0.5 ], [ 0, -1, 0 ], [ 0, 0 ], 0 }, - { [ -0.5, -0.5, 0.5 ], [ 0, -1, 0 ], [ 1, 1 ], 0 }, - { [ 0.5, -0.5, 0.5 ], [ 0, -1, 0 ], [ 0, 1 ], 0 }, - { [ -0.5, -0.5, -0.5 ], [-1, 0, 0 ], [ 0, 1 ], 0 }, // left - { [ -0.5, -0.5, 0.5 ], [-1, 0, 0 ], [ 1, 1 ], 0 }, - { [ -0.5, 0.5, -0.5 ], [-1, 0, 0 ], [ 0, 0 ], 0 }, - { [ -0.5, 0.5, 0.5 ], [-1, 0, 0 ], [ 1, 0 ], 0 }, - { [ 0.5, -0.5, -0.5 ], [ 1, 0, 0 ], [ 1, 1 ], 0 }, // right - { [ 0.5, 0.5, -0.5 ], [ 1, 0, 0 ], [ 1, 0 ], 0 }, - { [ 0.5, -0.5, 0.5 ], [ 1, 0, 0 ], [ 0, 1 ], 0 }, - { [ 0.5, 0.5, 0.5 ], [ 1, 0, 0 ], [ 0, 0 ], 0 }, + { [ -0.25, -0.25, 0.25 ], [ 0, 0, 1 ], [ 0, 1 ], 0 }, // front + { [ 0.25, -0.25, 0.25 ], [ 0, 0, 1 ], [ 1, 1 ], 0 }, + { [ -0.25, 0.25, 0.25 ], [ 0, 0, 1 ], [ 0, 0 ], 0 }, + { [ 0.25, 0.25, 0.25 ], [ 0, 0, 1 ], [ 1, 0 ], 0 }, + { [ -0.25, -0.25, -0.25 ], [ 0, 0, -1 ], [ 1, 1 ], 0 }, // back + { [ -0.25, 0.25, -0.25 ], [ 0, 0, -1 ], [ 1, 0 ], 0 }, + { [ 0.25, -0.25, -0.25 ], [ 0, 0, -1 ], [ 0, 1 ], 0 }, + { [ 0.25, 0.25, -0.25 ], [ 0, 0, -1 ], [ 0, 0 ], 0 }, + { [ -0.25, 0.25, -0.25 ], [ 0, 1, 0 ], [ 0, 0 ], 0 }, // top + { [ -0.25, 0.25, 0.25 ], [ 0, 1, 0 ], [ 0, 1 ], 0 }, + { [ 0.25, 0.25, -0.25 ], [ 0, 1, 0 ], [ 1, 0 ], 0 }, + { [ 0.25, 0.25, 0.25 ], [ 0, 1, 0 ], [ 1, 1 ], 0 }, + { [ -0.25, -0.25, -0.25 ], [ 0, -1, 0 ], [ 1, 0 ], 0 }, // bottom + { [ 0.25, -0.25, -0.25 ], [ 0, -1, 0 ], [ 0, 0 ], 0 }, + { [ -0.25, -0.25, 0.25 ], [ 0, -1, 0 ], [ 1, 1 ], 0 }, + { [ 0.25, -0.25, 0.25 ], [ 0, -1, 0 ], [ 0, 1 ], 0 }, + { [ -0.25, -0.25, -0.25 ], [-1, 0, 0 ], [ 0, 1 ], 0 }, // left + { [ -0.25, -0.25, 0.25 ], [-1, 0, 0 ], [ 1, 1 ], 0 }, + { [ -0.25, 0.25, -0.25 ], [-1, 0, 0 ], [ 0, 0 ], 0 }, + { [ -0.25, 0.25, 0.25 ], [-1, 0, 0 ], [ 1, 0 ], 0 }, + { [ 0.25, -0.25, -0.25 ], [ 1, 0, 0 ], [ 1, 1 ], 0 }, // right + { [ 0.25, 0.25, -0.25 ], [ 1, 0, 0 ], [ 1, 0 ], 0 }, + { [ 0.25, -0.25, 0.25 ], [ 1, 0, 0 ], [ 0, 1 ], 0 }, + { [ 0.25, 0.25, 0.25 ], [ 1, 0, 0 ], [ 0, 0 ], 0 }, + }; + indices = { + 0, 1, 2, 2, 1, 3, // front + 4, 5, 6, 6, 5, 7, // back + 8, 9, 10, 10, 9, 11, // top + 12, 13, 14, 14, 13, 15, // bottom + 16, 17, 18, 18, 17, 19, // left + 20, 21, 22, 22, 21, 23, // right + }; +}; +player_head = { + bounds = Cuboid([ -0.125, -0.125, -0.125 ], [ 0.125, 0.125, 0.125 ]); + vertices = { + // position normal texture + { [ -0.125, -0.125, 0.125 ], [ 0, 0, 1 ], [ 0, 1 ], 0 }, // front + { [ 0.125, -0.125, 0.125 ], [ 0, 0, 1 ], [ 1, 1 ], 0 }, + { [ -0.125, 0.125, 0.125 ], [ 0, 0, 1 ], [ 0, 0 ], 0 }, + { [ 0.125, 0.125, 0.125 ], [ 0, 0, 1 ], [ 1, 0 ], 0 }, + { [ -0.125, -0.125, -0.125 ], [ 0, 0, -1 ], [ 1, 1 ], 1 }, // back + { [ -0.125, 0.125, -0.125 ], [ 0, 0, -1 ], [ 1, 0 ], 1 }, + { [ 0.125, -0.125, -0.125 ], [ 0, 0, -1 ], [ 0, 1 ], 1 }, + { [ 0.125, 0.125, -0.125 ], [ 0, 0, -1 ], [ 0, 0 ], 1 }, + { [ -0.125, 0.125, -0.125 ], [ 0, 1, 0 ], [ 0, 0 ], 0 }, // top + { [ -0.125, 0.125, 0.125 ], [ 0, 1, 0 ], [ 0, 1 ], 0 }, + { [ 0.125, 0.125, -0.125 ], [ 0, 1, 0 ], [ 1, 0 ], 0 }, + { [ 0.125, 0.125, 0.125 ], [ 0, 1, 0 ], [ 1, 1 ], 0 }, + { [ -0.125, -0.125, -0.125 ], [ 0, -1, 0 ], [ 1, 0 ], 0 }, // bottom + { [ 0.125, -0.125, -0.125 ], [ 0, -1, 0 ], [ 0, 0 ], 0 }, + { [ -0.125, -0.125, 0.125 ], [ 0, -1, 0 ], [ 1, 1 ], 0 }, + { [ 0.125, -0.125, 0.125 ], [ 0, -1, 0 ], [ 0, 1 ], 0 }, + { [ -0.125, -0.125, -0.125 ], [-1, 0, 0 ], [ 0, 1 ], 0 }, // left + { [ -0.125, -0.125, 0.125 ], [-1, 0, 0 ], [ 1, 1 ], 0 }, + { [ -0.125, 0.125, -0.125 ], [-1, 0, 0 ], [ 0, 0 ], 0 }, + { [ -0.125, 0.125, 0.125 ], [-1, 0, 0 ], [ 1, 0 ], 0 }, + { [ 0.125, -0.125, -0.125 ], [ 1, 0, 0 ], [ 1, 1 ], 0 }, // right + { [ 0.125, 0.125, -0.125 ], [ 1, 0, 0 ], [ 1, 0 ], 0 }, + { [ 0.125, -0.125, 0.125 ], [ 1, 0, 0 ], [ 0, 1 ], 0 }, + { [ 0.125, 0.125, 0.125 ], [ 1, 0, 0 ], [ 0, 0 ], 0 }, }; indices = { 0, 1, 2, 2, 1, 3, // front