├── .eslintrc.js ├── .gitignore ├── 3d-basic ├── cube.html └── cylinder.html ├── 3d-camera ├── cylinder-clip.html ├── cylinder-ortho.html ├── cylinder-perspective.html ├── cylinder.html └── ogl-basic.html ├── 3d-model ├── axis-angle.html └── euler-angle.html ├── LICENSE ├── README.md ├── animate ├── animate_delta.html ├── animate_time.html ├── animator.html ├── frame_animate.html ├── lerp-bezier-css.html ├── lerp-bezier.html └── lerp.html ├── animate_webgl ├── bezier_easing.html ├── cellular-animation.html ├── fragment_rotation_animator.html ├── fragment_rotation_animator2.html ├── frame_animate.html ├── lerp.html ├── lerp_easing.html ├── particle.html ├── vertex_move_animator.html ├── vertex_move_easing.html ├── vertex_rotation.html └── vertex_rotation_animator.html ├── assets ├── airplane.jpg ├── airplane.json ├── github_contributions_akira-cn.json ├── normal_map.png ├── normal_plane.jpg ├── rock.jpg ├── rock_normal.jpg └── rounded-cube.json ├── bezier ├── app.js ├── app2.js ├── cubic.html └── quadratic.html ├── canvas ├── basic │ └── index.html ├── hierarchy │ ├── app.js │ └── index.html └── test.html ├── color-hints ├── app-cubehelix.js ├── app-hsl-problem.js ├── app-hsl.js ├── app-lab.js ├── app-rgb.js ├── color-cubehelix.html ├── color-hints-hsl.html ├── color-hints-rgb.html ├── color-hsl-problem.html └── color-lab.html ├── common └── lib │ ├── animator │ ├── index.js │ └── timing.js │ ├── color │ └── cubehelix │ │ ├── index.js │ │ └── matrix.js │ ├── dat.gui.js │ ├── earcut.js │ ├── gl-renderer.js │ ├── math │ ├── Color.js │ ├── Euler.js │ ├── Mat3.js │ ├── Mat4.js │ ├── Quat.js │ ├── README.md │ ├── Vec2.js │ ├── Vec3.js │ ├── Vec4.js │ └── functions │ │ ├── ColorFunc.js │ │ ├── EulerFunc.js │ │ ├── Mat3Func.js │ │ ├── Mat4Func.js │ │ ├── QuatFunc.js │ │ ├── Vec2Func.js │ │ ├── Vec3Func.js │ │ └── Vec4Func.js │ ├── ogl │ ├── core │ │ ├── Camera.js │ │ ├── Geometry.js │ │ ├── Mesh.js │ │ ├── Program.js │ │ ├── RenderTarget.js │ │ ├── Renderer.js │ │ ├── Texture.js │ │ └── Transform.js │ ├── extras │ │ ├── Animation.js │ │ ├── Box.js │ │ ├── Curve.js │ │ ├── Cylinder.js │ │ ├── Flowmap.js │ │ ├── GLTFAnimation.js │ │ ├── GLTFLoader.js │ │ ├── GLTFSkin.js │ │ ├── GPGPU.js │ │ ├── KTXTexture.js │ │ ├── NormalProgram.js │ │ ├── Orbit.js │ │ ├── Plane.js │ │ ├── Polyline.js │ │ ├── Post.js │ │ ├── Raycast.js │ │ ├── Shadow.js │ │ ├── Skin.js │ │ ├── Sphere.js │ │ ├── Text.js │ │ ├── TextureLoader.js │ │ ├── Torus.js │ │ └── Triangle.js │ ├── index.mjs │ └── math │ │ ├── Color.js │ │ ├── Euler.js │ │ ├── Mat3.js │ │ ├── Mat4.js │ │ ├── Quat.js │ │ ├── Vec2.js │ │ ├── Vec3.js │ │ ├── Vec4.js │ │ └── functions │ │ ├── ColorFunc.js │ │ ├── EulerFunc.js │ │ ├── Mat3Func.js │ │ ├── Mat4Func.js │ │ ├── QuatFunc.js │ │ ├── Vec2Func.js │ │ ├── Vec3Func.js │ │ └── Vec4Func.js │ ├── parametric.js │ ├── phong.js │ └── vector2d.js ├── coordinates ├── app.js └── index.html ├── covid-vis ├── assets │ └── data │ │ ├── covid-data-unpressed.json │ │ ├── covid-data.json │ │ ├── t01cd3ca6de977c52a9.jpg │ │ ├── world-geojson.json │ │ ├── world-topojson.json │ │ └── world-uncompressed.json ├── covid-dynamic.html ├── covid-static.html ├── mercator-topojson.html └── mercator.html ├── d3-spritejs ├── bar-graph.html └── force.html ├── d3 ├── d3-dom.html └── d3-spritejs.html ├── data-graph-css ├── areagraph.html ├── bargraph.html ├── linegraph.html └── piegraph.html ├── data-graph-svg └── bargraph.html ├── data ├── park-people │ ├── charts.html │ ├── charts2.html │ ├── charts3.html │ ├── charts4.html │ ├── data.json │ ├── source.html │ └── spritejs.js ├── weather.zip └── weather │ ├── 2013-2018.csv │ ├── beijing_2014.csv │ ├── index1.html │ ├── index2.html │ ├── index3.html │ ├── index4.html │ ├── index5.html │ ├── index6.html │ └── index7.html ├── github-contributions └── index.html ├── gl-raffle ├── index.html └── lib │ ├── fragment.glsl │ ├── gl-renderer.js │ ├── members.js │ └── prizes.js ├── lights ├── ambient-light.html ├── directional-light.html ├── phong.html ├── point-light.html ├── specular.html └── spot-light.html ├── misc ├── path_intersection.html ├── path_intersection_record.html └── video.html ├── noise ├── basic.html ├── cellular-noise.html ├── clouds.html ├── gradient-noise.html ├── noise-lines.html ├── noise-sdf.html ├── noise-sky.html ├── noise2d.html └── simplex-noise.html ├── normal-maps ├── cube.html └── rock.html ├── package.json ├── parametric-polar ├── app.js └── index.html ├── parametric ├── app.js └── index.html ├── parametric2 ├── app.js └── index.html ├── pass ├── bloom.html ├── blur.html └── smoke.html ├── performance-basic ├── canvas-circles.html ├── ogl-circles.html └── svg-circles.html ├── performance-more ├── point-primitives-circle.html ├── point-primitives-rect.html ├── spots-batch.html ├── spots-normal.html └── spots-points-batch.html ├── performance-webgl ├── random-shapes-1.html ├── random-shapes-2.html ├── random-triangles-1.html ├── random-triangles-2.html └── random-triangles-3.html ├── performance_canvas ├── layers.html ├── random_shapes.html ├── random_shapes_cache.html ├── random_shapes_filter.html ├── random_shapes_filter_pass.html ├── random_shapes_optimized.html ├── random_shapes_path2d.html ├── random_shapes_worker.html └── random_shapes_worker.js ├── pixels-shader ├── combine.html ├── particle.html └── texture.html ├── pixels ├── assets │ ├── explode.jpg │ ├── girl1.jpg │ ├── girl2.jpg │ ├── girl3.jpg │ └── sunlight.png ├── index1.html ├── index2-2.html ├── index2-3.html ├── index2.html ├── index3.html ├── index4.html ├── index5.html ├── index6.html ├── index7.html └── lib │ ├── color-matrix.js │ ├── image-data.js │ ├── math.js │ └── util.js ├── polar-shader ├── bud.html ├── circle.html ├── clover.html ├── conic.html ├── hsvwheel.html ├── rose.html └── rose2.html ├── polygon-fill ├── app.js └── fill-canvas2d.html ├── polyline-curve ├── canvas2d.html ├── webgl-lines-extrude.html └── webgl-lines.html ├── qcharts ├── area.html ├── bar.html ├── basic.html ├── gauge.html ├── line-bar.html ├── line.html ├── pie.html ├── radar.html └── radial.html ├── repeat-and-random ├── grids.html ├── mandelbrot.html ├── maze.html ├── random.html └── random2.html ├── shaping-functions ├── basic.html ├── circle-repeat.html ├── circle.html ├── circle_particle.html ├── clip.html ├── line-mouse.html ├── line-repeat.html ├── line.html ├── lineseg-mouse.html ├── progress.html ├── triangle-repeat.html └── triangles.html ├── sketch ├── index1.html ├── index10.html ├── index2.html ├── index3.html ├── index4.html ├── index5.html ├── index6.html ├── index7.html ├── index8.html ├── index9.html └── lib │ └── doodle.js ├── svg ├── basic │ └── index.html └── hierarchy │ ├── app.js │ └── index.html ├── triangluations ├── app-collision.js ├── app.js ├── app2d.js ├── polygon2d-collision.html ├── polygon2d.html └── trianglu-polygon.html ├── vector_draw ├── app.js └── index.html ├── vector_tree ├── app.js └── index.html ├── vis-geo-earth ├── .babelrc ├── .demosrc.js ├── .eslintrc.js ├── README.md ├── demos │ ├── .demoList.json │ ├── basical │ │ ├── config.js │ │ └── index.js │ ├── beams │ │ ├── config.js │ │ └── index.js │ ├── camera │ │ ├── config.js │ │ └── index.js │ ├── curves │ │ ├── config.js │ │ └── index.js │ ├── globe │ │ ├── config.js │ │ └── index.js │ ├── index.html │ ├── markers │ │ ├── config.js │ │ └── index.js │ ├── missiles │ │ ├── config.js │ │ └── index.js │ ├── normalmap │ │ ├── config.js │ │ └── index.js │ └── style.css ├── dist │ ├── sprite-extend-3d.js │ ├── sprite-geo-earth.esm.js │ ├── sprite-geo-earth.js │ ├── sprite-geo-earth.min.js │ └── spritejs.js ├── docs │ ├── assets │ │ ├── css │ │ │ └── chunk-vendors.cbc1d7ee.chunk.css │ │ └── js │ │ │ ├── 0.9783eddd.chunk.js │ │ │ ├── 1.a4a3b37a.chunk.js │ │ │ ├── 10.44fd260e.chunk.js │ │ │ ├── 11.0302456c.chunk.js │ │ │ ├── 12.161e71f1.chunk.js │ │ │ ├── 13.56a12e9d.chunk.js │ │ │ ├── 14.f9d6b8f4.chunk.js │ │ │ ├── 15.19e14411.chunk.js │ │ │ ├── 16.b63b9b8d.chunk.js │ │ │ ├── 17.44c46fa2.chunk.js │ │ │ ├── 18.414032b6.chunk.js │ │ │ ├── 19.5715201d.chunk.js │ │ │ ├── 2.8c8886c1.chunk.js │ │ │ ├── 20.c3830c06.chunk.js │ │ │ ├── 21.0dc47427.chunk.js │ │ │ ├── 22.8aeb7dae.chunk.js │ │ │ ├── 23.086e08e0.chunk.js │ │ │ ├── 24.57abd3d7.chunk.js │ │ │ ├── 25.3dc71cba.chunk.js │ │ │ ├── 26.56fa9a57.chunk.js │ │ │ ├── 27.3e5605d9.chunk.js │ │ │ ├── 28.408703be.chunk.js │ │ │ ├── 29.54152f91.chunk.js │ │ │ ├── 30.b8ac2ad7.chunk.js │ │ │ ├── 31.176633d2.chunk.js │ │ │ ├── 32.f0c049fa.chunk.js │ │ │ ├── 33.c0d60149.chunk.js │ │ │ ├── 34.8fd02ac4.chunk.js │ │ │ ├── 35.6a800636.chunk.js │ │ │ ├── 36.a5b935b2.chunk.js │ │ │ ├── 37.4e6f467b.chunk.js │ │ │ ├── 38.2bc552fb.chunk.js │ │ │ ├── 39.f9c5c8de.chunk.js │ │ │ ├── 40.e3ed0fab.chunk.js │ │ │ ├── 41.f5f51c5b.chunk.js │ │ │ ├── 42.9787e556.chunk.js │ │ │ ├── 43.57c1cef6.chunk.js │ │ │ ├── 44.14c338c8.chunk.js │ │ │ ├── 45.eea48cf2.chunk.js │ │ │ ├── 46.ccb35aec.chunk.js │ │ │ ├── 47.3e0688d5.chunk.js │ │ │ ├── 48.db3055a6.chunk.js │ │ │ ├── 49.12cefa9a.chunk.js │ │ │ ├── 50.e05c1b7b.chunk.js │ │ │ ├── 51.29036b60.chunk.js │ │ │ ├── 52.f55e85d8.chunk.js │ │ │ ├── 52.f55e85d8.chunk.js.LICENSE.txt │ │ │ ├── 53.c75cb7a3.chunk.js │ │ │ ├── 54.8714cf50.chunk.js │ │ │ ├── 55.7c013f81.chunk.js │ │ │ ├── 56.babace81.chunk.js │ │ │ ├── 57.25f0137b.chunk.js │ │ │ ├── 58.2b159274.chunk.js │ │ │ ├── 59.ba438755.chunk.js │ │ │ ├── 6.1133d547.chunk.js │ │ │ ├── 60.b4ad5138.chunk.js │ │ │ ├── 61.81768298.chunk.js │ │ │ ├── 62.3060cd66.chunk.js │ │ │ ├── 63.f03c5e55.chunk.js │ │ │ ├── 64.a719b5e4.chunk.js │ │ │ ├── 65.1aee1248.chunk.js │ │ │ ├── 66.620980a9.chunk.js │ │ │ ├── 67.bcd515c8.chunk.js │ │ │ ├── 68.c9ac6468.chunk.js │ │ │ ├── 69.3c7cb39a.chunk.js │ │ │ ├── 7.b7f2a1f8.chunk.js │ │ │ ├── 8.7458a4df.chunk.js │ │ │ ├── 9.a13fb562.chunk.js │ │ │ ├── chunk-vendors.cbc1d7ee.chunk.js │ │ │ ├── chunk-vendors.cbc1d7ee.chunk.js.LICENSE.txt │ │ │ └── index.af4e6410.chunk.js │ ├── css.worker.js │ ├── editor.worker.js │ ├── html.worker.js │ ├── index.html │ ├── json.worker.js │ ├── runtime~index.bundle.js │ ├── sprite-extend-3d.js │ ├── sprite-geo-earth.esm.js │ ├── sprite-geo-earth.js │ ├── sprite-geo-earth.min.js │ ├── spritejs.js │ ├── typescript.worker.js │ └── typescript.worker.js.LICENSE.txt ├── examples │ ├── assets │ │ ├── TB1Jp7dbsjI8KJjSsppXXXbyVXa-9000-4500.jpg │ │ ├── TB1mR3bX3nH8KJjSspcXXb3QFXa-9000-4500.jpg │ │ ├── geodata.json │ │ └── world.json │ ├── b_globe.html │ ├── beam.html │ ├── lib │ │ ├── sprite-extend-3d.js │ │ └── spritejs.js │ ├── mars.html │ ├── normalmap.html │ ├── test.html │ └── with_texture.html ├── package.json ├── src │ ├── beam.js │ ├── camera.js │ ├── config.js │ ├── curve.js │ ├── globe.js │ ├── index.js │ ├── map.js │ ├── marker.js │ ├── missile.js │ └── shaders │ │ ├── beam.frag │ │ ├── beam.vert │ │ ├── corona.frag │ │ ├── corona.vert │ │ ├── curve.frag │ │ ├── curve.vert │ │ ├── globe.frag │ │ ├── globe_normal_map.frag │ │ ├── globe_texture.frag │ │ ├── globe_texture_normal_map.frag │ │ ├── marker.frag │ │ ├── marker.vert │ │ ├── missile.frag │ │ ├── missile.vert │ │ ├── sky.frag │ │ ├── sky.vert │ │ ├── spot.frag │ │ └── spot.vert └── webpack.config.js ├── webgl └── hello_world.html └── webgl_particles ├── app.js └── index.html /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globals: { 3 | GlRenderer: true, 4 | glDoodle: true, 5 | __DEV__: true 6 | }, 7 | extends: 'eslint-config-sprite', 8 | env: { 9 | browser: true, 10 | mocha: true 11 | }, 12 | plugins: ['html'], 13 | rules: { 14 | complexity: ['warn', 25], 15 | 'import/prefer-default-export': 'off', 16 | 'no-unused-vars': 'warn' 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | node_modules 4 | yarn.lock 5 | package-lock.json 6 | .docz 7 | .nyc_output 8 | coverage 9 | .vscode -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Akira Wu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /animate/animate_delta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |