add readme
This commit is contained in:
parent
dba48ff012
commit
33a13cb1cc
2 changed files with 66 additions and 3 deletions
58
README.md
58
README.md
|
|
@ -1,3 +1,57 @@
|
|||
AsaJS Logo made by [Kammasy](https://www.youtube.com/channel/UCrmjDWdM8-ZSeekzLeCnftg) a.k.a **[E.G.G](https://www.youtube.com/channel/UCrmjDWdM8-ZSeekzLeCnftg)**
|
||||
<div align="center">
|
||||
<img src="./resources/logo.png" />
|
||||
|
||||

|
||||
<h2 align="center">
|
||||
<a href="https://asajs.asakiyuki.com/">AsaJS</a> - The <a href="https://www.minecraft.net/en-us">Minecraft: Bedrock Edition</a> JSON-UI Framework
|
||||
</h2>
|
||||
|
||||
[](https://www.npmjs.com/package/asajs)
|
||||
[](https://github.com/AsakiYuki/AsaJS/blob/main/README.md)
|
||||
[](https://www.npmjs.com/package/asajs)
|
||||
</div>
|
||||
|
||||
**AsaJS** is a NodeJS library designed to empower developers to create **JSON-UI** packages for Minecraft: Bedrock Edition using **JavaScript** or **TypeScript**.
|
||||
|
||||
Say goodbye to the tedious and repetitive nature of manual JSON editing. AsaJS streamlines your workflow by bringing the programmatic flexibility to Minecraft UI development.
|
||||
|
||||
## 🛠 Installation
|
||||
|
||||
To use AsaJS, ensure you have **[Node.js](https://nodejs.org/en)** installed on your system.
|
||||
|
||||
**Latest stable version:**
|
||||
|
||||
```bash
|
||||
npm install asajs
|
||||
```
|
||||
|
||||
**For our nightly builds:**
|
||||
|
||||
```
|
||||
npm install asajs@indev
|
||||
```
|
||||
|
||||
## 📖 "Hello World!" Example
|
||||
|
||||
Creating a custom UI with AsaJS is straightforward. Here is how you can insert a custom label onto the Minecraft Start Screen:
|
||||
|
||||
```javascript
|
||||
import { Anchor, Label, Modify } from "asajs"
|
||||
|
||||
const label = Label({
|
||||
text: "Hello World from my Custom UI!",
|
||||
shadow: true,
|
||||
anchor: Anchor.TOP_MIDDLE,
|
||||
offset: [0, 10],
|
||||
})
|
||||
|
||||
// This code injects the label into the top of the start screen
|
||||
Modify("start", "start_screen_content").insertChild(label)
|
||||
```
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
Detailed guides and API references are available at: 👉 https://asajs.asakiyuki.com/
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
||||
|
|
|
|||
11
test/app.ts
11
test/app.ts
|
|
@ -1 +1,10 @@
|
|||
import { Panel } from ".."
|
||||
import { Anchor, Label, Modify } from ".."
|
||||
|
||||
const label = Label({
|
||||
text: "Hello World from my Custom UI!",
|
||||
shadow: true,
|
||||
anchor: Anchor.TOP_MIDDLE,
|
||||
offset: [0, 10],
|
||||
})
|
||||
|
||||
Modify("start", "start_screen_content").insertChild(label)
|
||||
|
|
|
|||
Reference in a new issue