@bornengine/engine 0.4.16
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 +231 -0
- package/native/android/Cargo.lock +1848 -0
- package/native/android/Cargo.toml +24 -0
- package/native/android/src/lib.rs +702 -0
- package/native/ios/Cargo.lock +1690 -0
- package/native/ios/Cargo.toml +32 -0
- package/native/ios/src/lib.rs +1267 -0
- package/native/linux/Cargo.lock +3279 -0
- package/native/linux/Cargo.toml +29 -0
- package/native/linux/src/lib.rs +1331 -0
- package/native/macos/Cargo.lock +3310 -0
- package/native/macos/Cargo.toml +46 -0
- package/native/macos/src/lib.rs +1302 -0
- package/native/shared/Cargo.lock +1899 -0
- package/native/shared/Cargo.toml +62 -0
- package/native/shared/assets/default_font.ttf +0 -0
- package/native/shared/build.rs +270 -0
- package/native/shared/shaders/common/clouds.wgsl +122 -0
- package/native/shared/shaders/common/fog.wgsl +16 -0
- package/native/shared/shaders/common/foliage_wind.wgsl +98 -0
- package/native/shared/shaders/common/imposter.wgsl +112 -0
- package/native/shared/shaders/common/pbr.wgsl +186 -0
- package/native/shared/shaders/common/shadows.wgsl +186 -0
- package/native/shared/shaders/common/sky.wgsl +8 -0
- package/native/shared/shaders/common/tonemap.wgsl +25 -0
- package/native/shared/shaders/impulse_field.wgsl +57 -0
- package/native/shared/shaders/material_abi.wgsl +383 -0
- package/native/shared/shaders/materials/test_minimal.wgsl +42 -0
- package/native/shared/src/anim_mixer.rs +61 -0
- package/native/shared/src/attach.rs +263 -0
- package/native/shared/src/audio/decode.rs +123 -0
- package/native/shared/src/audio/mod.rs +863 -0
- package/native/shared/src/audio/render.rs +892 -0
- package/native/shared/src/audio/spsc.rs +156 -0
- package/native/shared/src/audio/stream.rs +226 -0
- package/native/shared/src/custom_shaders.rs +104 -0
- package/native/shared/src/decals.rs +245 -0
- package/native/shared/src/drs.rs +211 -0
- package/native/shared/src/engine.rs +261 -0
- package/native/shared/src/ffi.rs +116 -0
- package/native/shared/src/ffi_core/assets.rs +388 -0
- package/native/shared/src/ffi_core/audio_ffi.rs +184 -0
- package/native/shared/src/ffi_core/draw.rs +334 -0
- package/native/shared/src/ffi_core/game_loop.rs +577 -0
- package/native/shared/src/ffi_core/input.rs +234 -0
- package/native/shared/src/ffi_core/mod.rs +127 -0
- package/native/shared/src/ffi_core/models.rs +1154 -0
- package/native/shared/src/ffi_core/ragdoll_ffi.rs +261 -0
- package/native/shared/src/ffi_core/scene.rs +626 -0
- package/native/shared/src/ffi_core/vfx.rs +212 -0
- package/native/shared/src/ffi_core/visual.rs +691 -0
- package/native/shared/src/frame_callbacks.rs +122 -0
- package/native/shared/src/geometry.rs +236 -0
- package/native/shared/src/handles.rs +182 -0
- package/native/shared/src/input.rs +448 -0
- package/native/shared/src/jolt_sys.rs +822 -0
- package/native/shared/src/lib.rs +55 -0
- package/native/shared/src/models.rs +1093 -0
- package/native/shared/src/models_gltf.rs +1280 -0
- package/native/shared/src/particles.rs +391 -0
- package/native/shared/src/physics_jolt.rs +1908 -0
- package/native/shared/src/picking.rs +298 -0
- package/native/shared/src/postfx.rs +345 -0
- package/native/shared/src/profiler.rs +492 -0
- package/native/shared/src/ragdoll.rs +474 -0
- package/native/shared/src/renderer/atmosphere_lut.rs +573 -0
- package/native/shared/src/renderer/brdf_lut.rs +154 -0
- package/native/shared/src/renderer/draw2d.rs +143 -0
- package/native/shared/src/renderer/formats.rs +822 -0
- package/native/shared/src/renderer/froxel.rs +421 -0
- package/native/shared/src/renderer/gi_bake.rs +653 -0
- package/native/shared/src/renderer/graph.rs +462 -0
- package/native/shared/src/renderer/hiz.rs +269 -0
- package/native/shared/src/renderer/hot_reload.rs +390 -0
- package/native/shared/src/renderer/impulse_field.rs +456 -0
- package/native/shared/src/renderer/lighting.rs +154 -0
- package/native/shared/src/renderer/material_instancing.rs +171 -0
- package/native/shared/src/renderer/material_pipeline.rs +700 -0
- package/native/shared/src/renderer/material_system.rs +1996 -0
- package/native/shared/src/renderer/material_system_tests.rs +601 -0
- package/native/shared/src/renderer/material_system_wasm.rs +41 -0
- package/native/shared/src/renderer/mod.rs +12556 -0
- package/native/shared/src/renderer/model_draw.rs +641 -0
- package/native/shared/src/renderer/occlusion.rs +429 -0
- package/native/shared/src/renderer/planar_pass.rs +593 -0
- package/native/shared/src/renderer/planar_reflection.rs +499 -0
- package/native/shared/src/renderer/post_pass.rs +249 -0
- package/native/shared/src/renderer/postfx_chain.rs +728 -0
- package/native/shared/src/renderer/pt_pass.rs +577 -0
- package/native/shared/src/renderer/scene_pass.rs +607 -0
- package/native/shared/src/renderer/shader_include.rs +205 -0
- package/native/shared/src/renderer/shader_library.rs +135 -0
- package/native/shared/src/renderer/shaders/ao.rs +570 -0
- package/native/shared/src/renderer/shaders/core.rs +1243 -0
- package/native/shared/src/renderer/shaders/env.rs +907 -0
- package/native/shared/src/renderer/shaders/gi.rs +810 -0
- package/native/shared/src/renderer/shaders/mod.rs +19 -0
- package/native/shared/src/renderer/shaders/post.rs +1558 -0
- package/native/shared/src/renderer/shaders/pt.rs +1859 -0
- package/native/shared/src/renderer/shaders/ssgi.rs +1586 -0
- package/native/shared/src/renderer/shadow_pass.rs +731 -0
- package/native/shared/src/renderer/ssgi_pass.rs +392 -0
- package/native/shared/src/renderer/ssr_pass.rs +188 -0
- package/native/shared/src/renderer/texture_store.rs +473 -0
- package/native/shared/src/renderer/transient.rs +591 -0
- package/native/shared/src/renderer/types.rs +941 -0
- package/native/shared/src/renderer/util.rs +152 -0
- package/native/shared/src/scene.rs +1362 -0
- package/native/shared/src/sdf_cache.rs +274 -0
- package/native/shared/src/shadows.rs +1036 -0
- package/native/shared/src/staging.rs +102 -0
- package/native/shared/src/string_header.rs +266 -0
- package/native/shared/src/text_renderer.rs +502 -0
- package/native/shared/src/textures.rs +197 -0
- package/native/tvos/Cargo.lock +1693 -0
- package/native/tvos/Cargo.toml +36 -0
- package/native/tvos/metal-patched/Cargo.toml +178 -0
- package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
- package/native/tvos/metal-patched/LICENSE-MIT +25 -0
- package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
- package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
- package/native/tvos/metal-patched/src/argument.rs +366 -0
- package/native/tvos/metal-patched/src/blitpass.rs +102 -0
- package/native/tvos/metal-patched/src/buffer.rs +71 -0
- package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
- package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
- package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
- package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
- package/native/tvos/metal-patched/src/computepass.rs +107 -0
- package/native/tvos/metal-patched/src/constants.rs +152 -0
- package/native/tvos/metal-patched/src/counters.rs +119 -0
- package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
- package/native/tvos/metal-patched/src/device.rs +2134 -0
- package/native/tvos/metal-patched/src/drawable.rs +39 -0
- package/native/tvos/metal-patched/src/encoder.rs +2041 -0
- package/native/tvos/metal-patched/src/heap.rs +281 -0
- package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
- package/native/tvos/metal-patched/src/lib.rs +657 -0
- package/native/tvos/metal-patched/src/library.rs +902 -0
- package/native/tvos/metal-patched/src/mps.rs +575 -0
- package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
- package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
- package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
- package/native/tvos/metal-patched/src/renderpass.rs +443 -0
- package/native/tvos/metal-patched/src/resource.rs +182 -0
- package/native/tvos/metal-patched/src/sampler.rs +165 -0
- package/native/tvos/metal-patched/src/sync.rs +178 -0
- package/native/tvos/metal-patched/src/texture.rs +352 -0
- package/native/tvos/metal-patched/src/types.rs +90 -0
- package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
- package/native/tvos/src/audio_backend.rs +197 -0
- package/native/tvos/src/lib.rs +1891 -0
- package/native/visionos/Cargo.lock +1693 -0
- package/native/visionos/Cargo.toml +40 -0
- package/native/visionos/src/audio_backend.rs +197 -0
- package/native/visionos/src/lib.rs +1887 -0
- package/native/watchos/Cargo.lock +16 -0
- package/native/watchos/Cargo.toml +19 -0
- package/native/watchos/shaders/bloom_postfx.metal +99 -0
- package/native/watchos/src/BloomWatchApp.swift +1267 -0
- package/native/watchos/src/BloomWatchAudio.swift +179 -0
- package/native/watchos/src/audio.rs +55 -0
- package/native/watchos/src/draw_list.rs +229 -0
- package/native/watchos/src/ffi_stubs.rs +915 -0
- package/native/watchos/src/ffi_stubs_manual.rs +35 -0
- package/native/watchos/src/lib.rs +1124 -0
- package/native/watchos/src/models.rs +746 -0
- package/native/watchos/src/postfx.rs +95 -0
- package/native/watchos/src/scene.rs +534 -0
- package/native/watchos/src/textures.rs +184 -0
- package/native/web/Cargo.lock +1657 -0
- package/native/web/Cargo.toml +43 -0
- package/native/web/bloom_glue.js +695 -0
- package/native/web/build.sh +131 -0
- package/native/web/index.html +35 -0
- package/native/web/jolt_bridge.js +1519 -0
- package/native/web/src/input_ffi.rs +286 -0
- package/native/web/src/lib.rs +1796 -0
- package/native/web/src/material_ffi.rs +710 -0
- package/native/web/src/parity_ffi.rs +343 -0
- package/native/web/src/physics_ffi.rs +643 -0
- package/native/web/src/ragdoll_ffi.rs +250 -0
- package/native/web/src/render_settings.rs +98 -0
- package/native/windows/Cargo.lock +1815 -0
- package/native/windows/Cargo.toml +68 -0
- package/native/windows/src/lib.rs +1486 -0
- package/package.json +4279 -0
- package/src/audio/index.ts +315 -0
- package/src/core/colors.ts +63 -0
- package/src/core/index.ts +1206 -0
- package/src/core/keys.ts +63 -0
- package/src/core/types.ts +104 -0
- package/src/index.ts +171 -0
- package/src/math/index.ts +516 -0
- package/src/mobile/index.ts +294 -0
- package/src/models/index.ts +1258 -0
- package/src/physics/index.ts +1134 -0
- package/src/scene/index.ts +698 -0
- package/src/shapes/index.ts +120 -0
- package/src/text/index.ts +48 -0
- package/src/textures/index.ts +187 -0
- package/src/vfx/index.ts +191 -0
- package/src/world/index.ts +24 -0
- package/src/world/loader.ts +423 -0
- package/src/world/prefab.ts +217 -0
- package/src/world/render.ts +172 -0
- package/src/world/saver.ts +108 -0
- package/src/world/serialize.ts +301 -0
- package/src/world/terrain.ts +355 -0
- package/src/world/types.ts +160 -0
- package/src/world/validate.ts +319 -0
- package/src/world/version.ts +114 -0
package/src/core/keys.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Platform-agnostic key code constants.
|
|
2
|
+
// Platform crates map native keycodes to these Bloom key values.
|
|
3
|
+
export const Key = {
|
|
4
|
+
// Letters
|
|
5
|
+
A: 65, B: 66, C: 67, D: 68, E: 69, F: 70, G: 71, H: 72,
|
|
6
|
+
I: 73, J: 74, K: 75, L: 76, M: 77, N: 78, O: 79, P: 80,
|
|
7
|
+
Q: 81, R: 82, S: 83, T: 84, U: 85, V: 86, W: 87, X: 88,
|
|
8
|
+
Y: 89, Z: 90,
|
|
9
|
+
|
|
10
|
+
// Numbers
|
|
11
|
+
ZERO: 48, ONE: 49, TWO: 50, THREE: 51, FOUR: 52,
|
|
12
|
+
FIVE: 53, SIX: 54, SEVEN: 55, EIGHT: 56, NINE: 57,
|
|
13
|
+
|
|
14
|
+
// Function keys
|
|
15
|
+
F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117,
|
|
16
|
+
F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123,
|
|
17
|
+
|
|
18
|
+
// Arrow keys
|
|
19
|
+
UP: 256, DOWN: 257, LEFT: 258, RIGHT: 259,
|
|
20
|
+
|
|
21
|
+
// Special keys
|
|
22
|
+
SPACE: 32,
|
|
23
|
+
ENTER: 265,
|
|
24
|
+
ESCAPE: 27,
|
|
25
|
+
TAB: 9,
|
|
26
|
+
BACKSPACE: 8,
|
|
27
|
+
DELETE: 127,
|
|
28
|
+
INSERT: 260,
|
|
29
|
+
HOME: 261,
|
|
30
|
+
END: 262,
|
|
31
|
+
PAGE_UP: 263,
|
|
32
|
+
PAGE_DOWN: 264,
|
|
33
|
+
|
|
34
|
+
// Modifiers
|
|
35
|
+
LEFT_SHIFT: 280,
|
|
36
|
+
RIGHT_SHIFT: 281,
|
|
37
|
+
LEFT_CONTROL: 282,
|
|
38
|
+
RIGHT_CONTROL: 283,
|
|
39
|
+
LEFT_ALT: 284,
|
|
40
|
+
RIGHT_ALT: 285,
|
|
41
|
+
LEFT_SUPER: 286,
|
|
42
|
+
RIGHT_SUPER: 287,
|
|
43
|
+
|
|
44
|
+
// Punctuation
|
|
45
|
+
APOSTROPHE: 39,
|
|
46
|
+
COMMA: 44,
|
|
47
|
+
MINUS: 45,
|
|
48
|
+
PERIOD: 46,
|
|
49
|
+
SLASH: 47,
|
|
50
|
+
SEMICOLON: 59,
|
|
51
|
+
EQUAL: 61,
|
|
52
|
+
LEFT_BRACKET: 91,
|
|
53
|
+
BACKSLASH: 92,
|
|
54
|
+
RIGHT_BRACKET: 93,
|
|
55
|
+
GRAVE: 96,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Mouse button constants
|
|
59
|
+
export const MouseButton = {
|
|
60
|
+
LEFT: 0,
|
|
61
|
+
RIGHT: 1,
|
|
62
|
+
MIDDLE: 2,
|
|
63
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export interface Vec2 {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface Vec3 {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
z: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Vec4 {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
z: number;
|
|
16
|
+
w: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Color {
|
|
20
|
+
r: number;
|
|
21
|
+
g: number;
|
|
22
|
+
b: number;
|
|
23
|
+
a: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Rect {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface Camera2D {
|
|
34
|
+
offset: Vec2;
|
|
35
|
+
target: Vec2;
|
|
36
|
+
rotation: number;
|
|
37
|
+
zoom: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Camera3D {
|
|
41
|
+
position: Vec3;
|
|
42
|
+
target: Vec3;
|
|
43
|
+
up: Vec3;
|
|
44
|
+
fovy: number;
|
|
45
|
+
projection: "perspective" | "orthographic";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Texture {
|
|
49
|
+
/** Engine handle — same field name as Sound/Music/Font/Model. (Was
|
|
50
|
+
* `id` before v0.5, the lone outlier among resource types.) */
|
|
51
|
+
handle: number;
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface Font {
|
|
57
|
+
handle: number;
|
|
58
|
+
size: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface Sound {
|
|
62
|
+
handle: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Music {
|
|
66
|
+
handle: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface Quat {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
z: number;
|
|
73
|
+
w: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Ray {
|
|
77
|
+
position: Vec3;
|
|
78
|
+
direction: Vec3;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface BoundingBox {
|
|
82
|
+
min: Vec3;
|
|
83
|
+
max: Vec3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface Model {
|
|
87
|
+
handle: number;
|
|
88
|
+
meshCount: number;
|
|
89
|
+
materialCount: number;
|
|
90
|
+
transform: Mat4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface RayHit {
|
|
94
|
+
hit: boolean;
|
|
95
|
+
distance: number;
|
|
96
|
+
point: Vec3;
|
|
97
|
+
normal: Vec3;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface FrustumPlanes {
|
|
101
|
+
planes: Vec4[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type Mat4 = number[];
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export {
|
|
2
|
+
initWindow, closeWindow, windowShouldClose, resize,
|
|
3
|
+
// Embedding (Perry UI `BloomView`, or any host that owns a native view).
|
|
4
|
+
// attachToNativeView is the portable one and is what new code should use;
|
|
5
|
+
// attachToHwnd is Windows-only, returns nothing, and is kept for the existing
|
|
6
|
+
// callers. Until now only the DEPRECATED one was reachable from the `bloom`
|
|
7
|
+
// root, which is a good way to make everyone write the wrong call.
|
|
8
|
+
attachToNativeView, attachToNSView, attachToUIView, attachToSurface,
|
|
9
|
+
attachToHwnd,
|
|
10
|
+
beginDrawing, endDrawing, takeScreenshot, clearBackground, setEnvClearFromHdr,
|
|
11
|
+
setTargetFPS, getDeltaTime, getFPS, getTime,
|
|
12
|
+
getScreenWidth, getScreenHeight,
|
|
13
|
+
isKeyPressed, isKeyDown, isKeyReleased, isKeyRepeated,
|
|
14
|
+
getMouseX, getMouseY, isMouseButtonPressed, isMouseButtonDown, isMouseButtonReleased,
|
|
15
|
+
getMousePosition, getTouchPosition,
|
|
16
|
+
beginMode2D, endMode2D, beginMode3D, endMode3D,
|
|
17
|
+
isGamepadAvailable, getGamepadAxis, getGamepadAxisValue, isGamepadButtonPressed,
|
|
18
|
+
isGamepadButtonDown, isGamepadButtonReleased, getGamepadAxisCount,
|
|
19
|
+
getTouchX, getTouchY, getTouchCount, getTouchPointCount,
|
|
20
|
+
isTouchActive, getMaxTouchPoints,
|
|
21
|
+
toggleFullscreen, setWindowTitle, setWindowIcon,
|
|
22
|
+
disableCursor, enableCursor, getMouseDeltaX, getMouseDeltaY, getMouseWheel, getCharPressed,
|
|
23
|
+
setCursorShape, CursorShape,
|
|
24
|
+
setClipboardText, getClipboardText,
|
|
25
|
+
openFileDialog, saveFileDialog,
|
|
26
|
+
writeFile, fileExists, readFile,
|
|
27
|
+
getScreenToWorld2D, getWorldToScreen2D,
|
|
28
|
+
// `Color` is not here: it is the RGBA type, re-exported as a type below.
|
|
29
|
+
// The palette map is `Colors` / `ColorConstants` (GH #53).
|
|
30
|
+
ColorConstants, Colors, Key, MouseButton,
|
|
31
|
+
injectKeyDown, injectKeyUp, isAnyInputPressed, getPlatform, isMobile, isTV, Platform,
|
|
32
|
+
injectGamepadAxis, injectGamepadButtonDown, injectGamepadButtonUp,
|
|
33
|
+
runGame,
|
|
34
|
+
setProfilerEnabled, getProfilerFrameCpuUs, getProfilerFrameGpuUs,
|
|
35
|
+
printProfilerSummary, getProfilerOverlay, getProfilerFrameHistory,
|
|
36
|
+
splatImpulse, setMaterialParams,
|
|
37
|
+
} from './core/index';
|
|
38
|
+
|
|
39
|
+
export type {
|
|
40
|
+
Rect, Camera2D, Camera3D,
|
|
41
|
+
Texture, Font, Sound, Music, Quat, Ray, BoundingBox, Model, Mat4,
|
|
42
|
+
RayHit, FrustumPlanes,
|
|
43
|
+
} from './core/index';
|
|
44
|
+
|
|
45
|
+
// Vec2, Vec3, Vec4 as types come from core, as values (constructors) from math
|
|
46
|
+
export type { Vec2, Vec3, Vec4, Color } from './core/index';
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
drawLine, drawRect, drawRectRec, drawRectLines,
|
|
50
|
+
drawCircle, drawCircleLines, drawTriangle, drawPoly, drawBezier,
|
|
51
|
+
checkCollisionRecs, checkCollisionCircles, checkCollisionCircleRec,
|
|
52
|
+
checkCollisionPointRec, checkCollisionPointCircle, getCollisionRec,
|
|
53
|
+
} from './shapes/index';
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
drawText, measureText, loadFont, loadFontEx, unloadFont, drawTextEx, measureTextEx,
|
|
57
|
+
} from './text/index';
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
initAudio, closeAudio, initAudioDevice, closeAudioDevice,
|
|
61
|
+
loadSound, playSound, stopSound,
|
|
62
|
+
setSoundVolume, setMasterVolume,
|
|
63
|
+
loadMusic, playMusic, stopMusic, updateMusicStream, updateMusic,
|
|
64
|
+
setMusicVolume, isMusicPlaying,
|
|
65
|
+
playSound3D, setListenerPosition,
|
|
66
|
+
loadSoundAsync, loadMusicAsync, stageSounds, commitSound, commitMusic,
|
|
67
|
+
} from './audio/index';
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
loadTexture, unloadTexture, drawTexture, drawTexturePro, drawTextureRec,
|
|
71
|
+
getTextureWidth, getTextureHeight, loadImage,
|
|
72
|
+
imageResize, imageCrop, imageFlipH, imageFlipV, loadTextureFromImage,
|
|
73
|
+
genTextureMipmaps, setTextureFilter, FILTER_LINEAR, FILTER_NEAREST,
|
|
74
|
+
loadTextureAsync, stageTextures, commitTexture,
|
|
75
|
+
loadRenderTexture, unloadRenderTexture, beginTextureMode, endTextureMode, getRenderTextureTexture,
|
|
76
|
+
} from './textures/index';
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
loadModel, drawModel, drawModelRotated, drawModelTransform, unloadModel, getModelBounds, genMeshSplineRibbon,
|
|
80
|
+
setModelFoliageWind, setFoliageShadowMotion,
|
|
81
|
+
drawCube, drawCubeWires, drawSphere, drawSphereWires,
|
|
82
|
+
drawCylinder, drawPlane, drawGrid, drawRay, genMeshCube, genMeshHeightmap,
|
|
83
|
+
loadShader, compileMaterial, drawMeshWithMaterial,
|
|
84
|
+
compileRefractiveMaterial, compileTransparentMaterial, compileAdditiveMaterial,
|
|
85
|
+
compileMaterialCutout,
|
|
86
|
+
compileMaterialInstanced, createInstanceBuffer,
|
|
87
|
+
drawMeshWithMaterialInstanced, destroyInstanceBuffer,
|
|
88
|
+
createPlanarReflection, setMaterialReflectionProbe, setMaterialProbeVisible,
|
|
89
|
+
compileMaterialFromFile, loadMaterial,
|
|
90
|
+
createMeshExplicit,
|
|
91
|
+
loadModelAnimation, instantiateAnimation, updateModelAnimation, createMesh,
|
|
92
|
+
setAmbientLight, setDirectionalLight, setJointTest,
|
|
93
|
+
setProceduralSky, setSunDirection,
|
|
94
|
+
loadModelAsync, stageModels, stageModelsSync, commitModel,
|
|
95
|
+
} from './models/index';
|
|
96
|
+
|
|
97
|
+
export type { DrawCubeOpts, ProceduralSkyOptions } from './models/index';
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
vec2, vec2Add, vec2Sub, vec2Scale, vec2Length, vec2LengthSq,
|
|
101
|
+
vec2Normalize, vec2Dot, vec2Distance, vec2Lerp,
|
|
102
|
+
vec3, vec3Add, vec3Sub, vec3Scale, vec3Length, vec3LengthSq,
|
|
103
|
+
vec3Normalize, vec3Dot, vec3Cross, vec3Distance, vec3Lerp,
|
|
104
|
+
vec4, vec4Add, vec4Scale, vec4Length, vec4Normalize,
|
|
105
|
+
Vec2, Vec3, Vec4,
|
|
106
|
+
lerp, clamp, remap, randomFloat, randomInt,
|
|
107
|
+
easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic,
|
|
108
|
+
easeInOutCubic, easeInElastic, easeOutElastic, easeBounce,
|
|
109
|
+
mat4Identity, mat4Multiply, mat4Translate, mat4Scale,
|
|
110
|
+
mat4RotateX, mat4RotateY, mat4RotateZ,
|
|
111
|
+
mat4Perspective, mat4Ortho, mat4LookAt, mat4Invert,
|
|
112
|
+
quatIdentity, quatFromEuler, quatToMat4, quatSlerp,
|
|
113
|
+
quatNormalize, quatMultiply,
|
|
114
|
+
rayIntersectsBox, rayIntersectsSphere, checkCollisionBoxes, checkCollisionSpheres,
|
|
115
|
+
extractFrustumPlanes, isBoxInFrustum,
|
|
116
|
+
rayIntersectsTriangle, getRayCollisionBox, getRayCollisionMesh,
|
|
117
|
+
} from './math/index';
|
|
118
|
+
|
|
119
|
+
export {
|
|
120
|
+
createVirtualJoystick, updateVirtualJoystick, drawVirtualJoystick,
|
|
121
|
+
createVirtualButton, updateVirtualButton, drawVirtualButton,
|
|
122
|
+
getMovementInput, resetTouchClaims,
|
|
123
|
+
} from './mobile/index';
|
|
124
|
+
|
|
125
|
+
export type { VirtualJoystick, VirtualButton } from './mobile/index';
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
createSceneNode, destroySceneNode,
|
|
129
|
+
setSceneNodeVisible, setSceneNodeCastShadow, setSceneNodeReceiveShadow,
|
|
130
|
+
setSceneNodeGiOnly,
|
|
131
|
+
setSceneNodeParent, setSceneNodeTransform,
|
|
132
|
+
updateSceneNodeGeometry,
|
|
133
|
+
setSceneNodeColor, setSceneNodePbr, setSceneNodeTexture, setSceneNodeWaterMaterial, pickSceneAll,
|
|
134
|
+
getSceneNodeTransform, getSceneNodeBounds,
|
|
135
|
+
setSceneNodeUserData, getSceneNodeUserData,
|
|
136
|
+
getSceneNodeCount,
|
|
137
|
+
registerFrameCallback, unregisterFrameCallback,
|
|
138
|
+
addDirectionalLight, addPointLight,
|
|
139
|
+
extrudePolygon, subtractBox,
|
|
140
|
+
pickScene,
|
|
141
|
+
enableShadows, disableShadows, dumpShadowMap,
|
|
142
|
+
attachModelToNode,
|
|
143
|
+
enablePostFx, disablePostFx,
|
|
144
|
+
setPostFxSelected, setPostFxHovered,
|
|
145
|
+
setOutlineColor, setOutlineThickness,
|
|
146
|
+
projectToScreen,
|
|
147
|
+
} from './scene/index';
|
|
148
|
+
|
|
149
|
+
export type { SceneNodeHandle, PbrMaterial, PickHit } from './scene/index';
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
createPhysicsWorld, setGravity, setPhysicsTimestep,
|
|
153
|
+
createRigidBody, destroyRigidBody,
|
|
154
|
+
setBodyEnabled, setBodyCcd, setBodyGravityScale,
|
|
155
|
+
setKinematicTarget, lockRotations,
|
|
156
|
+
addBoxCollider, addSphereCollider, addCapsuleCollider, addCylinderCollider,
|
|
157
|
+
setColliderProperties,
|
|
158
|
+
applyForce, applyImpulse, applyTorque, applyTorqueImpulse,
|
|
159
|
+
setLinearVelocity, setAngularVelocity,
|
|
160
|
+
stepPhysics, syncPhysicsTransforms,
|
|
161
|
+
getBodyPosition, getBodyRotation, getLinearVelocity, getAngularVelocity,
|
|
162
|
+
physicsRaycast, getCollisions,
|
|
163
|
+
attachPhysicsBody,
|
|
164
|
+
createFixedJoint, createRevoluteJoint, createPrismaticJoint, destroyJoint,
|
|
165
|
+
BodyType,
|
|
166
|
+
} from './physics/index';
|
|
167
|
+
|
|
168
|
+
export type {
|
|
169
|
+
RigidBodyHandle, ColliderHandle, JointHandle,
|
|
170
|
+
PhysicsRayHit, CollisionInfo,
|
|
171
|
+
} from './physics/index';
|