@shd-developer/interactive-map
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -7,2 +7,3 @@ import { OrthographicCamera, PerspectiveCamera } from "three"; | ||
}; | ||
console.log(sizes); | ||
if (camera instanceof PerspectiveCamera) { | ||
@@ -9,0 +10,0 @@ camera.aspect = sizes.width / sizes.height; |
{ | ||
"name": "@shd-developer/interactive-map", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A package aimed at simplifying common three.js setups for interactive maps.", | ||
@@ -13,3 +13,4 @@ "type": "module", | ||
"scripts": { | ||
"build": "rm -rf dist && node node_modules/typescript/lib/tsc.js", | ||
"dev": "rm -rf dist/* && node node_modules/typescript/lib/tsc.js --watch --checkJs --pretty", | ||
"build": "rm -rf dist/* && node node_modules/typescript/lib/tsc.js --checkJs --pretty", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -16,0 +17,0 @@ }, |
@@ -5,3 +5,3 @@ import { OrthographicCamera, PerspectiveCamera, WebGLRenderer } from "three"; | ||
export const onWindowResize = (renderer: WebGLRenderer, camera: PerspectiveCamera | OrthographicCamera, cameraConfig: IOrthographicCameraConfig | IPerspectiveCameraConfig): ISize => { | ||
export const onWindowResize = (renderer: WebGLRenderer, camera: PerspectiveCamera | OrthographicCamera, cameraConfig: IOrthographicCameraConfig | IPerspectiveCameraConfig): ISize => { | ||
const sizes = { | ||
@@ -11,3 +11,3 @@ width: window.innerWidth, | ||
} | ||
if (camera instanceof PerspectiveCamera) { | ||
@@ -19,3 +19,3 @@ camera.aspect = sizes.width / sizes.height; | ||
const aspectRatio = sizes.width / sizes.height; | ||
camera.left = (cameraConfig as IOrthographicCameraConfig).frustumSize * aspectRatio / - 2; | ||
@@ -22,0 +22,0 @@ camera.right = (cameraConfig as IOrthographicCameraConfig).frustumSize * aspectRatio / 2; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82100
1733