visgl / visgl/deck.gl

[Bug] FirstPersonView breaks on interaction

Open
#9,249 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

When interacting with deckgl in FirstPersonView, the far plane gets reset

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

Initially you should see the boxes animating.
However, when interacting with it, they disappear!

Note: I needed to set the "far": to 10000 or 100000 to see the boxes initially as expected.

image

Steps to Reproduce

To observe the problem, go to:
https://deck.gl/playground
and use the following code:

{
	"initialViewState": {
	  "longitude": -122.4,
          "latitude": 37.74,
  	  "far": 10000,
	  "zoom": 6.6,
	  "minZoom": 5,
	  "maxZoom": 15,
	  "pitch": -3,
	  "position":[0,0,234],

	  "bearing": 0
	},
	"views": [
	  {
		"@@type": "FirstPersonView",
		"controller": true
	  }
	],
	"layers": [
	 	
	{
		"@@type": "ScenegraphLayer",
		"id": "ScenegraphLayer",
		"data": "https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/bart-stations.json",
		"pickable": true,
		"scenegraph": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxAnimated/glTF-Binary/BoxAnimated.glb",
		"getPosition": "@@=coordinates",
		"getOrientation": [
			0,
			0,
			90
		],
		"_animations": {
			"*": {
				"speed": 5
			}
		},
		"sizeScale": 500,
		"_lighting": "pbr"
	}
	]
  }
Environment
  • Framework version: deck.gl@9.0.3
  • Browser: Chrome
  • OS: Windows
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the deck.gl playground using the supplied FirstPersonView and ScenegraphLayer configuration, then inspect the FirstPersonView interaction path. No source file or test is named in the report, so begin from the playground entry point and trace how interaction updates the far plane. Done means the animated boxes remain visible after interaction without requiring an unusually large far value.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.