Namespace: settings

Tiny. settings

User's customizable globals for overriding the default Tiny settings, such as a renderer's default resolution, framerate, float percision, etc.

Example

// Disable interpolation when scaling, will make texture be pixelated
Tiny.settings.SCALE_MODE = Tiny.SCALE_MODES.NEAREST;

Members

static,constantTiny.settings.CAN_UPLOAD_SAME_BUFFERboolean

Can we upload the same buffer in a single frame?

staticTiny.settings.FILTER_RESOLUTIONnumber

Default filter resolution.

Version:
  • 1.2.0
Default Value:
  • 1

staticTiny.settings.GC_MAX_CHECK_COUNTnumber

Default Garbage Collection maximum check count.

Default Value:
  • 600

staticTiny.settings.GC_MAX_IDLEnumber

Default Garbage Collection max idle.

Default Value:
  • 3600

staticTiny.settings.GC_MODETiny.GC_MODES

Default Garbage Collection mode.

Default Value:
  • Tiny.GC_MODES.AUTO

staticTiny.settings.MIPMAP_TEXTURESboolean

If set to true WebGL will attempt make textures mimpaped by default.
Mipmapping will only succeed if the base texture uploaded has power of two dimensions.

Default Value:
  • true

staticTiny.settings.PRECISION_FRAGMENTTiny.PRECISION

Default specify float precision in shaders.

Default Value:
  • Tiny.PRECISION.MEDIUM

staticTiny.settings.PRECISION_VERTEXTiny.PRECISION

Default specify float precision in vertex shader.

Default Value:
  • Tiny.PRECISION.HIGH

static,constantTiny.settings.RENDER_OPTIONSobject

默认渲染参数

Properties:
Name Type Default Description
antialias boolean false
transparent boolean false
backgroundColor number 0x000000
clearBeforeRender boolean true
preserveDrawingBuffer boolean false
roundPixels boolean false
legacy boolean false

staticTiny.settings.RESOLUTIONnumber

Default resolution / device pixel ratio of the renderer.

Default Value:
  • 1

staticTiny.settings.SCALE_MODETiny.SCALE_MODES

The scale modes that are supported by Tiny.

Default Value:
  • Tiny.SCALE_MODES.LINEAR

staticTiny.settings.SPRITE_BATCH_SIZEnumber

The default sprite batch size.

The default aims to balance desktop and mobile devices.

Default Value:
  • 4096

staticTiny.settings.SPRITE_MAX_TEXTURESnumber

The maximum textures that this device supports.

Default Value:
  • 32

staticTiny.settings.TARGET_FPMSnumber

Target frames per millisecond.

Default Value:
  • 0.06

staticTiny.settings.TRANSFORM_MODETiny.TRANSFORM_MODE

Default transform type.

Default Value:
  • Tiny.TRANSFORM_MODE.STATIC

staticTiny.settings.WRAP_MODETiny.WRAP_MODES

Default wrap modes that are supported by Tiny.

Default Value:
  • Tiny.WRAP_MODES.CLAMP
Documentation generated by JSDoc 3.4.3 on Fri Jul 09 2021 19:32:27 GMT+0800 (CST)