Go to file
Jordan Irwin 727d1af152 Update license info in ContentDB config 2021-08-23 18:53:21 -07:00
models Add panel_rear_1x2x1 model 2021-08-23 15:24:28 -07:00
previews Add sample nodes & setting to enable them 2021-08-23 15:27:48 -07:00
textures Add sample nodes & setting to enable them 2021-08-23 15:27:48 -07:00
.cdb.json Update license info in ContentDB config 2021-08-23 18:53:21 -07:00
.gitattributes add double_node model 2021-08-16 23:32:27 -07:00
LICENSE.txt Change code license to MIT 2021-08-23 16:15:35 -07:00
README.md Add samples for for outward opening/closing door-like nodes 2021-08-23 17:10:24 -07:00
TODO.txt Add to TODO list 2021-08-23 17:16:07 -07:00
init.lua Add helper methods for opening/closing outward opening door-like nodes 2021-08-23 17:09:24 -07:00
mod.conf Change code license to MIT 2021-08-23 16:15:35 -07:00
samples.lua Add samples for for outward opening/closing door-like nodes 2021-08-23 17:10:24 -07:00
screenshot.png add double_node model 2021-08-16 23:32:27 -07:00
settingtypes.txt Add sample nodes & setting to enable them 2021-08-23 15:27:48 -07:00

README.md

Simple Models

Description

A set of very simple models for Minetest.

Usage

Models

simple_models_cube_1x2x1:

  • for nodes with dimensions 1x2x1

  • preview:

  • texture map:

simple_models_panel_1x2x1:

  • for door or panel-like nodes with dimensions 1x2x1

  • preview:

  • texture map:

simple_models_panel_rear_1x2x1:

  • for door or panel-like nodes with dimensions 1x2x1 positioned at rear
  • same texture map as simple_models_panel_1x2x1

Tables

smodel is an alias of simple_models.

There are some tables for accessing pre-defined attributes:

simple_models.cube_1x2x1:
- fields:
	- mesh: "simple_models_cube_1x2x1.obj"
	- box:  {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
- alias: simple_models.cube

simple_models.panel_1x2x1:
- fields:
	- mesh: "simple_models_panel_1x2x1.obj"
	- box:  {-0.5, -0.5, -0.5, 0.5, 1.5, -0.45}
- alias: simple_models.panel

simple_models.panel_rear_1x2x1:
- fields:
	- mesh: "simple_models_panel_rear_1x2x1.obj"
	- box:  {-0.5, -0.5, 0.45, 0.5, 1.5, 0.5}
- alias: simple_models.panel_rear

Samples

To use sample nodes, enable the setting simple_models.enable_samples.

Sample nodes include:

  • simple_models:node_tall
  • simple_models:panel
  • simple_models:panel_rear
  • simple_models:door
  • simple_models:door_open
  • simple_models:door2
  • simple_models:door2_open

Helper Methods

There are some helper methods to make opening & closing door-like nodes simpler. They take the parameters pos & new_node:

simple_models:door_inward_open
- Helper method for inward opening door-like nodes.

simple_models:door_inward_close
- Helper method for inward closing door-like nodes.

simple_models.door_outward_open
- Helper method for outward opening door-like nodes.

simple_models.door_outward_close
- Helper method for outward closing door-like nodes.

Example usage:

core.register_node("simple_models:door", {
	on_rightclick = function(pos, node, clicker, stack, pointed_thing)
		simple_models:door_inward_open(pos, "simple_models:door_open")
		return stack
	end,
})

Licensing