Socket
Socket
Sign inDemoInstall

@antv/g-camera-api

Package Overview
Dependencies
Maintainers
66
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-camera-api - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

1

dist/AdvancedCamera.d.ts

@@ -43,3 +43,2 @@ import { Camera } from '@antv/g-lite';

}>): void;
private syncFromLandmark;
}

@@ -165,9 +165,2 @@ import { getAngle, CameraType, deg2rad, createVec3, runtime, Camera } from '@antv/g-lite';

var epsilon_1 = 0.01;
if (duration_1 === 0) {
this.syncFromLandmark(landmark);
if (onfinish_1) {
onfinish_1();
}
return;
}
// cancel ongoing animation

@@ -181,3 +174,3 @@ this.cancelLandmarkAnimation();

var timeStart_1;
var endAnimation_1 = function () {
var end_1 = function () {
_this.setFocalPoint(destFocalPoint_1);

@@ -189,6 +182,6 @@ _this.setPosition(destPosition_1);

_this.triggerUpdate();
if (onfinish_1) {
onfinish_1();
}
onfinish_1 === null || onfinish_1 === void 0 ? void 0 : onfinish_1();
};
if (duration_1 === 0)
return end_1();
var animate_1 = function (timestamp) {

@@ -200,3 +193,3 @@ if (timeStart_1 === undefined) {

if (elapsed >= duration_1) {
endAnimation_1();
end_1();
return;

@@ -221,4 +214,3 @@ }

if (dist <= epsilon_1 && destZoom_1 == undefined && destRoll_1 == undefined) {
endAnimation_1();
return;
return end_1();
}

@@ -228,5 +220,3 @@ _this.computeMatrix();

if (elapsed < duration_1) {
if (onframe_1) {
onframe_1(t);
}
onframe_1 === null || onframe_1 === void 0 ? void 0 : onframe_1(t);
_this.landmarkAnimationID = _this.canvas.requestAnimationFrame(animate_1);

@@ -238,20 +228,2 @@ }

};
AdvancedCamera.prototype.syncFromLandmark = function (landmark) {
this.matrix = mat4.copy(this.matrix, landmark.matrix);
this.right = vec3.copy(this.right, landmark.right);
this.up = vec3.copy(this.up, landmark.up);
this.forward = vec3.copy(this.forward, landmark.forward);
this.position = vec3.copy(this.position, landmark.position);
this.focalPoint = vec3.copy(this.focalPoint, landmark.focalPoint);
this.distanceVector = vec3.copy(this.distanceVector, landmark.distanceVector);
this.azimuth = landmark.azimuth;
this.elevation = landmark.elevation;
this.roll = landmark.roll;
this.relAzimuth = landmark.relAzimuth;
this.relElevation = landmark.relElevation;
this.relRoll = landmark.relRoll;
this.dollyingStep = landmark.dollyingStep;
this.distance = landmark.distance;
this.zoom = landmark.zoom;
};
return AdvancedCamera;

@@ -258,0 +230,0 @@ }(Camera));

@@ -167,9 +167,2 @@ 'use strict';

var epsilon_1 = 0.01;
if (duration_1 === 0) {
this.syncFromLandmark(landmark);
if (onfinish_1) {
onfinish_1();
}
return;
}
// cancel ongoing animation

@@ -183,3 +176,3 @@ this.cancelLandmarkAnimation();

var timeStart_1;
var endAnimation_1 = function () {
var end_1 = function () {
_this.setFocalPoint(destFocalPoint_1);

@@ -191,6 +184,6 @@ _this.setPosition(destPosition_1);

_this.triggerUpdate();
if (onfinish_1) {
onfinish_1();
}
onfinish_1 === null || onfinish_1 === void 0 ? void 0 : onfinish_1();
};
if (duration_1 === 0)
return end_1();
var animate_1 = function (timestamp) {

@@ -202,3 +195,3 @@ if (timeStart_1 === undefined) {

if (elapsed >= duration_1) {
endAnimation_1();
end_1();
return;

@@ -223,4 +216,3 @@ }

if (dist <= epsilon_1 && destZoom_1 == undefined && destRoll_1 == undefined) {
endAnimation_1();
return;
return end_1();
}

@@ -230,5 +222,3 @@ _this.computeMatrix();

if (elapsed < duration_1) {
if (onframe_1) {
onframe_1(t);
}
onframe_1 === null || onframe_1 === void 0 ? void 0 : onframe_1(t);
_this.landmarkAnimationID = _this.canvas.requestAnimationFrame(animate_1);

@@ -240,20 +230,2 @@ }

};
AdvancedCamera.prototype.syncFromLandmark = function (landmark) {
this.matrix = glMatrix.mat4.copy(this.matrix, landmark.matrix);
this.right = glMatrix.vec3.copy(this.right, landmark.right);
this.up = glMatrix.vec3.copy(this.up, landmark.up);
this.forward = glMatrix.vec3.copy(this.forward, landmark.forward);
this.position = glMatrix.vec3.copy(this.position, landmark.position);
this.focalPoint = glMatrix.vec3.copy(this.focalPoint, landmark.focalPoint);
this.distanceVector = glMatrix.vec3.copy(this.distanceVector, landmark.distanceVector);
this.azimuth = landmark.azimuth;
this.elevation = landmark.elevation;
this.roll = landmark.roll;
this.relAzimuth = landmark.relAzimuth;
this.relElevation = landmark.relElevation;
this.relRoll = landmark.relRoll;
this.dollyingStep = landmark.dollyingStep;
this.distance = landmark.distance;
this.zoom = landmark.zoom;
};
return AdvancedCamera;

@@ -260,0 +232,0 @@ }(gLite.Camera));

2

package.json
{
"name": "@antv/g-camera-api",
"version": "2.0.7",
"version": "2.0.8",
"description": "A simple implementation of Camera API.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc