mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
fix typos in docs and dev test script
This commit is contained in:
parent
b06bbd3f7d
commit
c759e02ceb
8 changed files with 30 additions and 30 deletions
|
|
@ -4,7 +4,7 @@ network.get("https://api.github.com/repos/MihailRis/VoxelEngine-Cpp/releases/lat
|
||||||
print(json.parse(s).name)
|
print(json.parse(s).name)
|
||||||
response_received = true
|
response_received = true
|
||||||
end, function (code)
|
end, function (code)
|
||||||
print("repond with code", code)
|
print("respond with code", code)
|
||||||
response_received = true
|
response_received = true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
# Block Models (depricated)
|
# Block Models (deprecated)
|
||||||
|
|
||||||
> ![WARNING]
|
> ![WARNING]
|
||||||
> The `model-primitives` property is deprecated. Use the [VCM format](vcm.md) for a textual description of the model's primitives.
|
> The `model-primitives` property is deprecated. Use the [VCM format](vcm.md) for a textual description of the model's primitives.
|
||||||
|
|
||||||
Block model may be created with following properties:
|
Block model may be created with following properties:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"model": "custom",
|
"model": "custom",
|
||||||
"model-primitives": {
|
"model-primitives": {
|
||||||
"aabbs": [
|
"aabbs": [
|
||||||
// list of AABB primitives
|
// list of AABB primitives
|
||||||
],
|
],
|
||||||
// ... other primitives
|
// ... other primitives
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**AABB** primitive is an array of values:
|
**AABB** primitive is an array of values:
|
||||||
```
|
```
|
||||||
[x, y, z, width, height, depth, texture names for all 6 sides]
|
[x, y, z, width, height, depth, texture names for all 6 sides]
|
||||||
```
|
```
|
||||||
|
|
||||||
**tetragon** primitive (more like parallelogram) an array of three vectors, describing primitive position, X vector \* width, Y vector \* height.
|
**tetragon** primitive (more like parallelogram) an array of three vectors, describing primitive position, X vector \* width, Y vector \* height.
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ block.raycast(start: vec3, dir: vec3, max_distance: number, [optional] dest: tab
|
||||||
Casts a ray from the start point in the direction of *dir*. Max_distance specifies the maximum ray length.
|
Casts a ray from the start point in the direction of *dir*. Max_distance specifies the maximum ray length.
|
||||||
|
|
||||||
Argument `filter` can be used to tell ray what blocks can be skipped(passed through) during ray-casting.
|
Argument `filter` can be used to tell ray what blocks can be skipped(passed through) during ray-casting.
|
||||||
To use filter `dest` argument must be filled with some value(can be nil), it's done for backwards compatability
|
To use filter `dest` argument must be filled with some value(can be nil), it's done for backwards compatibility
|
||||||
|
|
||||||
The `include_non_selectable` argument determines whether blocks that cannot be selected by the cursor will be included.
|
The `include_non_selectable` argument determines whether blocks that cannot be selected by the cursor will be included.
|
||||||
Example - `base:water`
|
Example - `base:water`
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ inventory.clone(invid: int) -> int
|
||||||
|
|
||||||
-- Move an item from slotA of invA to slotB of invB.
|
-- Move an item from slotA of invA to slotB of invB.
|
||||||
-- invA may be the same as invB.
|
-- invA may be the same as invB.
|
||||||
-- If slotB will be chosen automaticly if argument is not specified.
|
-- If slotB will be chosen automatically if argument is not specified.
|
||||||
-- The move may be incomplete if the available slot has no enough stack space.
|
-- The move may be incomplete if the available slot has no enough stack space.
|
||||||
inventory.move(invA: int, slotA: int, invB: int, slotB: int)
|
inventory.move(invA: int, slotA: int, invB: int, slotB: int)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ Returns position of the selected block or nil
|
||||||
player.get_selected_entity(playerid: int) -> int
|
player.get_selected_entity(playerid: int) -> int
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns unique indentifier of the entity selected by player
|
Returns unique identifier of the entity selected by player
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
player.get_entity(playerid: int) -> int
|
player.get_entity(playerid: int) -> int
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ The entity object is available in components as a global variable **entity**.
|
||||||
-- Deletes an entity (the entity may continue to exist until the frame ends, but will not be displayed in that frame)
|
-- Deletes an entity (the entity may continue to exist until the frame ends, but will not be displayed in that frame)
|
||||||
entity:despawn()
|
entity:despawn()
|
||||||
|
|
||||||
-- Returns entity defintion index (integer ID)
|
-- Returns entity definition index (integer ID)
|
||||||
entity:def_index() -> int
|
entity:def_index() -> int
|
||||||
|
|
||||||
-- Returns entity definition name (string ID)
|
-- Returns entity definition name (string ID)
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Configuring connection. Disconnect-action is action that debugged instance must
|
||||||
|
|
||||||
- `frame` - Call stack frame index (indexing from most recent call)
|
- `frame` - Call stack frame index (indexing from most recent call)
|
||||||
- `local` - Local variable index (based on `paused` event stack trace)
|
- `local` - Local variable index (based on `paused` event stack trace)
|
||||||
- `path` - Requsted value path segments. Example: `['a', 'b', 5]` is `local_variable.a.b[5]`
|
- `path` - Requested value path segments. Example: `['a', 'b', 5]` is `local_variable.a.b[5]`
|
||||||
|
|
||||||
Responds with:
|
Responds with:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ enum AttributeType:uint8 {
|
||||||
sizeof(AttributeType) == 1;
|
sizeof(AttributeType) == 1;
|
||||||
|
|
||||||
struct VertexAttribute {
|
struct VertexAttribute {
|
||||||
AttributeType type; // data type is infered from attribute type
|
AttributeType type; // data type is inferred from attribute type
|
||||||
uint8 flags;
|
uint8 flags;
|
||||||
uint32 size;
|
uint32 size;
|
||||||
float data[]; // if compressed, first 4 bytes of compressed data is decompressed size
|
float data[]; // if compressed, first 4 bytes of compressed data is decompressed size
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue