Module ncine.mesh_sprite

The table containing mesh sprite related functions.

Inherits from ncine.base_sprite.

Functions

ncine.mesh_sprite.new (parent, texture, x, y) Constructs a mesh sprite object with a parent scene node, a texture, and position components.
ncine.mesh_sprite.new (parent, texture, pos) Constructs a mesh sprite object with a parent scene node, a texture, and a position vector.
ncine.mesh_sprite.clone (sprite) Constructs a new mesh sprite object as a clone of the specified one.
ncine.mesh_sprite.delete (sprite) Destroys a mesh sprite object and releases its memory
ncine.mesh_sprite.get_bytes_per_vertex (sprite) Returns the number of bytes used by each vertex
ncine.mesh_sprite.num_vertices (sprite) Returns the number of vertices of the sprite mesh
ncine.mesh_sprite.num_bytes (sprite) Returns the total number of bytes used by all sprite’s vertices
ncine.mesh_sprite.get_vertices (sprite) Returns the vertices data of the sprite mesh
ncine.mesh_sprite.are_unique_vertices (sprite) Returns true if the vertices belong to the sprite and are not stored externally
ncine.mesh_sprite.copy_vertices (sprite, vertices) Copies the vertices data from a table into the sprite
ncine.mesh_sprite.copy_vertices (sprite, vertices) Copies the vertices data from a table into the sprite (no texture version)
ncine.mesh_sprite.set_vertices (sprite, source_sprite) Sets the vertices data to the data used by another sprite
ncine.mesh_sprite.create_vertices_from_texels (sprite, texels, texture_cut_mode) Creates an internal set of vertices from an external table of points in texture space, with optional texture cut mode
ncine.mesh_sprite.emplace_vertices (sprite, vertices) Emplaces the vertices data from an array of numbers into the sprite
ncine.mesh_sprite.num_indices (sprite) Returns the number of indices used to draw the sprite mesh
ncine.mesh_sprite.get_indices (sprite) Returns the indices used to draw the sprite mesh
ncine.mesh_sprite.are_unique_indices (sprite) Returns true if the indices belong to the sprite and are not stored externally
ncine.mesh_sprite.copy_indices (sprite, indices) Copies the indices data from a table into the sprite (no texture version)
ncine.mesh_sprite.set_indices (sprite, source_sprite) Sets the indices data to the data used by another sprite
ncine.mesh_sprite.emplace_indices (sprite, indices) Emplaces the indices data from an array of integers into the sprite

Tables

meshspriteObj The light user data of a mesh sprite object.
ncine.texture_cut_mode Texture cut modes (enumeration)
mesh_sprite_vertex A mesh sprite vertex with UV texture coordinates
mesh_sprite_vertex_notexture A mesh sprite vertex


Functions

ncine.mesh_sprite.new (parent, texture, x, y)
Constructs a mesh sprite object with a parent scene node, a texture, and position components.

Don’t forget to call ncine.mesh_sprite.delete when you are done with it!

Parameters:

Returns:

    meshspriteObj A new mesh sprite object
ncine.mesh_sprite.new (parent, texture, pos)
Constructs a mesh sprite object with a parent scene node, a texture, and a position vector.

Don’t forget to call ncine.mesh_sprite.delete when you are done with it!

Parameters:

Returns:

    meshspriteObj A new mesh sprite object
ncine.mesh_sprite.clone (sprite)
Constructs a new mesh sprite object as a clone of the specified one.

Don’t forget to call ncine.mesh_sprite.delete when you are done with it!

Parameters:

Returns:

    meshspriteObj The cloned mesh sprite object
ncine.mesh_sprite.delete (sprite)
Destroys a mesh sprite object and releases its memory

Parameters:

ncine.mesh_sprite.get_bytes_per_vertex (sprite)
Returns the number of bytes used by each vertex

Parameters:

Returns:

    integer
ncine.mesh_sprite.num_vertices (sprite)
Returns the number of vertices of the sprite mesh

Parameters:

Returns:

    integer
ncine.mesh_sprite.num_bytes (sprite)
Returns the total number of bytes used by all sprite’s vertices

Parameters:

Returns:

    integer
ncine.mesh_sprite.get_vertices (sprite)
Returns the vertices data of the sprite mesh

Parameters:

Returns:

    number[]
ncine.mesh_sprite.are_unique_vertices (sprite)
Returns true if the vertices belong to the sprite and are not stored externally

Parameters:

Returns:

    boolean
ncine.mesh_sprite.copy_vertices (sprite, vertices)
Copies the vertices data from a table into the sprite

Parameters:

ncine.mesh_sprite.copy_vertices (sprite, vertices)
Copies the vertices data from a table into the sprite (no texture version)

Parameters:

ncine.mesh_sprite.set_vertices (sprite, source_sprite)
Sets the vertices data to the data used by another sprite

Parameters:

ncine.mesh_sprite.create_vertices_from_texels (sprite, texels, texture_cut_mode)
Creates an internal set of vertices from an external table of points in texture space, with optional texture cut mode

Parameters:

  • sprite meshspriteObj
  • texels ncine.vec2[]
  • texture_cut_mode ncine.texture_cut_mode
ncine.mesh_sprite.emplace_vertices (sprite, vertices)
Emplaces the vertices data from an array of numbers into the sprite

Parameters:

ncine.mesh_sprite.num_indices (sprite)
Returns the number of indices used to draw the sprite mesh

Parameters:

Returns:

    integer
ncine.mesh_sprite.get_indices (sprite)
Returns the indices used to draw the sprite mesh

Parameters:

Returns:

    integer[]
ncine.mesh_sprite.are_unique_indices (sprite)
Returns true if the indices belong to the sprite and are not stored externally

Parameters:

Returns:

    boolean
ncine.mesh_sprite.copy_indices (sprite, indices)
Copies the indices data from a table into the sprite (no texture version)

Parameters:

ncine.mesh_sprite.set_indices (sprite, source_sprite)
Sets the indices data to the data used by another sprite

Parameters:

ncine.mesh_sprite.emplace_indices (sprite, indices)
Emplaces the indices data from an array of integers into the sprite

Parameters:

Tables

meshspriteObj
The light user data of a mesh sprite object.

Inherits from ncine.base_sprite.basespriteObj.

ncine.texture_cut_mode
Texture cut modes (enumeration)

Fields:

  • RESIZE
  • CROP
mesh_sprite_vertex
A mesh sprite vertex with UV texture coordinates

Fields:

  • x number
  • y number
  • u number
  • v number
mesh_sprite_vertex_notexture
A mesh sprite vertex

Fields:

  • x number
  • y number
generated by LDoc 1.5.0 Last updated 2024-12-18 15:08:56