Namespace: SINT

SINT

Classes

AnimatedClip
AnimatedSprite
Application
BaseRenderTexture
BaseTexture
BlendModeManager
Bounds
Buffer
CanvasMaskManager
CanvasRenderer
CanvasRenderTarget
CanvasTinter
Circle
Container
DisplayObject
Ellipse
Filter
FilterManager
Game
GroupD8
MaskManager
Matrix
ObjectRenderer
ObservablePoint
Point
Polygon
Quad
Rectangle
RenderTarget
RenderTexture
RoundedRectangle
Shader
SpineClip
Sprite
SpriteClip
SpriteMaskFilter
Spritesheet
StencilManager
SystemRenderer
Text
TextClip
TextMetrics
TextStyle
Texture
TextureGarbageCollector
TextureManager
TextureMatrix
Transform
TransformBase
TransformStatic
Tween
VideoBaseTexture
VideoDom
WebGLManager
WebGLRenderer
WebGLState

Namespaces

interaction
loaders
magic
settings
ticker
Unit
utils

Members

SINT.Audios SINT.AudioManager static

The game audios.

SINT.BLEND_MODES object staticconstant

Various blend modes supported by SINT.

IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. Anything else will silently act like NORMAL.

Properties:
Name Type Description
NORMAL number
ADD number
MULTIPLY number
SCREEN number
OVERLAY number
DARKEN number
LIGHTEN number
COLOR_DODGE number
COLOR_BURN number
HARD_LIGHT number
SOFT_LIGHT number
DIFFERENCE number
EXCLUSION number
HUE number
SATURATION number
COLOR number
LUMINOSITY number

SINT.DATA_URI RegExp | string staticconstant

Regexp for data URI. Based on: https://github.com/ragingwind/data-uri-regex

Example
data:image/png;base64

SINT.DRAW_MODES object staticconstant

Various webgl draw modes. These can be used to specify which GL drawMode to use under certain situations and renderers.

Properties:
Name Type Description
POINTS number
LINES number
LINE_LOOP number
LINE_STRIP number
TRIANGLES number
TRIANGLE_STRIP number
TRIANGLE_FAN number

SINT.GC_MODES object staticconstant

The gc modes that are supported by SINT.

The SINT.settings.GC_MODE Garbage Collection mode for SINTJS textures is AUTO If set to GC_MODE, the renderer will occasionally check textures usage. If they are not used for a specified period of time they will be removed from the GPU. They will of course be uploaded again when they are required. This is a silent behind the scenes process that should ensure that the GPU does not get filled up.

Handy for mobile devices! This property only affects WebGL.

Properties:
Name Type Description
AUTO number

Garbage collection will happen periodically automatically

MANUAL number

Garbage collection will need to be called manually

SINT.loader SINT.loaders.Loader static

Alias for SINT.loaders.shared.

SINT.PRECISION object staticconstant

Constants that specify float precision in shaders.

Properties:
Name Type Default Description
LOW string 'lowp'
MEDIUM string 'mediump'
HIGH string 'highp'

SINT.RENDERER_TYPE object staticconstant

Constant to identify the Renderer Type.

Properties:
Name Type Description
UNKNOWN number

Unknown render type.

WEBGL number

WebGL render type.

CANVAS number

Canvas render type.

SINT.SCALE_MODES object staticconstant

The scale modes that are supported by SINT.

The SINT.settings.SCALE_MODE scale mode affects the default scaling mode of future operations. It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.

Properties:
Name Type Description
LINEAR number

Smooth scaling

NEAREST number

Pixelating scaling

SINT.SHAPES object staticconstant

Constants that identify shapes, mainly to prevent instanceof calls.

Properties:
Name Type Description
POLY number

Polygon

RECT number

Rectangle

CIRC number

Circle

ELIP number

Ellipse

RREC number

Rounded Rectangle

SINT.SVG_SIZE RegExp | string staticconstant

Regexp for SVG size.

Example
<svg width="100" height="100"></svg>

SINT.TEXT_GRADIENT object staticconstant

Constants that define the type of gradient on text.

Properties:
Name Type Description
LINEAR_VERTICAL number

Vertical gradient

LINEAR_HORIZONTAL number

Linear gradient

SINT.TRANSFORM_MODE object staticconstant

Constants that specify the transform type.

Properties:
Name Type Description
STATIC number
DYNAMIC number

SINT.UPDATE_PRIORITY object staticconstant

Represents the update priorities used by internal SINT classes when registered with the SINT.ticker.Ticker object. Higher priority items are updated first and lower priority items, such as render, should go later.

Properties:
Name Type Default Description
INTERACTION number 50

Highest priority, used for SINT.interaction.InteractionManager

HIGH number 25

High priority updating, SINT.VideoBaseTexture and SINT.extras.AnimatedSprite

NORMAL number 0

Default priority for ticker events, see SINT.ticker.Ticker#add.

LOW number -25

Low priority used for SINT.Application rendering.

UTILITY number -50

Lowest priority used for SINT.prepare.BasePrepare utility.

SINT.VERSION string staticconstant

String of the current SINT version.

SINT.WRAP_MODES object staticconstant

The wrap modes that are supported by SINT.

The SINT.settings.WRAP_MODE wrap mode affects the default wrapping mode of future operations. It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. If the texture is non power of two then clamp will be used regardless as webGL can only use REPEAT if the texture is po2.

This property only affects WebGL.

Properties:
Name Type Description
CLAMP number

The textures uvs are clamped

REPEAT number

The texture uvs tile and repeat

MIRRORED_REPEAT number

The texture uvs tile and repeat with mirroring

Methods

SINT.autoDetectRenderer (options)SINT.WebGLRenderer | SINT.CanvasRenderer static

This helper function will automatically detect which renderer you should be using. WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by the browser then this function will return a canvas renderer

Name Type Description
options object optional

The optional renderer parameters

Name Type Default Description
width number 800 optional

the width of the renderers view

height number 600 optional

the height of the renderers view

view HTMLCanvasElement optional

the canvas to use as a view, optional

transparent boolean false optional

If the render view is transparent, default false

antialias boolean false optional

sets antialias (only applicable in chrome at the moment)

preserveDrawingBuffer boolean false optional

enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context

backgroundColor number 0x000000 optional

The background color of the rendered area (shown if not transparent).

clearBeforeRender boolean true optional

This sets if the renderer will clear the canvas or not before the new render pass.

resolution number 1 optional

The resolution / device pixel ratio of the renderer, retina would be 2

forceCanvas boolean false optional

prevents selection of WebGL renderer, even if such is present

roundPixels boolean false optional

If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.

forceFXAA boolean false optional

forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great webgl only

legacy boolean false optional

true to ensure compatibility with older / less advanced devices. If you experience unexplained flickering try setting this to true. webgl only

powerPreference string optional

Parameter passed to webgl context, set to "high-performance" for devices with dual graphics card webgl only

Returns:
Type Description
SINT.WebGLRenderer | SINT.CanvasRenderer Returns WebGL renderer if available, otherwise CanvasRenderer