Settings

Settings

LittleJS Engine Settings

Members

# (static) audioVolume

Volume scale to apply to all sound, music and speech
Default Value:
  • 0.5

# (static) cameraPos :Vector2

Position of camera in world space
Type:

# (static) cameraScale

Scale of camera in world space

# (static, constant) copyGamepadDirectionToStick

Allow players to use dpad as analog stick
Default Value:
  • 1

# (static, constant) copyWASDToDpad

allow players to use WASD as direction keys
Default Value:
  • 1

# (static) defaultFont

Default font used for text rendering
Default Value:
  • arial

# (static, constant) defaultObjectAngleDamping

How much to slow angular velocity each frame (0-1)
Default Value:
  • 0.99

# (static, constant) defaultObjectDamping

How much to slow velocity by each frame (0-1)
Default Value:
  • 0.99

# (static, constant) defaultObjectElasticity

How much to bounce when a collision occurs (0-1)

# (static, constant) defaultObjectFriction

How much to slow when touching (0-1)
Default Value:
  • 0.8

# (static, constant) defaultObjectMass

Default object mass for collison calcuations (how heavy objects are)
Default Value:
  • 1

# (static, constant) defaultObjectSize :Vector2

Default size of objects
Type:

# (static, constant) defaultSoundRange

Default range where sound no longer plays
Default Value:
  • 30

# (static, constant) defaultSoundTaper

Default range percent to start tapering off sound (0-1)
Default Value:
  • 0.7

# (static, constant) defaultTileSize :Vector2

Default size of tiles in pixels
Type:

# (static) fixedFitToWindow

Fit to canvas to window by adding space on top or bottom if necessary
Default Value:
  • 1

# (static) fixedHeight

Fixed height, if enabled cavnvas size never changes

# (static) fixedWidth

Fixed witdh, if enabled cavnvas size never changes

# (static, constant) gamepadsEnable

Should gamepads be allowed
Default Value:
  • 1

# (static, constant) glEnable

Enable webgl rendering, webgl can be disabled and removed from build (with some features disabled)
Default Value:
  • 1

# (static) glOverlay

Fixes slow rendering in some browsers by not compositing the WebGL canvas
Default Value:
  • 1

# (static) gravity

How much gravity to apply to objects along the Y axis, negative is down

# (static, constant) maxHeight

The max height of the canvas, centered if window is larger
Default Value:
  • 1200

# (static, constant) maxObjectSpeed

Clamp max speed to avoid fast objects missing collisions
Default Value:
  • 1

# (static, constant) maxWidth

The max width of the canvas, centered if window is larger
Default Value:
  • 1920

# (static, constant) medalDisplayHeight

Height of medal display
Default Value:
  • 99

# (static, constant) medalDisplayIconSize

Size of icon in medal display
Default Value:
  • 80

# (static, constant) medalDisplaySlideTime

How quickly to slide on/off medals in seconds
Default Value:
  • 0.5

# (static, constant) medalDisplayTime

How long to show medals for in seconds
Default Value:
  • 5

# (static, constant) medalDisplayWidth

Width of medal display
Default Value:
  • 640

# (static) pixelated

Use crisp pixels for pixel art if true
Default Value:
  • 1

# (static, constant) soundEnable

All audio code can be disabled and removed from build
Default Value:
  • 1

# (static, constant) tileBleedShrinkFix

Prevent tile bleeding from neighbors in pixels
Default Value:
  • 0.3

# (static, constant) touchInputEnable

If true touch input is routed to mouse functions
Default Value:
  • 1