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) canvasFixedSize :Vector2

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

# (static) canvasMaxSize :Vector2

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

# (static) cavasPixelated

Disables anti aliasing for pixel art if true
Default Value:
  • 1

# (static) fontDefault

Default font used for text rendering
Default Value:
  • arial

# (static) gamepadDirectionEmulateStick

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

# (static) gamepadsEnable

Should gamepads be allowed
Default Value:
  • 1

# (static) 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) inputWASDEmulateDirection

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

# (static) medalDisplayHeight

Height of medal display
Default Value:
  • 80

# (static) medalDisplayIconSize

Size of icon in medal display
Default Value:
  • 50

# (static) medalDisplaySlideTime

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

# (static) medalDisplayTime

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

# (static) medalDisplayWidth

Width of medal display
Default Value:
  • 640

# (static) objectDefaultAngleDamping

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

# (static) objectDefaultDamping

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

# (static) objectDefaultElasticity

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

# (static) objectDefaultFriction

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

# (static) objectDefaultMass

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

# (static) objectDefaultSize :Vector2

Default size of objects
Type:

# (static) objectMaxSpeed

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

# (static) particleEmitRateScale

Scales emit rate of particles, useful for low graphics mode (0 disables particle emitters)
Default Value:
  • 1

# (static) soundDefaultRange

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

# (static) soundDefaultTaper

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

# (static) 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) tileFixBleedScale

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

# (static) tileSizeDefault :Vector2

Default size of tiles in pixels
Type:

# (static) touchGamepadAlpha

Transparency of touch gamepad overlay
Default Value:
  • 0.3

# (static) touchGamepadAnalog

True if touch gamepad should be analog stick or false to use if 8 way dpad
Default Value:
  • 1

# (static) touchGamepadEnable

True if touch gamepad should appear on mobile devices
- Supports left analog stick, 4 face buttons and start button (button 9)
- Must be set by end of gameInit to be activated

# (static) touchGamepadSize

Size of virutal gamepad for touch devices in pixels
Default Value:
  • 80

# (static) vibrateEnable

Allow vibration hardware if it exists
Default Value:
  • 1