visgl / loaders.gl Goto Github PK
View Code? Open in Web Editor NEWLoaders for big data visualization. Website:
Home Page: https://loaders.gl
License: Other
Loaders for big data visualization. Website:
Home Page: https://loaders.gl
License: Other
getImageSize tests only work under Node.
I can't make it work with rollup? any example? thanks
Reported in aurora-opensource/xviz#384
The text-decoder polyfill is no longer maintained and this generates warnings during install which is unsettling for users.
Suggested action:
@ibgreen @tsherif The deck.gl SimpleMeshLayer requires normals in the mesh attributes. It is not technically required to construct a luma Geometry; however our shading module will not work without it.
The majority of mesh files that I encounter do not contain normals. This can be seen in 2/3 of our test files, and online repositories here, and here.
Normals can easily be calculated from a triangle. We could theoretically back fill this missing attribute by averaging the normals at each vertex. We may need to investigate how this can be done with memory efficiency in the streaming case.
We can add a utility for this to @loaders.gl/core
and share it among draco/ply/obj.
Having this option will make our mesh stack much more usable.
See RFC.
While debugging draco compression being added to XVIZ it seems the interface won't work just with TypeArrays as the current packBinaryJson() is setup to do. There is more context that is necessary to properly pack than is currently available.
The flow in xviz today:
Problems:
We need to call addCompressedPointCloud() not addBuffer() so some context is required on an object to know if it is a point cloud or other. GLBBulider nor GLTFBuilder cannot know this generically
We need to gather attributes (well, we can gather attributes (color & points)) and the current object iteration operates on a single field at a time
When I hacked the above colors appears to expect 3 values per color, not 4 :(
3a. In the hack, the the JSONPointer replacement needs to be understood. Could be solved with the right interface but it's an question to answer.
Everything done here needs to be equally handled in the parser
(deckgl) alleon_g$ npm i @loaders.gl/gltf --save
npm ERR! path /Users/alleon_g/0x-TechWork/jsbsim-react/jsbsim-view/node_modules/@loaders.gl/gltf/bin/glbdump.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/alleon_g/0x-TechWork/jsbsim-react/jsbsim-view/node_modules/@loaders.gl/gltf/bin/glbdump.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alleon_g/.npm/_logs/2019-02-28T05_30_59_335Z-debug.log
The link on loaders.gl site points to https://loaders.gl/docs/get-started, and gives a GitHub pages error.
fetch
API doesn't AFAIK. Maybe the new browser streams could work here?When .svg files contain, for example chinese characters, parse-image.js throws error: Uncaught (in promise) DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
Using btoa(unescape(encodeURLComponent(xml)))
instead of btoa(xml)
could solve this problem to make parse-image.js
more robust.
TypeError: "2 is not a valid argument count for any overload of Window.createImageBitmap."
You already have one example for glTF loader: https://loaders.gl/examples/gltf
But it is hard to understand for entry level. I believe a lot of code here because of select boxes.
Examples for feature - only are better for documentation: https://threejs.org/docs/index.html#examples/loaders/GLTFLoader
If you expect that your library will use only experienced developers in webgl, you can close this issue unresolved.
Also see #7 GLTF Punchlist
utils
method out of core, e.g. separate the minimal parser/encoder drivers from loader utility methods.Also see #7 GLTF Punchlist
core
and images
core
and images
(@ibgreen)luma.gl
IO libraries into loaders.gl and consolidate (@ibgreen)@deck.gl/test-utils
IO code into loaders.gl (@ibgreen)@loaders.gl/images
- Reconstruct luma.gl's original Node-based image loaders as new submodule. (@ibgreen)As of uber-web/ocular#197, published modules properly include their full license text. deck.gl has published v7.0.10 in response, can this repo do the same? Thanks!
parseFile
- Binary/Text parsing selection logic is fragile/likely incorrect in a few cases.
loader.test...
- no way to test binary files. Most appropriate in many cases.decodeURI
- Uses Buffers
instead of ArrayBuffers
(loaders.gl is trying to standardize on the latter). Apart from the code base dissonance, this might make bundler include some Buffer
polyfill?loader.testText
- requires converting entire file instead of just headerPLYLoader
(binary) converts entire buffer to text just to parse header...addBufferView
in gltf-scenegraph.js is handling the bufferOffset incorrectly which causes addImage
to be broken.
this.byteLength
is not initializedthis.byteLength += padTo4Bytes(byteLength);
has to be done after glTFBufferView
is constructedThis looks like an easy fix but I currently have no working dev setup so I would be very glad if this could be fixed.
Big ints
data frame operations
length
queries get updated when filters are set, or just affects iteration?data types
data sources and sinks
Memory management - a bit more text.
Tables
Typescript
API Reference
TBA
Strings here modules/gltf/src/gltf/gltf-builder.js must be known and documented to access this data.
The issue is present in @loaders.gl/gltf
at 1.0.3
as used in @xviz/builder
at v1.0.0-beta.10
, but appears fixed in by #179. @twojtasz and @ibgreen not sure if belongs in #7 at all, but wanted to file this separately so I can note the work around I have to do in another library.
Specifically the older code wrote the un-padded length out to the GLB file while in the new code it is fixed.
ImageLoader
to a separate @loaders.gl/image
module.Docs
ImageLoader
Tests/Examples
Code
ImageLoader
worker support with throughput benchmarksoptions.image.data
#597BasisLoader
#596ImageBitmap
supportloadAndParse
from loaders.gl).yarn start-local
or yarn start-local-worker
to use local workers.debug
option to debug workers - add logging and/or break in debuggerinitializeWorkers([DracoWorkerLoader, ...])
(let app preload worker scripts before parsing is needed for reduced "time to first pixel")byteOffset
, byteLength
byteOffset
, byteLength
loader.useWorker(options)
@ibgreenloadAndParse
I'm seeing the following error on this sample model:
gltf-post-processor-old.js:175 glTF file error: Could not find samplers[undefined]
The texture.sampler
property is not required, and can use a default value if unspecified:
This issue tracks remaining work for the table category of loaders
parseInBatches
/loadInBatches
) architecture, implementation and docs. (@ibgreen)@loaders.gl/experimental
module to @loaders.gl/tables
(@ibgreen)TableBatch
, schema etc in @loaders.gl/tables
(@ibgreen)General Options
JSONTableLoader
JSONLoader
/ JSONTableLoader
or just use optionsXMLTableLoader
P2Not yet deployed
Deployed
The LASLoader uses a webworker internally.
Currently the worker setup doesn't work, so the LAS parser is not functional.
The target design for loaders.gl is that parsers are synchronous and can be run either on main thread or on worker, so ideally we should refactor the LASLoader accordingly as we implement generic worker support.
I met this problem, it caused by sometimes the process is not undefined but the process.version is undefined, in @loaders.gl/core/dist/esm/utils/globals.js:45, process.version.match
will cause this problem.
Cannot read property 'match' of undefined
TypeError: Cannot read property 'match' of undefined at Module. (http://localhost:8000/vendors.async.js:19546:65) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/utils/globals.js (http://localhost:8000/vendors.async.js:19549:30) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/javascript-utils/stream-utils.js (http://localhost:8000/vendors.async.js:17622:72) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/lib/loader-utils/get-data.js (http://localhost:8000/vendors.async.js:18590:88) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/lib/parse-with-loader.js (http://localhost:8000/vendors.async.js:18906:80) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/lib/parse.js (http://localhost:8000/vendors.async.js:19111:76) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@loaders.gl/core/dist/esm/index.js (http://localhost:8000/vendors.async.js:16703:68) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@deck.gl/core/dist/esm/lib/init.js (http://localhost:8000/vendors.async.js:7703:74) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@deck.gl/core/dist/esm/index.js (http://localhost:8000/vendors.async.js:3622:67) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@deck.gl/react/dist/esm/deckgl.js (http://localhost:8000/vendors.async.js:16227:71) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../node_modules/@[email protected]@@deck.gl/react/dist/esm/index.js (http://localhost:8000/vendors.async.js:16410:65) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../src/pages/entry/components/Map/MapGL.jsx (http://localhost:8000/p__testMap__index.async.js:19:72) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20) at Module../src/pages/testMap/index.js (http://localhost:8000/p__testMap__index.async.js:97:90) at webpack_require (http://localhost:8000/umi.js:775:30) at fn (http://localhost:8000/umi.js:130:20)
potree
data format:r0703...
where each digit hierarchically determines a sub-octant (0-7)Open tasks moved to #1245
glTF-based Tile parsing
@loaders.gl/gltf
: Tile3DLoader
and GLTFLoader
to wait for all sub loaders P0 (@ibgreen)@loaders.gl/core
: Improve support for sub-loaders P0 @ibgreen@loaders.gl/core
: Move loader options into nested sub objects (to simplify sending options to sub-loaders) @ibgreen P0Tile3DLayer
Tile3DLayer
P0 (@xintongxia)Tile3DLayer
P0 (@xintongxia)Tile3DLayer
to deck.gl P0 (@jianhuang01)Tile3DLayer
P0 (@xintongxia)Tile3DLayer
cleanup: Ion Asset Handling P0 (@xintongxia)Tile3DLayer
cleanup: General P0 (@xintongxia)3d-tiles example
3d-tiles module documentation
Tileset3D
class P0 (@ibgreen)glTF-based Tile parsing
Tile3DLayer
: Map instanced model tile data to deck.gl ScenegraphLayer
attributes #246 (@xintongxia)Tile3DLayer
: Support batched gltf tiles #246 (@xintongxia)Point Cloud Parsing
3d-tiles module code
DracoWorkerLoader
is not working (@xintongxia)Tileset3D refactor
Tileset3D
.Tileset3DTraversal
so that it does not access Tileset directly (@ibgreen)Tileset3D
into public/private methods (@ibgreen)deck.gl issues
ScenegraphLayer
opacity
prop is broken (@jianhuang01)ScenegraphLayer
modelMatrix
is broken P0 (@jianhuang01)ScenegraphLayer
PBR color (not texture) is broken (@jianhuang01)Traversal
glTF-based Tile parsing
(@xintongxia)
ScenegraphLayer
rendering for sync data? (@georgios-uber)ScenegraphLayer
? (@ibgreen)Use the transforms in the tileset and the tile to position the tiles correctly on the base map.
Ellipsoid
class to enable conversion of WSG84 "cartesians" to cartographic/lnglatz. (@ibgreen)Tile3DHeader.loadContent()
(@ibgreen) #224Tile3DHeader
s for all tiles in tileset (@ibgreen)Tileset3D
class, unit tests (@ibgreen)Ellipsoid
etc classes. #223OrientedBoundingBox
, BoundingSphere
, PerspectiveFrustum
, CullingVolume
classes.Ellipsoid
etc classes. (@ibgreen)OrientedBoundingBox
, BoundingSphere
, PerspectiveFrustum
, CullingVolume
classes. (@ibgreen)PointCloudLayer
attributes (@xintongxia)See #91
How to reproduce?
Go to examples/las
, replace the LASLoader
with LASWorkerLoader
. And do yarn start-local
.
Line 8 - 13 should like the following,
import {LASWorkerLoader} from '@loaders.gl/las';
// import {PLYWorkerLoader} from '@loaders.gl/ply';
import {load, registerLoaders} from '@loaders.gl/core';
// Additional format support can be added here, see
registerLoaders(LASWorkerLoader);
There seems to be an extra fetch related class to handle abort
now, not sure if it is portable between browsers yet.
See #92
Talked to Sean, here's the documentation for making requests to ion
https://cesium.com/docs/tutorials/rest-api/
https://cesium.com/docs/rest-api/#section/Overview
https://cesium.com/docs/rest-api/#operation/getAssetEndpoint
const request = require('request-promise');
const accessToken = '<your_access_token>'; // Replace this with your token from above.
const response = await request({
url: 'https://api.cesium.com/v1/assets',
headers: { Authorization:Bearer ${accessToken}
},
json: true
});
This returns a json where where the items
member contains an array of asset metadata. The id
is used to request information about how to access it.
{"items":[{"id":1,"type":"3DTILES","name":"AGI HQ","description":"AGI Headquarters","bytes":0,"attributition":"AGI","dateAdded":"2019-05-29T18:56:13.088Z","status":"COMPLETE","percentComplete":100}, ...]}
// Issue a GET request for the metadata
const assetMetadata = await request({
url:https://api.cesium.com/v1/assets/${assetId}/endpoint
,
headers: { Authorization:Bearer ${accessToken}
},
json: true
});
As an example, this could return something like:
{
"type": "3DTILES",
"url": "https://assets.cesium.com/23912/tileset.json",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMjZmNzU0Yy02ZmVkLTQ4ODktOTUyMC0zMDRlMmNjODdiMzEiLCJpZCI6NDQsImFzc2V0cyI6eyIxIjp7InR5cGUiOiJURVJSQUlOIiwiZXh0ZW5zaW9ucyI6W3RydWUsdHJ1ZSx0cnVlXSwicHVsbEFwYXJ0VGVycmFpbiI6ZmFsc2V9fSwic3JjIjoiOGE2NjVmYmMtZDQzMy00ZmMxLWE3NDgtNjRhYWE3MjFiOTgzIiwiaWF0IjoxNTU0MTI4NTUzLCJleHAiOjE1NTQxMzIxNTN9.CWjqdF1LORmCd7nVbHupXyIjCPOfuSOpXwQoaQU_a94",
"attributions": [
{
"html": "<a href="https://cesium.com" target="_blank"><img alt="Cesium ion" src="http://assets.cesium.com/ion-credit.png">",
"collapsible": false
}
]
}
Looking at https://cesium.com/docs/rest-api/#operation/getAssetEndpoint
the url is for the tileset.json and the accessToken is as specified:
The token to be included with each tile request, using Bearer format. This token is different than the access token used throughout the rest of the REST API. It provides access to the asset for approximately one hour. To continue using the asset after the allotted time, simple re-request the endpoint for a new token.
There are indications that we might be including too many tiles during traversal (which obviously will negatively affect loading and rendering performance). Based on suggestions from @loshjawrence:
General debugging tools for culling
Less costly approaches:
Possible investigations tracks:
Tileset3d.stats
indicators to indicate if any tiles in tileset use regions and other features that may be suspected to cause issues (@xintongxia)This seems to have regressed when loaders.gl was broken out from luma.gl:
modules/core/.bin
loaders.gl
is installed.npx glbdump
) while working inside loaders.gl, not just modules/core
As far as I can tell, worker threads are started when importing a module, even if the code never references the WorkerLoader
object.
This happens in glTF loader, where the Draco worker starts even when not used.
We may need to refine our bundling strategy.
Also the Draco worker appears to keep receiving empty messages in an "infinite loop", making debugging very sluggish.
glTF standards compliant loader: missing features
Loader Features:
basis
subloader (@georgios-uber)Other
Tests:
Extensions:
draco
subloader (@ibgree)options.gltf
(@igbreen)Extensions:
GLBBuilder
,GLTFBuilder
- nopack
option renamed to packTypedArrays
(#94) @ibreenGLTFLoader
& GLTFParser.parse()
supports async loading of linked resource files and base64 encoded buffers
. @georgios-uberGLTFParser.parse()
supports the following inputs: ArrayBuffer containing GLB, ArrayBuffer containing UTF8 encoded JSON, string containing JSON as well as decoded JSON. @ibreenGLTFBuilder
/GLTFParser
)GLBBuilder
/GLTFBuilder
APIsGLTFBuilder
API for adding extensionsA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.