API Docs for:
Show:

gs.Texture2D Class

A class to deal with textures. This class has a lot of more functions and properties than actually documented. That is because this class is actually for internal usage only. The only exception is if you work with custom GLSL shaders.

If you want to learn more about why certain classes of the Basic Engine are hidden and not editable, read the Basic Engine chapter in Help File.

Constructor

gs.Texture2D

()

Methods

setFilter

(
  • filter
  • mipmap
)

Sets the filter for the texture.

Parameters:

  • filter gs.TextureFilter
    • The filter to set
  • mipmap Boolean
    • Indicates if mip-mapping should be enabled.

Properties

@defaultStrikeThrough

Boolean static

Indicates if the the default style is strike-through.

@defaultUnderline

Boolean static

Indicates if the the default style is underline.

ascent

Number

The ascent-value of the font.

defaultBold

Boolean static

Indicates if the the default style is bold.

defaultBorder

Boolean static

Indicates if the default font has an outline.

defaultBorderColor

gs.Color static

The default font outline color.

defaultColor

gs.Color static

The default font color.

defaultItalic

Boolean static

Indicates if the the default style is italic.

defaultName

String static

The default font name.

defaultShadow

Boolean static

Indicates if the default font has shadow.

defaultShadowColor

gs.Color static

The default font shadow color.

defaultSize

Number static

The default font size.

descent

Number

The descent-value of the font.

filter

gs.TextureFilter static

The default texture filter used for newly created textures. If you want to create a game with pixel-look, it is recommended to set gs.TextureFilter.NEAREST.

filter

gs.TextureFilter

The current texture filter. If you want to set the filter, use setFilter method.

height

Number

The original height of the texture.

height

Number

The height of the font.

id

Number

The OpenGL ID of the texture.

isPowerOf2

Boolean

Indicates if the dimensions of the texture are power-of-2.

lineHeight

Number

The line-height of the font.

mipmap

Boolean

Indicates if mip-mapping is enabled for this texture. If you want to change mip-mapping, use setFilter method.

realHeight

Number

The real width of the texture.

realWidth

Number

The real width of the texture.

width

Number

The original width of the texture.