bg2e-js 2.4.1 → 2.5.0

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 (142) hide show
  1. package/dist/bg2e-js.js.map +1 -1
  2. package/package.json +2 -2
  3. package/src/app/AppController.ts +18 -0
  4. package/src/app/Bg2KeyboardEvent.ts +18 -0
  5. package/src/app/Bg2MouseEvent.ts +18 -0
  6. package/src/app/Bg2TouchEvent.ts +18 -0
  7. package/src/app/Canvas.ts +18 -0
  8. package/src/app/EventBase.ts +18 -0
  9. package/src/app/MainLoop.ts +18 -0
  10. package/src/app/index.ts +18 -0
  11. package/src/base/Color.ts +18 -0
  12. package/src/base/Environment.ts +18 -0
  13. package/src/base/Light.ts +18 -0
  14. package/src/base/Material.ts +18 -0
  15. package/src/base/PolyList.ts +18 -0
  16. package/src/base/Texture.ts +18 -0
  17. package/src/base/index.ts +18 -0
  18. package/src/bg2e-vite.d.ts +18 -0
  19. package/src/db/Bg2LoaderPlugin.ts +18 -0
  20. package/src/db/DBPluginApi.ts +18 -0
  21. package/src/db/Loader.ts +18 -0
  22. package/src/db/LoaderPlugin.ts +18 -0
  23. package/src/db/MtlParser.ts +18 -0
  24. package/src/db/ObjLoaderPlugin.ts +18 -0
  25. package/src/db/ObjParser.ts +18 -0
  26. package/src/db/ObjWriterPlugin.ts +18 -0
  27. package/src/db/VitscnjLoaderPlugin.ts +18 -0
  28. package/src/db/Writer.ts +18 -0
  29. package/src/db/WriterPlugin.ts +18 -0
  30. package/src/db/index.ts +18 -0
  31. package/src/debug/DebugRenderer.ts +18 -0
  32. package/src/debug/WebGLTextureViewer.ts +18 -0
  33. package/src/debug/index.ts +18 -0
  34. package/src/index.ts +18 -0
  35. package/src/manipulation/SelectionBuffer.ts +18 -0
  36. package/src/manipulation/SelectionHighlight.ts +18 -0
  37. package/src/manipulation/SelectionIdAssignVisitor.ts +18 -0
  38. package/src/manipulation/SelectionManager.ts +18 -0
  39. package/src/manipulation/SelectionMode.ts +18 -0
  40. package/src/math/Mat3.ts +18 -0
  41. package/src/math/Mat4.ts +18 -0
  42. package/src/math/MatrixStrategy.ts +18 -0
  43. package/src/math/Quat.ts +18 -0
  44. package/src/math/Vec.ts +18 -0
  45. package/src/math/constants.ts +18 -0
  46. package/src/math/functions.ts +18 -0
  47. package/src/math/index.ts +18 -0
  48. package/src/phsics/joint.ts +18 -0
  49. package/src/primitives/arrow.ts +18 -0
  50. package/src/primitives/cone.ts +18 -0
  51. package/src/primitives/cube.ts +18 -0
  52. package/src/primitives/cylinder.ts +18 -0
  53. package/src/primitives/index.ts +18 -0
  54. package/src/primitives/plane.ts +18 -0
  55. package/src/primitives/sphere.ts +18 -0
  56. package/src/react/useBg2e.ts +18 -0
  57. package/src/render/BRDFIntegrationMap.ts +18 -0
  58. package/src/render/Environment.ts +18 -0
  59. package/src/render/FrameBuffer.ts +18 -0
  60. package/src/render/MaterialRenderer.ts +18 -0
  61. package/src/render/Pipeline.ts +18 -0
  62. package/src/render/PolyListRenderer.ts +18 -0
  63. package/src/render/RenderBuffer.ts +18 -0
  64. package/src/render/RenderQueue.ts +18 -0
  65. package/src/render/RenderState.ts +18 -0
  66. package/src/render/Renderer.ts +18 -0
  67. package/src/render/SceneAppController.ts +18 -0
  68. package/src/render/SceneRenderer.ts +18 -0
  69. package/src/render/Shader.ts +18 -0
  70. package/src/render/ShadowRenderer.ts +18 -0
  71. package/src/render/SkyCube.ts +18 -0
  72. package/src/render/SkySphere.ts +18 -0
  73. package/src/render/TextureMergerRenderer.ts +18 -0
  74. package/src/render/TextureRenderer.ts +18 -0
  75. package/src/render/index.ts +18 -0
  76. package/src/render/webgl/FrameBuffer.ts +18 -0
  77. package/src/render/webgl/MaterialRenderer.ts +18 -0
  78. package/src/render/webgl/Pipeline.ts +18 -0
  79. package/src/render/webgl/PolyListRenderer.ts +18 -0
  80. package/src/render/webgl/RenderBuffer.ts +18 -0
  81. package/src/render/webgl/Renderer.ts +18 -0
  82. package/src/render/webgl/SceneRenderer.ts +18 -0
  83. package/src/render/webgl/ShaderProgram.ts +18 -0
  84. package/src/render/webgl/ShadowRenderer.ts +18 -0
  85. package/src/render/webgl/SkyCube.ts +18 -0
  86. package/src/render/webgl/SkySphere.ts +18 -0
  87. package/src/render/webgl/State.ts +18 -0
  88. package/src/render/webgl/TextureRenderer.ts +18 -0
  89. package/src/render/webgl/VertexBuffer.ts +18 -0
  90. package/src/render/webgl/index.ts +18 -0
  91. package/src/scene/Camera.ts +18 -0
  92. package/src/scene/Chain.ts +18 -0
  93. package/src/scene/ChainJoint.ts +18 -0
  94. package/src/scene/Component.ts +18 -0
  95. package/src/scene/ComponentMap.ts +18 -0
  96. package/src/scene/Drawable.ts +18 -0
  97. package/src/scene/EnvironmentComponent.ts +18 -0
  98. package/src/scene/FindNodeVisitor.ts +18 -0
  99. package/src/scene/LightComponent.ts +18 -0
  100. package/src/scene/MatrixState.ts +18 -0
  101. package/src/scene/Node.ts +18 -0
  102. package/src/scene/NodeVisitor.ts +18 -0
  103. package/src/scene/OrbitCameraController.ts +18 -0
  104. package/src/scene/SmoothOrbitCameraController.ts +18 -0
  105. package/src/scene/Transform.ts +18 -0
  106. package/src/scene/index.ts +18 -0
  107. package/src/shaders/BasicDiffuseColorShader.ts +18 -0
  108. package/src/shaders/BasicPBRLightShader.ts +18 -0
  109. package/src/shaders/DebugRenderShader.ts +18 -0
  110. package/src/shaders/DepthRenderShader.ts +18 -0
  111. package/src/shaders/IrradianceMapCubeShader.ts +18 -0
  112. package/src/shaders/PBRLightIBLShader.ts +18 -0
  113. package/src/shaders/PickSelectionShader.ts +18 -0
  114. package/src/shaders/PresentDebugFramebufferShader.ts +18 -0
  115. package/src/shaders/PresentTextureShader.ts +18 -0
  116. package/src/shaders/SelectionHighlightShader.ts +18 -0
  117. package/src/shaders/ShaderFunction.ts +18 -0
  118. package/src/shaders/SkyCubeShader.ts +18 -0
  119. package/src/shaders/SkySphereShader.ts +18 -0
  120. package/src/shaders/SpecularMapCubeShader.ts +18 -0
  121. package/src/shaders/TextureMergerShader.ts +18 -0
  122. package/src/shaders/index.ts +18 -0
  123. package/src/shaders/webgl/index.ts +18 -0
  124. package/src/shaders/webgl_shader_lib.ts +18 -0
  125. package/src/tools/BinaryResourceProvider.ts +18 -0
  126. package/src/tools/ImageResourceProvider.ts +18 -0
  127. package/src/tools/MaterialModifier.ts +18 -0
  128. package/src/tools/Resource.ts +18 -0
  129. package/src/tools/ResourceProvider.ts +18 -0
  130. package/src/tools/TextResourceProvider.ts +18 -0
  131. package/src/tools/TextureCache.ts +18 -0
  132. package/src/tools/TextureResourceDatabase.ts +18 -0
  133. package/src/tools/UserAgent.ts +18 -0
  134. package/src/tools/VideoResourceProvider.ts +18 -0
  135. package/src/tools/WriteStrategy.ts +18 -0
  136. package/src/tools/base64.ts +18 -0
  137. package/src/tools/crypto.ts +18 -0
  138. package/src/tools/endiantess.ts +18 -0
  139. package/src/tools/image.ts +18 -0
  140. package/src/tools/index.ts +18 -0
  141. package/src/tools/processType.ts +18 -0
  142. package/src/vite-env.d.ts +18 -0
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import Color from "../base/Color";
2
20
  import Material from "../base/Material";
3
21
  import Mat4 from "../math/Mat4";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
 
2
20
  import WebGLRenderer from '../render/webgl/Renderer';
3
21
  import type Texture from '../base/Texture';
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import DebugRenderer from "./DebugRenderer.js";
2
20
  import WebGLTextureViewer from "./WebGLTextureViewer.js";
3
21
 
package/src/index.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import bg2math from './math/index';
2
20
  import Mat3 from './math/Mat3';
3
21
  import Mat4 from './math/Mat4';
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import { RenderLayer } from "../base/PolyList";
2
20
  import Texture, { TextureComponentFormat, TextureRenderTargetAttachment, TextureWrap } from "../base/Texture";
3
21
  import PickSelectionShader from "../shaders/PickSelectionShader";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
 
2
20
  import { RenderLayer } from "../base/PolyList";
3
21
  import Texture, { TextureRenderTargetAttachment, TextureComponentFormat, TextureWrap } from "../base/Texture";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import NodeVisitor from "../scene/NodeVisitor";
2
20
  import SelectionMode from "./SelectionMode";
3
21
  import Color from "../base/Color";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import Vec from "../math/Vec";
2
20
  import SelectionBuffer from "./SelectionBuffer";
3
21
  import Camera from "../scene/Camera";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  enum SelectionMode {
2
20
  OBJECT = 0,
3
21
  POLY_LIST = 1
package/src/math/Mat3.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import { NumericArray } from "./constants";
2
20
  import Vec from "./Vec";
3
21
  import { isZero, equals } from "./functions";
package/src/math/Mat4.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import { NumericArray, PI, checkArray } from "./constants";
2
20
  import Vec from "./Vec";
3
21
  import Mat3 from "./Mat3";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import Mat4 from "./Mat4";
2
20
 
3
21
 
package/src/math/Quat.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import Vec from "./Vec";
2
20
 
3
21
  export default class Quat extends Vec {
package/src/math/Vec.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import { NumericArray } from "./constants";
2
20
  import { isZero, equals, lerp, clamp } from "./functions";
3
21
 
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  export enum Axis {
2
20
  NONE = 0,
3
21
  X = 1,
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import {
2
20
  EPSILON,
3
21
  DEG_TO_RAD,
package/src/math/index.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
 
2
20
  import {
3
21
  Axis,
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import Vec from '../math/Vec';
2
20
  import Mat4 from '../math/Mat4';
3
21
 
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import PolyList, { DrawMode } from "../base/PolyList";
2
20
  import Mat4 from "../math/Mat4";
3
21
  import Vec from "../math/Vec";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import ObjParser from "../db/ObjParser";
2
20
  import PolyList from "../base/PolyList";
3
21
 
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
 
2
20
  import ObjParser from "../db/ObjParser";
3
21
  import PolyList from "../base/PolyList";
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import ObjParser from "../db/ObjParser";
2
20
  import PolyList from "../base/PolyList";
3
21
 
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import cube from './cube';
2
20
  import sphere from './sphere';
3
21
  import cylinder from './cylinder';
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import PolyList, { DrawMode } from "../base/PolyList";
2
20
 
3
21
  export default function plane(w: number, d: number): PolyList {
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import ObjParser from "../db/ObjParser";
2
20
  import PolyList from "../base/PolyList";
3
21
 
@@ -1,3 +1,21 @@
1
+ /*
2
+ * business grade graphic engine (bg2 engine)
3
+ * Copyright (C) 2024 Fernando Serrano Carpena
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+
1
19
  import { useEffect, useMemo, useRef, useState } from "react";
2
20
 
3
21
  import Canvas from "../app/Canvas";