spatial-controls

3D movement controls.

ZLIB License

Downloads
476
Stars
52
Committers
1

Bot releases are hidden (Show)

spatial-controls - v4.2.0

Published by vanruesc over 3 years ago

Changelog

Settings

  • TranslationSettings
    • Added getBoostMultiplier() and setBoostMultiplier().

Managers

  • RotationManager
    • Fixed a bug in updateSpherical() for first person mode. See 6d23edc.

Strategies

  • Added BoostStrategy
    • Holding the Shift key will now toggle boost mode for translation.
spatial-controls - v4.1.0

Published by vanruesc over 3 years ago

Changelog

Core

  • SpatialControls will now dispatch update events during interaction:
    const controls = new SpatialControls(...);
    controls.addEventListener("update", () => {});
    

Managers

  • TranslationManager & MovementState
    • Improved handling of simultaneous opposite direction input.
spatial-controls - v4.0.2

Published by vanruesc over 3 years ago

Changelog

Updated dependencies.

spatial-controls - v4.0.1

Published by vanruesc over 3 years ago

Changelog

Updated dependencies.

spatial-controls - v4.0.0

Published by vanruesc over 3 years ago

Changelog

Bold text indicates a breaking change.

Package

  • Changed type to module and removed CJS exports.
  • Changed recommended engine to node ≥ 14.

Core

  • Added PointerBehaviour enum.
  • Added ControlMode enum.
  • SpatialControls
    • Removed setOrbitEnabled. Use constrols.settings.general.setMode instead.
    • The update method now expects a timestamp in milliseconds.
    • The method getTarget now returns the internal target vector and no longer has any parameters.
    • Pointer listeners are now marked as passive to prevent freezes.
    • Controls now listen for mouseleave and visibilitychange events to stop interaction on focus loss.
    • The methods setPosition, setTarget, moveTo and lookAt now support (x, y, z) as parameters.
    • The initial rotation will now be properly preserved. (This wasn't possible before with third person mode as default.)

Managers

  • TranslationManager
    • The method moveTo will now move both the target and the position in third person mode.
  • RotationManager
    • Added restrictSpherical method.
    • Added updateSpherical method.
    • Added updatePosition method.

Settings

  • Individual data fields are now private and must be accessed via setter/getter methods.
  • Removed SensitivitySettings and added sensitivity settings to RotationSettings, TranslationSettings and ZoomSettings.
  • Added fromJSON method to all settings.
  • Settings will now dispatch change events whenever a value is changed via one of the setter methods.
    • Changes to constraints will immediately be applied to the internal spherical coordinates.
  • Settings
    • Removed toDataURL method.
    • Added toBlob method.
  • GeneralSettings
    • The default control mode is now first person.
    • Orbit mode is now third person mode.
    • Switching from first person mode to third person will now push the position back to look at the previous position. The rotation will be preserved.
  • PointerSettings
    • Removed lock and hold flags. Use setBehaviour instead.
    • Added a baseline pointer sensitivity. Default is 1e-3.
  • RotationSettings
    • Removed invertX and invertY flags. Use setInvertedX and setInvertedY instead.
spatial-controls - v3.0.6

Published by vanruesc over 3 years ago

  • Documentation will now be included in the npm package alongside types.
  • Updated dependencies.
  • Removed build and public from repository.
  • Updated GitHub actions workflows.
spatial-controls - v3.0.5

Published by vanruesc almost 4 years ago

Updated dependencies.

spatial-controls - v3.0.4

Published by vanruesc almost 4 years ago

  • Updated dependencies.
  • Switched to esbuild for bundling.
spatial-controls - v3.0.3

Published by vanruesc almost 4 years ago

Updated dependencies.

spatial-controls - v3.0.2

Published by vanruesc about 4 years ago

Updated dependencies.

spatial-controls - v3.0.1

Published by vanruesc about 4 years ago

Updated dependencies.

spatial-controls - v3.0.0

Published by vanruesc about 4 years ago

  • Renamed package to spatial-controls.
  • Switched to TypeScript & TypeDoc.
  • Changed the scaling of the rotation sensitivity to make 1.0 the default.
  • Added separate settings for horizontal and vertical rotation sensitivity via rotationX and rotationY.
  • Replaced peer dependency math-ds with three.
spatial-controls - v2.1.0

Published by vanruesc over 4 years ago

Requires math-ds ≥ 1.0.0 < 2.0.0

  • Removed src from published package.
  • Updated the build setup.
  • Updated dependencies.
spatial-controls - v2.0.4

Published by vanruesc about 6 years ago

Requires math-ds ≥ 1.0.0 < 2.0.0

  • Removed advisory engines field from package.json.
  • Updated dependencies.
spatial-controls - v2.0.3

Published by vanruesc over 6 years ago

Requires math-ds 1.x.x

spatial-controls - v2.0.2

Published by vanruesc over 6 years ago

Requires math-ds 1.x.x

Changelog

  • Removed synthetic-event from peerDependencies.
spatial-controls - v2.0.1

Published by vanruesc over 6 years ago

Requires math-ds 1.x.x and synthetic-event 0.x.x

Changelog

  • Moved math-ds to peerDependencies.
  • Moved synthetic-event to peerDependencies.
spatial-controls - v1.0.3

Published by vanruesc over 6 years ago

Added sideEffect flag to package.json.

spatial-controls - v1.0.2

Published by vanruesc almost 7 years ago

Added DeltaControls.setDom.

spatial-controls - v1.0.1

Published by vanruesc almost 7 years ago

Fixed DeltaControls.clone.