Git Product home page Git Product logo

luma.gl's People

Contributors

1chandu avatar apercu avatar balthazar avatar belom88 avatar dependabot[bot] avatar donmccurdy avatar felixpalmer avatar georgios-uber avatar geyang avatar gnavvy avatar guobinyong avatar heshan0131 avatar ibgreen avatar igordykhta avatar jianhuang01 avatar kylebarron avatar manassra avatar mikolalysenko avatar pessimistress avatar philogb avatar seungup avatar tgorkin avatar trxcllnt avatar tsherif avatar unconed avatar vschs007 avatar wentsul avatar wwwtyro avatar xiaokaiuber avatar zbigg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luma.gl's Issues

Set up Travis CI

#61 paves the way for setting up CI to automatically test all PRs as they come in. The next step would be to set up a service like travis. To do this we would then need someone with admin access on luma.gl to do the following:

Create an account on travis
Turn on travis integrations for luma.gl
Set up the travis.yml config script
(Optional) Maybe add a CI badge too
After it is all set up, we'll get immediate feedback on any PR like this, which greatly simplifies code review

Examples not working locally

After running:

git clone [email protected]:uber/luma.gl.git
cd luma.gl
npm install
npm start

and going to an example page (like http://192.168.1.154:3000/dist/core/instancing/), there's just an error message:

'import' and 'export' may only appear at the top level (4:0) while parsing /Users/adam/Desktop/luma.gl/dist/bundle.js while parsing file: /Users/adam/Desktop/luma.gl/dist/bundle.js

The dist/core/mandelbrot/ page loads, but /dist/core/mandelbrot/bundle.js 404s and the javascript console on the page says Uncaught ReferenceError: LumaGL is not defined.

Also - I'm not sure if budo can delay opening a tab until the initial build is complete, but the browser tab that auto opens flickers for 15 seconds as it try to live reload every time a file is generated.

Separate geometry (attributes) from Model

Our model knows how to combine programs (shaders), attributes and uniforms.

It is also the base class for our geometric primitives (planes, cylinders, spheres etc). But geometric primitives are typically only a set of attributes and some props like drawType.

A separate geometry or attributes class that can be installed on a Model might be a more flexible setup, that would allow the overly broad Model class to become more focused.

Also compare attributes.js in deck.gl performance branch, it could be a good base for a geometry/attributes class.

@mikolalysenko

luma.gl v4.0 Release Tracker

Current plans for luma.gl v4.0

WebGL2 support

  • Add new WebGL2 classes
  • Add WebGL2 features to existing classes
  • Add docs
  • Add test cases

GL state management

  • Scaffold new state manager
  • Make state manager handling framebuffer bindings
  • Build state management into render calls

Documentation Overhaul

  • All classes documented in markdown
  • Examples ported to ES6

Polish

  • Coverage/Coveralls badge

Create nicer main page for the examples

@wwwtyro - The local server (nmp run start) shows a directory listing including a lot of non-example related files. It would be nice to have a more visually appealing and clear landing page.

I am also wondering if we can now show multiple lessons in one page - with your latest changes we now support multiple parallel gl contexts. It'd be neat to just be able to scroll through all the lessons on a single page rather than click back and forth.

Consider using texStorage2D in Texture2D class for WebGL2

This method creates immutable textures that have better performance.

according to https://www.khronos.org/registry/webgl/specs/latest/2.0/

void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) (OpenGL ES 3.0.4 §3.8.4, man page)
Specify all the levels of a two-dimensional or cube-map texture at the same time.

The image contents are set as if a buffer of sufficient size initialized to 0 would be passed to each texImage2D call in the pseudocode in The OpenGL ES 3.0 specification section 3.8.4 (OpenGL ES 3.0.4 §3.8.4).

texStorage2D should be considered a preferred alternative to texImage2D. It may have lower memory costs than texImage2D in some implementations.

ShaderCache Improvements

ShaderCache has a couple of issues.

  • shaders need to be cached per gl context, we could leverage a new context storage association mechanism developed for GL state management to get per context caching.
  • The luma.gl Shader class has a delete method but we do not do reference counting, meaning that shared contexts are vulnerable to deletion. Consider adding reference counting.

drawMode: 'POINTS' doesn't work

image
I used a index to decode the vertices position in vert shader,but doesn't work.

when I render this model, it renders nothing, and I got this:
image

what does it mean 'gl.NONE'?

Implement Groups + hierarchical traversal support

Scenegraph.js has limited support for nodes but is currently broken. Ideally we should have a Group element in our model hierarchy that can contain other models and groups. Groups should be able to have local coordinate systems (scale, position, rotation, etc - full 4x4) that should recursively be applied to any child Models as they are traversed.

There should be a traversal method that maintains a matrix stack and push and pops transformation matrices as we recursively walk the tree.

Create example that renders a series of frames to bitmaps to generate video clips

@wwwtyro - we want to drive a render loop to generate bitmaps that we can either export one by one or (eventually) feed into a video generation tool. We could modify any existing example. For now we could use window.saveAs or a polyfill to save the bitmaps one by one.

@mikolalysenko is working on headless-gl support so eventually we will make this all work on the server but for now we can start with this in the browser.

@philogb

Refactor debug support

  • App should be able to switch back and forth between debug context and real context (right now once you turn on debug, that's it, you have taken the perf hit for the entire session).
  • Also we need to get the new Khronos webgl2 debug support integrated. I am trying to see if I can get a life sign from current maintainer of the npm fork: vorg/webgl-debug#1
  • We should improve the isWebGLContext detection code - current support for debug contexts is hacky. We could save the original context as a member of the debug context, and then do the instanceof check on that member instead when present.

Also see review comments in #136

Write Test cases for our basic WebGL classes

This is intended to be a <20min task. Just add a few test cases that construct our basic classes in the src/webgl directory and call a method or two. context funcs, Program, Buffer, Texture classes.

This will validate the electron integration #61

I am thinking we should have a structure with a -spec.js file matching each source file.

  • test/webgl/buffer-spec.js
  • test/webgl/program-spec.js
  • test/webgl/buffer-spec.js
  • test/webgl/index.js

Required gl version is too old

alubox:luma.gl-master stevenbeeckman$ npm install
npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/gl
> prebuild --download

prebuild WARN install Prebuilt binaries for node version 0.10.40,0.12.7,1.0.4,1.8.4,2.4.0,3.3.1,4.1.1 are not available
prebuild ERR! configure error
prebuild ERR! stack Error: Invalid version number: 0.10.40,0.12.7,1.0.4,1.8.4,2.4.0,3.3.1,4.1.1
prebuild ERR! stack     at getNodeDir (/Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:69:25)
prebuild ERR! stack     at /Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:41:7
prebuild ERR! stack     at /Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:393:9
prebuild ERR! stack     at ChildProcess.exithandler (child_process.js:193:7)
prebuild ERR! stack     at emitTwo (events.js:106:13)
prebuild ERR! stack     at ChildProcess.emit (events.js:191:7)
prebuild ERR! stack     at maybeClose (internal/child_process.js:850:16)
prebuild ERR! stack     at Socket.<anonymous> (internal/child_process.js:323:11)
prebuild ERR! stack     at emitOne (events.js:96:13)
prebuild ERR! stack     at Socket.emit (events.js:188:7)
prebuild ERR! not ok
prebuild ERR! build Error: Invalid version number: 0.10.40,0.12.7,1.0.4,1.8.4,2.4.0,3.3.1,4.1.1
prebuild ERR! build     at getNodeDir (/Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:69:25)
prebuild ERR! build     at /Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:41:7
prebuild ERR! build     at /Users/stevenbeeckman/Downloads/luma.gl-master/node_modules/node-gyp/lib/configure.js:393:9
prebuild ERR! build     at ChildProcess.exithandler (child_process.js:193:7)
prebuild ERR! build     at emitTwo (events.js:106:13)
prebuild ERR! build     at ChildProcess.emit (events.js:191:7)
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `prebuild --download`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild --download'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild --download
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gl
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gl
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/stevenbeeckman/Downloads/luma.gl-master/npm-debug.log

Adapting package.json so "gl": "^3.0.5" makes npm install work.

Clean up methods in new GL state manager

  • withState / withParameters
    Right now, scissorTests and framebuffer state are handled in withParameters, not in withState. We should eventually make withState handle every GL state.

  • setParameters / setValues
    When to use setParameters and setValues are a bit confusing. We may consider clarify these two functions in docs or combine them.

  • State manager also need to correctly handle those enable/disable states, as right now GL state cannot be disabled through our state manager.

Lesson 14/15 Console warnings

@wwwtyro
256(index):1 [GroupMarkerNotSet(crbug.com/242999)!:D0AC894CA37F0000]PERFORMANCE WARNING: Attribute 0 is disabled. This has signficant performance penalty
(index):1 WebGL: too many errors, no more errors will be reported to the console for this context.

FramebufferObject is no longer exported

After #136 , FramebufferObject class from the deprecated/fbo.js that deck.gl is dependent on is no longer exported. This breaks deck.gl.

The replacement Framebuffer class is imcompatible with the previous FramebufferObject. This needs to be solved before we release a new luma.gl version

LumaGL should not error out in a node environment

@wwwtyro - The code should not crash by trying to access global browser state like window etc that is not available in Node.js.

Even when WebGl is not available:

  • createGLContext should through a descriptive Error exception ('WebGL not available') or similar.
  • hasWebGL and extension queries should report false

Mouse event positions incorrect when page scrolled

This issue is the root cause of deck.gl issue 248. When clicking on a luma.gl view which is partially scrolled off screen by the pages scroll bar, relative mode click positions are incorrect. This issue does not occur if the luma.gl view is scrolled off screen by a containing elements scroll bars.

I think I've identified what's causing this issue. In the calculation of relative event positions, pos is subtracted from x/y (which is epos). Since epos is page relative, but pos is client relative, positions are incorrect if the client has scrolled the page. EventsProxy options used are relative true and centerOrigin false.

Is my reasoning correct? If so, I'll can submit a PR which addresses the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.