|
@@ -1,4 +1,4 @@
|
|
|
-class XCameraComponent {
|
|
|
+export default class XCameraComponent {
|
|
|
constructor(e, t, r) {
|
|
|
E(this, "maincameraRotLimitObserver", null);
|
|
|
E(this, "mainCamera");
|
|
@@ -11,19 +11,19 @@ class XCameraComponent {
|
|
|
E(this, "forceKeepVertical", !1);
|
|
|
E(this, "initCamera", e=>{
|
|
|
const {maxZ: t=1e4, minZ: r=.1, angularSensibility: n=2e3} = e;
|
|
|
- this.mainCamera = new FreeCamera("camera_main",new Vector3(0,1e3,0),this.scene),
|
|
|
+ this.mainCamera = new BABYLON.FreeCamera("camera_main",new BABYLON.Vector3(0,1e3,0),this.scene),
|
|
|
this.mainCamera.mode = BABYLON.Camera.PERSPECTIVE_CAMERA,
|
|
|
this.mainCamera.speed = .1,
|
|
|
this.mainCamera.angularSensibility = n,
|
|
|
- this.mainCamera.setTarget(new Vector3(0,1010,0)),
|
|
|
+ this.mainCamera.setTarget(new BABYLON.Vector3(0,1010,0)),
|
|
|
this.mainCamera.minZ = r,
|
|
|
this.mainCamera.fov = Math.PI * this.yuvInfo.fov / 180,
|
|
|
this.mainCamera.maxZ = t,
|
|
|
this.mainCamera.fovMode = BABYLON.Camera.FOVMODE_HORIZONTAL_FIXED,
|
|
|
- this.cgCamera = new FreeCamera("camera_temp",new Vector3(0,1e3,0),this.scene),
|
|
|
+ this.cgCamera = new BABYLON.FreeCamera("camera_temp",new BABYLON.Vector3(0,1e3,0),this.scene),
|
|
|
this.cgCamera.mode = BABYLON.Camera.PERSPECTIVE_CAMERA,
|
|
|
this.cgCamera.speed = .1,
|
|
|
- this.cgCamera.setTarget(new Vector3(0,1010,0)),
|
|
|
+ this.cgCamera.setTarget(new BABYLON.Vector3(0,1010,0)),
|
|
|
this.cgCamera.maxZ = t,
|
|
|
this.cgCamera.minZ = r,
|
|
|
this.cgCamera.fovMode = BABYLON.Camera.FOVMODE_HORIZONTAL_FIXED,
|
|
@@ -89,9 +89,9 @@ class XCameraComponent {
|
|
|
const u = (v,y,b)=>(v.x = this.reCalXYZRot(v.x, y.x),
|
|
|
v.y = this.reCalXYZRot(v.y, y.y),
|
|
|
v.z = this.reCalXYZRot(v.z, y.z),
|
|
|
- new Vector3((y.x - v.x) * b + v.x,(y.y - v.y) * b + v.y,(y.z - v.z) * b + v.z))
|
|
|
+ new BABYLON.Vector3((y.x - v.x) * b + v.x,(y.y - v.y) * b + v.y,(y.z - v.z) * b + v.z))
|
|
|
, c = function(v, y, b) {
|
|
|
- return new Vector3((y.x - v.x) * b + v.x,(y.y - v.y) * b + v.y,(y.z - v.z) * b + v.z)
|
|
|
+ return new BABYLON.Vector3((y.x - v.x) * b + v.x,(y.y - v.y) * b + v.y,(y.z - v.z) * b + v.z)
|
|
|
}
|
|
|
, h = new Animation("myAnimation1","position",s,Animation.ANIMATIONTYPE_VECTOR3,Animation.ANIMATIONLOOPMODE_CONSTANT);
|
|
|
let f = []
|