LDtk 关卡编辑器 Haxe API

LDtk 关卡编辑器 Haxe API(可从 HaxeLib 获取)。「LDtk level editor Haxe API (available on HaxeLib)」

Github星跟踪图

About

What is this?

This is the Haxe API to load LDtk Project JSON files.

LDtk is a modern and open-source 2D level editor.

Issue tracker (shared) |
API documentation |
LDtk official page

Unit tests

Features

  • Compatible with all Haxe based frameworks and engines.
  • Dedicated API for the following frameworks:
  • Completely typed at compilation: if you rename any element in your project (ie. level, layer, entity, etc.), the corresponding references in your code will break accordingly, avoiding typical errors or mistypings.
  • Full completion in VScode: if you have vs-haxe installed, you will get full completion while exploring your project file, based on its actual content, right from VScode.

Usage

Install

haxelib install ldtk-haxe-api

Documentation

Please check the full documentation and tutorials here:

https://deepnight.net/docs/ldtk/haxe-api/

Samples

You can check some examples in samples folder.

Samples are built to WebGL (Javascript) and Hashlink targets, but you can try them on other compatible platforms too.

Requirements

You need a standard Haxe install, and the following libraries installed: heaps (from source), deepnightLibs (from source), hlsdl:

haxelib git heaps https://github.com/HeapsIO/heaps.git

haxelib git deepnightLibs https://github.com/deepnight/deepnightLibs.git

haxelib install hlsdl

Building samples

Open a folder in the samples folder (eg. samples\Generic - Generic - Read project) and run:

haxe build.hxml

You can also build all samples in one go. Go in samples folder and run:

haxe buildAll.hxml

Rebuild samples HXMLs

If you modify the API, you might need to rebuild samples HXMLs files themselves. In the root of the repo, run:

haxe genSamples.hxml

Unit tests

You can build and run unit tests manually using the following commands from the repository root.

JS/WebGL target

You will need Node interpreter to run the tests.

haxe tests\js.hxml

Neko target

You will need Neko VM interpreter to run the tests.

haxe tests\neko.hxml

主要指标

概览
名称与所有者deepnight/ldtk-haxe-api
主编程语言Haxe
编程语言HTML (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2020-07-10 19:06:49
推送于2025-06-23 07:23:45
最后一次提交2024-01-22 16:22:36
发布数53
最新版本名称1.5.3-rc1 (发布于 2024-01-15 16:13:17)
第一版名称0.0.1 (发布于 2020-08-28 15:55:07)
用户参与
星数95
关注者数6
派生数34
提交数1k
已启用问题?
问题数20
打开的问题数8
拉请求数11
打开的拉请求数7
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?