python3 setup.py build
Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so
| extends Node | |
| # Based on this tweet by Clay John: | |
| # https://twitter.com/john_clayjohn/status/1306447928932753408 | |
| func _ready() -> void: | |
| # Create a local rendering device. | |
| var rd := RenderingServer.create_local_rendering_device() | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Microsoft.Xna.Framework; | |
| using Microsoft.Xna.Framework.Graphics; | |
| using SharpFont; | |
| namespace MonoFont | |
| { |
| """ | |
| This script is designed to export a mass amount of MagicaVoxel .vox files | |
| to .obj. Unlike Magica's internal exporter, this exporter preserves the | |
| voxel vertices for easy manipulating in a 3d modeling program like Blender. | |
| Various meshing algorithms are included (or to be included). MagicaVoxel | |
| uses monotone triangulation (I think). The algorithms that will (or do) | |
| appear in this script will use methods to potentially reduce rendering | |
| artifacts that could be introduced by triangulation of this nature. | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |