New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

regl-worldview

Package Overview
Dependencies
Maintainers
6
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regl-worldview - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name": "regl-worldview",
"version": "0.2.2",
"version": "0.2.3",
"description": "A reusable component for rendering 2D and 3D views using regl",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -101,3 +101,3 @@ // Copyright (c) 2018-present, GM Cruise LLC

handleMouseEvent(objects: MouseEventObject[], e: MouseEvent, ray: Ray, mouseEventName: MouseEventEnum) {
handleMouseEvent(objects: MouseEventObject[], ray: Ray, e: MouseEvent, mouseEventName: MouseEventEnum) {
const mouseHandler = this.props[mouseEventName];

@@ -104,0 +104,0 @@ if (!mouseHandler || !objects.length) {

@@ -12,2 +12,3 @@ // @flow

import { storiesOf } from "@storybook/react";
import expect from "expect";
import React from "react";

@@ -19,3 +20,3 @@ import { withScreenshot } from "storybook-chrome-screenshot";

import { clickAtOrigin, WorldviewWrapper } from "../worldviewAssertionUtils";
import { assertionTest, expect } from "stories/assertionTestUtils";
import { assertionTest } from "stories/assertionTestUtils";

@@ -22,0 +23,0 @@ const defaultXAxis = {

@@ -12,6 +12,7 @@ // @flow

import { storiesOf } from "@storybook/react";
import expect from "expect";
import React from "react";
import { withScreenshot } from "storybook-chrome-screenshot";
import { assertionTest, expect } from "stories/assertionTestUtils";
import { assertionTest } from "stories/assertionTestUtils";

@@ -18,0 +19,0 @@ storiesOf("Integration/ExampleTest", module)

@@ -12,2 +12,3 @@ // @flow

import { storiesOf } from "@storybook/react";
import expect from "expect";
import React from "react";

@@ -18,3 +19,3 @@ import { withScreenshot } from "storybook-chrome-screenshot";

import { clickAtOrigin, WorldviewWrapper } from "../worldviewAssertionUtils";
import { assertionTest, expect, timeout } from "stories/assertionTestUtils";
import { assertionTest, timeout } from "stories/assertionTestUtils";

@@ -21,0 +22,0 @@ const firstModelPosition = {

@@ -12,2 +12,3 @@ // @flow

import { storiesOf } from "@storybook/react";
import expect from "expect";
import React from "react";

@@ -19,3 +20,3 @@ import { withScreenshot } from "storybook-chrome-screenshot";

import { WorldviewWrapper, clickAtOrigin } from "../worldviewAssertionUtils";
import { assertionTest, expect } from "stories/assertionTestUtils";
import { assertionTest } from "stories/assertionTestUtils";

@@ -22,0 +23,0 @@ const COUNT = 6;

@@ -12,2 +12,3 @@ // @flow

import { storiesOf } from "@storybook/react";
import expect from "expect";
import React from "react";

@@ -18,3 +19,3 @@ import { withScreenshot } from "storybook-chrome-screenshot";

import { WorldviewWrapper, clickAtOrigin, WORLDVIEW_SIZE } from "../worldviewAssertionUtils";
import { assertionTest, expect, timeout } from "stories/assertionTestUtils";
import { assertionTest, timeout } from "stories/assertionTestUtils";

@@ -73,2 +74,31 @@ const cube = {

.add(
`Default object handler has a ray`,
assertionTest({
story: (setTestData) => (
<WorldviewWrapper>
<Cubes onClick={(_, clickInfo) => setTestData(clickInfo)}>{[cube]}</Cubes>
</WorldviewWrapper>
),
assertions: async (getTestData) => {
await clickAtOrigin();
const result = await getTestData();
// Dir
expect(result.ray.dir[0]).toBeCloseTo(0);
expect(result.ray.dir[1]).toBeCloseTo(-1);
expect(result.ray.dir[2]).toBeCloseTo(0);
// Origin
expect(result.ray.origin[0]).toBeCloseTo(0);
expect(result.ray.origin[1]).toBeCloseTo(75, 1);
expect(result.ray.origin[2]).toBeCloseTo(0);
// Point
expect(result.ray.point[0]).toBeCloseTo(0);
expect(result.ray.point[1]).toBeCloseTo(75, 1);
expect(result.ray.point[2]).toBeCloseTo(0);
},
})
)
.add(
`onMouseMove does not pick up objects with hitmapOnMouseMove=false`,

@@ -75,0 +105,0 @@ assertionTest({

@@ -11,2 +11,3 @@ // @flow

import expect from "expect";
import React, { type ComponentType } from "react";

@@ -17,3 +18,3 @@

import Worldview, { type Props } from "../Worldview";
import { assertionTest, timeout, expect } from "stories/assertionTestUtils";
import { assertionTest, timeout } from "stories/assertionTestUtils";

@@ -20,0 +21,0 @@ const defaultCameraState: $Shape<CameraState> = {

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

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

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