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
|
import Texture, { TextureRenderTargetAttachment, TextureTarget } from "../base/Texture";
|
|
2
20
|
import IrradianceMapCubeShader from "../shaders/IrradianceMapCubeShader";
|
|
3
21
|
import SpecularMapCubeShader from "../shaders/SpecularMapCubeShader";
|
|
@@ -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 type Renderer from "./Renderer";
|
|
2
20
|
|
|
3
21
|
export interface ClearOptions {
|
|
@@ -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 Texture from "../base/Texture";
|
|
2
20
|
import Renderer from "./Renderer";
|
|
3
21
|
import Material from "../base/Material";
|
package/src/render/Pipeline.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
|
export enum BlendEquation {
|
|
2
20
|
ADD = 1,
|
|
3
21
|
SUBTRACT = 2,
|
|
@@ -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 type Renderer from "./Renderer";
|
|
2
20
|
import type 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 Texture, { TextureDataType, TextureTarget, TextureRenderTargetAttachmentNames } from "../base/Texture";
|
|
2
20
|
import Vec from "../math/Vec";
|
|
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 { getLayers, RenderLayer } from "../base/PolyList";
|
|
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 { RenderLayer } from "../base/PolyList";
|
|
3
21
|
import Mat4 from "../math/Mat4";
|
package/src/render/Renderer.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 Canvas from "../app/Canvas";
|
|
2
20
|
import Material from "../base/Material";
|
|
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 AppController from "../app/AppController";
|
|
2
20
|
import SelectionHighlight from "../manipulation/SelectionHighlight";
|
|
3
21
|
import SelectionManager from "../manipulation/SelectionManager";
|
|
@@ -156,7 +174,6 @@ export default class SceneAppController extends AppController {
|
|
|
156
174
|
const camera = Camera.GetMain(this.sceneRoot);
|
|
157
175
|
if (camera) {
|
|
158
176
|
this.selectionHighlight && this.selectionHighlight.draw(this.sceneRoot, camera);
|
|
159
|
-
this._debugRenderer?.draw(camera);
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
179
|
|
|
@@ -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 { BlendFunction } from "./Pipeline";
|
|
3
21
|
import RenderQueue from "./RenderQueue";
|
package/src/render/Shader.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 type Renderer from "./Renderer";
|
|
2
20
|
import type PolyListRenderer from "./PolyListRenderer";
|
|
3
21
|
import type MaterialRenderer from "./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 { RenderLayer } from "../base/PolyList";
|
|
2
20
|
import Texture, {
|
|
3
21
|
TextureComponentFormat,
|
package/src/render/SkyCube.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 Material from "../base/Material";
|
|
2
20
|
import { createCube } from "../primitives";
|
|
3
21
|
import RenderState from "./RenderState";
|
package/src/render/SkySphere.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 { createSphere } from "../primitives";
|
|
2
20
|
import SkySphereShader from "../shaders/SkySphereShader";
|
|
3
21
|
import RenderState from "./RenderState";
|
|
@@ -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 Texture, { TextureChannel, TextureComponentFormat, TextureRenderTargetAttachment, TextureWrap } from "../base/Texture";
|
|
2
20
|
import TextureMergerShader from "../shaders/TextureMergerShader";
|
|
3
21
|
import Renderer from "./Renderer";
|
|
@@ -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 Texture, { TextureTarget } from "../base/Texture";
|
|
2
20
|
import Renderer from "./Renderer";
|
|
3
21
|
|
package/src/render/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 Environment from "./Environment";
|
|
2
20
|
import FrameBuffer from "./FrameBuffer";
|
|
3
21
|
import MaterialRenderer from "./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
|
|
|
2
20
|
import FrameBuffer from "../FrameBuffer";
|
|
3
21
|
import WebGLRenderer from "./Renderer";
|
|
@@ -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 Texture, { TextureChannel, TextureTargetName } from "../../base/Texture";
|
|
2
20
|
import Material from "../../base/Material";
|
|
3
21
|
import MaterialRenderer from "../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
|
|
|
2
20
|
import Pipeline, { BlendEquation, BlendFunction } from "../Pipeline";
|
|
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 { DrawMode, PolyListCullFace, PolyListFrontFace } from "../../base/PolyList";
|
|
3
21
|
import PolyListRenderer from "../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 { TextureRenderTargetAttachment, TextureTargetName } from "../../base/Texture";
|
|
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 Renderer, { EngineFeatures } from "../Renderer";
|
|
2
20
|
import State from "./State";
|
|
3
21
|
import PolyListRenderer from "../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
|
import PBRLightIBLShader from "../../shaders/PBRLightIBLShader";
|
|
2
20
|
import SceneRenderer from "../SceneRenderer";
|
|
3
21
|
import { RenderLayer } 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 Mat4 from "../../math/Mat4";
|
|
2
20
|
import Mat3 from "../../math/Mat3";
|
|
3
21
|
import { TextureTarget, 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 ShadowRenderer from "../ShadowRenderer";
|
|
2
20
|
|
|
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 SkyCube from "../SkyCube";
|
|
2
20
|
import WebGLRenderer from "./Renderer";
|
|
3
21
|
|