Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opus-world-wind

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opus-world-wind - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

18

ExtUtils.js

@@ -8,2 +8,3 @@ define([

'WebWorldWind/geom/Vec3',
'WebWorldWind/geom/Matrix',
'WebWorldWind/geom/Plane',

@@ -13,4 +14,5 @@ 'WebWorldWind/geom/Line',

'OpusWorldWind/Intersection'
], function(OpusWorldWind, WorldWind, Globe, Globe2D, Angle, Vec3, Plane, Line, Position, Intersection) {
], function(OpusWorldWind, WorldWind, Globe, Globe2D, Angle, Vec3, Matrix, Plane, Line, Position, Intersection) {
var ExtUtils = {
scratchMatrix: Matrix.fromIdentity(),
convertWorldWindPositionAltitudeMode: function(wwd, position, fromAltitudeMode, toAltitudeMode) {

@@ -150,8 +152,11 @@ if(fromAltitudeMode === toAltitudeMode || toAltitudeMode === WorldWind.CLAMP_TO_GROUND) {

rayFromScreenPoint: function(dc, screenPoint, result) {
this.scratchMatrix.setToIdentity();
var modelviewProjectionInv = this.scratchMatrix;
modelviewProjectionInv.invertMatrix(dc.modelviewProjection);
var p1 = new Vec3(screenPoint[0], screenPoint[1], 0);
var p2 = new Vec3(screenPoint[0], screenPoint[1], 1);
if(!dc.unProject(p1, result.origin)) {
if(!modelviewProjectionInv.unProject(p1, dc.viewport, result.origin)) {
return null;
}
if(!dc.unProject(p2, result.direction)) {
if(!modelviewProjectionInv.unProject(p2, dc.viewport, result.direction)) {
return null;

@@ -164,2 +169,5 @@ }

computeScreenRightDirection: function(dc, result) {
this.scratchMatrix.setToIdentity();
var modelviewProjectionInv = this.scratchMatrix;
modelviewProjectionInv.invertMatrix(dc.modelviewProjection);
var p1 = new Vec3(0, 0, 0);

@@ -169,6 +177,6 @@ var p2 = new Vec3(1, 0, 0);

var pt2 = new Vec3(0, 0, 0);
if(!dc.unProject(p1, pt1)) {
if(!modelviewProjectionInv.unProject(p1, dc.viewport, pt1)) {
return null;
}
if(!dc.unProject(p2, pt2)) {
if(!modelviewProjectionInv.unProject(p2, dc.viewport, pt2)) {
return null;

@@ -175,0 +183,0 @@ }

{
"name": "opus-world-wind",
"version": "1.0.1",
"version": "1.0.2",
"license": "GPL-3.0",

@@ -5,0 +5,0 @@ "repository": {

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