Skip to content

Commit

Permalink
fix: Correct script_api missing and misspelled functions (#4)
Browse files Browse the repository at this point in the history
* Correct script_api

* Fix rotation names in script_api
  • Loading branch information
thinknathan authored Jan 27, 2024
1 parent 1723b16 commit 561bdf5
Showing 1 changed file with 53 additions and 8 deletions.
61 changes: 53 additions & 8 deletions xmath/api/xMath.script_api
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
desc: "Rotate a vector by a quaternion."
parameters:
- name: v_in_place
type: [vector3, vector4]
type: vector3
- name: q
type: quaternion
- name: v1
type: [vector3, vector4]
type: vector3

- name: vector
type: function
Expand Down Expand Up @@ -256,18 +256,63 @@
- name: m1
type: matrix4

- name: matrix_mul
- name: matrix_look_at
type: function
desc: "Set the value of a matrix from supplied look-at parameters."
parameters:
- name: m_in_place
type: matrix4
- name: eye
type: vector3
- name: look_at
type: vector3
- name: up
type: vector3

- name: matrix4_orthographic
type: function
desc: "Multiply two matrices."
desc: "Set the value of an orthographic projection matrix."
parameters:
- name: m_in_place
type: matrix4
- name: left
type: number
- name: right
type: number
- name: bottom
type: number
- name: top
type: number
- name: near
type: number
- name: far
type: number

- name: matrix_ortho_inv
type: function
desc: "The resulting matrix is the inverse of the supplied matrix."
parameters:
- name: m_in_place
type: matrix4
- name: m1
type: matrix4
- name: m2

- name: matrix4_perspective
type: function
desc: "Set the value of a perspective projection matrix."
parameters:
- name: m_in_place
type: matrix4
- name: fov
type: number
- name: aspect
type: number
- name: near
type: number
- name: far
type: number

- name: matrix_rotate_x
- name: matrix_rotation_x
type: function
desc: "Set the value of a matrix for rotation around the x-axis."
parameters:
Expand All @@ -276,7 +321,7 @@
- name: angle
type: number

- name: matrix_rotate_y
- name: matrix_rotation_y
type: function
desc: "Set the value of a matrix for rotation around the y-axis."
parameters:
Expand All @@ -285,7 +330,7 @@
- name: angle
type: number

- name: matrix_rotate_z
- name: matrix_rotation_z
type: function
desc: "Set the value of a matrix for rotation around the z-axis."
parameters:
Expand Down

0 comments on commit 561bdf5

Please sign in to comment.