@tolokoban/tgd 2.0.8 → 2.0.9

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 (176) hide show
  1. package/lib/dist/buffer/index.js +1 -1
  2. package/lib/dist/camera/camera-orthographic.d.ts +1 -1
  3. package/lib/dist/camera/camera-orthographic.js +2 -2
  4. package/lib/dist/camera/camera-perspective.d.ts +1 -1
  5. package/lib/dist/camera/camera-perspective.js +2 -2
  6. package/lib/dist/camera/camera.d.ts +1 -1
  7. package/lib/dist/camera/camera.js +3 -3
  8. package/lib/dist/camera/index.js +3 -3
  9. package/lib/dist/canvas/gizmo/gizmo.d.ts +4 -4
  10. package/lib/dist/canvas/gizmo/gizmo.js +7 -7
  11. package/lib/dist/canvas/gizmo/index.js +1 -1
  12. package/lib/dist/canvas/gizmo/painter/tips.d.ts +2 -2
  13. package/lib/dist/canvas/gizmo/painter/tips.js +3 -3
  14. package/lib/dist/canvas/index.js +2 -2
  15. package/lib/dist/canvas/landscape/index.js +1 -1
  16. package/lib/dist/canvas/landscape/landscape.d.ts +1 -1
  17. package/lib/dist/canvas/landscape/landscape.js +1 -1
  18. package/lib/dist/color/index.js +1 -1
  19. package/lib/dist/context/animation/animation-manager.d.ts +1 -1
  20. package/lib/dist/context/context.d.ts +8 -8
  21. package/lib/dist/context/context.js +8 -8
  22. package/lib/dist/context/index.js +2 -2
  23. package/lib/dist/controller/camera/index.js +1 -1
  24. package/lib/dist/controller/camera/orbit.d.ts +3 -3
  25. package/lib/dist/controller/camera/orbit.js +3 -3
  26. package/lib/dist/controller/index.js +1 -1
  27. package/lib/dist/dataset/dataset.d.ts +2 -2
  28. package/lib/dist/dataset/index.js +1 -1
  29. package/lib/dist/event/index.js +1 -1
  30. package/lib/dist/filter/blur.js +2 -2
  31. package/lib/dist/filter/chromatic-aberration.js +1 -1
  32. package/lib/dist/filter/filter.d.ts +2 -2
  33. package/lib/dist/filter/hue-rotation.js +1 -1
  34. package/lib/dist/filter/index.js +4 -4
  35. package/lib/dist/geometry/box.js +2 -2
  36. package/lib/dist/geometry/geometry.d.ts +2 -2
  37. package/lib/dist/geometry/geometry.js +1 -1
  38. package/lib/dist/geometry/index.js +2 -2
  39. package/lib/dist/index.js +23 -23
  40. package/lib/dist/input/index.js +3 -3
  41. package/lib/dist/input/inputs.d.ts +2 -2
  42. package/lib/dist/input/inputs.js +2 -2
  43. package/lib/dist/input/keyboard.d.ts +1 -1
  44. package/lib/dist/input/keyboard.js +1 -1
  45. package/lib/dist/input/pointer.d.ts +2 -2
  46. package/lib/dist/input/pointer.js +1 -1
  47. package/lib/dist/light/index.js +1 -1
  48. package/lib/dist/light/light.d.ts +1 -1
  49. package/lib/dist/light/light.js +1 -1
  50. package/lib/dist/loader/glb.d.ts +1 -1
  51. package/lib/dist/loader/glb.js +1 -1
  52. package/lib/dist/loader/index.js +2 -2
  53. package/lib/dist/material/diffuse.d.ts +4 -4
  54. package/lib/dist/material/diffuse.js +3 -3
  55. package/lib/dist/material/ghost.d.ts +3 -3
  56. package/lib/dist/material/ghost.js +2 -2
  57. package/lib/dist/material/index.js +4 -4
  58. package/lib/dist/material/material.d.ts +1 -1
  59. package/lib/dist/material/normals.d.ts +2 -2
  60. package/lib/dist/material/normals.js +1 -1
  61. package/lib/dist/math/index.js +8 -8
  62. package/lib/dist/math/mat3.js +1 -1
  63. package/lib/dist/math/mat4.js +2 -2
  64. package/lib/dist/math/mat4.test.js +1 -1
  65. package/lib/dist/math/quat.js +1 -1
  66. package/lib/dist/math/quat.test.js +1 -1
  67. package/lib/dist/math/transfo.js +3 -3
  68. package/lib/dist/math/vec2.js +1 -1
  69. package/lib/dist/math/vec3.js +1 -1
  70. package/lib/dist/math/vec3.test.js +1 -1
  71. package/lib/dist/math/vec4.js +1 -1
  72. package/lib/dist/math/vec4.test.js +1 -1
  73. package/lib/dist/painter/axis/axis.d.ts +2 -2
  74. package/lib/dist/painter/axis/axis.js +3 -3
  75. package/lib/dist/painter/axis/index.js +1 -1
  76. package/lib/dist/painter/background/background.d.ts +2 -2
  77. package/lib/dist/painter/background/background.js +2 -2
  78. package/lib/dist/painter/background/index.js +1 -1
  79. package/lib/dist/painter/clear.d.ts +2 -2
  80. package/lib/dist/painter/clear.js +1 -1
  81. package/lib/dist/painter/depth.js +1 -1
  82. package/lib/dist/painter/filter/filter.d.ts +4 -4
  83. package/lib/dist/painter/filter/filter.js +4 -4
  84. package/lib/dist/painter/filter/index.js +1 -1
  85. package/lib/dist/painter/framebuffer-old.d.ts +3 -3
  86. package/lib/dist/painter/framebuffer-old.d.ts.map +1 -1
  87. package/lib/dist/painter/framebuffer-old.js +3 -3
  88. package/lib/dist/painter/framebuffer.js +1 -1
  89. package/lib/dist/painter/group.d.ts +1 -1
  90. package/lib/dist/painter/group.js +1 -1
  91. package/lib/dist/painter/index.d.ts +1 -1
  92. package/lib/dist/painter/index.d.ts.map +1 -1
  93. package/lib/dist/painter/index.js +15 -15
  94. package/lib/dist/painter/logic.js +1 -1
  95. package/lib/dist/painter/mesh/gltf/gltf.d.ts +2 -2
  96. package/lib/dist/painter/mesh/gltf/gltf.js +6 -6
  97. package/lib/dist/painter/mesh/gltf/index.js +1 -1
  98. package/lib/dist/painter/mesh/index.js +3 -3
  99. package/lib/dist/painter/mesh/mesh/index.js +1 -1
  100. package/lib/dist/painter/mesh/mesh/mesh.d.ts +4 -4
  101. package/lib/dist/painter/mesh/mesh/mesh.js +4 -4
  102. package/lib/dist/painter/mesh/normals/index.js +1 -1
  103. package/lib/dist/painter/mesh/normals/normals.d.ts +3 -3
  104. package/lib/dist/painter/mesh/normals/normals.js +2 -2
  105. package/lib/dist/painter/node.d.ts +1 -1
  106. package/lib/dist/painter/node.js +3 -3
  107. package/lib/dist/painter/painter.d.ts +1 -1
  108. package/lib/dist/painter/painter.js +1 -1
  109. package/lib/dist/painter/segments/index.js +1 -1
  110. package/lib/dist/painter/segments/segments.d.ts +3 -3
  111. package/lib/dist/painter/segments/segments.js +2 -2
  112. package/lib/dist/painter/skybox/index.js +1 -1
  113. package/lib/dist/painter/skybox/skybox.d.ts +4 -4
  114. package/lib/dist/painter/skybox/skybox.js +4 -4
  115. package/lib/dist/painter/state/blend.d.ts +22 -0
  116. package/lib/dist/painter/state/blend.d.ts.map +1 -0
  117. package/lib/dist/painter/state/blend.js +47 -0
  118. package/lib/dist/painter/state/cull.d.ts +6 -0
  119. package/lib/dist/painter/state/cull.d.ts.map +1 -0
  120. package/lib/dist/painter/state/cull.js +20 -0
  121. package/lib/dist/painter/state/depth.d.ts +18 -0
  122. package/lib/dist/painter/state/depth.d.ts.map +1 -0
  123. package/lib/dist/painter/state/depth.js +44 -0
  124. package/lib/dist/painter/state/index.d.ts +2 -0
  125. package/lib/dist/painter/state/index.d.ts.map +1 -0
  126. package/lib/dist/painter/state/index.js +2 -0
  127. package/lib/dist/painter/state/state.d.ts +20 -0
  128. package/lib/dist/painter/state/state.d.ts.map +1 -0
  129. package/lib/dist/painter/state/state.js +55 -0
  130. package/lib/dist/parser/gltf/gltf.d.ts +13 -3
  131. package/lib/dist/parser/gltf/gltf.d.ts.map +1 -1
  132. package/lib/dist/parser/gltf/gltf.js +65 -3
  133. package/lib/dist/parser/gltf/index.js +1 -1
  134. package/lib/dist/parser/gltf/parser.js +1 -1
  135. package/lib/dist/parser/index.js +2 -2
  136. package/lib/dist/parser/mesh/wavefront.d.ts +2 -2
  137. package/lib/dist/parser/mesh/wavefront.d.ts.map +1 -1
  138. package/lib/dist/parser/mesh/wavefront.js +4 -4
  139. package/lib/dist/program/index.js +1 -1
  140. package/lib/dist/program/program.d.ts +2 -2
  141. package/lib/dist/resource/index.js +4 -4
  142. package/lib/dist/resource/program.d.ts +1 -1
  143. package/lib/dist/resource/program.js +2 -2
  144. package/lib/dist/resource/texture2d.d.ts +2 -2
  145. package/lib/dist/resource/texture2d.js +2 -2
  146. package/lib/dist/resource/textureCube.d.ts +2 -2
  147. package/lib/dist/resource/textureCube.js +2 -2
  148. package/lib/dist/shader/fragment.js +1 -1
  149. package/lib/dist/shader/index.js +2 -2
  150. package/lib/dist/shader/vertex.js +1 -1
  151. package/lib/dist/texture/index.js +2 -2
  152. package/lib/dist/texture/texture2d.d.ts +2 -2
  153. package/lib/dist/texture/texture2d.js +3 -3
  154. package/lib/dist/texture/textureCube.d.ts +1 -1
  155. package/lib/dist/texture/textureCube.js +1 -1
  156. package/lib/dist/types/context.d.ts +6 -6
  157. package/lib/dist/types/gltf.d.ts +7 -6
  158. package/lib/dist/types/gltf.d.ts.map +1 -1
  159. package/lib/dist/types/gltf.js +2 -2
  160. package/lib/dist/types/index.js +9 -9
  161. package/lib/dist/types/input-pointer.d.ts +1 -1
  162. package/lib/dist/types/mesh.d.ts +0 -1
  163. package/lib/dist/types/mesh.d.ts.map +1 -1
  164. package/lib/dist/utils/action/camera.d.ts +2 -2
  165. package/lib/dist/utils/action/camera.js +2 -2
  166. package/lib/dist/utils/action/index.js +1 -1
  167. package/lib/dist/utils/ease-func/index.js +1 -1
  168. package/lib/dist/utils/fetch/index.js +1 -1
  169. package/lib/dist/utils/index.js +6 -6
  170. package/lib/dist/utils/webgl.d.ts +2 -0
  171. package/lib/dist/utils/webgl.d.ts.map +1 -1
  172. package/lib/dist/utils/webgl.js +32 -1
  173. package/lib/dist/vao/index.js +1 -1
  174. package/lib/dist/vao/vao.d.ts +3 -3
  175. package/lib/dist/vao/vao.js +1 -1
  176. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- export * from "./buffer.js";
1
+ export * from "./buffer";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYnVmZmVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFBIn0=
@@ -1,4 +1,4 @@
1
- import { TgdMat4, TgdVec3 } from "../math";
1
+ import { TgdMat4, TgdVec3 } from "@tgd/math";
2
2
  import { TgdCamera, TgdCameraOptions } from "./camera";
3
3
  export interface TgdCameraOrthographicOptions extends TgdCameraOptions {
4
4
  spaceHeight?: number;
@@ -1,5 +1,5 @@
1
- import { TgdMat4, TgdVec3 } from "./../math/index.js";
2
- import { TgdCamera } from "./camera.js";
1
+ import { TgdMat4, TgdVec3 } from "@tgd/math";
2
+ import { TgdCamera } from "./camera";
3
3
  export class TgdCameraOrthographic extends TgdCamera {
4
4
  _matrixProjection = new TgdMat4();
5
5
  _spaceHeight = 10;
@@ -1,4 +1,4 @@
1
- import { TgdMat4, TgdVec3 } from "../math";
1
+ import { TgdMat4, TgdVec3 } from "@tgd/math";
2
2
  import { TgdCamera, TgdCameraOptions } from "./camera";
3
3
  export interface TgdCameraPerspectiveOptions extends TgdCameraOptions {
4
4
  fovy?: number;
@@ -1,5 +1,5 @@
1
- import { TgdMat4, TgdVec3 } from "./../math/index.js";
2
- import { TgdCamera } from "./camera.js";
1
+ import { TgdMat4, TgdVec3 } from "@tgd/math";
2
+ import { TgdCamera } from "./camera";
3
3
  export class TgdCameraPerspective extends TgdCamera {
4
4
  _matrixProjection = new TgdMat4();
5
5
  _fovy = Math.PI / 4;
@@ -1,4 +1,4 @@
1
- import { TgdQuat, TgdVec3, TgdMat4, TgdQuatFace } from "../math";
1
+ import { TgdQuat, TgdVec3, TgdMat4, TgdQuatFace } from "@tgd/math";
2
2
  import { TgdEvent } from "../event";
3
3
  import { ArrayNumber3, ArrayNumber4 } from "..";
4
4
  export interface TgdCameraOptions {
@@ -1,6 +1,6 @@
1
- import { TgdQuat, TgdVec3, TgdMat4 } from "./../math/index.js";
2
- import { TgdMat3 } from "./../math/mat3.js";
3
- import { TgdEvent } from "../event/index.js";
1
+ import { TgdQuat, TgdVec3, TgdMat4 } from "@tgd/math";
2
+ import { TgdMat3 } from "@tgd/math/mat3";
3
+ import { TgdEvent } from "../event";
4
4
  export class TgdCamera {
5
5
  static incrementalId = 1;
6
6
  /**
@@ -1,4 +1,4 @@
1
- export * from "./camera.js";
2
- export * from "./camera-orthographic.js";
3
- export * from "./camera-perspective.js";
1
+ export * from "./camera";
2
+ export * from "./camera-orthographic";
3
+ export * from "./camera-perspective";
4
4
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2FtZXJhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFBO0FBQ3hCLGNBQWMsdUJBQXVCLENBQUE7QUFDckMsY0FBYyxzQkFBc0IsQ0FBQSJ9
@@ -1,7 +1,7 @@
1
- import { TgdCamera } from "../../camera";
2
- import { TgdContextOptions } from "../../context";
3
- import { TgdEvent } from "../../event";
4
- import { TgdQuat } from "../../math";
1
+ import { TgdCamera } from "@tgd/camera";
2
+ import { TgdContextOptions } from "@tgd/context";
3
+ import { TgdEvent } from "@tgd/event";
4
+ import { TgdQuat } from "@tgd/math";
5
5
  export interface TgdCanvasGizmoOptions extends TgdContextOptions {
6
6
  canvas?: HTMLCanvasElement;
7
7
  }
@@ -1,10 +1,10 @@
1
- import { TgdCameraPerspective } from "./../../camera/index.js";
2
- import { TgdContext } from "./../../context/index.js";
3
- import { TgdControllerCameraOrbit } from "./../../controller/index.js";
4
- import { TgdEvent } from "./../../event/index.js";
5
- import { TgdQuat, TgdMat3, TgdVec3 } from "./../../math/index.js";
6
- import { TgdPainterClear, TgdPainterDepth } from "./../../painter/index.js";
7
- import { TipsPainter } from "./painter/tips.js";
1
+ import { TgdCameraPerspective } from "@tgd/camera";
2
+ import { TgdContext } from "@tgd/context";
3
+ import { TgdControllerCameraOrbit } from "@tgd/controller";
4
+ import { TgdEvent } from "@tgd/event";
5
+ import { TgdQuat, TgdMat3, TgdVec3 } from "@tgd/math";
6
+ import { TgdPainterClear, TgdPainterDepth } from "@tgd/painter";
7
+ import { TipsPainter } from "./painter/tips";
8
8
  /**
9
9
  * The Gizmo displays the orientation of an attached camera.
10
10
  * You can click one of the axis to force the camera to face it.
@@ -1,2 +1,2 @@
1
- export * from "./gizmo.js";
1
+ export * from "./gizmo";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2FudmFzL2dpem1vL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsU0FBUyxDQUFBIn0=
@@ -1,5 +1,5 @@
1
- import { TgdContext } from "../../../context";
2
- import { TgdPainter } from "../../../painter/painter";
1
+ import { TgdContext } from "@tgd/context";
2
+ import { TgdPainter } from "@tgd/painter/painter";
3
3
  export declare class TipsPainter extends TgdPainter {
4
4
  private readonly context;
5
5
  private readonly texture;
@@ -1,6 +1,6 @@
1
- import { TgdDataset } from "./../../../dataset/index.js";
2
- import { TgdPainter } from "./../../../painter/painter.js";
3
- import { tgdCanvasCreateWithContext2D } from "./../../../utils/index.js";
1
+ import { TgdDataset } from "@tgd/dataset";
2
+ import { TgdPainter } from "@tgd/painter/painter";
3
+ import { tgdCanvasCreateWithContext2D } from "@tgd/utils";
4
4
  import FRAG from "./shader.frag";
5
5
  import VERT from "./shader.vert";
6
6
  export class TipsPainter extends TgdPainter {
@@ -1,3 +1,3 @@
1
- export * from "./gizmo/index.js";
2
- export * from "./landscape/index.js";
1
+ export * from "./gizmo";
2
+ export * from "./landscape";
3
3
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2FudmFzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsU0FBUyxDQUFBO0FBQ3ZCLGNBQWMsYUFBYSxDQUFBIn0=
@@ -1,2 +1,2 @@
1
- export * from "./landscape.js";
1
+ export * from "./landscape";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2FudmFzL2xhbmRzY2FwZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQSJ9
@@ -1,4 +1,4 @@
1
- import { TgdContext, TgdContextOptions } from "../../context";
1
+ import { TgdContext, TgdContextOptions } from "@tgd/context";
2
2
  export interface TgdCanvasLandscapeOptions extends TgdContextOptions {
3
3
  canvas?: HTMLCanvasElement;
4
4
  onReady(context: TgdContext): void;
@@ -1,4 +1,4 @@
1
- import { TgdContext } from "./../../context/index.js";
1
+ import { TgdContext } from "@tgd/context";
2
2
  /**
3
3
  * The Landscape displays the orientation of an attached camera.
4
4
  * You can click one of the axis to force the camera to face it.
@@ -1,2 +1,2 @@
1
- export * from "./color.js";
1
+ export * from "./color";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29sb3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxTQUFTLENBQUEifQ==
@@ -1,4 +1,4 @@
1
- import { TgdAnimation } from "../../types/animation";
1
+ import { TgdAnimation } from "@tgd/types/animation";
2
2
  export declare class TgdManagerAnimation {
3
3
  private readonly animations;
4
4
  schedule(animation: TgdAnimation): TgdAnimation;
@@ -1,11 +1,11 @@
1
- import { TgdBuffer, TgdBufferOptions } from "../buffer";
2
- import { TgdCamera } from "../camera";
3
- import { TgdDataset } from "../dataset";
4
- import { TgdInputs } from "../input";
5
- import { TgdResourceProgram, TgdResourceTexture2D, TgdResourceTextureCube } from "../resource";
6
- import { TgdContextInterface, TgdProgram } from "../types";
7
- import { TgdPainterFunction as TgdPainterFunctionType } from "../types/painter";
8
- import { TgdVertexArray } from "../vao";
1
+ import { TgdBuffer, TgdBufferOptions } from "@tgd/buffer";
2
+ import { TgdCamera } from "@tgd/camera";
3
+ import { TgdDataset } from "@tgd/dataset";
4
+ import { TgdInputs } from "@tgd/input";
5
+ import { TgdResourceProgram, TgdResourceTexture2D, TgdResourceTextureCube } from "@tgd/resource";
6
+ import { TgdContextInterface, TgdProgram } from "@tgd/types";
7
+ import { TgdPainterFunction as TgdPainterFunctionType } from "@tgd/types/painter";
8
+ import { TgdVertexArray } from "@tgd/vao";
9
9
  import { TgdPainter } from "../painter/painter";
10
10
  import { TgdAnimation } from "../types/animation";
11
11
  /**
@@ -1,11 +1,11 @@
1
- import { TgdBuffer } from "./../buffer/index.js";
2
- import { TgdCameraPerspective } from "./../camera/index.js";
3
- import { TgdInputs } from "./../input/index.js";
4
- import { TgdResourceProgram, TgdResourceTexture2D, TgdResourceTextureCube, } from "./../resource/index.js";
5
- import { TgdVertexArray } from "./../vao/index.js";
6
- import { TgdPainterGroup } from "../painter/group.js";
7
- import { tgdCanvasCreate } from "../utils/index.js";
8
- import { TgdManagerAnimation } from "./animation/animation-manager.js";
1
+ import { TgdBuffer } from "@tgd/buffer";
2
+ import { TgdCameraPerspective } from "@tgd/camera";
3
+ import { TgdInputs } from "@tgd/input";
4
+ import { TgdResourceProgram, TgdResourceTexture2D, TgdResourceTextureCube, } from "@tgd/resource";
5
+ import { TgdVertexArray } from "@tgd/vao";
6
+ import { TgdPainterGroup } from "../painter/group";
7
+ import { tgdCanvasCreate } from "../utils";
8
+ import { TgdManagerAnimation } from "./animation/animation-manager";
9
9
  /**
10
10
  * This class gives you a [WebGL2RenderingContext](https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext) for a given canvas,
11
11
  * through its public readonly attribute `gl`.
@@ -1,3 +1,3 @@
1
- export * from "./context.js";
2
- export * from "../log.js";
1
+ export * from "./context";
2
+ export * from "../log";
3
3
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udGV4dC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFdBQVcsQ0FBQTtBQUN6QixjQUFjLFFBQVEsQ0FBQSJ9
@@ -1,2 +1,2 @@
1
- export * from "./orbit.js";
1
+ export * from "./orbit";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJvbGxlci9jYW1lcmEvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxTQUFTLENBQUEifQ==
@@ -1,6 +1,6 @@
1
- import { TgdContextInterface, TgdInputPointerModifierKeys } from "../../types";
2
- import { TgdEvent } from "../../event";
3
- import { TgdCamera } from "../../camera";
1
+ import { TgdContextInterface, TgdInputPointerModifierKeys } from "@tgd/types";
2
+ import { TgdEvent } from "@tgd/event";
3
+ import { TgdCamera } from "@tgd/camera";
4
4
  export interface TgdControllerCameraOrbitZoomRequest extends TgdInputPointerModifierKeys {
5
5
  x: number;
6
6
  y: number;
@@ -1,6 +1,6 @@
1
- import { tgdEasingFunctionOutQuad } from "./../../utils/index.js";
2
- import { clamp } from "./../../utils/math.js";
3
- import { TgdEvent } from "./../../event/index.js";
1
+ import { tgdEasingFunctionOutQuad } from "@tgd/utils";
2
+ import { clamp } from "@tgd/utils/math";
3
+ import { TgdEvent } from "@tgd/event";
4
4
  export class TgdControllerCameraOrbit {
5
5
  context;
6
6
  eventChange = new TgdEvent();
@@ -1,2 +1,2 @@
1
- export * from "./camera/index.js";
1
+ export * from "./camera";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJvbGxlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFVBQVUsQ0FBQSJ9
@@ -1,5 +1,5 @@
1
- import { TgdProgram } from "../types";
2
- import { TgdBufferOptionTarget, TgdBufferOptionUsage } from "../buffer";
1
+ import { TgdProgram } from "@tgd/types";
2
+ import { TgdBufferOptionTarget, TgdBufferOptionUsage } from "@tgd/buffer";
3
3
  export type TgdDatasetType = "float" | "vec2" | "vec3" | "vec4";
4
4
  export interface TgdDatasetOptions {
5
5
  divisor: number;
@@ -1,2 +1,2 @@
1
- export * from "./dataset.js";
1
+ export * from "./dataset";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGF0YXNldC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFdBQVcsQ0FBQSJ9
@@ -1,2 +1,2 @@
1
- export * from "./event.js";
1
+ export * from "./event";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxTQUFTLENBQUEifQ==
@@ -1,5 +1,5 @@
1
- import { TgdMath, TgdVec2 } from "../math/index.js";
2
- import { TgdFilter } from "./filter.js";
1
+ import { TgdMath, TgdVec2 } from "../math";
2
+ import { TgdFilter } from "./filter";
3
3
  const DEFAULT_DIRECTION = new TgdVec2(1, 0);
4
4
  export class TgdFilterBlur extends TgdFilter {
5
5
  constructor(options = {}) {
@@ -1,4 +1,4 @@
1
- import { TgdFilter } from "./filter.js";
1
+ import { TgdFilter } from "./filter";
2
2
  export class TgdFilterChromaticAberration extends TgdFilter {
3
3
  /**
4
4
  * Percentage of displacement of the color or the border of the image.
@@ -1,5 +1,5 @@
1
- import { CodeBloc } from "../shader/code";
2
- import { TgdProgram, WebglUniformType } from "../types";
1
+ import { CodeBloc } from "@tgd/shader/code";
2
+ import { TgdProgram, WebglUniformType } from "@tgd/types";
3
3
  /**
4
4
  * Define the shader to be used in a filter.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { TgdFilter } from "./filter.js";
1
+ import { TgdFilter } from "./filter";
2
2
  export class TgdFilterHueRotation extends TgdFilter {
3
3
  hueShift = 0;
4
4
  constructor({ hueShiftInDegrees = 0, } = {}) {
@@ -1,5 +1,5 @@
1
- export * from "./blur.js";
2
- export * from "./chromatic-aberration.js";
3
- export * from "./filter.js";
4
- export * from "./hue-rotation.js";
1
+ export * from "./blur";
2
+ export * from "./chromatic-aberration";
3
+ export * from "./filter";
4
+ export * from "./hue-rotation";
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZmlsdGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsUUFBUSxDQUFBO0FBQ3RCLGNBQWMsd0JBQXdCLENBQUE7QUFDdEMsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxnQkFBZ0IsQ0FBQSJ9
@@ -1,5 +1,5 @@
1
- import { TgdDataset } from "./../dataset/index.js";
2
- import { TgdGeometry } from "./geometry.js";
1
+ import { TgdDataset } from "@tgd/dataset";
2
+ import { TgdGeometry } from "./geometry";
3
3
  export class TgdGeometryBox extends TgdGeometry {
4
4
  constructor({ sizeX = 1, sizeY = 1, sizeZ = 1, } = {}) {
5
5
  const x = sizeX * 0.5;
@@ -1,5 +1,5 @@
1
- import { TgdDataset } from "../dataset";
2
- import { WebglDrawMode } from "../types";
1
+ import { TgdDataset } from "@tgd/dataset";
2
+ import { WebglDrawMode } from "@tgd/types";
3
3
  export interface TgdGeometryOptions {
4
4
  dataset: TgdDataset;
5
5
  drawMode: WebglDrawMode | number;
@@ -1,4 +1,4 @@
1
- import { TgdVec3 } from "./../math/index.js";
1
+ import { TgdVec3 } from "@tgd/math";
2
2
  /**
3
3
  * Geometry is used to define a mesh.
4
4
  * It must hold at least one vec3 attributes
@@ -1,3 +1,3 @@
1
- export * from "./box.js";
2
- export * from "./geometry.js";
1
+ export * from "./box";
2
+ export * from "./geometry";
3
3
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2VvbWV0cnkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxPQUFPLENBQUE7QUFDckIsY0FBYyxZQUFZLENBQUEifQ==
package/lib/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
- export * from "./camera/index.js";
2
- export * from "./canvas/index.js";
3
- export * from "./color/index.js";
4
- export * from "./context/index.js";
5
- export * from "./controller/index.js";
6
- export * from "./dataset/index.js";
7
- export * from "./event/index.js";
8
- export * from "./filter/index.js";
9
- export * from "./geometry/index.js";
10
- export * from "./input/index.js";
11
- export * from "./light/index.js";
12
- export * from "./loader/index.js";
13
- export * from "./log.js";
14
- export * from "./material/index.js";
15
- export * from "./math/index.js";
16
- export * from "./painter/index.js";
17
- export * from "./painter/painter.js";
18
- export * from "./parser/index.js";
19
- export * from "./resource/index.js";
20
- export * from "./shader/index.js";
21
- export * from "./utils/index.js";
22
- export * from "./vao/index.js";
23
- export * from "./types/index.js";
1
+ export * from "./camera";
2
+ export * from "./canvas";
3
+ export * from "./color";
4
+ export * from "./context";
5
+ export * from "./controller";
6
+ export * from "./dataset";
7
+ export * from "./event";
8
+ export * from "./filter";
9
+ export * from "./geometry";
10
+ export * from "./input";
11
+ export * from "./light";
12
+ export * from "./loader";
13
+ export * from "./log";
14
+ export * from "./material";
15
+ export * from "./math";
16
+ export * from "./painter";
17
+ export * from "./painter/painter";
18
+ export * from "./parser";
19
+ export * from "./resource";
20
+ export * from "./shader";
21
+ export * from "./utils";
22
+ export * from "./vao";
23
+ export * from "./types";
24
24
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxjQUFjLENBQUE7QUFDNUIsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxPQUFPLENBQUE7QUFDckIsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxRQUFRLENBQUE7QUFDdEIsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxtQkFBbUIsQ0FBQTtBQUNqQyxjQUFjLFVBQVUsQ0FBQTtBQUN4QixjQUFjLFlBQVksQ0FBQTtBQUMxQixjQUFjLFVBQVUsQ0FBQTtBQUN4QixjQUFjLFNBQVMsQ0FBQTtBQUN2QixjQUFjLE9BQU8sQ0FBQTtBQUVyQixjQUFjLFNBQVMsQ0FBQSJ9
@@ -1,4 +1,4 @@
1
- export * from "./inputs.js";
2
- export * from "./keyboard.js";
3
- export * from "./pointer.js";
1
+ export * from "./inputs";
2
+ export * from "./keyboard";
3
+ export * from "./pointer";
4
4
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5wdXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUE7QUFDeEIsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxXQUFXLENBQUEifQ==
@@ -1,5 +1,5 @@
1
- import { TgdInputKeyboard } from "../types/input-keyboard";
2
- import { TgdInputPointer } from "../types/input-pointer";
1
+ import { TgdInputKeyboard } from "@tgd/types/input-keyboard";
2
+ import { TgdInputPointer } from "@tgd/types/input-pointer";
3
3
  export declare class TgdInputs {
4
4
  private readonly canvas;
5
5
  private _keyboard;
@@ -1,5 +1,5 @@
1
- import { TgdInputKeyboardImpl } from "./keyboard.js";
2
- import { TgdInputPointerImpl } from "./pointer.js";
1
+ import { TgdInputKeyboardImpl } from "@tgd/input/keyboard";
2
+ import { TgdInputPointerImpl } from "@tgd/input/pointer";
3
3
  export class TgdInputs {
4
4
  canvas;
5
5
  _keyboard = null;
@@ -1,4 +1,4 @@
1
- import { TgdInputKeyboard } from "../types/input-keyboard";
1
+ import { TgdInputKeyboard } from "@tgd/types/input-keyboard";
2
2
  import { TgdEvent } from "../event";
3
3
  export declare class TgdInputKeyboardImpl implements TgdInputKeyboard {
4
4
  readonly eventKeyPress: TgdEvent<KeyboardEvent>;
@@ -1,4 +1,4 @@
1
- import { TgdEvent } from "../event/index.js";
1
+ import { TgdEvent } from "../event";
2
2
  export class TgdInputKeyboardImpl {
3
3
  eventKeyPress = new TgdEvent();
4
4
  keysDown = new Set();
@@ -1,5 +1,5 @@
1
- import { TgdEvent } from "../event";
2
- import { TgdInputPointer, TgdInputPointerEventMove, TgdInputPointerEventTap, TgdInputPointerEventZoom } from "../types";
1
+ import { TgdEvent } from "@tgd/event";
2
+ import { TgdInputPointer, TgdInputPointerEventMove, TgdInputPointerEventTap, TgdInputPointerEventZoom } from "@tgd/types";
3
3
  export declare class TgdInputPointerImpl implements TgdInputPointer {
4
4
  private readonly canvas;
5
5
  readonly eventTap: TgdEvent<Readonly<TgdInputPointerEventTap>>;
@@ -1,4 +1,4 @@
1
- import { TgdEvent } from "./../event/index.js";
1
+ import { TgdEvent } from "@tgd/event";
2
2
  const MOUSE_BUTTON_RIGHT = 2;
3
3
  export class TgdInputPointerImpl {
4
4
  canvas;
@@ -1,2 +1,2 @@
1
- export * from "./light.js";
1
+ export * from "./light";
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbGlnaHQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxTQUFTLENBQUEifQ==
@@ -1,4 +1,4 @@
1
- import { TgdVec3, TgdVec4 } from "../math";
1
+ import { TgdVec3, TgdVec4 } from "@tgd/math";
2
2
  export interface TgdLightOptions {
3
3
  color: TgdVec4;
4
4
  direction: TgdVec3;
@@ -1,4 +1,4 @@
1
- import { TgdVec3, TgdVec4 } from "./../math/index.js";
1
+ import { TgdVec3, TgdVec4 } from "@tgd/math";
2
2
  export class TgdLight {
3
3
  /**
4
4
  * The alpha channel is the intensity of the light.
@@ -1,4 +1,4 @@
1
- import { TgdParserGLTransfertFormatBinary } from "../parser";
1
+ import { TgdParserGLTransfertFormatBinary } from "@tgd/parser";
2
2
  export declare class TgdLoaderGlb {
3
3
  static glb(url: string): Promise<TgdParserGLTransfertFormatBinary | null>;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { TgdParserGLTransfertFormatBinary } from "./../parser/index.js";
1
+ import { TgdParserGLTransfertFormatBinary } from "@tgd/parser";
2
2
  export class TgdLoaderGlb {
3
3
  static async glb(url) {
4
4
  try {
@@ -1,3 +1,3 @@
1
- export * from "./glb.js";
2
- export * from "./image.js";
1
+ export * from "./glb";
2
+ export * from "./image";
3
3
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbG9hZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsT0FBTyxDQUFBO0FBQ3JCLGNBQWMsU0FBUyxDQUFBIn0=
@@ -1,8 +1,8 @@
1
- import { TgdProgram, TgdTexture2D, WebglAttributeType, WebglUniformType } from "../types";
2
- import { TgdVec4 } from "../math";
1
+ import { TgdProgram, TgdTexture2D, WebglAttributeType, WebglUniformType } from "@tgd/types";
2
+ import { TgdVec4 } from "@tgd/math";
3
3
  import { TgdMaterial } from "./material";
4
- import { CodeBloc } from "../shader/code";
5
- import { TgdLight } from "../light";
4
+ import { CodeBloc } from "@tgd/shader/code";
5
+ import { TgdLight } from "@tgd/light";
6
6
  export type TgdMaterialDiffuseOptions = Partial<{
7
7
  color: TgdVec4 | TgdTexture2D;
8
8
  light: TgdLight;
@@ -1,6 +1,6 @@
1
- import { TgdVec3, TgdVec4 } from "./../math/index.js";
2
- import { TgdMaterial } from "./material.js";
3
- import { TgdLight } from "./../light/index.js";
1
+ import { TgdVec3, TgdVec4 } from "@tgd/math";
2
+ import { TgdMaterial } from "./material";
3
+ import { TgdLight } from "@tgd/light";
4
4
  const DEFAULT_COLOR = new TgdVec4(0.8, 0.8, 0.8, 1);
5
5
  export class TgdMaterialDiffuse extends TgdMaterial {
6
6
  light = new TgdLight();
@@ -1,7 +1,7 @@
1
- import { TgdProgram, WebglAttributeType } from "../types";
2
- import { TgdVec4 } from "../math";
1
+ import { TgdProgram, WebglAttributeType } from "@tgd/types";
2
+ import { TgdVec4 } from "@tgd/math";
3
3
  import { TgdMaterial } from "./material";
4
- import { CodeBloc } from "../shader/code";
4
+ import { CodeBloc } from "@tgd/shader/code";
5
5
  export type TgdMaterialGhostOptions = Partial<{
6
6
  color: TgdVec4;
7
7
  exponent: number;
@@ -1,5 +1,5 @@
1
- import { TgdVec4 } from "./../math/index.js";
2
- import { TgdMaterial } from "./material.js";
1
+ import { TgdVec4 } from "@tgd/math";
2
+ import { TgdMaterial } from "./material";
3
3
  const DEFAULT_COLOR = new TgdVec4(0.6, 1, 0.9, 1);
4
4
  export class TgdMaterialGhost extends TgdMaterial {
5
5
  varyings;
@@ -1,5 +1,5 @@
1
- export * from "./diffuse.js";
2
- export * from "./ghost.js";
3
- export * from "./material.js";
4
- export * from "./normals.js";
1
+ export * from "./diffuse";
2
+ export * from "./ghost";
3
+ export * from "./material";
4
+ export * from "./normals";
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbWF0ZXJpYWwvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxXQUFXLENBQUEifQ==
@@ -1,4 +1,4 @@
1
- import { CodeBloc } from "../shader/code";
1
+ import { CodeBloc } from "@tgd/shader/code";
2
2
  import { TgdProgram, WebglAttributeType, WebglUniformType } from "..";
3
3
  export declare abstract class TgdMaterial {
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { TgdProgram, WebglAttributeType } from "../types";
1
+ import { TgdProgram, WebglAttributeType } from "@tgd/types";
2
2
  import { TgdMaterial } from "./material";
3
- import { CodeBloc } from "../shader/code";
3
+ import { CodeBloc } from "@tgd/shader/code";
4
4
  export declare class TgdMaterialNormals extends TgdMaterial {
5
5
  readonly varyings: {
6
6
  [name: string]: WebglAttributeType;
@@ -1,4 +1,4 @@
1
- import { TgdMaterial } from "./material.js";
1
+ import { TgdMaterial } from "./material";
2
2
  export class TgdMaterialNormals extends TgdMaterial {
3
3
  varyings;
4
4
  fragmentShaderCode;
@@ -1,9 +1,9 @@
1
- export * from "./mat3.js";
2
- export * from "./mat4.js";
3
- export * from "./math.js";
4
- export * from "./quat.js";
5
- export * from "./transfo.js";
6
- export * from "./vec2.js";
7
- export * from "./vec3.js";
8
- export * from "./vec4.js";
1
+ export * from "./mat3";
2
+ export * from "./mat4";
3
+ export * from "./math";
4
+ export * from "./quat";
5
+ export * from "./transfo";
6
+ export * from "./vec2";
7
+ export * from "./vec3";
8
+ export * from "./vec4";
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbWF0aC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFdBQVcsQ0FBQTtBQUN6QixjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFFBQVEsQ0FBQTtBQUN0QixjQUFjLFFBQVEsQ0FBQSJ9