mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
Add markdown lint. Start adressing warnings (#507)
This commit is contained in:
parent
2b857d1b48
commit
9400fe5cfd
10
.markdownlintrc
Normal file
10
.markdownlintrc
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"default": true,
|
||||
"colors": true,
|
||||
"line-length": false,
|
||||
"ul-style": {"style": "sublist"},
|
||||
"no-duplicate-header": false,
|
||||
"no-inline-html": false,
|
||||
"no-hard-tabs": false,
|
||||
"whitespace": false
|
||||
}
|
||||
@ -116,12 +116,12 @@ Assigns a buffer a vertex attribute. Vertex Shader will be invoked once (not con
|
||||
2. **location** (*GLuint*) - index of the attribute
|
||||
3. **buffer** (*WebGLBuffer*|*Buffer*)
|
||||
4. **target** (*GLuint*, gl.ARRAY_BUFFER) - which target to bind to
|
||||
4. **size** (*GLuint*) - number of values per element (1-4)
|
||||
4. **type** (*GLuint*) - type of values (e.g. gl.FLOAT)
|
||||
4. **normalized** (*boolean*, false) - normalize integers to [-1,1] or [0,1]
|
||||
4. **integer** (*boolean*, false) - **WebGL2 only** disable int-to-float conversion
|
||||
4. **stride** (*GLuint*, 0) - supports strided arrays
|
||||
4. **offset** (*GLuint*, 0) - supports strided arrays
|
||||
5. **size** (*GLuint*) - number of values per element (1-4)
|
||||
6. **type** (*GLuint*) - type of values (e.g. gl.FLOAT)
|
||||
7. **normalized** (*boolean*, false) - normalize integers to [-1,1] or [0,1]
|
||||
8. **integer** (*boolean*, false) - **WebGL2 only** disable int-to-float conversion
|
||||
9. **stride** (*GLuint*, 0) - supports strided arrays
|
||||
10. **offset** (*GLuint*, 0) - supports strided arrays
|
||||
|
||||
### Remarks
|
||||
|
||||
@ -133,7 +133,7 @@ Assigns a buffer a vertex attribute. Vertex Shader will be invoked once (not con
|
||||
|
||||
Sets a constant (i.e. generic) value for a vertex attribute. All Vertex Shader invocations will get the same value.
|
||||
|
||||
### Syntax:
|
||||
### Syntax
|
||||
|
||||
VertexAttributes.setGeneric({gl, location, array});
|
||||
|
||||
@ -154,7 +154,7 @@ Sets the instance divisor. 0 disables instancing, >=1 enables it.
|
||||
|
||||
See description of instancing in the overview above.
|
||||
|
||||
### Syntax:
|
||||
### Syntax
|
||||
|
||||
VertexAttributes.setGeneric({gl, location, array});
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
## Buffers
|
||||
# Buffers
|
||||
|
||||
This section can be skipped as the luma.gl API will handle binding (and unbinding) of buffers to the appropriate "targets". Still it can be good to have some understanding of buffer binding points as these feature prominently in the WebGL API.
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ For more information, see [OpenGL Wiki](https://www.khronos.org/opengl/wiki/Tran
|
||||
## Usage
|
||||
|
||||
Setting up a model object for transform feedback.
|
||||
|
||||
```js
|
||||
const model = new Model(gl, {
|
||||
vs,
|
||||
@ -47,6 +48,7 @@ const transformFeedback = new TransformFeedback(gl, {
|
||||
|
||||
|
||||
Running program (drawing) with implicit activation of transform feedback (will call `begin` and `end` on supplied `transformFeedback`)
|
||||
|
||||
```js
|
||||
model.draw({
|
||||
drawMode,
|
||||
@ -57,6 +59,7 @@ model.draw({
|
||||
```
|
||||
|
||||
Running program (drawing) with explicit activation of transform feedback
|
||||
|
||||
```js
|
||||
transformFeedback.begin();
|
||||
model.draw({...});
|
||||
@ -64,6 +67,7 @@ transformFeedback.end();
|
||||
```
|
||||
|
||||
Turning off rasterization
|
||||
|
||||
```js
|
||||
const parameters = {[GL.RASTERIZER_DISCARD]: true}
|
||||
model.draw({..., transformFeedback, parameters});
|
||||
@ -75,9 +79,8 @@ model.draw({..., transformFeedback, parameters});
|
||||
### constructor
|
||||
|
||||
* `gl` - (`WebGL2RenderingContext`) gl - context
|
||||
* `opts` - (`Object`={}) - options
|
||||
* `buffers` - buffers that gets bound to `TRANSFORM_FEEDBACK_BUFFER` target for recording vertex shader outputs.
|
||||
* `varyingMap` - Object mapping varying name to buffer index it needs to be bound.
|
||||
* `buffers` - buffers that gets bound to `TRANSFORM_FEEDBACK_BUFFER` target for recording vertex shader outputs.
|
||||
* `varyingMap` - Object mapping varying name to buffer index it needs to be bound.
|
||||
|
||||
WebGL APIs [`gl.createTransformFeedback`](https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/createTransformFeedback)
|
||||
|
||||
@ -103,10 +106,12 @@ Reallocating storage for any of these buffers. This includes invalidation.
|
||||
```js
|
||||
begin(primitiveMode)
|
||||
```
|
||||
|
||||
* `primitiveMode` (`GLenum`) -
|
||||
|
||||
returns (`TransformFeedback`) - returns self to enable chaining
|
||||
|
||||
| `Transform Feedback primitiveMode | Compatible Draw Modes |
|
||||
| Transform Feedback primitiveMode | Compatible Draw Modes |
|
||||
| --- | --- |
|
||||
| `GL.POINTS` | `GL.POINTS` |
|
||||
| `GL.LINES` | `GL.LINES`, `GL.LINE_LOOP`, `GL.LINE_STRIP` |
|
||||
@ -168,6 +173,8 @@ None
|
||||
|
||||
* All of the indexed `GL.TRANSFORM_FEEDBACK_BUFFER` bindings. So all calls to `Buffer.bindBase` or `Buffer.bindRange` with `{target: GL.TRANSFORM_FEEDBACK_BUFFER, ...}` will attach the given region of the buffer to the currently bound feedback object.
|
||||
* Whether the transform feedback is active and/or paused.
|
||||
* About `TransformFeedback` activation caveats
|
||||
* When activated, `TransformFeedback` are coupled to the "current" `Program`
|
||||
|
||||
About `TransformFeedback` activation caveats
|
||||
|
||||
* When activated, `TransformFeedback` are coupled to the "current" `Program`
|
||||
* Note that a started and unpaused TransformFeedback prevents the app from changing or re-linking the current program. So for instance, `Program.use` (`gl.useProgram`) cannot be called.
|
||||
|
||||
@ -6,7 +6,8 @@ A helper class that lets the application describe the contents of a uniform bloc
|
||||
## Usage
|
||||
|
||||
Create a `UniformBufferLayout` that matches the uniform block declaration in your shader
|
||||
```
|
||||
|
||||
```js
|
||||
#version 300 es
|
||||
layout (std140) uniform matrix {
|
||||
mat4 mvp;
|
||||
@ -20,6 +21,7 @@ const matrixBlockLayout = new UniformBufferLayout({
|
||||
```
|
||||
|
||||
Setting values on a `UniformBufferLayout`:
|
||||
|
||||
```js
|
||||
.setValues({
|
||||
mvp: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
|
||||
@ -27,12 +29,14 @@ Setting values on a `UniformBufferLayout`:
|
||||
```
|
||||
|
||||
Creating a uniform buffer to hold the data required by the layout
|
||||
|
||||
```js
|
||||
const layout = new UniformBufferLayout({...});
|
||||
const buffer = new Buffer(gl, {size: layout.getBytes()});
|
||||
```
|
||||
|
||||
Updating your actual uniform buffer
|
||||
|
||||
```js
|
||||
const layout = ...
|
||||
layout.setValues({...})
|
||||
@ -40,12 +44,14 @@ buffer.setData({data: layout.getData()})
|
||||
```
|
||||
|
||||
Updating a minimal part of the actual uniform buffer
|
||||
|
||||
```js
|
||||
const {data, offset} = layout.getSubData();
|
||||
buffer.setData({data, offset})
|
||||
```
|
||||
|
||||
Binding your uniform buffer
|
||||
|
||||
```js
|
||||
TBA
|
||||
```
|
||||
|
||||
@ -21,9 +21,10 @@ When installed from npm, luma.gl and related libraries come with three separate
|
||||
| `dist/es6` | `esnext` | This distribution uses `babel-preset-env` and with very few exceptions essentially untranspiled ES6/ES2015 code. This is the smallest distribution, that will three-shake best, and is intended to be the best choice if you are only targeting "evergreen" browsers. |
|
||||
|
||||
You will have to check the documentation of your particular bundler to see what configuration options are available:
|
||||
|
||||
* Webpack 4 allows you to choose the `esnext` distribution by specifying a `resolve.mainFields` array.
|
||||
* Webpack 2 and later will pick `module` main field over `main` if it is available
|
||||
For other bundlers, please refer to the respective documentation
|
||||
* For other bundlers, please refer to the respective documentation
|
||||
|
||||
|
||||
### About Tree-Shaking
|
||||
@ -31,6 +32,7 @@ For other bundlers, please refer to the respective documentation
|
||||
luma.gl was designed from the start to leverage tree-shaking. This technique has been talked about for quite some time but has been slow in actually providing the expected benefits. With the combination of webpack 4 and babel 7 we are finally starting to see significant results, so you may want to experiment with upgrading your bundler if you are not getting results.
|
||||
|
||||
Note that tree-shaking still has limitations:
|
||||
|
||||
* At least in webpack, tree shaking is done by the uglifierm, which is typically only run on production builds, so it is typically not possible to assess the benefits of tree shaking during development. In addition, this makes it even harder to make statements about bundle size impact from looking at bundle sizes in development builds. The recommendation is to always measure impact on your final production builds.
|
||||
* Static dependency analyzers err on the side of safety and will still include any symbol it is not sure will never be used.
|
||||
* This is compounded by the fact that there are side effects in various language feature that complicate or defeat current static dependency analysis techniques, causing "dead code" to still be bundled. The good news is that the analyzers are getting better.
|
||||
@ -48,10 +50,9 @@ So, what bundle size impact should you expect? When do you know if you have set
|
||||
| ES5 | 388 KB (88 KB) | 392 KB (88 KB) | Transpiled to ES5, no tree-shaking |
|
||||
|
||||
Notes:
|
||||
* Numbers represent the minified bundle size of a minimal application, bundled with Webpack 4, which means that the ES76 and ESM numbers benefit from tree shaking.
|
||||
* Numbers represent the minified bundle size of a minimal application, bundled with Webpack 4, which means that the `ES6` and ESM numbers benefit from tree shaking.
|
||||
* The number in parenthesis are the compressed bundle sizes. This is an indication of the how much extra size will be added to your compressed app bundle if you import luma.gl.
|
||||
* For the ES6 and ESM dists, using more luma.gl classes and features will increase the size, as less code can be removed by tree-shaking.
|
||||
|
||||
* For the ES6 and ESM dists, apps that use more luma.gl classes and features will see an increase in bundle size.
|
||||
|
||||
### Future Work
|
||||
|
||||
|
||||
@ -6,10 +6,11 @@ luma.gl has a number of provisions for debugging designed to help you save time
|
||||
## Seer Integration
|
||||
|
||||
luma.gl is integrated with the [`seer`](https://chrome.google.com/webstore/detail/seer/eogckabefmgphfgngjdmmlfbddmonfdh) Chrome extension, giving you a powerful tool for viewing and inspecting luma.gl state at runtime when developing in Chrome. Installing the extension gives you a new tab in the developer tools where you can:
|
||||
|
||||
* See list of created `Models`
|
||||
* Inspect values of uniforms and vertex attributes
|
||||
* See GPU render timings for each model
|
||||
and much more.
|
||||
* and much more.
|
||||
|
||||
|
||||
## id strings
|
||||
@ -50,10 +51,12 @@ luma.gl is pre-integrated with the Khronos group's WebGL debug tools (the [WebGL
|
||||
The `WebGLDeveloperTools` are automatically installed when luma.gl is installed, but are not actually bundled into the application unless explicitly imported. This avoids impacting the size of production bundles built on luma.gl that typically do not need debug support.
|
||||
|
||||
To use debug support, first import the debug tools, then call `getDebugContext` to create a debug contexts from a normal WebGL context:
|
||||
|
||||
```js
|
||||
import "luma.gl/debug";
|
||||
const gl = getDebugContext(gl);
|
||||
```
|
||||
|
||||
If the debug tools haven't been imported, `getDebugContext` will print a warning and simply return the original context, so the debug code can be left in the applicatin even when debug support is not imported.
|
||||
|
||||
When the `luma.log.debug` flag is set, a debug contexts does the following:
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
Welcome to luma.gl!
|
||||
|
||||
This section has information about:
|
||||
|
||||
* how to install luma.gl
|
||||
* how to run, copy, and modify the many luma.gl examples
|
||||
* How to use luma.gl with other frameworks in different environments.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Installation
|
||||
|
||||
Use npm or yarn to install luma.gl:
|
||||
To use luma.gl in an application, use npm or yarn to install luma.gl
|
||||
|
||||
using yarn:
|
||||
```
|
||||
@ -15,13 +15,14 @@ npm install --save luma.gl
|
||||
|
||||
## Testing using the Website
|
||||
|
||||
Go to the website directory and run `yarn start` or `npm start` to run the test server, it will open a web page from which you can access live examples and lessons. It automatically updates when you save modified source files.
|
||||
To build and make changes to luma.gl itself, go to the `website` directory and run `yarn start` or `npm start` to run the test server, it will open a web page from which you can access live examples and lessons. It automatically updates when you save modified source files.
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
Testing is performed on Travis CI and using a precommit hook. Local testing is supported on three environments
|
||||
* `npm test` - runs `npm run test-headless`
|
||||
Testing is performed on Travis CI and using a precommit hook. Local testing is supported on these environments:
|
||||
|
||||
* `npm test` - runs tests under node using headless gl
|
||||
* `npm run test-browser` - Tests in your browser, may be helpful to quickly debug test case failures since it autoreloads on changes and gives you full access to your browser's debugger.
|
||||
|
||||
When adding new features, or modifying existing ones, carefully consider if unit testing can be provided.
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
luma.gl is integrated with [headless-gl](https://www.npmjs.com/package/gl) and dynamically attempts to load it when running under Node.js. If `gl` is installed and properly configured on your system (`gl` can often autodetect your configuration), you should be able to run luma.gl in Node.js from the console, even on machines that do not have GPUs.
|
||||
|
||||
As of v5.2, no special imports are needed.
|
||||
|
||||
```js
|
||||
import 'luma.gl';
|
||||
import {createGLContext, Model, ...} from 'luma.gl';
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
[Debugging](/#/documentation/get-started/debugging): The Khronos group's `WebGLDeveloperTools` are automatically installed when luma.gl is installed, but are not actually bundled into the application unless explicitly imported. This avoids impacting the size of production bundles built on luma.gl that typically do not need debug support.
|
||||
|
||||
To use debug support, first import the debug tools, then call `getDebugContext` to create a debug contexts from a normal WebGL context:
|
||||
|
||||
```js
|
||||
import "luma.gl/debug";
|
||||
const gl = getDebugContext(gl);
|
||||
@ -29,7 +30,7 @@ Before upgrading to v5, it is highly recommended to run your application using l
|
||||
|
||||
The `Model` constructor expects a gl context as the first argument.
|
||||
|
||||
```
|
||||
```js
|
||||
// v5
|
||||
Model(gl)
|
||||
Model(gl, {...opts});
|
||||
@ -38,7 +39,7 @@ The `Model` constructor expects a gl context as the first argument.
|
||||
|
||||
Following style construction was deprecated in v4 and is now removed in v5.
|
||||
|
||||
```
|
||||
```js
|
||||
// NOT SUPPORTED
|
||||
Model({gl});
|
||||
Model({gl, ...opts});
|
||||
@ -53,7 +54,7 @@ Following style construction was deprecated in v4 and is now removed in v5.
|
||||
|
||||
`Geometry` class construction with inline attributes was deprecated in v4 and now removed in v5.
|
||||
|
||||
```
|
||||
```js
|
||||
// NOT SUPPORTED
|
||||
new Geometry({
|
||||
positions: new Float32Array([ ... ]),
|
||||
@ -66,7 +67,7 @@ new Geometry({
|
||||
|
||||
All attributes should be grouped inside `attribute` object.
|
||||
|
||||
```
|
||||
```js
|
||||
// SUPPORTED
|
||||
new Geometry({
|
||||
attributes: {
|
||||
@ -141,7 +142,7 @@ Some classes and functions have been deprecated in luma.gl v4. They will continu
|
||||
|
||||
The `Model` constructor now expects a gl context as the first argument.
|
||||
|
||||
```
|
||||
```js
|
||||
// v3
|
||||
Model({gl});
|
||||
Model({gl, ...opts});
|
||||
|
||||
@ -3,12 +3,9 @@
|
||||
In addition to these notes, always check the [Upgrade Guide](/#/documentation/upgrade-guide) when considering adopting a new release.
|
||||
|
||||
|
||||
|
||||
## Version 5.2
|
||||
|
||||
**IN DEVELOPMENT**
|
||||
|
||||
Date: Target April, 2018
|
||||
Date: Target April, 2018 **IN DEVELOPMENT**
|
||||
|
||||
|
||||
## Transform class (New, WebGL2) (Experimental)
|
||||
@ -118,7 +115,8 @@ A major release that brings full WebGL2 support to luma.gl, as well as adding su
|
||||
|
||||
### Full WebGL2 Support
|
||||
|
||||
luma.gl now exposes the complete WebGL2 APIs
|
||||
luma.gl now exposes the complete WebGL2 APIs:
|
||||
|
||||
* New classes expose all the new WebGL2 objects ([`Query`](/#/documentation/api-reference/query), [`Sampler`](/#/documentation/api-reference/sampler), [`Texture2DArray`](/#/documentation/api-reference/texture-2-array), [`Texture3D`](/#/documentation/api-reference/texture-3d), and [`TransformFeedback`](/#/documentation/api-reference/transform-feedback)), together with a new [`UniformBufferLayout`](/#/documentation/api-reference/uniform-buffer-layout) helper class to make uniform buffers easy to use.
|
||||
* Other existing WebGL classes with new functionalites under WebGL2 have been updated.
|
||||
* Add new WebGL2 texture formats and types support, including floating point textures, and multiple render targets.
|
||||
@ -131,7 +129,8 @@ luma.gl provides a single unified WebGL2-style API across WebGL2, WebGL1 and Web
|
||||
|
||||
### WebGL State Management
|
||||
|
||||
In this version, a new WebGL state management is implemented to help address one of the weak spots of the state-machine based WebGL API
|
||||
In this version, a new WebGL state management is implemented to help address one of the weak spots of the stateful WebGL API:
|
||||
|
||||
* luma.gl can track certain WebGL context state changes so the app could easily set and reset WebGL states for certain operations.
|
||||
* luma.gl also has a host-side WebGL state caching system that records certain WebGL states so that expansive queries into the GPU or underlying OpenGL driver won't be necessary.
|
||||
|
||||
@ -166,61 +165,69 @@ A smaller release mainly intended to align the luma.gl code base with the big de
|
||||
## Major News
|
||||
|
||||
### Examples
|
||||
|
||||
* Examples converted to ES6 to better showcase the luma.gl API.
|
||||
|
||||
|
||||
## Debug Support
|
||||
- Now uses `WEBGL_debug_shaders` extension when available to log translated shader source code.
|
||||
- Performance queries, using `EXT_disjoint_timer_query` and `EXT_disjoint_timer_query_webgl2` to provide timings.
|
||||
|
||||
* Now uses `WEBGL_debug_shaders` extension when available to log translated shader source code.
|
||||
* Performance queries, using `EXT_disjoint_timer_query` and `EXT_disjoint_timer_query_webgl2` to provide timings.
|
||||
|
||||
|
||||
## New `AnimationFrame` class
|
||||
- Wraps requestAnimationFrame on browser and Node.js
|
||||
- Supports initialization promises (wait for HTML body (canvas) to load, wait for texture images to load, etc).
|
||||
- Supplies common uniforms to the frame render function: `width`, `height`, `aspect`, `tick`, `time` etc.
|
||||
|
||||
* Wraps requestAnimationFrame on browser and Node.js
|
||||
* Supports initialization promises (wait for HTML body (canvas) to load, wait for texture images to load, etc).
|
||||
* Supplies common uniforms to the frame render function: `width`, `height`, `aspect`, `tick`, `time` etc.
|
||||
|
||||
|
||||
## Smaller changes
|
||||
- Fix glTypeToArray to use `Uint8ClampedArrays` by default
|
||||
- Add CORS setting to allow loading image from a different domain
|
||||
|
||||
* Fix glTypeToArray to use `Uint8ClampedArrays` by default
|
||||
* Add CORS setting to allow loading image from a different domain
|
||||
|
||||
## New `gl-matrix` based math library
|
||||
- Optional library: All math operations directly accept JavaScript arrays
|
||||
- Math classes are subclasses of JavaScript arrays (i.e. not {x,y,z} objects)
|
||||
|
||||
* Optional library: All math operations directly accept JavaScript arrays
|
||||
* Math classes are subclasses of JavaScript arrays (i.e. not {x,y,z} objects)
|
||||
and can thus be used interchangeably with arrays.
|
||||
- Relies on `gl-matrix` for computations.
|
||||
- Adds optional error checking.
|
||||
- Offers more control over details like printing precision etc.
|
||||
* Relies on `gl-matrix` for computations.
|
||||
* Adds optional error checking.
|
||||
* Offers more control over details like printing precision etc.
|
||||
|
||||
### Library Size
|
||||
|
||||
* Reorganized to only export a minimal surface of functions/classes.
|
||||
* Tree-shaking support (package.json module keyword and dist-es6 distribution)
|
||||
* Significant reduction of module dependencies.
|
||||
|
||||
### Experimental Additiona
|
||||
- `shader-modules`, `shader-tools`, `shaders` shader module system added to `/experimental`
|
||||
- `probe` moved to `/experimental`
|
||||
### Experimental APIs
|
||||
|
||||
* `shader-modules`, `shader-tools`, `shaders` shader module system added to `/experimental`
|
||||
* `probe` moved to `/experimental`
|
||||
|
||||
### Deprecations/Deletions
|
||||
- Old math lib deprecated.
|
||||
- `FBO` class deprecated (use `Framebuffer` directly).
|
||||
- `Camera` class deprecated, use math library directly.
|
||||
- `Scene` class deprecated, for effects use - TBD
|
||||
|
||||
* Old math lib deprecated.
|
||||
* `FBO` class deprecated (use `Framebuffer` directly).
|
||||
* `Camera` class deprecated, use math library directly.
|
||||
* `Scene` class deprecated, for effects use - TBD
|
||||
|
||||
### Internal improvements
|
||||
- Replace wildcard exports with named exports in index.js
|
||||
- ES6 Conformant code base: stage-2 extensions removed
|
||||
- Webpack based build
|
||||
- Multiple examples now work standalone
|
||||
- Experimental tree-shaking support: dist and dist-es6 directories
|
||||
- Dependency removal, including removal of `autobind-decorator` dependency
|
||||
- Changed precommit hook from `husky` to `pre-commit`
|
||||
- `webgl` folder now contains both webgl1 and webgl2 classes
|
||||
|
||||
* Replace wildcard exports with named exports in index.js
|
||||
* ES6 Conformant code base: stage-2 extensions removed
|
||||
* Webpack based build
|
||||
* Multiple examples now work standalone
|
||||
* Experimental tree-shaking support: dist and dist-es6 directories
|
||||
* Dependency removal, including removal of `autobind-decorator` dependency
|
||||
* Changed precommit hook from `husky` to `pre-commit`
|
||||
* `webgl` folder now contains both webgl1 and webgl2 classes
|
||||
|
||||
### Breaking Changes
|
||||
- BREAKING CHANGE: Move node IO (loadImage etc) out of main src tree
|
||||
and into `packages`. This allows luma.gl to drop a number of big dependencies.
|
||||
The node IO code may be published as a separate module later.
|
||||
|
||||
* BREAKING CHANGE: Move node IO (loadImage etc) out of main src tree and into `packages`. This allows luma.gl to drop a number of big dependencies. The node IO code may be published as a separate module later.
|
||||
|
||||
|
||||
## v2.0
|
||||
@ -231,71 +238,81 @@ Theme: A bigger official release, a major API refactoring that introduced the We
|
||||
|
||||
## Major Features
|
||||
|
||||
- CHANGE: Removes glslify as a dependency, apps that depend on glslify must add it to their own package.json.
|
||||
* CHANGE: Removes glslify as a dependency, apps that depend on glslify must add it to their own package.json.
|
||||
|
||||
### TimerQuery
|
||||
- Support EXT_disjoint_timer_query.
|
||||
|
||||
* Support EXT_disjoint_timer_query.
|
||||
|
||||
## Debug Support
|
||||
- Built-in attribute/uniform logging
|
||||
- GLSL shader compiler error handling
|
||||
|
||||
* Built-in attribute/uniform logging
|
||||
* GLSL shader compiler error handling
|
||||
|
||||
### Linux support
|
||||
- Add missing call to getAttribLocation.
|
||||
|
||||
### Introduce new gl-matrix based math library.
|
||||
- Move old math lib to deprecated folder.
|
||||
- Move FBO to deprecated folder.
|
||||
- Examples converted to ES6. AnimationFrame class updates.
|
||||
- Add back persistence example
|
||||
- WebGL type and constant cleanup
|
||||
- Fix glTypeToArray and use clamped arrays by default
|
||||
* Add missing call to getAttribLocation.
|
||||
|
||||
### New gl-matrix based math classes
|
||||
|
||||
* Move old math lib to deprecated folder.
|
||||
* Move FBO to deprecated folder.
|
||||
* Examples converted to ES6. AnimationFrame class updates.
|
||||
* Add back persistence example
|
||||
* WebGL type and constant cleanup
|
||||
* Fix glTypeToArray and use clamped arrays by default
|
||||
|
||||
### TimerQuery, WebGL Extension doc, fix crash on Travis CI
|
||||
- Support EXT_disjoint_timer_query
|
||||
- Document luma.gl use of WebGL extensions.
|
||||
- Fix: context creation crash when WEBGL_debug_info extension was undefined
|
||||
|
||||
* Support EXT_disjoint_timer_query
|
||||
* Document luma.gl use of WebGL extensions.
|
||||
* Fix: context creation crash when WEBGL_debug_info extension was undefined
|
||||
|
||||
### Debug log improvements, import fix
|
||||
- Debug logs now print unused attributes more compactly, number formatting
|
||||
improved.
|
||||
|
||||
* Debug logs now print unused attributes more compactly, number formatting improved.
|
||||
|
||||
### Add ability to import luma without io
|
||||
- import "luma.gl/luma" will import luma without io functions
|
||||
- import "luma.gl/io" will import luma io functions only
|
||||
- omitting io functions significantly reduces dependencies
|
||||
- Makes the luma object available in console for debugging.
|
||||
- Some polish on luma's built-in attribute/uniform logging
|
||||
|
||||
* import "luma.gl/luma" will import luma without io functions
|
||||
* import "luma.gl/io" will import luma io functions only
|
||||
* omitting io functions significantly reduces dependencies
|
||||
* Makes the luma object available in console for debugging.
|
||||
* Some polish on luma's built-in attribute/uniform logging
|
||||
|
||||
### Node.js/AttributeManager/Renderer/Program.render()/Examples
|
||||
- Ensure luma.gl does not fail under node until createGLContext is called.
|
||||
- Program.render() now takes a map of uniforms, reducing need to "set" uniforms before render.
|
||||
- New experimental Renderer class - `requestAnimationFrame` replacement.
|
||||
- Improvement/fixes to examples
|
||||
|
||||
* Ensure luma.gl does not fail under node until createGLContext is called.
|
||||
* Program.render() now takes a map of uniforms, reducing need to "set" uniforms before render.
|
||||
* New experimental Renderer class - `requestAnimationFrame` replacement.
|
||||
* Improvement/fixes to examples
|
||||
|
||||
### Node.js support
|
||||
- Ensure luma.gl does not fail under node until createGLContext is called.
|
||||
|
||||
* Ensure luma.gl does not fail under node until createGLContext is called.
|
||||
|
||||
### luma global initialization
|
||||
- Makes the luma object available in console for debugging.
|
||||
- Makes optional headless support more reliable.
|
||||
|
||||
* Makes the luma object available in console for debugging.
|
||||
* Makes optional headless support more reliable.
|
||||
|
||||
### Headless support
|
||||
- Removed `gl` (headless-gl) dependency, to simplify build and setup for applications that don't use headless-gl.
|
||||
- `import 'luma.gl/headless'` and `npm install gl` to get headless integration.
|
||||
|
||||
* Removed `gl` (headless-gl) dependency, to simplify build and setup for applications that don't use headless-gl.
|
||||
* `import 'luma.gl/headless'` and `npm install gl` to get headless integration.
|
||||
|
||||
### Improve change detection
|
||||
- Redraw flag management improvements
|
||||
|
||||
* Redraw flag management improvements
|
||||
|
||||
### Decoupled headless-gl dependency
|
||||
- It is now necessary to import luma.gl through `luma.gl/headless` to get
|
||||
headless integration. When using the basic `luma.gl` import, the app no longer needs to
|
||||
have `gl` as a dependency. This should simplify build and setup for applications that don't use headless-gl.
|
||||
|
||||
* It is now necessary to import luma.gl through `luma.gl/headless` to get headless integration. When using the basic `luma.gl` import, the app no longer needs to have `gl` as a dependency. This should simplify build and setup for applications that don't use headless-gl.
|
||||
|
||||
### Improve change detection
|
||||
- Redraw flag management improvements
|
||||
- New experimental Renderer class - `requestAnimationFrame` replacement.
|
||||
|
||||
* Redraw flag management improvements
|
||||
* New experimental Renderer class - `requestAnimationFrame` replacement.
|
||||
|
||||
|
||||
## v1.0
|
||||
@ -305,4 +322,5 @@ Release Date: 2016
|
||||
Theme: A smaller, mostly internal version that was the starting point for luma.gl development.
|
||||
|
||||
### Major Features
|
||||
|
||||
* Initial ES6 Port from PhiloGL
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
"headless.js"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "cat < docs/get-started/examples.md",
|
||||
"start": "echo 'Please see luma.gl website for how to run examples' && open http://uber.github.io/luma.gl/#/documentation/getting-started/examples",
|
||||
"clean": "rm -fr dist dist-es6 && mkdir -p dist/es5/packages dist/esm/packages dist/es6/packages",
|
||||
"build-es6": "BABEL_ENV=es6 babel src --out-dir dist/es6 --source-maps && BABEL_ENV=es6 babel packages --out-dir dist/es6/packages --source-maps",
|
||||
"build-esm": "BABEL_ENV=esm babel src --out-dir dist/esm --source-maps && BABEL_ENV=esm babel packages --out-dir dist/esm/packages --source-maps",
|
||||
@ -85,6 +85,7 @@
|
||||
"eslint-plugin-babel": "^4.0.0",
|
||||
"gl": "^4.0.2",
|
||||
"html-webpack-plugin": "^3.0.7",
|
||||
"markdownlint-cli": "^0.8.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"module-alias": "^2.0.0",
|
||||
"nyc": "^10.2.0",
|
||||
|
||||
11
scripts/lint-markdown.sh
Executable file
11
scripts/lint-markdown.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Script to check code styles
|
||||
|
||||
set -e
|
||||
|
||||
# https://serverfault.com/questions/59262/bash-print-stderr-in-red-color
|
||||
color() {
|
||||
(set -o pipefail;"$@" 2>&1>&3|sed -E $'s,^.*.md,\e[33m&\e[m,'|sed -E $'s,MD[a-zA-Z0-9/\\-]+,\e[31m&\e[m,'|sed -E $'s,\\[Context: .*\\],\e[90m&\e[m,'>&2)3>&1
|
||||
}
|
||||
|
||||
color npx markdownlint docs
|
||||
87
yarn.lock
87
yarn.lock
@ -2389,6 +2389,12 @@ commander@~2.13.0:
|
||||
version "2.13.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||
|
||||
commander@~2.9.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||
dependencies:
|
||||
graceful-readlink ">= 1.0.0"
|
||||
|
||||
commondir@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
|
||||
@ -2688,7 +2694,7 @@ deep-equal@^1.0.1, deep-equal@~1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
|
||||
|
||||
deep-extend@^0.4.0, deep-extend@~0.4.0:
|
||||
deep-extend@^0.4.0, deep-extend@~0.4.0, deep-extend@~0.4.1:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
|
||||
|
||||
@ -3673,6 +3679,10 @@ get-stdin@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
|
||||
|
||||
get-stdin@~5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
|
||||
|
||||
get-stream@3.0.0, get-stream@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
@ -3781,6 +3791,17 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, gl
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@~7.0.3:
|
||||
version "7.0.6"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.2"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
global-modules@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
|
||||
@ -3886,6 +3907,10 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||
|
||||
"graceful-readlink@>= 1.0.0":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
|
||||
|
||||
grouped-queue@^0.3.3:
|
||||
version "0.3.3"
|
||||
resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c"
|
||||
@ -4934,6 +4959,12 @@ lexical-scope@^1.2.0:
|
||||
dependencies:
|
||||
astw "^2.0.0"
|
||||
|
||||
linkify-it@^2.0.0:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f"
|
||||
dependencies:
|
||||
uc.micro "^1.0.1"
|
||||
|
||||
listr-silent-renderer@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e"
|
||||
@ -5042,6 +5073,14 @@ lodash.assign@^4.0.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
|
||||
|
||||
lodash.differencewith@~4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.differencewith/-/lodash.differencewith-4.5.0.tgz#bafafbc918b55154e179176a00bb0aefaac854b7"
|
||||
|
||||
lodash.flatten@~4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
|
||||
|
||||
lodash.get@^4.4.2:
|
||||
version "4.4.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||
@ -5163,6 +5202,35 @@ map-visit@^1.0.0:
|
||||
dependencies:
|
||||
object-visit "^1.0.0"
|
||||
|
||||
markdown-it@8.4.1:
|
||||
version "8.4.1"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44"
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
entities "~1.1.1"
|
||||
linkify-it "^2.0.0"
|
||||
mdurl "^1.0.1"
|
||||
uc.micro "^1.0.5"
|
||||
|
||||
markdownlint-cli@^0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.8.1.tgz#b5644bdc52635827097ac1829b4be54d9c94637c"
|
||||
dependencies:
|
||||
commander "~2.9.0"
|
||||
deep-extend "~0.4.1"
|
||||
get-stdin "~5.0.1"
|
||||
glob "~7.0.3"
|
||||
lodash.differencewith "~4.5.0"
|
||||
lodash.flatten "~4.4.0"
|
||||
markdownlint "~0.8.1"
|
||||
rc "~1.1.6"
|
||||
|
||||
markdownlint@~0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.8.1.tgz#a87572ccc84273b2a723205e65fa657437fe06c6"
|
||||
dependencies:
|
||||
markdown-it "8.4.1"
|
||||
|
||||
math.gl@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/math.gl/-/math.gl-1.1.0.tgz#2cd4758051441151eefa2c8664f16c189d9b6747"
|
||||
@ -5191,6 +5259,10 @@ md5.js@^1.3.4:
|
||||
hash-base "^3.0.0"
|
||||
inherits "^2.0.1"
|
||||
|
||||
mdurl@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
|
||||
|
||||
media-typer@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
@ -6402,6 +6474,15 @@ rc@^1.1.6, rc@^1.1.7:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
rc@~1.1.6:
|
||||
version "1.1.7"
|
||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea"
|
||||
dependencies:
|
||||
deep-extend "~0.4.0"
|
||||
ini "~1.3.0"
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
read-chunk@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-2.1.0.tgz#6a04c0928005ed9d42e1a6ac5600e19cbc7ff655"
|
||||
@ -7780,6 +7861,10 @@ typedarray@^0.0.6, typedarray@~0.0.5:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
|
||||
|
||||
uglify-es@^3.3.4:
|
||||
version "3.3.9"
|
||||
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user