mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
remove support docs
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
# Actor
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `node: node, RO`
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Behaviour
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `meta: table, RW`
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# Camera
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `depth: number, RW`
|
|
||||||
- `viewport: b2f, RW`
|
|
||||||
- `projection: m4f, RW`
|
|
||||||
- `target: render_target, RW`
|
|
||||||
- `background: color, RW`
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Flipbook Player
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `time: number, RW`
|
|
||||||
- `speed: number, RW`
|
|
||||||
- `looped: boolean, RW`
|
|
||||||
- `stopped: boolean, RW`
|
|
||||||
- `playing: boolean, RW`
|
|
||||||
- `sequence: str_hash, RW`
|
|
||||||
- `flipbook: flipbook_asset, RW`
|
|
||||||
|
|
||||||
## Function
|
|
||||||
|
|
||||||
- `stop(time: number)`
|
|
||||||
- `stop(sequence: str_hash)`
|
|
||||||
- `play(time: number)`
|
|
||||||
- `play(sequence: str_hash)`
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Label
|
|
||||||
|
|
||||||
## Enums
|
|
||||||
|
|
||||||
```lua
|
|
||||||
e2d.label.haligns = {
|
|
||||||
left, center, right
|
|
||||||
}
|
|
||||||
|
|
||||||
e2d.label.valigns = {
|
|
||||||
top, center, bottom, baseline
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `text: string, RW`
|
|
||||||
- `font: font_asset, RW`
|
|
||||||
- `tint: color32, RW`
|
|
||||||
- `halign: haligns, RW`
|
|
||||||
- `valign: valigns, RW`
|
|
||||||
- `leading: number, RW`
|
|
||||||
- `tracking: number, RW`
|
|
||||||
- `text_width: number, RW`
|
|
||||||
- `glyph_dilate: number, RW`
|
|
||||||
- `outline_width: number, RW`
|
|
||||||
- `outline_color: color32, RW`
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Model Renderer
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `model: model_asset, RW`
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Named
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `name: string, RW`
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Renderer
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Scene
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `depth: number, RW`
|
|
||||||
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
# Spine Player
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `spine: spine_asset, RW`
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
- `skin(name: string) -> void`
|
|
||||||
- `attachment(slot: string, name: string) -> void`
|
|
||||||
- `has_skin(name: string) -> boolean`
|
|
||||||
- `has_animation(name: string) -> boolean`
|
|
||||||
- `add_command(command: commands) -> void`
|
|
||||||
|
|
||||||
## Commands
|
|
||||||
|
|
||||||
- `clear_track_cmd(track: number)`
|
|
||||||
- `track: number, RO`
|
|
||||||
|
|
||||||
- `set_anim_cmd(track: number, name: string)`
|
|
||||||
- `track: number, RO`
|
|
||||||
- `name: string, RO`
|
|
||||||
- `loop: boolean, RW`
|
|
||||||
- `end_message: string, RW`
|
|
||||||
- `complete_messsage: string, RW`
|
|
||||||
|
|
||||||
- `add_anim_cmd(track: number, name: string)`
|
|
||||||
- `track: number, RO`
|
|
||||||
- `name: string, RO`
|
|
||||||
- `loop: boolean, RW`
|
|
||||||
- `delay: secf, RW`
|
|
||||||
- `end_message: string, RW`
|
|
||||||
- `complete_messsage: string, RW`
|
|
||||||
|
|
||||||
- `set_empty_anim_cmd(track: number)`
|
|
||||||
- `track: number, RO`
|
|
||||||
- `mix_duration: secf, RW`
|
|
||||||
- `end_message: string, RW`
|
|
||||||
- `complete_messsage: string, RW`
|
|
||||||
|
|
||||||
- `add_empty_anim_cmd(track: number)`
|
|
||||||
- `track: number, RO`
|
|
||||||
- `delay: secf, RW`
|
|
||||||
- `mix_duration: secf, RW`
|
|
||||||
- `end_message: string, RW`
|
|
||||||
- `complete_messsage: string, RW`
|
|
||||||
|
|
||||||
## Events
|
|
||||||
|
|
||||||
- `custom_evt(name: str_hash)`
|
|
||||||
- `name: str_hash, RO`
|
|
||||||
- `int_value: number, RW`
|
|
||||||
- `float_value: number, RW`
|
|
||||||
- `string_value: string, RW`
|
|
||||||
|
|
||||||
- `end_evt(message: string)`
|
|
||||||
- `message: string, RO`
|
|
||||||
|
|
||||||
- `complete_evt(message: string)`
|
|
||||||
- `message: string, RO`
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```lua
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local keyboard = e2d.input.keyboard
|
|
||||||
local roar_key = e2d.keyboard_key.r
|
|
||||||
|
|
||||||
function M:on_update(go)
|
|
||||||
local roar = keyboard:is_key_just_pressed(roar_key)
|
|
||||||
if roar then
|
|
||||||
local cmd = e2d.spine_player.set_anim_cmd.new(0, "roar")
|
|
||||||
cmd.complete_message = "to_walk"
|
|
||||||
go.spine_player:add_command(cmd)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M:on_event(go, type, event)
|
|
||||||
local to_walk =
|
|
||||||
type == "spine_player.complete_evt" and
|
|
||||||
event.message == "to_walk"
|
|
||||||
if to_walk then
|
|
||||||
local cmd = e2d.spine_player.add_anim_cmd.new(0, "walk")
|
|
||||||
cmd.loop = true
|
|
||||||
go.spine_player:add_command(cmd)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Sprite Renderer
|
|
||||||
|
|
||||||
## Enums
|
|
||||||
|
|
||||||
```lua
|
|
||||||
e2d.sprite_renderer.blendings = {
|
|
||||||
normal, additive, multiply, screen
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `tint: color32, RW`
|
|
||||||
- `blending: blendings, RW`
|
|
||||||
- `filtering: boolean, RW`
|
|
||||||
- `sprite: sprite_asset, RW`
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# GObject
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `alive: boolean, RO`
|
|
||||||
- `valid: boolean, RO`
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
- `destroy() -> void`
|
|
||||||
|
|
||||||
## Components
|
|
||||||
|
|
||||||
- `actor: actor, RO`
|
|
||||||
- `behaviour: behaviour, RO`
|
|
||||||
- `camera: camera, RO`
|
|
||||||
- `flipbook_player: flipbook_player, RO`
|
|
||||||
- `label: label, RO`
|
|
||||||
- `model_renderer: model_renderer, RO`
|
|
||||||
- `renderer: renderer, RO`
|
|
||||||
- `scene: scene, RO`
|
|
||||||
- `spine_player: spine_player, RO`
|
|
||||||
- `sprite_renderer: sprite_renderer, RO`
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```lua
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M:on_init(go)
|
|
||||||
self.life = 2
|
|
||||||
end
|
|
||||||
|
|
||||||
function M:on_update(go)
|
|
||||||
self.life = self.life - e2d.engine.delta_time
|
|
||||||
if self.life <= 0 then
|
|
||||||
go:destroy()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
```
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# DBGUI
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `visible: boolean` (read/write)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
if the_keyboard:is_key_just_pressed("f12") then
|
|
||||||
the_dbgui.visible = not the_dbgui.visible
|
|
||||||
end
|
|
||||||
```
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# DEBUG
|
|
||||||
|
|
||||||
## FUNCTIONS
|
|
||||||
|
|
||||||
- `trace(message: string): void`
|
|
||||||
- `warning(message: string): void`
|
|
||||||
- `error(message: string): void`
|
|
||||||
- `fatal(message: string): void`
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
the_debug:trace("Hello World")
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# ENGINE
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `time: number` (read_only)
|
|
||||||
- `delta_time: number` (read_only)
|
|
||||||
- `frame_rate: number` (read_only)
|
|
||||||
- `frame_count: number` (read_only)
|
|
||||||
- `realtime_time: number` (read_only)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
the_debug:trace("FPS: " .. the_engine.frame_rate)
|
|
||||||
```
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# INPUT
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `mouse: mouse` (read_only)
|
|
||||||
- `keyboard: keyboard` (read_only)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
if the_input.mouse.is_any_button_just_pressed then
|
|
||||||
the_debug:trace("some mouse button was pressed")
|
|
||||||
end
|
|
||||||
|
|
||||||
if the_input.keyboard:is_key_just_pressed("space") then
|
|
||||||
the_debug:trace("`space` key was pressed")
|
|
||||||
end
|
|
||||||
```
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# KEYBOARD
|
|
||||||
|
|
||||||
## FUNCTIONS
|
|
||||||
|
|
||||||
- `is_key_pressed(key: string): boolean`
|
|
||||||
- `is_key_just_pressed(key: string): boolean`
|
|
||||||
- `is_key_just_released(key: string): boolean`
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `input_text: string` (read_only)
|
|
||||||
- `is_any_key_pressed: boolean` (read_only)
|
|
||||||
- `is_any_key_just_pressed: boolean` (read_only)
|
|
||||||
- `is_any_key_just_released: boolean` (read_only)
|
|
||||||
- `pressed_keys: [string]` (read_only)
|
|
||||||
- `just_pressed_keys: [string]` (read_only)
|
|
||||||
- `just_released_keys: [string]` (read_only)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
if the_keyboard:is_key_pressed("w") then
|
|
||||||
the_debug:trace("move forward")
|
|
||||||
end
|
|
||||||
```
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# LIBRARY
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# LUASOL
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# MOUSE
|
|
||||||
|
|
||||||
## FUNCTIONS
|
|
||||||
|
|
||||||
- `is_button_pressed(button: string): boolean`
|
|
||||||
- `is_button_just_pressed(button: string): boolean`
|
|
||||||
- `is_button_just_released(button: string): boolean`
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `cursor_pos: v2f` (read_only)
|
|
||||||
- `scroll_delta: v2f` (read_only)
|
|
||||||
- `is_any_button_pressed: boolean` (read_only)
|
|
||||||
- `is_any_button_just_pressed: boolean` (read_only)
|
|
||||||
- `is_any_button_just_released: boolean` (read_only)
|
|
||||||
- `pressed_buttons: [string]` (read_only)
|
|
||||||
- `just_pressed_buttons: [string]` (read_only)
|
|
||||||
- `just_released_buttons: [string]` (read_only)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
the_debug:trace("cursor position: " .. tostring(the_mouse.cursor_pos))
|
|
||||||
|
|
||||||
if the_mouse:is_button_just_pressed("left") then
|
|
||||||
the_debug:trace("mouse button was pressed")
|
|
||||||
end
|
|
||||||
```
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# WINDOW
|
|
||||||
|
|
||||||
## FUNCTIONS
|
|
||||||
|
|
||||||
- `hide(): void`
|
|
||||||
- `show(): void`
|
|
||||||
- `restore(): void`
|
|
||||||
- `minimize(): void`
|
|
||||||
|
|
||||||
## PROPERTIES
|
|
||||||
|
|
||||||
- `enabled: boolean` (read_only)
|
|
||||||
- `visible: boolean` (read_only)
|
|
||||||
- `focused: boolean` (read_only)
|
|
||||||
- `minimized: boolean` (read_only)
|
|
||||||
|
|
||||||
- `fullscreen: boolean` (read/write)
|
|
||||||
- `cursor_hidden: boolean` (read/write)
|
|
||||||
|
|
||||||
- `real_size: v2f` (read_only)
|
|
||||||
- `virtual_size: v2f` (read_only)
|
|
||||||
- `framebuffer_size: v2f` (read_only)
|
|
||||||
|
|
||||||
- `title: string` (read/write)
|
|
||||||
- `should_close: boolean` (read/write)
|
|
||||||
|
|
||||||
## EXAMPLE
|
|
||||||
|
|
||||||
```lua
|
|
||||||
local close_window =
|
|
||||||
the_keyboard:is_key_just_pressed("f12")
|
|
||||||
|
|
||||||
local toggle_fullscreen =
|
|
||||||
the_keyboard:is_key_pressed("lsuper") and
|
|
||||||
the_keyboard:is_key_just_released("enter")
|
|
||||||
|
|
||||||
if close_window then
|
|
||||||
the_window.should_close = true
|
|
||||||
elseif toggle_fullscreen then
|
|
||||||
the_window.fullscreen = not the_window.fullscreen
|
|
||||||
end
|
|
||||||
```
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# WORLD
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# Node
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
- `owner: gobject, RO`
|
|
||||||
|
|
||||||
- `transform: t3f, RW`
|
|
||||||
- `translation: v3f, RW`
|
|
||||||
- `rotation: q4f, RW`
|
|
||||||
- `scale: v3f, RW`
|
|
||||||
|
|
||||||
- `local_matrix: m4f, RO`
|
|
||||||
- `world_matrix: m4f, RO`
|
|
||||||
|
|
||||||
- `root: node, RO`
|
|
||||||
- `parent: node, RO`
|
|
||||||
|
|
||||||
- `child_count: number, RO`
|
|
||||||
- `child_count_recursive: number, RO`
|
|
||||||
|
|
||||||
- `first_child: node, RO`
|
|
||||||
- `last_child: node, RO`
|
|
||||||
- `prev_sibling: node, RO`
|
|
||||||
- `next_sibling: node, RO`
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
- `remove_from_parent() -> boolean`
|
|
||||||
- `remove_all_children() -> number`
|
|
||||||
|
|
||||||
- `add_child(child: node) -> boolean`
|
|
||||||
- `add_child_to_back(child: node) -> boolean`
|
|
||||||
- `add_child_to_front(child: node) -> boolean`
|
|
||||||
- `add_child_before(before: node, child: node) -> boolean`
|
|
||||||
- `add_child_after(after: node, child: node) -> boolean`
|
|
||||||
- `add_sibling_before(sibling: node) -> boolean`
|
|
||||||
- `add_sibling_after(sibling: node) -> boolean`
|
|
||||||
- `remove_child(child: node) -> boolean`
|
|
||||||
|
|
||||||
- `send_backward() -> boolean`
|
|
||||||
- `bring_to_back() -> boolean`
|
|
||||||
- `send_forward() -> boolean`
|
|
||||||
- `bring_to_front() -> boolean`
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user