@antv/g-webgpu 0.6.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -35
  3. package/dist/index.umd.min.js +16 -0
  4. package/es/ContextRegisterPlugin.d.ts +7 -0
  5. package/es/ContextRegisterPlugin.js +28 -0
  6. package/es/WebGLContextService.d.ts +18 -0
  7. package/es/WebGLContextService.js +99 -0
  8. package/es/index.d.ts +10 -0
  9. package/es/index.js +34 -6
  10. package/lib/ContextRegisterPlugin.d.ts +7 -0
  11. package/lib/ContextRegisterPlugin.js +37 -0
  12. package/lib/WebGLContextService.d.ts +18 -0
  13. package/lib/WebGLContextService.js +107 -0
  14. package/lib/index.d.ts +10 -0
  15. package/lib/index.js +49 -29
  16. package/package.json +36 -33
  17. package/CHANGELOG.md +0 -75
  18. package/es/Kernel.js +0 -331
  19. package/es/Kernel.js.map +0 -1
  20. package/es/Renderer.js +0 -310
  21. package/es/Renderer.js.map +0 -1
  22. package/es/Scene.js +0 -39
  23. package/es/Scene.js.map +0 -1
  24. package/es/View.js +0 -86
  25. package/es/View.js.map +0 -1
  26. package/es/World.js +0 -239
  27. package/es/World.js.map +0 -1
  28. package/es/camera/Camera.js +0 -801
  29. package/es/camera/Camera.js.map +0 -1
  30. package/es/camera/Landmark.js +0 -86
  31. package/es/camera/Landmark.js.map +0 -1
  32. package/es/index.js.map +0 -1
  33. package/es/renderable/Renderable.js +0 -132
  34. package/es/renderable/Renderable.js.map +0 -1
  35. package/es/renderable/line/Line.js +0 -164
  36. package/es/renderable/line/Line.js.map +0 -1
  37. package/es/renderable/point/Point.js +0 -203
  38. package/es/renderable/point/Point.js.map +0 -1
  39. package/es/utils/canvas.js +0 -8
  40. package/es/utils/canvas.js.map +0 -1
  41. package/es/utils/math.js +0 -23
  42. package/es/utils/math.js.map +0 -1
  43. package/es/utils/picking.js +0 -4
  44. package/es/utils/picking.js.map +0 -1
  45. package/es/utils/polyline-normals.js +0 -127
  46. package/es/utils/polyline-normals.js.map +0 -1
  47. package/lib/Kernel.js +0 -352
  48. package/lib/Kernel.js.map +0 -1
  49. package/lib/Renderer.js +0 -325
  50. package/lib/Renderer.js.map +0 -1
  51. package/lib/Scene.js +0 -49
  52. package/lib/Scene.js.map +0 -1
  53. package/lib/View.js +0 -99
  54. package/lib/View.js.map +0 -1
  55. package/lib/World.js +0 -265
  56. package/lib/World.js.map +0 -1
  57. package/lib/camera/Camera.js +0 -870
  58. package/lib/camera/Camera.js.map +0 -1
  59. package/lib/camera/Landmark.js +0 -95
  60. package/lib/camera/Landmark.js.map +0 -1
  61. package/lib/index.js.map +0 -1
  62. package/lib/renderable/Renderable.js +0 -141
  63. package/lib/renderable/Renderable.js.map +0 -1
  64. package/lib/renderable/line/Line.js +0 -182
  65. package/lib/renderable/line/Line.js.map +0 -1
  66. package/lib/renderable/point/Point.js +0 -221
  67. package/lib/renderable/point/Point.js.map +0 -1
  68. package/lib/utils/canvas.js +0 -15
  69. package/lib/utils/canvas.js.map +0 -1
  70. package/lib/utils/math.js +0 -36
  71. package/lib/utils/math.js.map +0 -1
  72. package/lib/utils/picking.js +0 -11
  73. package/lib/utils/picking.js.map +0 -1
  74. package/lib/utils/polyline-normals.js +0 -135
  75. package/lib/utils/polyline-normals.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 AntV team
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.
package/README.md CHANGED
@@ -1,35 +0,0 @@
1
- # @antv/g-webgpu
2
-
3
- ```typescript
4
- import { World } from '@antv/g-webgpu';
5
-
6
- const canvas = document.getElementById('application');
7
-
8
- // create a world
9
- const world = new World(canvas);
10
-
11
- // create a camera
12
- const camera = world.createCamera({
13
- aspect: Math.abs(canvas.width / canvas.height),
14
- angle: 72,
15
- far: 100,
16
- near: 1,
17
- });
18
- world.getCamera(camera).setPosition(0, 5, 5);
19
-
20
- // create a scene
21
- const scene = world.createScene({ camera });
22
-
23
- // create geometry, material and attach them to mesh
24
- const boxGeometry = world.createBoxGeometry({
25
- halfExtents: vec3.fromValues(1, 1, 1),
26
- });
27
- const material = world.createBasicMaterial();
28
- const mesh = world.createMesh({
29
- geometry: boxGeometry,
30
- material,
31
- });
32
-
33
- // add meshes to current scene
34
- world.add(scene, mesh);
35
- ```