@fonsecabarreto/genesis-gl-react 0.1.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.
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/chunk-4H2GKYMT.js +4056 -0
- package/dist/chunk-4H2GKYMT.js.map +1 -0
- package/dist/chunk-5CACF6RI.js +71 -0
- package/dist/chunk-5CACF6RI.js.map +1 -0
- package/dist/chunk-6ZAB2GPA.js +46 -0
- package/dist/chunk-6ZAB2GPA.js.map +1 -0
- package/dist/chunk-E6LIWNSH.js +46 -0
- package/dist/chunk-E6LIWNSH.js.map +1 -0
- package/dist/chunk-OJF67RNM.js +1 -0
- package/dist/chunk-OJF67RNM.js.map +1 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/hooks/useGenesisGL.ts
|
|
2
|
+
import { useRef, useEffect } from "react";
|
|
3
|
+
import { WebGLCore, Scene, Renderer, Viewport } from "@fonsecabarreto/genesis-gl-core/Core";
|
|
4
|
+
function useGenesisGL(options) {
|
|
5
|
+
const contextRef = useRef({
|
|
6
|
+
renderer: null,
|
|
7
|
+
scene: null,
|
|
8
|
+
viewport: null,
|
|
9
|
+
webglCore: null
|
|
10
|
+
});
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const { canvasRef, onReady, onError } = options;
|
|
13
|
+
if (!canvasRef.current) return;
|
|
14
|
+
try {
|
|
15
|
+
const canvas = canvasRef.current;
|
|
16
|
+
const webglCore = new WebGLCore(canvas);
|
|
17
|
+
const viewport = new Viewport(
|
|
18
|
+
canvas,
|
|
19
|
+
window.innerWidth,
|
|
20
|
+
window.innerHeight,
|
|
21
|
+
webglCore
|
|
22
|
+
);
|
|
23
|
+
const renderer = new Renderer(webglCore, viewport);
|
|
24
|
+
const scene = Scene.withDefaultLights(webglCore);
|
|
25
|
+
contextRef.current = { renderer, scene, viewport, webglCore };
|
|
26
|
+
viewport.camera.target = [0, 0, 0];
|
|
27
|
+
viewport.camera.position = [4, 2, 8];
|
|
28
|
+
viewport.camera.invalidate();
|
|
29
|
+
if (onReady) {
|
|
30
|
+
onReady(scene, viewport, renderer);
|
|
31
|
+
}
|
|
32
|
+
} catch (error) {
|
|
33
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
34
|
+
console.error("Failed to initialize GenesisGL:", err);
|
|
35
|
+
if (onError) onError(err);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
const { scene, viewport, webglCore } = contextRef.current;
|
|
39
|
+
if (scene && webglCore) scene.dispose(webglCore);
|
|
40
|
+
if (viewport) viewport.dispose();
|
|
41
|
+
if (webglCore) webglCore.dispose();
|
|
42
|
+
};
|
|
43
|
+
}, [options]);
|
|
44
|
+
return contextRef.current;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/hooks/useRenderer.ts
|
|
48
|
+
import { useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
49
|
+
function useRenderer(options) {
|
|
50
|
+
const { renderer, onFrame, enabled = true } = options;
|
|
51
|
+
const animationIdRef = useRef2(null);
|
|
52
|
+
useEffect2(() => {
|
|
53
|
+
if (!renderer || !enabled) return;
|
|
54
|
+
const animate = (time) => {
|
|
55
|
+
if (onFrame) onFrame(time);
|
|
56
|
+
animationIdRef.current = requestAnimationFrame(animate);
|
|
57
|
+
};
|
|
58
|
+
animationIdRef.current = requestAnimationFrame(animate);
|
|
59
|
+
return () => {
|
|
60
|
+
if (animationIdRef.current !== null) {
|
|
61
|
+
cancelAnimationFrame(animationIdRef.current);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}, [renderer, onFrame, enabled]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
useGenesisGL,
|
|
69
|
+
useRenderer
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=chunk-5CACF6RI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useGenesisGL.ts","../src/hooks/useRenderer.ts"],"sourcesContent":["import { useRef, useEffect } from 'react';\nimport { WebGLCore, Scene, Renderer, Viewport } from '@fonsecabarreto/genesis-gl-core/Core';\n\nexport interface UseGenesisGLOptions {\n canvasRef: React.RefObject<HTMLCanvasElement>;\n onReady?: (scene: Scene, viewport: Viewport, renderer: Renderer) => void;\n onError?: (error: Error) => void;\n}\n\nexport interface GenesisGLContext {\n renderer: Renderer | null;\n scene: Scene | null;\n viewport: Viewport | null;\n webglCore: WebGLCore | null;\n}\n\n/**\n * Hook to initialize GenesisGL engine in a React component.\n * Handles WebGL context creation, scene setup, and cleanup.\n */\nexport function useGenesisGL(options: UseGenesisGLOptions): GenesisGLContext {\n const contextRef = useRef<GenesisGLContext>({\n renderer: null,\n scene: null,\n viewport: null,\n webglCore: null,\n });\n\n useEffect(() => {\n const { canvasRef, onReady, onError } = options;\n if (!canvasRef.current) return;\n\n try {\n const canvas = canvasRef.current;\n\n // Initialize WebGL core\n const webglCore = new WebGLCore(canvas);\n const viewport = new Viewport(\n canvas,\n window.innerWidth,\n window.innerHeight,\n webglCore\n );\n const renderer = new Renderer(webglCore, viewport);\n const scene = Scene.withDefaultLights(webglCore);\n\n contextRef.current = { renderer, scene, viewport, webglCore };\n\n // Set default camera\n viewport.camera.target = [0, 0, 0];\n viewport.camera.position = [4, 2, 8];\n viewport.camera.invalidate();\n\n if (onReady) {\n onReady(scene, viewport, renderer);\n }\n } catch (error) {\n const err = error instanceof Error ? error : new Error(String(error));\n console.error('Failed to initialize GenesisGL:', err);\n if (onError) onError(err);\n }\n\n // Cleanup\n return () => {\n const { scene, viewport, webglCore } = contextRef.current;\n if (scene && webglCore) scene.dispose(webglCore);\n if (viewport) viewport.dispose();\n if (webglCore) webglCore.dispose();\n };\n }, [options]);\n\n return contextRef.current;\n}\n","import { useRef, useEffect } from 'react';\nimport { Renderer } from '@fonsecabarreto/genesis-gl-core/Core';\n\nexport interface UseRendererOptions {\n renderer: Renderer | null;\n onFrame?: (time: number) => void;\n enabled?: boolean;\n}\n\n/**\n * Hook to manage the render loop with requestAnimationFrame.\n * Handles starting/stopping animation and cleanup.\n */\nexport function useRenderer(options: UseRendererOptions): void {\n const { renderer, onFrame, enabled = true } = options;\n const animationIdRef = useRef<number | null>(null);\n\n useEffect(() => {\n if (!renderer || !enabled) return;\n\n const animate = (time: number) => {\n if (onFrame) onFrame(time);\n animationIdRef.current = requestAnimationFrame(animate);\n };\n\n animationIdRef.current = requestAnimationFrame(animate);\n\n return () => {\n if (animationIdRef.current !== null) {\n cancelAnimationFrame(animationIdRef.current);\n }\n };\n }, [renderer, onFrame, enabled]);\n}\n"],"mappings":";AAAA,SAAS,QAAQ,iBAAiB;AAClC,SAAS,WAAW,OAAO,UAAU,gBAAgB;AAmB9C,SAAS,aAAa,SAAgD;AAC3E,QAAM,aAAa,OAAyB;AAAA,IAC1C,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,IACV,WAAW;AAAA,EACb,CAAC;AAED,YAAU,MAAM;AACd,UAAM,EAAE,WAAW,SAAS,QAAQ,IAAI;AACxC,QAAI,CAAC,UAAU,QAAS;AAExB,QAAI;AACF,YAAM,SAAS,UAAU;AAGzB,YAAM,YAAY,IAAI,UAAU,MAAM;AACtC,YAAM,WAAW,IAAI;AAAA,QACnB;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,QACP;AAAA,MACF;AACA,YAAM,WAAW,IAAI,SAAS,WAAW,QAAQ;AACjD,YAAM,QAAQ,MAAM,kBAAkB,SAAS;AAE/C,iBAAW,UAAU,EAAE,UAAU,OAAO,UAAU,UAAU;AAG5D,eAAS,OAAO,SAAS,CAAC,GAAG,GAAG,CAAC;AACjC,eAAS,OAAO,WAAW,CAAC,GAAG,GAAG,CAAC;AACnC,eAAS,OAAO,WAAW;AAE3B,UAAI,SAAS;AACX,gBAAQ,OAAO,UAAU,QAAQ;AAAA,MACnC;AAAA,IACF,SAAS,OAAO;AACd,YAAM,MAAM,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AACpE,cAAQ,MAAM,mCAAmC,GAAG;AACpD,UAAI,QAAS,SAAQ,GAAG;AAAA,IAC1B;AAGA,WAAO,MAAM;AACX,YAAM,EAAE,OAAO,UAAU,UAAU,IAAI,WAAW;AAClD,UAAI,SAAS,UAAW,OAAM,QAAQ,SAAS;AAC/C,UAAI,SAAU,UAAS,QAAQ;AAC/B,UAAI,UAAW,WAAU,QAAQ;AAAA,IACnC;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO,WAAW;AACpB;;;ACxEA,SAAS,UAAAA,SAAQ,aAAAC,kBAAiB;AAa3B,SAAS,YAAY,SAAmC;AAC7D,QAAM,EAAE,UAAU,SAAS,UAAU,KAAK,IAAI;AAC9C,QAAM,iBAAiBD,QAAsB,IAAI;AAEjD,EAAAC,WAAU,MAAM;AACd,QAAI,CAAC,YAAY,CAAC,QAAS;AAE3B,UAAM,UAAU,CAAC,SAAiB;AAChC,UAAI,QAAS,SAAQ,IAAI;AACzB,qBAAe,UAAU,sBAAsB,OAAO;AAAA,IACxD;AAEA,mBAAe,UAAU,sBAAsB,OAAO;AAEtD,WAAO,MAAM;AACX,UAAI,eAAe,YAAY,MAAM;AACnC,6BAAqB,eAAe,OAAO;AAAA,MAC7C;AAAA,IACF;AAAA,EACF,GAAG,CAAC,UAAU,SAAS,OAAO,CAAC;AACjC;","names":["useRef","useEffect"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useGenesisGL,
|
|
3
|
+
useRenderer
|
|
4
|
+
} from "./chunk-4H2GKYMT.js";
|
|
5
|
+
|
|
6
|
+
// src/components/GenesisGLCanvas.tsx
|
|
7
|
+
import React, { useRef } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var GenesisGLCanvas = React.forwardRef(
|
|
10
|
+
({ onReady, onFrame, style, className }, ref) => {
|
|
11
|
+
const canvasRef = useRef(null);
|
|
12
|
+
const internalRef = ref || canvasRef;
|
|
13
|
+
const genesisContext = useGenesisGL({
|
|
14
|
+
canvasRef: internalRef,
|
|
15
|
+
onReady
|
|
16
|
+
});
|
|
17
|
+
useRenderer({
|
|
18
|
+
renderer: genesisContext.renderer,
|
|
19
|
+
onFrame: (time) => {
|
|
20
|
+
if (genesisContext.renderer && genesisContext.scene) {
|
|
21
|
+
genesisContext.renderer.render(genesisContext.scene);
|
|
22
|
+
if (onFrame) onFrame(time);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"canvas",
|
|
28
|
+
{
|
|
29
|
+
ref: internalRef,
|
|
30
|
+
style: {
|
|
31
|
+
display: "block",
|
|
32
|
+
width: "100%",
|
|
33
|
+
height: "100%",
|
|
34
|
+
...style
|
|
35
|
+
},
|
|
36
|
+
className
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
GenesisGLCanvas.displayName = "GenesisGLCanvas";
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
GenesisGLCanvas
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=chunk-6ZAB2GPA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/GenesisGLCanvas.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport type { Scene, Renderer, Viewport } from '../../../GenesisGL/src/Core';\nimport { useGenesisGL } from '../hooks/useGenesisGL';\nimport { useRenderer } from '../hooks/useRenderer';\n\nexport interface GenesisGLCanvasProps {\n onReady?: (scene: Scene, viewport: Viewport, renderer: Renderer) => void;\n onFrame?: (time: number) => void;\n style?: React.CSSProperties;\n className?: string;\n}\n\n/**\n * GenesisGLCanvas — A React component that wraps the entire initialization\n * and rendering pipeline for GenesisGL.\n *\n * Handles WebGL context, scene creation, cleanup, and animation loop.\n */\nexport const GenesisGLCanvas = React.forwardRef<HTMLCanvasElement, GenesisGLCanvasProps>(\n ({ onReady, onFrame, style, className }, ref) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const internalRef = (ref as React.MutableRefObject<HTMLCanvasElement | null>) || canvasRef;\n\n const genesisContext = useGenesisGL({\n canvasRef: internalRef,\n onReady,\n });\n\n useRenderer({\n renderer: genesisContext.renderer,\n onFrame: (time) => {\n if (genesisContext.renderer && genesisContext.scene) {\n genesisContext.renderer.render(genesisContext.scene);\n if (onFrame) onFrame(time);\n }\n },\n });\n\n return (\n <canvas\n ref={internalRef}\n style={{\n display: 'block',\n width: '100%',\n height: '100%',\n ...style,\n }}\n className={className}\n />\n );\n }\n);\n\nGenesisGLCanvas.displayName = 'GenesisGLCanvas';\n"],"mappings":";;;;;;AAAA,OAAO,SAAS,cAAc;AAuCxB;AArBC,IAAM,kBAAkB,MAAM;AAAA,EACnC,CAAC,EAAE,SAAS,SAAS,OAAO,UAAU,GAAG,QAAQ;AAC/C,UAAM,YAAY,OAA0B,IAAI;AAChD,UAAM,cAAe,OAA4D;AAEjF,UAAM,iBAAiB,aAAa;AAAA,MAClC,WAAW;AAAA,MACX;AAAA,IACF,CAAC;AAED,gBAAY;AAAA,MACV,UAAU,eAAe;AAAA,MACzB,SAAS,CAAC,SAAS;AACjB,YAAI,eAAe,YAAY,eAAe,OAAO;AACnD,yBAAe,SAAS,OAAO,eAAe,KAAK;AACnD,cAAI,QAAS,SAAQ,IAAI;AAAA,QAC3B;AAAA,MACF;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,SAAS;AAAA,UACT,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,GAAG;AAAA,QACL;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,gBAAgB,cAAc;","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useGenesisGL,
|
|
3
|
+
useRenderer
|
|
4
|
+
} from "./chunk-5CACF6RI.js";
|
|
5
|
+
|
|
6
|
+
// src/components/GenesisGLCanvas.tsx
|
|
7
|
+
import React, { useRef } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var GenesisGLCanvas = React.forwardRef(
|
|
10
|
+
({ onReady, onFrame, style, className }, ref) => {
|
|
11
|
+
const canvasRef = useRef(null);
|
|
12
|
+
const internalRef = ref || canvasRef;
|
|
13
|
+
const genesisContext = useGenesisGL({
|
|
14
|
+
canvasRef: internalRef,
|
|
15
|
+
onReady
|
|
16
|
+
});
|
|
17
|
+
useRenderer({
|
|
18
|
+
renderer: genesisContext.renderer,
|
|
19
|
+
onFrame: (time) => {
|
|
20
|
+
if (genesisContext.renderer && genesisContext.scene) {
|
|
21
|
+
genesisContext.renderer.render(genesisContext.scene);
|
|
22
|
+
if (onFrame) onFrame(time);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"canvas",
|
|
28
|
+
{
|
|
29
|
+
ref: internalRef,
|
|
30
|
+
style: {
|
|
31
|
+
display: "block",
|
|
32
|
+
width: "100%",
|
|
33
|
+
height: "100%",
|
|
34
|
+
...style
|
|
35
|
+
},
|
|
36
|
+
className
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
GenesisGLCanvas.displayName = "GenesisGLCanvas";
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
GenesisGLCanvas
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=chunk-E6LIWNSH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/GenesisGLCanvas.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Scene, Renderer, Viewport } from '@fonsecabarreto/genesis-gl-core/Core';\nimport { useGenesisGL } from '../hooks/useGenesisGL';\nimport { useRenderer } from '../hooks/useRenderer';\n\nexport interface GenesisGLCanvasProps {\n onReady?: (scene: Scene, viewport: Viewport, renderer: Renderer) => void;\n onFrame?: (time: number) => void;\n style?: React.CSSProperties;\n className?: string;\n}\n\n/**\n * GenesisGLCanvas — A React component that wraps the entire initialization\n * and rendering pipeline for GenesisGL.\n *\n * Handles WebGL context, scene creation, cleanup, and animation loop.\n */\nexport const GenesisGLCanvas = React.forwardRef<HTMLCanvasElement, GenesisGLCanvasProps>(\n ({ onReady, onFrame, style, className }, ref) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const internalRef = (ref as React.MutableRefObject<HTMLCanvasElement | null>) || canvasRef;\n\n const genesisContext = useGenesisGL({\n canvasRef: internalRef,\n onReady,\n });\n\n useRenderer({\n renderer: genesisContext.renderer,\n onFrame: (time) => {\n if (genesisContext.renderer && genesisContext.scene) {\n genesisContext.renderer.render(genesisContext.scene);\n if (onFrame) onFrame(time);\n }\n },\n });\n\n return (\n <canvas\n ref={internalRef}\n style={{\n display: 'block',\n width: '100%',\n height: '100%',\n ...style,\n }}\n className={className}\n />\n );\n }\n);\n\nGenesisGLCanvas.displayName = 'GenesisGLCanvas';\n"],"mappings":";;;;;;AAAA,OAAO,SAAS,cAAc;AAuCxB;AArBC,IAAM,kBAAkB,MAAM;AAAA,EACnC,CAAC,EAAE,SAAS,SAAS,OAAO,UAAU,GAAG,QAAQ;AAC/C,UAAM,YAAY,OAA0B,IAAI;AAChD,UAAM,cAAe,OAA4D;AAEjF,UAAM,iBAAiB,aAAa;AAAA,MAClC,WAAW;AAAA,MACX;AAAA,IACF,CAAC;AAED,gBAAY;AAAA,MACV,UAAU,eAAe;AAAA,MACzB,SAAS,CAAC,SAAS;AACjB,YAAI,eAAe,YAAY,eAAe,OAAO;AACnD,yBAAe,SAAS,OAAO,eAAe,KAAK;AACnD,cAAI,QAAS,SAAQ,IAAI;AAAA,QAC3B;AAAA,MACF;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,SAAS;AAAA,UACT,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,GAAG;AAAA,QACL;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,gBAAgB,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-OJF67RNM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GenesisGLCanvas
|
|
3
|
+
} from "./chunk-6ZAB2GPA.js";
|
|
4
|
+
import "./chunk-OJF67RNM.js";
|
|
5
|
+
import {
|
|
6
|
+
useGenesisGL,
|
|
7
|
+
useRenderer
|
|
8
|
+
} from "./chunk-4H2GKYMT.js";
|
|
9
|
+
export {
|
|
10
|
+
GenesisGLCanvas,
|
|
11
|
+
useGenesisGL,
|
|
12
|
+
useRenderer
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fonsecabarreto/genesis-gl-react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React integration for GenesisGL — WebGL 3D engine",
|
|
5
|
+
"author": "Lucas Fonseca Barreto",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./hooks": {
|
|
17
|
+
"import": "./dist/hooks/index.js",
|
|
18
|
+
"types": "./dist/hooks/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./components": {
|
|
21
|
+
"import": "./dist/components/index.js",
|
|
22
|
+
"types": "./dist/components/index.d.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/fonsecaBarreto/project-genesis-gl.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/fonsecaBarreto/project-genesis-gl/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/fonsecaBarreto/project-genesis-gl#readme",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"keywords": [
|
|
42
|
+
"react",
|
|
43
|
+
"webgl",
|
|
44
|
+
"3d",
|
|
45
|
+
"game-engine",
|
|
46
|
+
"hooks",
|
|
47
|
+
"components"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"clean": "rimraf dist",
|
|
53
|
+
"typecheck": "tsc --noEmit"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^18.0.0",
|
|
57
|
+
"react-dom": "^18.0.0",
|
|
58
|
+
"@fonsecabarreto/genesis-gl-core": "^0.1.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^20.11.30",
|
|
62
|
+
"@types/react": "^18.3.3",
|
|
63
|
+
"@types/react-dom": "^18.3.0",
|
|
64
|
+
"@fonsecabarreto/genesis-gl-core": "*",
|
|
65
|
+
"react": "^18.3.1",
|
|
66
|
+
"react-dom": "^18.3.1",
|
|
67
|
+
"rimraf": "^6.0.1",
|
|
68
|
+
"tsup": "^8.4.0",
|
|
69
|
+
"typescript": "^5.9.2"
|
|
70
|
+
}
|
|
71
|
+
}
|