@bimdata/engine-2d
v0.0.21
Published
Draw shapes and texts using webgl2
Keywords
Readme
DEV
For development, just serve the index.js root file.
GLSL syntax highlighting
To Add GLSL syntax highlighting for JavaScript template literals, use the VSCode extension: glsl-literal
Unit testing
VSCode Vitest extension is highly recommended.
npm run testTypes
npm run typesRoadmap
LOW PRIORITY TODOs
- [ ] move/translate/rotate/scale methods on dynamic entity
- [ ] tests
- [ ] fill holes
- [ ] b2d binary format
- [ ] compressed textures
DONE
[x] cleaner SVG parser (the current one is the previous 2d-engine version + adapter) https://github.com/bimdata/engine-2d/pull/43
[x] Better Inputs API (handle "click" and picking) https://github.com/bimdata/engine-2d/pull/42
[x] select and highlight rendering logic rework https://github.com/bimdata/engine-2d/pull/41
[x] renderer offset or model/entity origin to handle full f64 precision for point coordinate https://github.com/bimdata/engine-2d/pull/40 + FIX
[x] touch controller https://github.com/bimdata/engine-2d/pull/39
[x] groups (entity.group and max texture units exceeded) PART 1 https://github.com/bimdata/engine-2d/pull/35 PART 2 https://github.com/bimdata/engine-2d/pull/37
[x] texts https://github.com/bimdata/engine-2d/pull/29
[x] TypedArrays in Builder.js https://github.com/bimdata/engine-2d/pull/28
[x] remove de-instancing feature if not useful https://github.com/bimdata/engine-2d/pull/27
[x] dash rework https://github.com/bimdata/engine-2d/pull/26
[x] snap picking (edge + vertex) https://github.com/bimdata/engine-2d/pull/14
[x] shape attribute change => scene redraw + proper resource cleaning --- hard update https://github.com/bimdata/engine-2d/pull/18
[x] better picking API https://github.com/bimdata/engine-2d/pull/19
[x] camera fit view https://github.com/bimdata/engine-2d/pull/23
[x] packed color https://github.com/bimdata/engine-2d/pull/3
[x] picking https://github.com/bimdata/engine-2d/pull/6
[x] entity flags update (performant batch update + tint for selected or highlighted entities & need redraw) - soft update https://github.com/bimdata/engine-2d/pull/4
[x] render target resize = redraw (cache projection matrix) https://github.com/bimdata/engine-2d/pull/13
[x] fill style texture https://github.com/bimdata/engine-2d/pull/12
[x] line style dash array + dash offset https://github.com/bimdata/engine-2d/pull/7
[x] properly manage WebGL integer buffer & texture precision https://github.com/bimdata/pixi-lines/pull/2
[x] auto generated types d.ts https://github.com/bimdata/engine-2d/pull/4
[ ] compositing with canvas2D for texts https://css-tricks.com/techniques-for-rendering-text-with-webgl/ Replaced by simple "texts"
[ ] model entities sorting by z-index last added object drawn last
[ ] picking margin & picking z-index https://github.com/bimdata/engine-2d/pull/11
Core
Main Buffers
Indexes
They are point indices read by four. The "reading window" (represented by the "|- - - -|" symbol) comes forward of one index for the subsequent segment. Zero means a cap. -(index) is for closed path.
