Settings

Settings

LittleJS Engine Settings

Members

# (static) cameraPos :Vector2

Position of camera in world space
Type:

# (static) cameraScale

Scale of camera in world space

# (static) fixedSize :Vector2

Fixed size of the canvas, if enabled cavnvas size never changes
Type:

# (static) fontDefault

Default font used for text rendering
Default Value:
  • arial

# (static, constant) gamepadDirectionEmulateStick

If true, the dpad input is also routed to the left analog stick (for better accessability)
Default Value:
  • 1

# (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) inputTouchEnable

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

# (static, constant) inputWASDEmulateDirection

If true the WASD keys are also routed to the direction keys (for better accessability)
Default Value:
  • 1

# (static, constant) maxSize :Vector2

The max size of the canvas, centered if window is larger
Type:

# (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, constant) objectDefaultAngleDamping

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

# (static, constant) objectDefaultDamping

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

# (static, constant) objectDefaultElasticity

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

# (static, constant) objectDefaultFriction

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

# (static, constant) objectDefaultMass

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

# (static, constant) objectDefaultSize :Vector2

Default size of objects
Type:

# (static, constant) objectMaxSpeed

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

# (static) pixelated

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

# (static, constant) soundDefaultRange

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

# (static, constant) soundDefaultTaper

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

# (static, constant) soundEnable

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

# (static) soundVolume

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

# (static, constant) tileBleedShrinkFix

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

# (static, constant) tileSizeDefault :Vector2

Default size of tiles in pixels
Type: