bg2e-js 2.4.1 → 2.5.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.
- package/dist/bg2e-js.js +1 -1
- package/dist/bg2e-js.js.map +1 -1
- package/package.json +2 -2
- package/src/app/AppController.ts +18 -0
- package/src/app/Bg2KeyboardEvent.ts +18 -0
- package/src/app/Bg2MouseEvent.ts +18 -0
- package/src/app/Bg2TouchEvent.ts +18 -0
- package/src/app/Canvas.ts +18 -0
- package/src/app/EventBase.ts +18 -0
- package/src/app/MainLoop.ts +18 -0
- package/src/app/index.ts +18 -0
- package/src/base/Color.ts +18 -0
- package/src/base/Environment.ts +18 -0
- package/src/base/Light.ts +18 -0
- package/src/base/Material.ts +18 -0
- package/src/base/PolyList.ts +18 -0
- package/src/base/Texture.ts +18 -0
- package/src/base/index.ts +18 -0
- package/src/bg2e-vite.d.ts +18 -0
- package/src/db/Bg2LoaderPlugin.ts +18 -0
- package/src/db/DBPluginApi.ts +18 -0
- package/src/db/Loader.ts +18 -0
- package/src/db/LoaderPlugin.ts +18 -0
- package/src/db/MtlParser.ts +18 -0
- package/src/db/ObjLoaderPlugin.ts +18 -0
- package/src/db/ObjParser.ts +18 -0
- package/src/db/ObjWriterPlugin.ts +18 -0
- package/src/db/VitscnjLoaderPlugin.ts +18 -0
- package/src/db/Writer.ts +18 -0
- package/src/db/WriterPlugin.ts +18 -0
- package/src/db/index.ts +18 -0
- package/src/debug/DebugRenderer.ts +18 -0
- package/src/debug/WebGLTextureViewer.ts +18 -0
- package/src/debug/index.ts +18 -0
- package/src/index.ts +18 -0
- package/src/manipulation/SelectionBuffer.ts +18 -0
- package/src/manipulation/SelectionHighlight.ts +18 -0
- package/src/manipulation/SelectionIdAssignVisitor.ts +18 -0
- package/src/manipulation/SelectionManager.ts +18 -0
- package/src/manipulation/SelectionMode.ts +18 -0
- package/src/math/Mat3.ts +18 -0
- package/src/math/Mat4.ts +18 -0
- package/src/math/MatrixStrategy.ts +18 -0
- package/src/math/Quat.ts +18 -0
- package/src/math/Vec.ts +18 -0
- package/src/math/constants.ts +18 -0
- package/src/math/functions.ts +18 -0
- package/src/math/index.ts +18 -0
- package/src/phsics/joint.ts +18 -0
- package/src/primitives/arrow.ts +18 -0
- package/src/primitives/cone.ts +18 -0
- package/src/primitives/cube.ts +18 -0
- package/src/primitives/cylinder.ts +18 -0
- package/src/primitives/index.ts +18 -0
- package/src/primitives/plane.ts +18 -0
- package/src/primitives/sphere.ts +18 -0
- package/src/react/useBg2e.ts +18 -0
- package/src/render/BRDFIntegrationMap.ts +18 -0
- package/src/render/Environment.ts +18 -0
- package/src/render/FrameBuffer.ts +18 -0
- package/src/render/MaterialRenderer.ts +18 -0
- package/src/render/Pipeline.ts +18 -0
- package/src/render/PolyListRenderer.ts +18 -0
- package/src/render/RenderBuffer.ts +18 -0
- package/src/render/RenderQueue.ts +18 -0
- package/src/render/RenderState.ts +18 -0
- package/src/render/Renderer.ts +18 -0
- package/src/render/SceneAppController.ts +18 -1
- package/src/render/SceneRenderer.ts +18 -0
- package/src/render/Shader.ts +18 -0
- package/src/render/ShadowRenderer.ts +18 -0
- package/src/render/SkyCube.ts +18 -0
- package/src/render/SkySphere.ts +18 -0
- package/src/render/TextureMergerRenderer.ts +18 -0
- package/src/render/TextureRenderer.ts +18 -0
- package/src/render/index.ts +18 -0
- package/src/render/webgl/FrameBuffer.ts +18 -0
- package/src/render/webgl/MaterialRenderer.ts +18 -0
- package/src/render/webgl/Pipeline.ts +18 -0
- package/src/render/webgl/PolyListRenderer.ts +18 -0
- package/src/render/webgl/RenderBuffer.ts +18 -0
- package/src/render/webgl/Renderer.ts +18 -0
- package/src/render/webgl/SceneRenderer.ts +18 -0
- package/src/render/webgl/ShaderProgram.ts +18 -0
- package/src/render/webgl/ShadowRenderer.ts +18 -0
- package/src/render/webgl/SkyCube.ts +18 -0
- package/src/render/webgl/SkySphere.ts +18 -0
- package/src/render/webgl/State.ts +18 -0
- package/src/render/webgl/TextureRenderer.ts +18 -0
- package/src/render/webgl/VertexBuffer.ts +18 -0
- package/src/render/webgl/index.ts +18 -0
- package/src/scene/Camera.ts +18 -0
- package/src/scene/Chain.ts +18 -0
- package/src/scene/ChainJoint.ts +18 -0
- package/src/scene/Component.ts +18 -0
- package/src/scene/ComponentMap.ts +18 -0
- package/src/scene/Drawable.ts +18 -0
- package/src/scene/EnvironmentComponent.ts +18 -0
- package/src/scene/FindNodeVisitor.ts +18 -0
- package/src/scene/LightComponent.ts +18 -0
- package/src/scene/MatrixState.ts +18 -0
- package/src/scene/Node.ts +18 -0
- package/src/scene/NodeVisitor.ts +18 -0
- package/src/scene/OrbitCameraController.ts +18 -0
- package/src/scene/SmoothOrbitCameraController.ts +18 -0
- package/src/scene/Transform.ts +18 -0
- package/src/scene/index.ts +18 -0
- package/src/shaders/BasicDiffuseColorShader.ts +18 -0
- package/src/shaders/BasicPBRLightShader.ts +18 -0
- package/src/shaders/DebugRenderShader.ts +18 -0
- package/src/shaders/DepthRenderShader.ts +18 -0
- package/src/shaders/IrradianceMapCubeShader.ts +18 -0
- package/src/shaders/PBRLightIBLShader.ts +18 -0
- package/src/shaders/PickSelectionShader.ts +18 -0
- package/src/shaders/PresentDebugFramebufferShader.ts +18 -0
- package/src/shaders/PresentTextureShader.ts +18 -0
- package/src/shaders/SelectionHighlightShader.ts +18 -0
- package/src/shaders/ShaderFunction.ts +18 -0
- package/src/shaders/SkyCubeShader.ts +18 -0
- package/src/shaders/SkySphereShader.ts +18 -0
- package/src/shaders/SpecularMapCubeShader.ts +18 -0
- package/src/shaders/TextureMergerShader.ts +18 -0
- package/src/shaders/index.ts +18 -0
- package/src/shaders/webgl/index.ts +18 -0
- package/src/shaders/webgl_shader_lib.ts +18 -0
- package/src/tools/BinaryResourceProvider.ts +18 -0
- package/src/tools/ImageResourceProvider.ts +18 -0
- package/src/tools/MaterialModifier.ts +18 -0
- package/src/tools/Resource.ts +18 -0
- package/src/tools/ResourceProvider.ts +18 -0
- package/src/tools/TextResourceProvider.ts +18 -0
- package/src/tools/TextureCache.ts +18 -0
- package/src/tools/TextureResourceDatabase.ts +18 -0
- package/src/tools/UserAgent.ts +18 -0
- package/src/tools/VideoResourceProvider.ts +18 -0
- package/src/tools/WriteStrategy.ts +18 -0
- package/src/tools/base64.ts +18 -0
- package/src/tools/crypto.ts +18 -0
- package/src/tools/endiantess.ts +18 -0
- package/src/tools/image.ts +18 -0
- package/src/tools/index.ts +18 -0
- package/src/tools/processType.ts +18 -0
- 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
|
|
|
2
20
|
import { TextureTargetName } from '../base/Texture';
|
|
3
21
|
import PolyListRenderer from '../render/PolyListRenderer';
|
|
@@ -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 { TextureTargetName } from '../base/Texture';
|
|
3
21
|
import Shader from '../render/Shader';
|
|
@@ -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
|
interface FunctionLike {
|
|
2
20
|
name: string;
|
|
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 Mat4 from "../math/Mat4";
|
|
2
20
|
import PolyListRenderer from '../render/PolyListRenderer';
|
|
3
21
|
import MaterialRenderer from '../render/MaterialRenderer';
|
|
@@ -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 Shader from "../render/Shader";
|
|
2
20
|
import ShaderProgram from "../render/webgl/ShaderProgram";
|
|
3
21
|
import { TextureTargetName } 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 Shader from "../render/Shader";
|
|
2
20
|
import ShaderProgram from "../render/webgl/ShaderProgram";
|
|
3
21
|
import PolyListRenderer from '../render/PolyListRenderer';
|
|
@@ -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 Texture, { TextureChannel } from '../base/Texture';
|
|
3
21
|
import PolyListRenderer from '../render/PolyListRenderer';
|
package/src/shaders/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 BasicDiffuseColorShader from "./BasicDiffuseColorShader";
|
|
2
20
|
import BasicPBRLightShader from "./BasicPBRLightShader";
|
|
3
21
|
import DebugRenderShader from "./DebugRenderShader";
|
|
@@ -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 colorCorrection from "./color_correction.glsl?raw";
|
|
2
20
|
import constants from "./constants.glsl?raw";
|
|
3
21
|
import normalMap from "./normal_map.glsl?raw";
|
|
@@ -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
|
// TODO: Deprecated. Use webgl/index.ts instead.
|
|
2
20
|
|
|
3
21
|
import ShaderFunction from "./ShaderFunction";
|
|
@@ -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 ResourceProvider from "./ResourceProvider";
|
|
2
20
|
|
|
3
21
|
export default class BinaryResourceProvider extends ResourceProvider {
|
|
@@ -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 ResourceProvider from "./ResourceProvider";
|
|
2
20
|
import { generateUUID } from "./crypto";
|
|
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 {
|
|
2
20
|
textureTypeLoader,
|
|
3
21
|
colorTypeLoader,
|
package/src/tools/Resource.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 ImageResourceProvider from "./ImageResourceProvider.js";
|
|
3
21
|
import VideoResourceProvider from "./VideoResourceProvider.js";
|
|
@@ -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 { isBrowser } from './processType';
|
|
2
20
|
import { base64ToArrayBuffer } from './base64';
|
|
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 ResourceProvider from './ResourceProvider';
|
|
2
20
|
|
|
3
21
|
export default class TextResourceProvider extends ResourceProvider {
|
|
@@ -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 Canvas from '../app/Canvas';
|
|
3
21
|
import 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 Color from "../base/Color"
|
|
2
20
|
import Texture, { ProceduralTextureFunction, TextureFilter, TextureTarget, TextureWrap } from "../base/Texture"
|
|
3
21
|
import BRDFIntegrationMap from "../render/BRDFIntegrationMap";
|
package/src/tools/UserAgent.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
|
interface VersionInfo {
|
|
3
21
|
major: number;
|
|
@@ -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 ResourceProvider from "./ResourceProvider";
|
|
2
20
|
|
|
3
21
|
const g_preventVideoDump: HTMLVideoElement[] = [];
|
|
@@ -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
|
export default class WriteStrategy {
|
|
3
21
|
async writeBytes(path: string, data: ArrayBuffer): Promise<void> {
|
package/src/tools/base64.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 { isNode, isBrowser } from "./processType";
|
|
2
20
|
|
|
3
21
|
export const base64ToArrayBuffer = async (base64: string) : Promise<Uint8Array> => {
|
package/src/tools/crypto.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
|
// @ts-ignore
|
|
2
20
|
!function(r){function n(r){for(var n="",t="",o=0,e=0,a=0,i=r.length;i>a;a++){var f=r.charCodeAt(a);128>f?e++:(t=2048>f?String.fromCharCode(f>>6|192,63&f|128):String.fromCharCode(f>>12|224,f>>6&63|128,63&f|128),e>o&&(n+=r.slice(o,e)),n+=t,o=e=a+1)}return e>o&&(n+=r.slice(o,i)),n}function t(r){var n,t;if(r+="",s=!1,v=w=r.length,w>63){for(o(r.substring(0,64)),i(A),s=!0,n=128;w>=n;n+=64)o(r.substring(n-64,n)),f(A);r=r.substring(n-64),w=r.length}for(d[0]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,n=0;w>n;n++)t=3&n,0===t?d[n>>2]=r.charCodeAt(n):d[n>>2]|=r.charCodeAt(n)<<C[t];return d[n>>2]|=h[3&n],n>55?(s?f(d):(i(d),s=!0),f([0,0,0,0,0,0,0,0,0,0,0,0,0,0,v<<3,0])):(d[14]=v<<3,void(s?f(d):i(d)))}function o(r){for(var n=16;n--;){var t=n<<2;A[n]=r.charCodeAt(t)+(r.charCodeAt(t+1)<<8)+(r.charCodeAt(t+2)<<16)+(r.charCodeAt(t+3)<<24)}}function e(r,o,e){t(o?r:n(r));var a=g[0];return u[1]=l[15&a],u[0]=l[15&(a>>=4)],u[3]=l[15&(a>>=4)],u[2]=l[15&(a>>=4)],u[5]=l[15&(a>>=4)],u[4]=l[15&(a>>=4)],u[7]=l[15&(a>>=4)],u[6]=l[15&(a>>=4)],a=g[1],u[9]=l[15&a],u[8]=l[15&(a>>=4)],u[11]=l[15&(a>>=4)],u[10]=l[15&(a>>=4)],u[13]=l[15&(a>>=4)],u[12]=l[15&(a>>=4)],u[15]=l[15&(a>>=4)],u[14]=l[15&(a>>=4)],a=g[2],u[17]=l[15&a],u[16]=l[15&(a>>=4)],u[19]=l[15&(a>>=4)],u[18]=l[15&(a>>=4)],u[21]=l[15&(a>>=4)],u[20]=l[15&(a>>=4)],u[23]=l[15&(a>>=4)],u[22]=l[15&(a>>=4)],a=g[3],u[25]=l[15&a],u[24]=l[15&(a>>=4)],u[27]=l[15&(a>>=4)],u[26]=l[15&(a>>=4)],u[29]=l[15&(a>>=4)],u[28]=l[15&(a>>=4)],u[31]=l[15&(a>>=4)],u[30]=l[15&(a>>=4)],e?u:u.join("")}function a(r,n,t,o,e,a,i){return n+=r+o+i,(n<<e|n>>>a)+t<<0}function i(r){c(0,0,0,0,r),g[0]=y[0]+1732584193<<0,g[1]=y[1]-271733879<<0,g[2]=y[2]-1732584194<<0,g[3]=y[3]+271733878<<0}function f(r){c(g[0],g[1],g[2],g[3],r),g[0]=y[0]+g[0]<<0,g[1]=y[1]+g[1]<<0,g[2]=y[2]+g[2]<<0,g[3]=y[3]+g[3]<<0}function c(r,n,t,o,e){var i,f;s?(r=a((t^o)&n^o,r,n,e[0],7,25,-680876936),o=a((n^t)&r^t,o,r,e[1],12,20,-389564586),t=a((r^n)&o^n,t,o,e[2],17,15,606105819),n=a((o^r)&t^r,n,t,e[3],22,10,-1044525330)):(r=e[0]-680876937,r=(r<<7|r>>>25)-271733879<<0,o=e[1]-117830708+(2004318071&r^-1732584194),o=(o<<12|o>>>20)+r<<0,t=e[2]-1126478375+((-271733879^r)&o^-271733879),t=(t<<17|t>>>15)+o<<0,n=e[3]-1316259209+((o^r)&t^r),n=(n<<22|n>>>10)+t<<0),r=a((t^o)&n^o,r,n,e[4],7,25,-176418897),o=a((n^t)&r^t,o,r,e[5],12,20,1200080426),t=a((r^n)&o^n,t,o,e[6],17,15,-1473231341),n=a((o^r)&t^r,n,t,e[7],22,10,-45705983),r=a((t^o)&n^o,r,n,e[8],7,25,1770035416),o=a((n^t)&r^t,o,r,e[9],12,20,-1958414417),t=a((r^n)&o^n,t,o,e[10],17,15,-42063),n=a((o^r)&t^r,n,t,e[11],22,10,-1990404162),r=a((t^o)&n^o,r,n,e[12],7,25,1804603682),o=a((n^t)&r^t,o,r,e[13],12,20,-40341101),t=a((r^n)&o^n,t,o,e[14],17,15,-1502002290),n=a((o^r)&t^r,n,t,e[15],22,10,1236535329),r=a((n^t)&o^t,r,n,e[1],5,27,-165796510),o=a((r^n)&t^n,o,r,e[6],9,23,-1069501632),t=a((o^r)&n^r,t,o,e[11],14,18,643717713),n=a((t^o)&r^o,n,t,e[0],20,12,-373897302),r=a((n^t)&o^t,r,n,e[5],5,27,-701558691),o=a((r^n)&t^n,o,r,e[10],9,23,38016083),t=a((o^r)&n^r,t,o,e[15],14,18,-660478335),n=a((t^o)&r^o,n,t,e[4],20,12,-405537848),r=a((n^t)&o^t,r,n,e[9],5,27,568446438),o=a((r^n)&t^n,o,r,e[14],9,23,-1019803690),t=a((o^r)&n^r,t,o,e[3],14,18,-187363961),n=a((t^o)&r^o,n,t,e[8],20,12,1163531501),r=a((n^t)&o^t,r,n,e[13],5,27,-1444681467),o=a((r^n)&t^n,o,r,e[2],9,23,-51403784),t=a((o^r)&n^r,t,o,e[7],14,18,1735328473),n=a((t^o)&r^o,n,t,e[12],20,12,-1926607734),i=n^t,r=a(i^o,r,n,e[5],4,28,-378558),o=a(i^r,o,r,e[8],11,21,-2022574463),f=o^r,t=a(f^n,t,o,e[11],16,16,1839030562),n=a(f^t,n,t,e[14],23,9,-35309556),i=n^t,r=a(i^o,r,n,e[1],4,28,-1530992060),o=a(i^r,o,r,e[4],11,21,1272893353),f=o^r,t=a(f^n,t,o,e[7],16,16,-155497632),n=a(f^t,n,t,e[10],23,9,-1094730640),i=n^t,r=a(i^o,r,n,e[13],4,28,681279174),o=a(i^r,o,r,e[0],11,21,-358537222),f=o^r,t=a(f^n,t,o,e[3],16,16,-722521979),n=a(f^t,n,t,e[6],23,9,76029189),i=n^t,r=a(i^o,r,n,e[9],4,28,-640364487),o=a(i^r,o,r,e[12],11,21,-421815835),f=o^r,t=a(f^n,t,o,e[15],16,16,530742520),n=a(f^t,n,t,e[2],23,9,-995338651),r=a(t^(n|~o),r,n,e[0],6,26,-198630844),o=a(n^(r|~t),o,r,e[7],10,22,1126891415),t=a(r^(o|~n),t,o,e[14],15,17,-1416354905),n=a(o^(t|~r),n,t,e[5],21,11,-57434055),r=a(t^(n|~o),r,n,e[12],6,26,1700485571),o=a(n^(r|~t),o,r,e[3],10,22,-1894986606),t=a(r^(o|~n),t,o,e[10],15,17,-1051523),n=a(o^(t|~r),n,t,e[1],21,11,-2054922799),r=a(t^(n|~o),r,n,e[8],6,26,1873313359),o=a(n^(r|~t),o,r,e[15],10,22,-30611744),t=a(r^(o|~n),t,o,e[6],15,17,-1560198380),n=a(o^(t|~r),n,t,e[13],21,11,1309151649),r=a(t^(n|~o),r,n,e[4],6,26,-145523070),o=a(n^(r|~t),o,r,e[11],10,22,-1120210379),t=a(r^(o|~n),t,o,e[2],15,17,718787259),n=a(o^(t|~r),n,t,e[9],21,11,-343485551),y[0]=r,y[1]=n,y[2]=t,y[3]=o}var u=[],d=[],A=[],h=[],l="0123456789abcdef".split(""),C=[],g=[],s=!1,v=0,w=0,y=[];if(r.Int32Array)d=new Int32Array(16),A=new Int32Array(16),h=new Int32Array(4),C=new Int32Array(4),g=new Int32Array(4),y=new Int32Array(4);else{var I;for(I=0;16>I;I++)d[I]=A[I]=0;for(I=0;4>I;I++)h[I]=C[I]=g[I]=y[I]=0}h[0]=128,h[1]=32768,h[2]=8388608,h[3]=-2147483648,C[0]=0,C[1]=8,C[2]=16,C[3]=24,r.md5=r.md5||e}("undefined"==typeof global?window:global);
|
|
3
21
|
|
package/src/tools/endiantess.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
|
export const isBigEndian = (): boolean => {
|
|
3
21
|
const arr32 = new Uint32Array(1);
|
package/src/tools/image.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 { generateMD5 } from '../tools/crypto';
|
|
2
20
|
|
|
3
21
|
export const imageToBase64 = (image: HTMLImageElement, format = 'image/jpeg') => {
|
package/src/tools/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 { generateUUID, generateMD5 } from './crypto';
|
|
2
20
|
import { isBigEndian, isLittleEndian } from './endiantess';
|
|
3
21
|
import UserAgent from './UserAgent';
|
package/src/tools/processType.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
|
export enum ProcessType {
|
|
3
21
|
BROWSER = 0,
|
package/src/vite-env.d.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
|
declare module '*.glsl?raw' {
|
|
2
20
|
const src: string;
|
|
3
21
|
export default src;
|