Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples url #7354

Open
wants to merge 2 commits into
base: 8.8-release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -145,3 +145,9 @@ After this `yarn bootstrap` can be run with
```
CPLUS_INCLUDE_PATH=/opt/homebrew/include yarn bootstrap
```

Additional flags that may be required to build are:
```
CXXFLAGS="--std=c++17 -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" CPLUS_INCLUDE_PATH=/opt/homebrew/include yarn bootstrap
```
In addition, you may need to force-link some of the packages installed with homebrew.
2 changes: 1 addition & 1 deletion docs/developer-guide/base-maps/using-with-mapbox.md
Expand Up @@ -8,7 +8,7 @@

When using deck.gl and Mapbox, there are three options you can choose from:

- Using the Deck canvas as a overlay on top of the Mapbox map, and Deck as the root element. In this option, deck.gl handles all user input, and holds the source of truth of the camera state. The [React get-started example](https://github.com/visgl/deck.gl/tree/8.8-release/examples/get-started/react/mapbox/) illustrates the basic pattern. This is the most tested and robust use case, as you can find in all the [examples on this website](https://deck.gl/examples/website). It supports all the features of Deck.
- Using the Deck canvas as a overlay on top of the Mapbox map, and Deck as the root element. In this option, deck.gl handles all user input, and holds the source of truth of the camera state. The [React get-started example](https://github.com/visgl/deck.gl/tree/8.8-release/examples/get-started/react/mapbox/) illustrates the basic pattern. This is the most tested and robust use case, as you can find in all the [examples on this website](https://deck.gl/examples). It supports all the features of Deck.
- Using the Deck canvas as a overlay on top of the Mapbox map, and Mapbox as the root element. In this option, mapbox-gl handles all user input, and holds the source of truth of the camera state. The [vanilla JS get-started example](https://github.com/visgl/deck.gl/tree/8.8-release/examples/get-started/pure-js/mapbox/) illustrates this pattern. The `MapboxOverlay` class in [@deck.gl/mapbox](/docs/api-reference/mapbox/overview.md) implements the mapbox-gl control interface to insert deck into the map container. This is favorable if you need to use other mapbox-gl controls and plugins in addition to deck.gl.
- Using deck.gl layers interleaved with Mapbox layers in the same WebGL context, using either the `MapboxOverlay` or `MapboxLayer` from the [@deck.gl/mapbox](/docs/api-reference/mapbox/overview.md) module. This allows you to mix deck.gl layers with base map layers, e.g. below text labels or occlude each other correctly in 3D. Be cautious that this feature subjects to bugs and limitations of mapbox-gl's custom layer interface.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -63,7 +63,7 @@
"babel-plugin-inline-webgl-constants": "^1.0.3",
"babel-plugin-remove-glsl-comments": "^0.1.0",
"babel-preset-minify": "^0.5.0",
"canvas": "^2.6.0",
"canvas": "^2.10.1",
"coveralls": "^3.0.0",
"gl": "^4.9.0",
"glsl-transpiler": "^1.8.3",
Expand Down
7 changes: 6 additions & 1 deletion test/modules/core/lib/resource/resource.spec.js
Expand Up @@ -2,6 +2,7 @@
import test from 'tape-promise/tape';
import {gl} from '@deck.gl/test-utils';
import Resource from '@deck.gl/core/lib/resource/resource';
import path from 'path';

function mockLoadData(value, delay) {
return new Promise(resolve => {
Expand All @@ -15,9 +16,12 @@ test('Resource#setData', async t => {
const resource = new Resource('test', [], {gl});
t.deepEqual(resource.getData(), []);

resource.setData('./test.json');
resource.setData(path.resolve(__dirname, 'test.json'));
t.ok(resource.getData() instanceof Promise, 'data is being loaded');
t.deepEqual(await resource.getData(), {}, 'json file is loaded');

let errors = 0;
resource.setData('not-existing.json');
try {
await resource.getData();
} catch (e) {
Expand All @@ -42,5 +46,6 @@ test('Resource#setData', async t => {
t.is(resource.getData(), 'B');

resource.delete();

t.end();
});
1 change: 1 addition & 0 deletions test/modules/core/lib/resource/test.json
@@ -0,0 +1 @@
{}