pxlCamera

pxlCamera

Camera or pxlCamera class

Constructor

new pxlCamera()

Description:
  • Camera or pxlCamera class

Source:

Methods

(static) Camera#setCameraRotateEasing(val)

Description:
  • Sets the user's camera movement easing.

Source:
Example
// Set the user's camera movement easing to 0.85.
this.pxlCamera.setCameraMoveEasing( 0.85 );
Parameters:
Name Type Description
val number

The user's camera movement easing.

(static) Camera#setGravityMax(val)

Description:
  • Sets the user's gravity rate.

Source:
Example
// Set the user's gravity rate to 2.5
this.pxlCamera.setGravityRate( 2.5 );
Parameters:
Name Type Description
val number

The user's gravity rate.

(static) Camera#setGravityRate(val)

Description:
  • Sets the user's gravity rate.

Source:
Example
// Set the user's gravity rate to 0.3
this.pxlCamera.setGravityRate( 0.3 );
Parameters:
Name Type Description
val number

The user's gravity rate.

(static) Camera#setInputMovementMult(val)

Description:
  • Sets the user's movement multiplier.

Source:
Example
// Set the user's movement multiplier to 0.1.
this.pxlCamera.setInputMovementMult( 0.1 );
Parameters:
Name Type Description
val number

The user's movement multiplier.

(static) Camera#setJumpHoldMax(val)

Description:
  • Sets the user's maximum jump hold.

Source:
Example
// Set the user's maximum jump hold to 2.85.
this.pxlCamera.setJumpHoldMax( 2.85 );
Parameters:
Name Type Description
val number

The user's maximum jump hold.

(static) Camera#setJumpImpulse(val)

Description:
  • Sets the user's jump impulse.

Source:
Example
// Set the user's jump impulse to 0.75.
this.pxlCamera.setJumpImpulse( 0.75 );
Parameters:
Name Type Description
val number

The user's jump impulse.

(static) Camera#setJumpRepeatDelay(val)

Description:
  • Sets the user's jump repeat delay.

Source:
Example
// Set the user's jump repeat delay to 0.08.
this.pxlCamera.setJumpRepeatDelay( 0.08 );
Parameters:
Name Type Description
val number

The user's jump repeat delay.

(static) Camera#setJumpScalar(val)

Description:
  • Sets the user's jump scalar.

Source:
Example
// Set the user's jump scalar to 1.
this.pxlCamera.setJumpScalar( 1 );
Parameters:
Name Type Description
val number

The user's jump scalar.

(static) Camera#setMaxStepHeight(val)

Description:
  • Sets the user's maximum step height.

Source:
Example
// Set the user's maximum step height to 5 meters.
this.pxlCamera.setMaxStepHeight( 5 );
Parameters:
Name Type Description
val number

The user's maximum step height.

(static) Camera#setMovementEase(val)

Description:
  • Sets the user's movement easing rate.

Source:
Example
// Set the user's movement easing rate to 0.85.
this.pxlCamera.setMovementEase( 0.85 );
Parameters:
Name Type Description
val number

The user's movement easing rate.

(static) Camera#setMovementMax(val)

Description:
  • Sets the user's maximum movement speed.

Source:
Example
// Set the user's maximum movement speed to 10 meters per second.
this.pxlCamera.setMovementMax( 10 );
Parameters:
Name Type Description
val number

The user's maximum movement speed.

(static) Camera#setMovementScalar(val)

Description:
  • Sets the user's movement scalar.

Source:
Example
// Set the user's movement scalar to 1.
this.pxlCamera.setMovementScalar( 1 );
Parameters:
Name Type Description
val number

The user's movement scalar.

(static) Camera#setPositionBlend(val)

Description:
  • Sets the jump scalar.

Source:
Example
// Set the jump scalar to 0.75.
this.pxlCamera.setJumpScalar( 0.75 );
Parameters:
Name Type Description
val number

The jump scalar.

(static) Camera#setTouchSensitivity(val)

Description:
  • Sets the user's touch sensitivity.

Source:
Example
// Set the user's touch sensitivity to 500.
this.pxlCamera.setTouchSensitivity( 500 );
Parameters:
Name Type Description
val number

The user's touch sensitivity.

(static) Camera#setUserHeight(val, roomNameopt)

Description:
  • Sets the user's standing height.

Source:
Example
// Set the user's standing height to 1.75 meters.
this.pxlCamera.setUserHeight( 1.75 );
Parameters:
Name Type Attributes Default Description
val number

The user's standing height.

roomName string <optional>
'default'

The name of the room.

(static) Camera#setUserScale(val)

Description:
  • Sets the user's scale.

Source:
Example
// Set the user's scale to 1.
this.pxlCamera.setUserScale( 1 );
Parameters:
Name Type Description
val number

The user's scale.

(static) Camera#setUserSettings(userSettingsObject)

Description:
  • Sets the user's settings.

Source:
Example
// Set the user's settings.
import { pxlUserSettings } from "../core/Options.js";
let userSettingsObject = Object.assign({}, pxlUserSettings);
this.pxlCamera.setUserSettings( userSettingsObject );
Parameters:
Name Type Description
userSettingsObject Object

The user's settings object.

(static) Camera#setWalkBounceEaseIn(val)

Description:
  • Sets the user's walk bounce ease in.

Source:
Example
// Set the user's walk bounce ease in to 0.03
this.pxlCamera.setWalkBounceEaseIn( 0.03 );
Parameters:
Name Type Description
val number

The user's walk bounce ease in.

(static) Camera#setWalkBounceEaseOut(val)

Description:
  • Sets the user's walk bounce ease out.

Source:
Example
// Set the user's walk bounce ease out to 0.95
this.pxlCamera.setWalkBounceEaseOut( 0.95 );
Parameters:
Name Type Description
val number

The user's walk bounce ease out.

(static) Camera#setWalkBounceHeight(val)

Description:
  • Sets the user's walk bounce seed.

Source:
Example
// Set the user's walk bounce seed to 230.
this.pxlCamera.setWalkBounceSeed( 230 );
Parameters:
Name Type Description
val number

The user's walk bounce seed.

(static) Camera#setWalkBounceRate(val)

Description:
  • Sets the user's walk bounce rate.

Source:
Example
// Set the user's walk bounce rate to 0.025.
this.pxlCamera.setWalkBounceRate( 0.025 );
Parameters:
Name Type Description
val number

The user's walk bounce rate.