@multitapio/multitap 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.js +60 -0
- package/dist/react/views/FirstPersonView.d.ts.map +1 -1
- package/dist/react/views/ThirdPersonFixedView.d.ts.map +1 -1
- package/dist/react/views/ThirdPersonView.d.ts.map +1 -1
- package/dist/react/views/VehicleFixedView.d.ts.map +1 -1
- package/dist/react/views/VehicleView.d.ts.map +1 -1
- package/dist/types/react/views/FirstPersonView.d.ts.map +1 -1
- package/dist/types/react/views/ThirdPersonFixedView.d.ts.map +1 -1
- package/dist/types/react/views/ThirdPersonView.d.ts.map +1 -1
- package/dist/types/react/views/VehicleFixedView.d.ts.map +1 -1
- package/dist/types/react/views/VehicleView.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -8753,6 +8753,18 @@ var FirstPersonView = {
|
|
|
8753
8753
|
pivot.position.y += eyeHeight;
|
|
8754
8754
|
pivot.rotation.set(0, state.yaw, 0);
|
|
8755
8755
|
camera.position.set(0, 0, 0);
|
|
8756
|
+
if (props.cameraOffset) {
|
|
8757
|
+
const offset = props.cameraOffset;
|
|
8758
|
+
if (Array.isArray(offset)) {
|
|
8759
|
+
camera.position.x += offset[0];
|
|
8760
|
+
camera.position.y += offset[1];
|
|
8761
|
+
camera.position.z += offset[2];
|
|
8762
|
+
} else {
|
|
8763
|
+
camera.position.x += offset.x;
|
|
8764
|
+
camera.position.y += offset.y;
|
|
8765
|
+
camera.position.z += offset.z;
|
|
8766
|
+
}
|
|
8767
|
+
}
|
|
8756
8768
|
camera.rotation.set(state.pitch, 0, 0);
|
|
8757
8769
|
}
|
|
8758
8770
|
};
|
|
@@ -8840,6 +8852,18 @@ var ThirdPersonView = {
|
|
|
8840
8852
|
distance * Math.cos(state.yaw) * Math.cos(state.pitch)
|
|
8841
8853
|
);
|
|
8842
8854
|
camera.position.copy(cameraOffset);
|
|
8855
|
+
if (props.cameraOffset) {
|
|
8856
|
+
const offset = props.cameraOffset;
|
|
8857
|
+
if (Array.isArray(offset)) {
|
|
8858
|
+
camera.position.x += offset[0];
|
|
8859
|
+
camera.position.y += offset[1];
|
|
8860
|
+
camera.position.z += offset[2];
|
|
8861
|
+
} else {
|
|
8862
|
+
camera.position.x += offset.x;
|
|
8863
|
+
camera.position.y += offset.y;
|
|
8864
|
+
camera.position.z += offset.z;
|
|
8865
|
+
}
|
|
8866
|
+
}
|
|
8843
8867
|
camera.lookAt(pivot.position);
|
|
8844
8868
|
}
|
|
8845
8869
|
};
|
|
@@ -8943,6 +8967,18 @@ var ThirdPersonFixedView = {
|
|
|
8943
8967
|
pivot.quaternion.slerp(state.aim, t);
|
|
8944
8968
|
}
|
|
8945
8969
|
camera.position.set(0, 0, distance);
|
|
8970
|
+
if (props.cameraOffset) {
|
|
8971
|
+
const offset = props.cameraOffset;
|
|
8972
|
+
if (Array.isArray(offset)) {
|
|
8973
|
+
camera.position.x += offset[0];
|
|
8974
|
+
camera.position.y += offset[1];
|
|
8975
|
+
camera.position.z += offset[2];
|
|
8976
|
+
} else {
|
|
8977
|
+
camera.position.x += offset.x;
|
|
8978
|
+
camera.position.y += offset.y;
|
|
8979
|
+
camera.position.z += offset.z;
|
|
8980
|
+
}
|
|
8981
|
+
}
|
|
8946
8982
|
camera.rotation.set(0, 0, 0);
|
|
8947
8983
|
}
|
|
8948
8984
|
};
|
|
@@ -9318,6 +9354,18 @@ var VehicleView = {
|
|
|
9318
9354
|
pivot.quaternion.slerp(tempCameraAim, t);
|
|
9319
9355
|
}
|
|
9320
9356
|
camera.position.set(0, 0, distance);
|
|
9357
|
+
if (props.cameraOffset) {
|
|
9358
|
+
const offset = props.cameraOffset;
|
|
9359
|
+
if (Array.isArray(offset)) {
|
|
9360
|
+
camera.position.x += offset[0];
|
|
9361
|
+
camera.position.y += offset[1];
|
|
9362
|
+
camera.position.z += offset[2];
|
|
9363
|
+
} else {
|
|
9364
|
+
camera.position.x += offset.x;
|
|
9365
|
+
camera.position.y += offset.y;
|
|
9366
|
+
camera.position.z += offset.z;
|
|
9367
|
+
}
|
|
9368
|
+
}
|
|
9321
9369
|
camera.rotation.set(0, 0, 0);
|
|
9322
9370
|
}
|
|
9323
9371
|
};
|
|
@@ -9427,6 +9475,18 @@ var VehicleFixedView = {
|
|
|
9427
9475
|
pivot.quaternion.slerp(tempCameraAim2, t);
|
|
9428
9476
|
}
|
|
9429
9477
|
camera.position.set(0, 0, distance);
|
|
9478
|
+
if (props.cameraOffset) {
|
|
9479
|
+
const offset = props.cameraOffset;
|
|
9480
|
+
if (Array.isArray(offset)) {
|
|
9481
|
+
camera.position.x += offset[0];
|
|
9482
|
+
camera.position.y += offset[1];
|
|
9483
|
+
camera.position.z += offset[2];
|
|
9484
|
+
} else {
|
|
9485
|
+
camera.position.x += offset.x;
|
|
9486
|
+
camera.position.y += offset.y;
|
|
9487
|
+
camera.position.z += offset.z;
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9430
9490
|
camera.rotation.set(0, 0, 0);
|
|
9431
9491
|
}
|
|
9432
9492
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirstPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/FirstPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"FirstPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/FirstPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,IAiH7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThirdPersonFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAwB3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"ThirdPersonFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAwB3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,EAAE,IAyIlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThirdPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAuB3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"ThirdPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAuB3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,IAwI7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA8B3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"VehicleFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA8B3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,IA6I9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA2B3D;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"VehicleView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA2B3D;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,IAkKzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirstPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/FirstPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"FirstPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/FirstPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAmB3D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,IAiH7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThirdPersonFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAwB3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"ThirdPersonFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAwB3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,EAAE,IAyIlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThirdPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAuB3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"ThirdPersonView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/ThirdPersonView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AAuB3D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,IAwI7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA8B3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"VehicleFixedView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleFixedView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA8B3D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,IA6I9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA2B3D;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"VehicleView.d.ts","sourceRoot":"","sources":["../../../../src/react/views/VehicleView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,SAAS,CAAA;AA2B3D;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,IAkKzB,CAAA"}
|