goudengine 0.0.826 → 0.0.828
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/README.md +18 -0
- package/dist/generated/errors.g.d.ts +37 -0
- package/dist/generated/errors.g.d.ts.map +1 -0
- package/dist/generated/errors.g.js +148 -0
- package/dist/generated/errors.g.js.map +1 -0
- package/dist/generated/index.g.d.ts +3 -2
- package/dist/generated/index.g.d.ts.map +1 -1
- package/dist/generated/index.g.js +13 -1
- package/dist/generated/index.g.js.map +1 -1
- package/dist/generated/node/index.g.d.ts +122 -2
- package/dist/generated/node/index.g.d.ts.map +1 -1
- package/dist/generated/node/index.g.js +160 -1
- package/dist/generated/node/index.g.js.map +1 -1
- package/dist/generated/types/engine.g.d.ts +134 -0
- package/dist/generated/types/engine.g.d.ts.map +1 -1
- package/dist/generated/types/input.g.d.ts +38 -0
- package/dist/generated/types/input.g.d.ts.map +1 -1
- package/dist/generated/types/input.g.js +45 -1
- package/dist/generated/types/input.g.js.map +1 -1
- package/dist/generated/types/math.g.d.ts +4 -0
- package/dist/generated/types/math.g.d.ts.map +1 -1
- package/dist/generated/types/math.g.js +4 -0
- package/dist/generated/types/math.g.js.map +1 -1
- package/dist/web/generated/types/engine.g.d.ts +134 -0
- package/dist/web/generated/types/engine.g.d.ts.map +1 -1
- package/dist/web/generated/types/input.g.d.ts +38 -0
- package/dist/web/generated/types/input.g.d.ts.map +1 -1
- package/dist/web/generated/types/input.g.js +44 -0
- package/dist/web/generated/types/input.g.js.map +1 -1
- package/dist/web/generated/types/math.g.d.ts +4 -0
- package/dist/web/generated/types/math.g.d.ts.map +1 -1
- package/dist/web/generated/types/math.g.js +4 -0
- package/dist/web/generated/types/math.g.js.map +1 -1
- package/dist/web/generated/web/errors.g.d.ts +37 -0
- package/dist/web/generated/web/errors.g.d.ts.map +1 -0
- package/dist/web/generated/web/errors.g.js +136 -0
- package/dist/web/generated/web/errors.g.js.map +1 -0
- package/dist/web/generated/web/index.g.d.ts +91 -2
- package/dist/web/generated/web/index.g.d.ts.map +1 -1
- package/dist/web/generated/web/index.g.js +144 -13
- package/dist/web/generated/web/index.g.js.map +1 -1
- package/goud-engine-node.darwin-arm64.node +0 -0
- package/goud-engine-node.darwin-x64.node +0 -0
- package/goud-engine-node.linux-x64-gnu.node +0 -0
- package/goud-engine-node.win32-x64-msvc.node +0 -0
- package/index.d.ts +24 -0
- package/index.js +53 -52
- package/package.json +1 -1
- package/wasm/goud_engine.d.ts +231 -60
- package/wasm/goud_engine.js +621 -57
- package/wasm/goud_engine_bg.wasm +0 -0
- package/wasm/goud_engine_bg.wasm.d.ts +93 -34
package/README.md
CHANGED
|
@@ -136,6 +136,24 @@ game.destroy();
|
|
|
136
136
|
**Controls:** `Space` or left-click to flap, `R` to restart, `Escape` to quit.
|
|
137
137
|
The web variant works the same way — import from `goudengine/web` and call `await GoudGame.create(...)`.
|
|
138
138
|
|
|
139
|
+
## Web Platform Notes
|
|
140
|
+
|
|
141
|
+
A few things to keep in mind when targeting the browser:
|
|
142
|
+
|
|
143
|
+
- **Synchronous game loop callback** -- The `game.run()` callback must be
|
|
144
|
+
synchronous. Passing an `async` function triggers a console warning because
|
|
145
|
+
wasm-bindgen's `RefCell` borrow cannot be held across `await` points.
|
|
146
|
+
- **Texture loading uses `fetch()`** -- `loadTexture(path)` calls `fetch()`
|
|
147
|
+
internally, so relative URLs resolve from the page's origin. Make sure your
|
|
148
|
+
asset paths are correct relative to your HTML file or use absolute URLs.
|
|
149
|
+
- **`pause()` / `resume()`** -- You can pause the game loop without detaching
|
|
150
|
+
input handlers by calling `game.pause()`. Call `game.resume()` to restart.
|
|
151
|
+
`game.stop()` fully tears down the loop and input handlers.
|
|
152
|
+
- **Tab visibility** -- `requestAnimationFrame` automatically pauses when the
|
|
153
|
+
browser tab is hidden. No extra handling is needed.
|
|
154
|
+
- **Touch input** -- Touch events are automatically mapped to mouse button 0.
|
|
155
|
+
`touchstart` maps to `press_mouse_button(0)`, `touchend` maps to `release_mouse_button(0)`.
|
|
156
|
+
|
|
139
157
|
## Node vs Web Targets
|
|
140
158
|
|
|
141
159
|
The package uses conditional exports to select the right backend automatically:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare enum RecoveryClass {
|
|
2
|
+
Recoverable = 0,
|
|
3
|
+
Fatal = 1,
|
|
4
|
+
Degraded = 2
|
|
5
|
+
}
|
|
6
|
+
/** Base error for all GoudEngine errors. */
|
|
7
|
+
export declare class GoudError extends Error {
|
|
8
|
+
readonly code: number;
|
|
9
|
+
readonly category: string;
|
|
10
|
+
readonly subsystem: string;
|
|
11
|
+
readonly operation: string;
|
|
12
|
+
readonly recovery: RecoveryClass;
|
|
13
|
+
readonly recoveryHint: string;
|
|
14
|
+
constructor(code: number, message: string, category: string, subsystem: string, operation: string, recovery: RecoveryClass, recoveryHint: string);
|
|
15
|
+
/**
|
|
16
|
+
* Build the correct typed error subclass from a code and message.
|
|
17
|
+
* Subsystem and operation are optional context strings.
|
|
18
|
+
*/
|
|
19
|
+
static fromCode(code: number, message: string, subsystem?: string, operation?: string): GoudError;
|
|
20
|
+
}
|
|
21
|
+
export declare class GoudContextError extends GoudError {
|
|
22
|
+
}
|
|
23
|
+
export declare class GoudResourceError extends GoudError {
|
|
24
|
+
}
|
|
25
|
+
export declare class GoudGraphicsError extends GoudError {
|
|
26
|
+
}
|
|
27
|
+
export declare class GoudEntityError extends GoudError {
|
|
28
|
+
}
|
|
29
|
+
export declare class GoudInputError extends GoudError {
|
|
30
|
+
}
|
|
31
|
+
export declare class GoudSystemError extends GoudError {
|
|
32
|
+
}
|
|
33
|
+
export declare class GoudProviderError extends GoudError {
|
|
34
|
+
}
|
|
35
|
+
export declare class GoudInternalError extends GoudError {
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=errors.g.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.g.d.ts","sourceRoot":"","sources":["../../src/generated/errors.g.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACvB,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;CACb;AAED,4CAA4C;AAC5C,qBAAa,SAAU,SAAQ,KAAK;IAClC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,QAAQ,EAAE,aAAa,CAAC;IACxC,SAAgB,YAAY,EAAE,MAAM,CAAC;gBAGnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,MAAM;IAetB;;;OAGG;IACH,MAAM,CAAC,QAAQ,CACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAW,EACtB,SAAS,GAAE,MAAW,GACrB,SAAS;CAUb;AAED,qBAAa,gBAAiB,SAAQ,SAAS;CAAG;AAClD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AACnD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AACnD,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AACjD,qBAAa,cAAe,SAAQ,SAAS;CAAG;AAChD,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AACjD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AACnD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file is AUTO-GENERATED by GoudEngine codegen. DO NOT EDIT.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GoudInternalError = exports.GoudProviderError = exports.GoudSystemError = exports.GoudInputError = exports.GoudEntityError = exports.GoudGraphicsError = exports.GoudResourceError = exports.GoudContextError = exports.GoudError = exports.RecoveryClass = void 0;
|
|
5
|
+
var RecoveryClass;
|
|
6
|
+
(function (RecoveryClass) {
|
|
7
|
+
RecoveryClass[RecoveryClass["Recoverable"] = 0] = "Recoverable";
|
|
8
|
+
RecoveryClass[RecoveryClass["Fatal"] = 1] = "Fatal";
|
|
9
|
+
RecoveryClass[RecoveryClass["Degraded"] = 2] = "Degraded";
|
|
10
|
+
})(RecoveryClass || (exports.RecoveryClass = RecoveryClass = {}));
|
|
11
|
+
/** Base error for all GoudEngine errors. */
|
|
12
|
+
class GoudError extends Error {
|
|
13
|
+
constructor(code, message, category, subsystem, operation, recovery, recoveryHint) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = new.target.name;
|
|
16
|
+
this.code = code;
|
|
17
|
+
this.category = category;
|
|
18
|
+
this.subsystem = subsystem;
|
|
19
|
+
this.operation = operation;
|
|
20
|
+
this.recovery = recovery;
|
|
21
|
+
this.recoveryHint = recoveryHint;
|
|
22
|
+
// Maintain proper prototype chain for instanceof checks
|
|
23
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build the correct typed error subclass from a code and message.
|
|
27
|
+
* Subsystem and operation are optional context strings.
|
|
28
|
+
*/
|
|
29
|
+
static fromCode(code, message, subsystem = "", operation = "") {
|
|
30
|
+
const category = categoryFromCode(code);
|
|
31
|
+
const recovery = recoveryFromCategory(category);
|
|
32
|
+
const hint = hintFromCode(code);
|
|
33
|
+
const Subclass = CATEGORY_CLASS_MAP[category] ?? GoudError;
|
|
34
|
+
return new Subclass(code, message, category, subsystem, operation, recovery, hint);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.GoudError = GoudError;
|
|
38
|
+
class GoudContextError extends GoudError {
|
|
39
|
+
}
|
|
40
|
+
exports.GoudContextError = GoudContextError;
|
|
41
|
+
class GoudResourceError extends GoudError {
|
|
42
|
+
}
|
|
43
|
+
exports.GoudResourceError = GoudResourceError;
|
|
44
|
+
class GoudGraphicsError extends GoudError {
|
|
45
|
+
}
|
|
46
|
+
exports.GoudGraphicsError = GoudGraphicsError;
|
|
47
|
+
class GoudEntityError extends GoudError {
|
|
48
|
+
}
|
|
49
|
+
exports.GoudEntityError = GoudEntityError;
|
|
50
|
+
class GoudInputError extends GoudError {
|
|
51
|
+
}
|
|
52
|
+
exports.GoudInputError = GoudInputError;
|
|
53
|
+
class GoudSystemError extends GoudError {
|
|
54
|
+
}
|
|
55
|
+
exports.GoudSystemError = GoudSystemError;
|
|
56
|
+
class GoudProviderError extends GoudError {
|
|
57
|
+
}
|
|
58
|
+
exports.GoudProviderError = GoudProviderError;
|
|
59
|
+
class GoudInternalError extends GoudError {
|
|
60
|
+
}
|
|
61
|
+
exports.GoudInternalError = GoudInternalError;
|
|
62
|
+
const CATEGORY_CLASS_MAP = {
|
|
63
|
+
Context: GoudContextError,
|
|
64
|
+
Resource: GoudResourceError,
|
|
65
|
+
Graphics: GoudGraphicsError,
|
|
66
|
+
Entity: GoudEntityError,
|
|
67
|
+
Input: GoudInputError,
|
|
68
|
+
System: GoudSystemError,
|
|
69
|
+
Provider: GoudProviderError,
|
|
70
|
+
Internal: GoudInternalError,
|
|
71
|
+
};
|
|
72
|
+
function categoryFromCode(code) {
|
|
73
|
+
if (code >= 900)
|
|
74
|
+
return "Internal";
|
|
75
|
+
if (code >= 600)
|
|
76
|
+
return "Provider";
|
|
77
|
+
if (code >= 500)
|
|
78
|
+
return "System";
|
|
79
|
+
if (code >= 400)
|
|
80
|
+
return "Input";
|
|
81
|
+
if (code >= 300)
|
|
82
|
+
return "Entity";
|
|
83
|
+
if (code >= 200)
|
|
84
|
+
return "Graphics";
|
|
85
|
+
if (code >= 100)
|
|
86
|
+
return "Resource";
|
|
87
|
+
if (code >= 1)
|
|
88
|
+
return "Context";
|
|
89
|
+
return "Unknown";
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Default recovery class derived from code range. This is a fallback
|
|
93
|
+
* for environments where the native FFI is not available (e.g., web).
|
|
94
|
+
* Desktop environments should prefer the value from
|
|
95
|
+
* goud_error_recovery_class.
|
|
96
|
+
*/
|
|
97
|
+
function recoveryFromCategory(category) {
|
|
98
|
+
switch (category) {
|
|
99
|
+
case "Context":
|
|
100
|
+
case "Internal":
|
|
101
|
+
return RecoveryClass.Fatal;
|
|
102
|
+
default:
|
|
103
|
+
return RecoveryClass.Recoverable;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Static hint lookup matching the codegen schema. */
|
|
107
|
+
function hintFromCode(code) {
|
|
108
|
+
return HINTS[code] ?? "";
|
|
109
|
+
}
|
|
110
|
+
const HINTS = {
|
|
111
|
+
1: "Call the initialization function first",
|
|
112
|
+
2: "Shut down the engine before re-initializing",
|
|
113
|
+
3: "Ensure the context was properly created and not corrupted",
|
|
114
|
+
4: "Re-initialize the engine to obtain a new context",
|
|
115
|
+
10: "Check the error message for details and verify dependencies",
|
|
116
|
+
100: "Verify the file path and check the working directory",
|
|
117
|
+
101: "Check file permissions and ensure the file is not locked",
|
|
118
|
+
102: "Verify the file is not corrupted and uses a supported format",
|
|
119
|
+
103: "Use a unique identifier or remove the existing resource first",
|
|
120
|
+
110: "Ensure the handle was obtained from a valid creation call",
|
|
121
|
+
111: "Re-create the resource to get a new handle",
|
|
122
|
+
112: "Pass the correct handle type for the operation",
|
|
123
|
+
200: "Review shader source; the error message contains GPU compiler output",
|
|
124
|
+
201: "Verify shader stage inputs/outputs match and uniforms are declared",
|
|
125
|
+
210: "Check texture dimensions and format; reduce size or free GPU resources",
|
|
126
|
+
211: "Reduce buffer size or free unused GPU buffers",
|
|
127
|
+
220: "Verify attachment formats and dimensions are consistent",
|
|
128
|
+
230: "Update GPU drivers or select a different supported backend",
|
|
129
|
+
240: "Verify buffer bindings and shader state; try updating GPU drivers",
|
|
130
|
+
300: "Verify the entity ID is valid and has not been despawned",
|
|
131
|
+
301: "Use a different entity ID or remove the existing entity first",
|
|
132
|
+
310: "Attach the component before accessing it, or check with a has-component query",
|
|
133
|
+
311: "Use replace/update instead of add, or remove the existing component first",
|
|
134
|
+
320: "Check for conflicting mutable/immutable access on the same component",
|
|
135
|
+
400: "Verify the input device is connected and recognized by the OS",
|
|
136
|
+
401: "Check the action name matches a registered input action",
|
|
137
|
+
500: "Verify display server is running and window parameters are valid",
|
|
138
|
+
510: "Check that an audio output device is available",
|
|
139
|
+
520: "Review physics configuration for invalid values",
|
|
140
|
+
530: "Check the error message for platform-specific details",
|
|
141
|
+
600: "Check provider configuration and dependencies",
|
|
142
|
+
601: "Register the provider before accessing it",
|
|
143
|
+
602: "Check the error message for operation-specific details",
|
|
144
|
+
900: "Report the error with full details; this is likely an engine bug",
|
|
145
|
+
901: "Use an alternative approach or wait for the feature to be implemented",
|
|
146
|
+
902: "Check the sequence of API calls; the engine may need re-initialization",
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=errors.g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.g.js","sourceRoot":"","sources":["../../src/generated/errors.g.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;AAElE,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,+DAAe,CAAA;IACf,mDAAS,CAAA;IACT,yDAAY,CAAA;AACd,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,4CAA4C;AAC5C,MAAa,SAAU,SAAQ,KAAK;IAQlC,YACE,IAAY,EACZ,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,QAAuB,EACvB,YAAoB;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAA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sDAAsD;IAC3D,GAAG,EAAE,0DAA0D;IAC/D,GAAG,EAAE,8DAA8D;IACnE,GAAG,EAAE,+DAA+D;IACpE,GAAG,EAAE,2DAA2D;IAChE,GAAG,EAAE,4CAA4C;IACjD,GAAG,EAAE,gDAAgD;IACrD,GAAG,EAAE,sEAAsE;IAC3E,GAAG,EAAE,oEAAoE;IACzE,GAAG,EAAE,wEAAwE;IAC7E,GAAG,EAAE,+CAA+C;IACpD,GAAG,EAAE,yDAAyD;IAC9D,GAAG,EAAE,4DAA4D;IACjE,GAAG,EAAE,mEAAmE;IACxE,GAAG,EAAE,0DAA0D;IAC/D,GAAG,EAAE,+DAA+D;IACpE,GAAG,EAAE,+EAA+E;IACpF,GAAG,EAAE,2EAA2E;IAChF,GAAG,EAAE,sEAAsE;IAC3E,GAAG,EAAE,+DAA+D;IACpE,GAAG,EAAE,yDAAyD;IAC9D,GAAG,EAAE,kEAAkE;IACvE,GAAG,EAAE,gDAAgD;IACrD,GAAG,EAAE,iDAAiD;IACtD,GAAG,EAAE,uDAAuD;IAC5D,GAAG,EAAE,+CAA+C;IACpD,GAAG,EAAE,2CAA2C;IAChD,GAAG,EAAE,wDAAwD;IAC7D,GAAG,EAAE,kEAAkE;IACvE,GAAG,EAAE,uEAAuE;IAC5E,GAAG,EAAE,wEAAwE;CAC9E,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { GoudGame, Color, Vec2, Vec3, Key, MouseButton } from './node/index.g.js';
|
|
2
|
-
export type { IGoudGame, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact } from './types/engine.g.js';
|
|
1
|
+
export { GoudGame, EngineConfig, Color, Vec2, Vec3, Key, MouseButton } from './node/index.g.js';
|
|
2
|
+
export type { IGoudGame, IEngineConfig, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact, IFpsStats } from './types/engine.g.js';
|
|
3
3
|
export type { Rect } from './types/math.g.js';
|
|
4
|
+
export { GoudError, GoudContextError, GoudResourceError, GoudGraphicsError, GoudEntityError, GoudInputError, GoudSystemError, GoudProviderError, GoudInternalError, RecoveryClass } from './errors.g.js';
|
|
4
5
|
//# sourceMappingURL=index.g.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.g.d.ts","sourceRoot":"","sources":["../../src/generated/index.g.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.g.d.ts","sourceRoot":"","sources":["../../src/generated/index.g.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChG,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC9J,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is AUTO-GENERATED by GoudEngine codegen. DO NOT EDIT.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MouseButton = exports.Key = exports.Vec3 = exports.Vec2 = exports.Color = exports.GoudGame = void 0;
|
|
4
|
+
exports.RecoveryClass = exports.GoudInternalError = exports.GoudProviderError = exports.GoudSystemError = exports.GoudInputError = exports.GoudEntityError = exports.GoudGraphicsError = exports.GoudResourceError = exports.GoudContextError = exports.GoudError = exports.MouseButton = exports.Key = exports.Vec3 = exports.Vec2 = exports.Color = exports.EngineConfig = exports.GoudGame = void 0;
|
|
5
5
|
var index_g_js_1 = require("./node/index.g.js");
|
|
6
6
|
Object.defineProperty(exports, "GoudGame", { enumerable: true, get: function () { return index_g_js_1.GoudGame; } });
|
|
7
|
+
Object.defineProperty(exports, "EngineConfig", { enumerable: true, get: function () { return index_g_js_1.EngineConfig; } });
|
|
7
8
|
Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return index_g_js_1.Color; } });
|
|
8
9
|
Object.defineProperty(exports, "Vec2", { enumerable: true, get: function () { return index_g_js_1.Vec2; } });
|
|
9
10
|
Object.defineProperty(exports, "Vec3", { enumerable: true, get: function () { return index_g_js_1.Vec3; } });
|
|
10
11
|
Object.defineProperty(exports, "Key", { enumerable: true, get: function () { return index_g_js_1.Key; } });
|
|
11
12
|
Object.defineProperty(exports, "MouseButton", { enumerable: true, get: function () { return index_g_js_1.MouseButton; } });
|
|
13
|
+
var errors_g_js_1 = require("./errors.g.js");
|
|
14
|
+
Object.defineProperty(exports, "GoudError", { enumerable: true, get: function () { return errors_g_js_1.GoudError; } });
|
|
15
|
+
Object.defineProperty(exports, "GoudContextError", { enumerable: true, get: function () { return errors_g_js_1.GoudContextError; } });
|
|
16
|
+
Object.defineProperty(exports, "GoudResourceError", { enumerable: true, get: function () { return errors_g_js_1.GoudResourceError; } });
|
|
17
|
+
Object.defineProperty(exports, "GoudGraphicsError", { enumerable: true, get: function () { return errors_g_js_1.GoudGraphicsError; } });
|
|
18
|
+
Object.defineProperty(exports, "GoudEntityError", { enumerable: true, get: function () { return errors_g_js_1.GoudEntityError; } });
|
|
19
|
+
Object.defineProperty(exports, "GoudInputError", { enumerable: true, get: function () { return errors_g_js_1.GoudInputError; } });
|
|
20
|
+
Object.defineProperty(exports, "GoudSystemError", { enumerable: true, get: function () { return errors_g_js_1.GoudSystemError; } });
|
|
21
|
+
Object.defineProperty(exports, "GoudProviderError", { enumerable: true, get: function () { return errors_g_js_1.GoudProviderError; } });
|
|
22
|
+
Object.defineProperty(exports, "GoudInternalError", { enumerable: true, get: function () { return errors_g_js_1.GoudInternalError; } });
|
|
23
|
+
Object.defineProperty(exports, "RecoveryClass", { enumerable: true, get: function () { return errors_g_js_1.RecoveryClass; } });
|
|
12
24
|
//# sourceMappingURL=index.g.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.g.js","sourceRoot":"","sources":["../../src/generated/index.g.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;AAElE,
|
|
1
|
+
{"version":3,"file":"index.g.js","sourceRoot":"","sources":["../../src/generated/index.g.ts"],"names":[],"mappings":";AAAA,kEAAkE;;;AAElE,gDAAgG;AAAvF,sGAAA,QAAQ,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,mGAAA,KAAK,OAAA;AAAE,kGAAA,IAAI,OAAA;AAAE,kGAAA,IAAI,OAAA;AAAE,iGAAA,GAAG,OAAA;AAAE,yGAAA,WAAW,OAAA;AAGpE,6CAAyM;AAAhM,wGAAA,SAAS,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AAAE,8GAAA,eAAe,OAAA;AAAE,6GAAA,cAAc,OAAA;AAAE,8GAAA,eAAe,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AAAE,4GAAA,aAAa,OAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IGoudGame, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact } from '../types/engine.g.js';
|
|
1
|
+
import type { IGoudGame, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact, IFpsStats } from '../types/engine.g.js';
|
|
2
2
|
export { Color, Vec2, Vec3 } from '../types/math.g.js';
|
|
3
3
|
export { Key, MouseButton } from '../types/input.g.js';
|
|
4
|
-
export type { IGoudGame, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact } from '../types/engine.g.js';
|
|
4
|
+
export type { IGoudGame, IEntity, IColor, IVec2, ITransform2DData, ISpriteData, IRenderStats, IContact, IFpsStats } from '../types/engine.g.js';
|
|
5
|
+
/** Main game engine instance. Creates a window, manages rendering, input, and ECS. */
|
|
5
6
|
export declare class GoudGame implements IGoudGame {
|
|
6
7
|
private native;
|
|
7
8
|
constructor(config?: {
|
|
@@ -14,90 +15,209 @@ export declare class GoudGame implements IGoudGame {
|
|
|
14
15
|
height?: number;
|
|
15
16
|
title?: string;
|
|
16
17
|
}): Promise<GoudGame>;
|
|
18
|
+
/** Seconds elapsed since last frame */
|
|
17
19
|
get deltaTime(): number;
|
|
20
|
+
/** Current frames per second */
|
|
18
21
|
get fps(): number;
|
|
22
|
+
/** Window width in pixels */
|
|
19
23
|
get windowWidth(): number;
|
|
24
|
+
/** Window height in pixels */
|
|
20
25
|
get windowHeight(): number;
|
|
26
|
+
/** Window title */
|
|
21
27
|
get title(): string;
|
|
28
|
+
/** Total elapsed time in seconds */
|
|
22
29
|
get totalTime(): number;
|
|
30
|
+
/** Number of frames processed */
|
|
23
31
|
get frameCount(): number;
|
|
32
|
+
/** Returns true if the window close has been requested */
|
|
24
33
|
shouldClose(): boolean;
|
|
34
|
+
/** Signals the window to close */
|
|
25
35
|
close(): void;
|
|
36
|
+
/** Releases all engine resources */
|
|
26
37
|
destroy(): void;
|
|
38
|
+
/** Starts a new render frame with the given clear color */
|
|
27
39
|
beginFrame(r?: number, g?: number, b?: number, a?: number): void;
|
|
40
|
+
/** Finishes the current frame and presents it to the screen */
|
|
28
41
|
endFrame(): void;
|
|
42
|
+
/** Runs the game loop. Calls the update callback each frame with delta time. Blocks until the window is closed. */
|
|
29
43
|
run(update: (dt: number) => void): void;
|
|
44
|
+
/** Loads a texture from a file path and returns its handle */
|
|
30
45
|
loadTexture(path: string): Promise<number>;
|
|
46
|
+
/** Destroys a previously loaded texture */
|
|
31
47
|
destroyTexture(handle: number): void;
|
|
48
|
+
/** Draws a textured sprite */
|
|
32
49
|
drawSprite(texture: number, x: number, y: number, width: number, height: number, rotation?: number, color?: IColor): void;
|
|
50
|
+
/** Draws a colored rectangle */
|
|
33
51
|
drawQuad(x: number, y: number, width: number, height: number, color?: IColor): void;
|
|
52
|
+
/** Returns true if the key is currently held down */
|
|
34
53
|
isKeyPressed(key: number): boolean;
|
|
54
|
+
/** Returns true if the key was pressed this frame */
|
|
35
55
|
isKeyJustPressed(key: number): boolean;
|
|
56
|
+
/** Returns true if the key was released this frame */
|
|
36
57
|
isKeyJustReleased(key: number): boolean;
|
|
58
|
+
/** Returns true if the mouse button is currently held */
|
|
37
59
|
isMouseButtonPressed(button: number): boolean;
|
|
60
|
+
/** Returns true if the mouse button was pressed this frame */
|
|
38
61
|
isMouseButtonJustPressed(button: number): boolean;
|
|
62
|
+
/** Returns true if the mouse button was released this frame */
|
|
39
63
|
isMouseButtonJustReleased(button: number): boolean;
|
|
64
|
+
/** Returns the mouse position relative to the window */
|
|
40
65
|
getMousePosition(): IVec2;
|
|
66
|
+
/** Returns the mouse movement since last frame */
|
|
41
67
|
getMouseDelta(): IVec2;
|
|
68
|
+
/** Returns the scroll wheel delta this frame */
|
|
42
69
|
getScrollDelta(): IVec2;
|
|
70
|
+
/** Creates a new empty entity */
|
|
43
71
|
spawnEmpty(): IEntity;
|
|
72
|
+
/** Destroys an entity and all its components */
|
|
44
73
|
despawn(entity: IEntity): boolean;
|
|
74
|
+
/** Clones an entity, creating a new entity with copies of all cloneable components */
|
|
75
|
+
cloneEntity(entity: IEntity): IEntity;
|
|
76
|
+
/** Clones an entity and all its descendants recursively */
|
|
77
|
+
cloneEntityRecursive(entity: IEntity): IEntity;
|
|
78
|
+
/** Returns the number of living entities */
|
|
45
79
|
entityCount(): number;
|
|
80
|
+
/** Returns true if the entity still exists */
|
|
46
81
|
isAlive(entity: IEntity): boolean;
|
|
82
|
+
/** Attaches a Transform2D component to the entity */
|
|
47
83
|
addTransform2d(entity: IEntity, transform: ITransform2DData): void;
|
|
84
|
+
/** Returns the entity's Transform2D, or null if absent */
|
|
48
85
|
getTransform2d(entity: IEntity): ITransform2DData | null;
|
|
86
|
+
/** Overwrites the entity's Transform2D */
|
|
49
87
|
setTransform2d(entity: IEntity, transform: ITransform2DData): void;
|
|
88
|
+
/** Returns true if the entity has a Transform2D */
|
|
50
89
|
hasTransform2d(entity: IEntity): boolean;
|
|
90
|
+
/** Removes the Transform2D from the entity */
|
|
51
91
|
removeTransform2d(entity: IEntity): boolean;
|
|
92
|
+
/** Attaches a Name component to the entity */
|
|
52
93
|
addName(entity: IEntity, name: string): void;
|
|
94
|
+
/** Returns the entity's Name, or null if absent */
|
|
53
95
|
getName(entity: IEntity): string | null;
|
|
96
|
+
/** Returns true if the entity has a Name */
|
|
54
97
|
hasName(entity: IEntity): boolean;
|
|
98
|
+
/** Removes the Name from the entity */
|
|
55
99
|
removeName(entity: IEntity): boolean;
|
|
100
|
+
/** Attaches a Sprite component to the entity */
|
|
56
101
|
addSprite(entity: IEntity, sprite: ISpriteData): void;
|
|
102
|
+
/** Returns the entity's Sprite, or null if absent */
|
|
57
103
|
getSprite(entity: IEntity): ISpriteData | null;
|
|
104
|
+
/** Overwrites the entity's Sprite */
|
|
58
105
|
setSprite(entity: IEntity, sprite: ISpriteData): void;
|
|
106
|
+
/** Returns true if the entity has a Sprite */
|
|
59
107
|
hasSprite(entity: IEntity): boolean;
|
|
108
|
+
/** Removes the Sprite from the entity */
|
|
60
109
|
removeSprite(entity: IEntity): boolean;
|
|
110
|
+
/** Spawns multiple empty entities at once */
|
|
61
111
|
spawnBatch(count: number): IEntity[];
|
|
112
|
+
/** Despawns multiple entities at once */
|
|
62
113
|
despawnBatch(entities: IEntity[]): number;
|
|
114
|
+
/** Creates a 3D cube */
|
|
63
115
|
createCube(textureId: number, width: number, height: number, depth: number): number;
|
|
116
|
+
/** Creates a 3D plane */
|
|
64
117
|
createPlane(textureId: number, width: number, depth: number): number;
|
|
118
|
+
/** Creates a 3D sphere */
|
|
65
119
|
createSphere(textureId: number, diameter: number, segments?: number): number;
|
|
120
|
+
/** Creates a 3D cylinder */
|
|
66
121
|
createCylinder(textureId: number, radius: number, height: number, segments?: number): number;
|
|
122
|
+
/** Sets a 3D object's position */
|
|
67
123
|
setObjectPosition(objectId: number, x: number, y: number, z: number): boolean;
|
|
124
|
+
/** Sets a 3D object's rotation in degrees */
|
|
68
125
|
setObjectRotation(objectId: number, x: number, y: number, z: number): boolean;
|
|
126
|
+
/** Sets a 3D object's scale */
|
|
69
127
|
setObjectScale(objectId: number, x: number, y: number, z: number): boolean;
|
|
128
|
+
/** Destroys a 3D object */
|
|
70
129
|
destroyObject(objectId: number): boolean;
|
|
130
|
+
/** Adds a light to the 3D scene */
|
|
71
131
|
addLight(lightType: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, r: number, g: number, b: number, intensity: number, range: number, spotAngle: number): number;
|
|
132
|
+
/** Updates a light's properties */
|
|
72
133
|
updateLight(lightId: number, lightType: number, posX: number, posY: number, posZ: number, dirX: number, dirY: number, dirZ: number, r: number, g: number, b: number, intensity: number, range: number, spotAngle: number): boolean;
|
|
134
|
+
/** Removes a light */
|
|
73
135
|
removeLight(lightId: number): boolean;
|
|
136
|
+
/** Sets the 3D camera position */
|
|
74
137
|
setCameraPosition3D(x: number, y: number, z: number): boolean;
|
|
138
|
+
/** Sets the 3D camera rotation */
|
|
75
139
|
setCameraRotation3D(pitch: number, yaw: number, roll: number): boolean;
|
|
140
|
+
/** Configures the ground grid */
|
|
76
141
|
configureGrid(enabled: boolean, size: number, divisions: number): boolean;
|
|
142
|
+
/** Sets grid visibility */
|
|
77
143
|
setGridEnabled(enabled: boolean): boolean;
|
|
144
|
+
/** Configures the skybox/background color */
|
|
78
145
|
configureSkybox(enabled: boolean, r: number, g: number, b: number, a: number): boolean;
|
|
146
|
+
/** Configures fog settings */
|
|
79
147
|
configureFog(enabled: boolean, r: number, g: number, b: number, density: number): boolean;
|
|
148
|
+
/** Sets fog visibility */
|
|
80
149
|
setFogEnabled(enabled: boolean): boolean;
|
|
150
|
+
/** Renders all 3D objects */
|
|
81
151
|
render3D(): boolean;
|
|
152
|
+
/** Draws a sprite with source rectangle for sprite sheets */
|
|
82
153
|
drawSpriteRect(texture: number, x: number, y: number, width: number, height: number, rotation: number, srcX: number, srcY: number, srcW: number, srcH: number, color?: IColor): boolean;
|
|
154
|
+
/** Sets the rendering viewport */
|
|
83
155
|
setViewport(x: number, y: number, width: number, height: number): void;
|
|
156
|
+
/** Enables depth testing */
|
|
84
157
|
enableDepthTest(): void;
|
|
158
|
+
/** Disables depth testing */
|
|
85
159
|
disableDepthTest(): void;
|
|
160
|
+
/** Clears the depth buffer */
|
|
86
161
|
clearDepth(): void;
|
|
162
|
+
/** Disables alpha blending */
|
|
87
163
|
disableBlending(): void;
|
|
164
|
+
/** Returns rendering statistics for the current frame */
|
|
88
165
|
getRenderStats(): IRenderStats;
|
|
166
|
+
/** Returns FPS statistics from the debug overlay rolling window */
|
|
167
|
+
getFpsStats(): IFpsStats;
|
|
168
|
+
/** Enables or disables the FPS debug overlay */
|
|
169
|
+
setFpsOverlayEnabled(enabled: boolean): void;
|
|
170
|
+
/** Sets how often FPS statistics are recomputed */
|
|
171
|
+
setFpsUpdateInterval(interval: number): void;
|
|
172
|
+
/** Sets the screen corner where the FPS overlay is displayed */
|
|
173
|
+
setFpsOverlayCorner(corner: number): void;
|
|
174
|
+
/** Maps an action name to a key */
|
|
89
175
|
mapActionKey(action: string, key: number): boolean;
|
|
176
|
+
/** Returns true if the action is currently pressed */
|
|
90
177
|
isActionPressed(action: string): boolean;
|
|
178
|
+
/** Returns true if the action was pressed this frame */
|
|
91
179
|
isActionJustPressed(action: string): boolean;
|
|
180
|
+
/** Returns true if the action was released this frame */
|
|
92
181
|
isActionJustReleased(action: string): boolean;
|
|
182
|
+
/** AABB vs AABB collision test with contact */
|
|
93
183
|
collisionAabbAabb(centerAx: number, centerAy: number, halfWa: number, halfHa: number, centerBx: number, centerBy: number, halfWb: number, halfHb: number): IContact | null;
|
|
184
|
+
/** Circle vs circle collision test */
|
|
94
185
|
collisionCircleCircle(centerAx: number, centerAy: number, radiusA: number, centerBx: number, centerBy: number, radiusB: number): IContact | null;
|
|
186
|
+
/** Circle vs AABB collision test */
|
|
95
187
|
collisionCircleAabb(circleX: number, circleY: number, circleRadius: number, boxX: number, boxY: number, boxHw: number, boxHh: number): IContact | null;
|
|
188
|
+
/** Tests if a point is inside a rectangle */
|
|
96
189
|
pointInRect(px: number, py: number, rx: number, ry: number, rw: number, rh: number): boolean;
|
|
190
|
+
/** Tests if a point is inside a circle */
|
|
97
191
|
pointInCircle(px: number, py: number, cx: number, cy: number, radius: number): boolean;
|
|
192
|
+
/** Fast AABB overlap test */
|
|
98
193
|
aabbOverlap(minAx: number, minAy: number, maxAx: number, maxAy: number, minBx: number, minBy: number, maxBx: number, maxBy: number): boolean;
|
|
194
|
+
/** Fast circle overlap test */
|
|
99
195
|
circleOverlap(x1: number, y1: number, r1: number, x2: number, y2: number, r2: number): boolean;
|
|
196
|
+
/** Distance between two points */
|
|
100
197
|
distance(x1: number, y1: number, x2: number, y2: number): number;
|
|
198
|
+
/** Squared distance between two points */
|
|
101
199
|
distanceSquared(x1: number, y1: number, x2: number, y2: number): number;
|
|
102
200
|
}
|
|
201
|
+
import type { IEngineConfig } from '../types/engine.g.js';
|
|
202
|
+
/** Builder for configuring and creating a GoudGame instance with provider selection. */
|
|
203
|
+
export declare class EngineConfig implements IEngineConfig {
|
|
204
|
+
private native;
|
|
205
|
+
constructor();
|
|
206
|
+
/** Sets the window title */
|
|
207
|
+
setTitle(title: string): EngineConfig;
|
|
208
|
+
/** Sets the window size in pixels */
|
|
209
|
+
setSize(width: number, height: number): EngineConfig;
|
|
210
|
+
/** Enables or disables vertical sync */
|
|
211
|
+
setVsync(enabled: boolean): EngineConfig;
|
|
212
|
+
/** Enables or disables fullscreen mode */
|
|
213
|
+
setFullscreen(enabled: boolean): EngineConfig;
|
|
214
|
+
/** Sets the target frames per second */
|
|
215
|
+
setTargetFps(fps: number): EngineConfig;
|
|
216
|
+
/** Enables or disables the FPS debug overlay */
|
|
217
|
+
setFpsOverlay(enabled: boolean): EngineConfig;
|
|
218
|
+
/** Consumes the config and creates a windowed GoudGame instance */
|
|
219
|
+
build(): GoudGame;
|
|
220
|
+
/** Frees the config without building */
|
|
221
|
+
destroy(): void;
|
|
222
|
+
}
|
|
103
223
|
//# sourceMappingURL=index.g.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.g.d.ts","sourceRoot":"","sources":["../../../src/generated/node/index.g.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.g.d.ts","sourceRoot":"","sources":["../../../src/generated/node/index.g.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEhJ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEhJ,sFAAsF;AACtF,q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