瀏覽代碼

rename the function

Raanan Weber 5 年之前
父節點
當前提交
32c7fad652
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      src/Misc/timer.ts
  2. 3 3
      src/XR/features/WebXRControllerTeleportation.ts

+ 1 - 1
src/Misc/timer.ts

@@ -88,7 +88,7 @@ export enum TimerState {
  *
  * @param options options with which to initialize this timer
  */
-export function SetAndStartTimer(options: ITimerOptions<any>): Nullable<Observer<any>> {
+export function setAndStartTimer(options: ITimerOptions<any>): Nullable<Observer<any>> {
     let timer = 0;
     const startTime = Date.now();
     options.observableParameters = options.observableParameters ?? {};

+ 3 - 3
src/XR/features/WebXRControllerTeleportation.ts

@@ -25,7 +25,7 @@ import { Color3 } from '../../Maths/math.color';
 import { Scene } from '../../scene';
 import { UtilityLayerRenderer } from '../../Rendering/utilityLayerRenderer';
 import { PointerEventTypes } from '../../Events/pointerEvents';
-import { SetAndStartTimer } from '../../Misc/timer';
+import { setAndStartTimer } from '../../Misc/timer';
 
 /**
  * The options container for the teleportation module
@@ -430,7 +430,7 @@ export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
                                     controllerData.teleportationState.baseRotation = this._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y;
                                     controllerData.teleportationState.currentRotation = 0;
                                     const timeToSelect = this._options.timeToTeleport || 3000;
-                                    SetAndStartTimer({
+                                    setAndStartTimer({
                                         time: timeToSelect,
                                         countingObservable: this._xrSessionManager.onXRFrameObservable,
                                         breakCondition: () => !mainComponent.pressed,
@@ -521,7 +521,7 @@ export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
                     controllerData.teleportationState.baseRotation = this._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y;
                     controllerData.teleportationState.currentRotation = 0;
                     const timeToSelect = this._options.timeToTeleport || 3000;
-                    SetAndStartTimer({
+                    setAndStartTimer({
                         time: timeToSelect,
                         countingObservable: this._xrSessionManager.onXRFrameObservable,
                         onEnded: () => {