incanto 0.25.0 → 0.25.2
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/2d.js +1 -1
- package/dist/3d.js +4 -4
- package/dist/{create-game-BzaDwZX8.js → create-game-BaBDYcNj.js} +3 -3
- package/dist/{create-game-sVIgbrmg.js → create-game-CO3qo_7Y.js} +1 -1
- package/dist/{gameplay-DMaCGBBn.js → gameplay-CXn_0_XD.js} +75 -19
- package/dist/gameplay.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{physics-3d-Cwi7-zug.js → physics-3d-B77uXt91.js} +2 -2
- package/dist/react.js +1 -1
- package/dist/{register-BnWbwRsc.js → register-C-q0XJAn.js} +1 -1
- package/dist/test.js +4 -4
- package/editor/assets/{agent8-DzrvlA6H.js → agent8-e6PNzw9c.js} +1 -1
- package/editor/assets/{index-Did0QjRa.js → index-WP3vGgq9.js} +75 -21
- package/editor/index.html +1 -1
- package/package.json +1 -1
- package/templates-app/beacon-isle-3d/package.json +1 -1
- package/templates-app/tps-3d/package.json +1 -1
- package/templates-app/village-quest-3d/package.json +1 -1
package/dist/2d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
2
|
-
import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-
|
|
2
|
+
import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-CO3qo_7Y.js";
|
|
3
3
|
import { _ as RigidBody2D, a as parseCells, c as ColorRect2D, d as AnimatedSprite2D, f as Sprite2D, g as PhysicsBody2D, h as CharacterBody2D, i as mergeSolidRects, l as CharacterController2D, m as Area2D, n as UILayer, o as Particles2D, p as Joint2D, r as TileMap2D, s as Label, t as registerNodes2D, u as Camera2D, v as StaticBody2D, y as Node2D } from "./register-CvpSUU3O.js";
|
|
4
4
|
import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-DiVFFlH3.js";
|
|
5
5
|
//#region src/2d/library-sprite.ts
|
package/dist/3d.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
2
|
-
import { A as Water3D, F as StaticBody3D, I as Node3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D, z as WATER_MAX_RIPPLES } from "./gameplay-
|
|
3
|
-
import { a as Environment3D, c as sunDirectionFromElevationAzimuth, i as syncTree, l as sunDirectionFromSky, o as horizonColorFromSky, r as Renderer3D, s as parseEnvironment3D, t as createGame3D, u as AssetStore3D } from "./create-game-
|
|
4
|
-
import { A as QUARTER_PITCH, C as BoneAttachment3D, D as TERRAIN_THEMES, E as DEFAULT_TERRAIN_TEXTURE_BASE, M as keyboardIntensity, N as movementState, O as terrainThemeLayers, P as rigPose, S as BoneLookAt3D, T as Terrain3D, _ as Flowers3D, a as Trail3D, b as CharacterController3D, c as Particles3D, d as DirectionalLight3D, f as OmniLight3D, g as DENSITY_PRESETS, h as Foliage3D, i as Tree3D, j as cameraRelative, k as Joint3D, l as ModelInstance3D, m as MeshInstance3D, n as VOXEL_PALETTE, o as River3D, p as InstancedMesh3D, r as VoxelGrid3D, s as traceDownhillPath, t as registerNodes3D, u as LoftMesh3D, v as resolveFlowerDensity, w as Billboard3D, x as Camera3D, y as FLOWER_VARIETIES } from "./register-
|
|
2
|
+
import { A as Water3D, F as StaticBody3D, I as Node3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D, z as WATER_MAX_RIPPLES } from "./gameplay-CXn_0_XD.js";
|
|
3
|
+
import { a as Environment3D, c as sunDirectionFromElevationAzimuth, i as syncTree, l as sunDirectionFromSky, o as horizonColorFromSky, r as Renderer3D, s as parseEnvironment3D, t as createGame3D, u as AssetStore3D } from "./create-game-BaBDYcNj.js";
|
|
4
|
+
import { A as QUARTER_PITCH, C as BoneAttachment3D, D as TERRAIN_THEMES, E as DEFAULT_TERRAIN_TEXTURE_BASE, M as keyboardIntensity, N as movementState, O as terrainThemeLayers, P as rigPose, S as BoneLookAt3D, T as Terrain3D, _ as Flowers3D, a as Trail3D, b as CharacterController3D, c as Particles3D, d as DirectionalLight3D, f as OmniLight3D, g as DENSITY_PRESETS, h as Foliage3D, i as Tree3D, j as cameraRelative, k as Joint3D, l as ModelInstance3D, m as MeshInstance3D, n as VOXEL_PALETTE, o as River3D, p as InstancedMesh3D, r as VoxelGrid3D, s as traceDownhillPath, t as registerNodes3D, u as LoftMesh3D, v as resolveFlowerDensity, w as Billboard3D, x as Camera3D, y as FLOWER_VARIETIES } from "./register-C-q0XJAn.js";
|
|
5
5
|
import { n as splatWeights, t as buildHeightmap } from "./heightmap-CRK0M4jT.js";
|
|
6
|
-
import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-
|
|
6
|
+
import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-B77uXt91.js";
|
|
7
7
|
//#region src/3d/environment-runtime.ts
|
|
8
8
|
/**
|
|
9
9
|
* Live environment editing — the renderer re-applies `scene.environment`
|
|
@@ -3,10 +3,10 @@ import { _ as registerBehavior, n as loadScene } from "./loader-BZqOKfI2.js";
|
|
|
3
3
|
import { l as AudioPlayer, u as Engine } from "./register-nObreUQR.js";
|
|
4
4
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
5
5
|
import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
|
|
6
|
-
import { I as Node3D, N as PhysicsBody3D, R as createCausticsQuad, n as registerGameplayBehaviors } from "./gameplay-
|
|
6
|
+
import { I as Node3D, N as PhysicsBody3D, R as createCausticsQuad, n as registerGameplayBehaviors } from "./gameplay-CXn_0_XD.js";
|
|
7
7
|
import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
|
|
8
|
-
import { d as DirectionalLight3D, l as ModelInstance3D, t as registerNodes3D, x as Camera3D } from "./register-
|
|
9
|
-
import { n as enablePhysics3D } from "./physics-3d-
|
|
8
|
+
import { d as DirectionalLight3D, l as ModelInstance3D, t as registerNodes3D, x as Camera3D } from "./register-C-q0XJAn.js";
|
|
9
|
+
import { n as enablePhysics3D } from "./physics-3d-B77uXt91.js";
|
|
10
10
|
import { ACESFilmicToneMapping, AmbientLight, Box3, BufferAttribute, BufferGeometry, Color, DepthTexture, EquirectangularReflectionMapping, FloatType, Fog, HalfFloatType, LineBasicMaterial, LineSegments, Matrix4, Mesh, PCFShadowMap, PMREMGenerator, PerspectiveCamera, PlaneGeometry, Quaternion, Raycaster, Scene, ShaderMaterial, Vector2, Vector3, WebGLRenderTarget, WebGLRenderer } from "three";
|
|
11
11
|
import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
|
|
12
12
|
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
|
@@ -3,7 +3,7 @@ import { _ as registerBehavior, n as loadScene, o as computeViewport, s as resol
|
|
|
3
3
|
import { l as AudioPlayer, u as Engine } from "./register-nObreUQR.js";
|
|
4
4
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
5
5
|
import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
|
|
6
|
-
import { n as registerGameplayBehaviors } from "./gameplay-
|
|
6
|
+
import { n as registerGameplayBehaviors } from "./gameplay-CXn_0_XD.js";
|
|
7
7
|
import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-CvpSUU3O.js";
|
|
8
8
|
import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
|
|
9
9
|
import { n as enablePhysics2D } from "./physics-2d-DiVFFlH3.js";
|
|
@@ -1014,8 +1014,18 @@ uniform float uCausticsAbove;
|
|
|
1014
1014
|
// incanto presets: per-preset reflection ceiling (the old hard 0.6) — lakes
|
|
1015
1015
|
// push toward mirror, pools stay glassy-clear.
|
|
1016
1016
|
uniform float uReflectivityMax;
|
|
1017
|
-
|
|
1018
|
-
|
|
1017
|
+
// incanto: the scene pre-pass runs at HALF resolution, so everything read from
|
|
1018
|
+
// its depth texture arrives quantised to those texels. Derivatives of a
|
|
1019
|
+
// quantised signal are garbage (they alternate between ~0 inside a texel and a
|
|
1020
|
+
// spike at its edge — the "barcode" on a shoreline), and a threshold crossed
|
|
1021
|
+
// inside one texel is a STAIRCASE (the sand-coloured line across open water).
|
|
1022
|
+
// Both cures are the same: filter the depth over its own texel footprint and
|
|
1023
|
+
// estimate gradients from those taps instead of from fwidth().
|
|
1024
|
+
uniform vec2 uScenePassTexel;
|
|
1025
|
+
/** Shoreline dissolve width, in DEPTH TEXELS (≈2 screen px each). */
|
|
1026
|
+
const float SHORE_FADE_TEXELS = 11.0;
|
|
1027
|
+
/** Deepest water that can still be a shoreline (m) — past this the fade is off. */
|
|
1028
|
+
const float SHORE_MAX_COLUMN = 2.2;
|
|
1019
1029
|
// incanto: 1 while the camera EYE is under THIS surface — the underside is a
|
|
1020
1030
|
// different optical world (Snell's window), not the top shaded darker.
|
|
1021
1031
|
uniform float uCameraSubmerged;
|
|
@@ -1201,6 +1211,23 @@ float linearizeDepth(float depth, float near, float far) {
|
|
|
1201
1211
|
return (2.0 * near * far) / (far + near - z * (far - near));
|
|
1202
1212
|
}
|
|
1203
1213
|
|
|
1214
|
+
/**
|
|
1215
|
+
* Vertical water column under a screen point, reconstructed from the scene
|
|
1216
|
+
* depth along the view ray. Split out so the shoreline can sample it in a
|
|
1217
|
+
* cross and filter the half-res quantisation away.
|
|
1218
|
+
*
|
|
1219
|
+
* surfaceY is THIS FRAGMENT'S water height — the displaced one, waves and
|
|
1220
|
+
* swash included, not the node's flat plane. The wash line moves with the
|
|
1221
|
+
* surge; measuring its depth against a static plane makes the fade collapse to
|
|
1222
|
+
* nothing on every retreating stroke, which is a razor edge that appears and
|
|
1223
|
+
* disappears with the tide.
|
|
1224
|
+
*/
|
|
1225
|
+
float waterColumnAt(vec2 uv, float linearWaterDepth, float camDist, vec3 viewDir, float surfaceY) {
|
|
1226
|
+
float sceneD = linearizeDepth(texture2D(uDepthTexture, uv).r, uCameraNear, uCameraFar);
|
|
1227
|
+
float t = camDist * (sceneD / max(linearWaterDepth, 1e-4));
|
|
1228
|
+
return max(surfaceY - (cameraPosition.y + viewDir.y * t), 0.0);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1204
1231
|
// incanto: splash WHITEWATER. The look that read as FAKE was a clean radial
|
|
1205
1232
|
// disc/ring × speckle. Real foam is irregular clumps + tendrils that drift with
|
|
1206
1233
|
// the water and break apart at the edges. So: a soft COVERAGE envelope (where
|
|
@@ -1532,7 +1559,13 @@ void main() {
|
|
|
1532
1559
|
float refrT = camDist * (refractedSceneDepth / max(linearWaterDepth, 1e-4));
|
|
1533
1560
|
offsetReject = max(offsetReject, smoothstep(0.02, 0.25,
|
|
1534
1561
|
cameraPosition.y + viewDirection.y * refrT - uWaterCenter.y));
|
|
1535
|
-
|
|
1562
|
+
// SILHOUETTE reject: a refracted sample that lands across a depth cliff
|
|
1563
|
+
// (a bed's rim, a hull, a swimmer's edge) drags that surface's colour
|
|
1564
|
+
// into the water as a hard sliver — and the half-res grab quantises the
|
|
1565
|
+
// sliver into a staircase. Snap those samples back to the straight ray.
|
|
1566
|
+
float silhouette = smoothstep(0.05, 0.22,
|
|
1567
|
+
abs(refractedSceneDepth - linearSceneDepth) / max(linearWaterDepth, 1e-3));
|
|
1568
|
+
refractedUV = mix(refractedUV, screenUV, max(offsetReject, silhouette));
|
|
1536
1569
|
// mip-biased grab read: the pre-pass target carries mips (see
|
|
1537
1570
|
// Water3D._onRender3D) — biasing ~1.75 levels samples a pre-blurred
|
|
1538
1571
|
// underwater scene. Real water blurs what it refracts; the crisp
|
|
@@ -1575,9 +1608,21 @@ void main() {
|
|
|
1575
1608
|
// shows the occluder behind this fragment, so a translucent ramp tint
|
|
1576
1609
|
// over it is the honest shallow-water look; compositing the clipped
|
|
1577
1610
|
// grab instead painted ref-26's background-colored band.
|
|
1578
|
-
|
|
1611
|
+
// the above-water test crosses inside ONE half-res texel, and a hard
|
|
1612
|
+
// crossing there draws a stepped sand-coloured seam across open water —
|
|
1613
|
+
// average the neighbours so the transition spans the texel instead
|
|
1614
|
+
float aboveC = cameraPosition.y + viewDirection.y *
|
|
1615
|
+
(camDist * (linearSceneDepth / max(linearWaterDepth, 1e-4))) - vWorldPosition.y;
|
|
1616
|
+
float aboveL = -waterColumnAt(screenUV - vec2(uScenePassTexel.x, 0.0),
|
|
1617
|
+
linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1618
|
+
float aboveR = -waterColumnAt(screenUV + vec2(uScenePassTexel.x, 0.0),
|
|
1619
|
+
linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1620
|
+
float aboveU = -waterColumnAt(screenUV + vec2(0.0, uScenePassTexel.y),
|
|
1621
|
+
linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1622
|
+
float aboveD = -waterColumnAt(screenUV - vec2(0.0, uScenePassTexel.y),
|
|
1623
|
+
linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1579
1624
|
float sceneAbove = smoothstep(0.02, 0.25,
|
|
1580
|
-
|
|
1625
|
+
(aboveC * 2.0 + aboveL + aboveR + aboveU + aboveD) / 6.0);
|
|
1581
1626
|
float meanAbsorbed = 1.0 - dot(transmittance, vec3(0.299, 0.587, 0.114));
|
|
1582
1627
|
float alphaOpacity = mix(uOpacity * 0.45, max(uOpacity, 0.95), meanAbsorbed);
|
|
1583
1628
|
bodyColor = mix(mix(sceneColor, mixedColor2, body), mixedColor2, sceneAbove);
|
|
@@ -1768,19 +1813,28 @@ void main() {
|
|
|
1768
1813
|
// foam toggle — a beach without foam still has a waterline.
|
|
1769
1814
|
float shoreDissolve = 1.0;
|
|
1770
1815
|
if (uUseSceneDepth > 0.5 && waterViewDepth >= 0.0) {
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
//
|
|
1776
|
-
//
|
|
1777
|
-
//
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
float
|
|
1783
|
-
float
|
|
1816
|
+
// FIVE taps, one depth texel apart. The centre says how deep the water is;
|
|
1817
|
+
// the cross says how fast that is changing across the screen — a
|
|
1818
|
+
// derivative-free gradient, because fwidth() of a half-res depth read
|
|
1819
|
+
// alternates between nothing and a spike and bars the shoreline like a
|
|
1820
|
+
// barcode. Filtering also dissolves the texel staircase that otherwise
|
|
1821
|
+
// draws a hard sand-coloured line wherever a threshold is crossed inside
|
|
1822
|
+
// one texel.
|
|
1823
|
+
vec2 tx = uScenePassTexel;
|
|
1824
|
+
float cC = waterColumnAt(screenUV, linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1825
|
+
float cL = waterColumnAt(screenUV - vec2(tx.x, 0.0), linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1826
|
+
float cR = waterColumnAt(screenUV + vec2(tx.x, 0.0), linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1827
|
+
float cD = waterColumnAt(screenUV - vec2(0.0, tx.y), linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1828
|
+
float cU = waterColumnAt(screenUV + vec2(0.0, tx.y), linearWaterDepth, camDist, viewDirection, vWorldPosition.y);
|
|
1829
|
+
float column = (cC * 2.0 + cL + cR + cD + cU) / 6.0;
|
|
1830
|
+
float grad = max(max(abs(cR - cL), abs(cU - cD)) * 0.5, 1e-5);
|
|
1831
|
+
float edgeT = clamp(column / (grad * SHORE_FADE_TEXELS), 0.0, 1.0);
|
|
1832
|
+
// A SHORELINE is where the water is ankle-to-knee deep. Any other place
|
|
1833
|
+
// the column changes fast — the seabed's own horizon, a hull's silhouette,
|
|
1834
|
+
// a cliff under water — has a huge gradient too, and without this gate the
|
|
1835
|
+
// fade fired there and drew a frothy translucent band across open sea.
|
|
1836
|
+
float shoreBand = 1.0 - smoothstep(SHORE_MAX_COLUMN * 0.55, SHORE_MAX_COLUMN, column);
|
|
1837
|
+
edgeT = mix(1.0, edgeT, shoreBand);
|
|
1784
1838
|
|
|
1785
1839
|
// the wash LINE is ragged and it breathes: a still contour reads as a cut
|
|
1786
1840
|
// no matter how soft it is
|
|
@@ -1795,7 +1849,7 @@ void main() {
|
|
|
1795
1849
|
// FROTH gathers where the sheet is thinning out — the last band of a wash
|
|
1796
1850
|
// is white, and that white is what makes water read as meeting ground
|
|
1797
1851
|
// rather than ending at a line.
|
|
1798
|
-
float hem = (1.0 - edgeT) * smoothstep(0.25, 0.75, lacy) * 0.85;
|
|
1852
|
+
float hem = (1.0 - edgeT) * smoothstep(0.25, 0.75, lacy) * 0.85 * shoreBand;
|
|
1799
1853
|
foamAmount = max(foamAmount, hem * shoreDissolve);
|
|
1800
1854
|
}
|
|
1801
1855
|
|
|
@@ -2976,6 +3030,7 @@ var Water3D = class Water3D extends Node3D {
|
|
|
2976
3030
|
mesh.visible = wasVisible;
|
|
2977
3031
|
if (u.uDepthTexture && u.uSceneColor && u.uCameraNear && u.uCameraFar && u.uUseSceneDepth) {
|
|
2978
3032
|
u.uDepthTexture.value = this.scenePassTarget.depthTexture;
|
|
3033
|
+
(u.uScenePassTexel?.value)?.set(1 / passW, 1 / passH);
|
|
2979
3034
|
u.uSceneColor.value = this.scenePassTarget.texture;
|
|
2980
3035
|
u.uCameraNear.value = ctx.camera.near;
|
|
2981
3036
|
u.uCameraFar.value = ctx.camera.far;
|
|
@@ -3090,6 +3145,7 @@ var Water3D = class Water3D extends Node3D {
|
|
|
3090
3145
|
uFoamRange: { value: foamRangeFor(this.size[0] ?? 1, this.size[1] ?? 1) },
|
|
3091
3146
|
uFoamScale: { value: FOAM_LOOK.scale },
|
|
3092
3147
|
uDepthTexture: { value: null },
|
|
3148
|
+
uScenePassTexel: { value: new Vector2(1 / 512, 1 / 512) },
|
|
3093
3149
|
uCameraNear: { value: .1 },
|
|
3094
3150
|
uCameraFar: { value: 1e3 },
|
|
3095
3151
|
uEdgeColor: { value: new Color(FOAM_LOOK.edgeColor) },
|
package/dist/gameplay.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as FollowCamera, D as Health, E as DamageOnContact, O as Collector, S as restartScene, T as phaseOf, _ as hitStop, a as Wander, b as GameFlow, c as Projectile, d as PathFollow, f as Oscillate, g as Cooldown, h as CameraShake, i as WaveSpawner, k as Chase, l as Pickup, m as Lifetime, n as registerGameplayBehaviors, o as Spawner, p as MoveTo, r as ZombieAI, s as ScoreKeeper, t as GAMEPLAY_BEHAVIORS, u as Patrol, v as screenFlash, w as DayNight, x as goToScene, y as Interactable } from "./gameplay-
|
|
1
|
+
import { C as FollowCamera, D as Health, E as DamageOnContact, O as Collector, S as restartScene, T as phaseOf, _ as hitStop, a as Wander, b as GameFlow, c as Projectile, d as PathFollow, f as Oscillate, g as Cooldown, h as CameraShake, i as WaveSpawner, k as Chase, l as Pickup, m as Lifetime, n as registerGameplayBehaviors, o as Spawner, p as MoveTo, r as ZombieAI, s as ScoreKeeper, t as GAMEPLAY_BEHAVIORS, u as Patrol, v as screenFlash, w as DayNight, x as goToScene, y as Interactable } from "./gameplay-CXn_0_XD.js";
|
|
2
2
|
export { CameraShake, Chase, Collector, Cooldown, DamageOnContact, DayNight, FollowCamera, GAMEPLAY_BEHAVIORS, GameFlow, Health, Interactable, Lifetime, MoveTo, Oscillate, PathFollow, Patrol, Pickup, Projectile, ScoreKeeper, Spawner, Wander, WaveSpawner, ZombieAI, goToScene, hitStop, phaseOf, registerGameplayBehaviors, restartScene, screenFlash };
|
package/dist/index.js
CHANGED
|
@@ -295,6 +295,6 @@ function newUid() {
|
|
|
295
295
|
//#endregion
|
|
296
296
|
//#region src/index.ts
|
|
297
297
|
/** Engine version. Kept in sync with package.json by the release pipeline. */
|
|
298
|
-
const VERSION = "0.25.
|
|
298
|
+
const VERSION = "0.25.2";
|
|
299
299
|
//#endregion
|
|
300
300
|
export { AudioBuses, AudioPlayer, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, LogManager, MusicManager, Node, ORDER_GROUP_BASE, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, Scene, SceneTree, SfxEngine, Signal, Timer, TouchControls, UiBanner, UiBar, UiButton, UiDialogue, UiText, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, auditScene, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, findPath, getBehavior, getNodeSchema, getNodeSignals, getNodeType, gridFromRows, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, replay, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, startRecording, synthSfx };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
3
|
-
import { I as Node3D, L as validateCollider3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D } from "./gameplay-
|
|
3
|
+
import { I as Node3D, L as validateCollider3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D } from "./gameplay-CXn_0_XD.js";
|
|
4
4
|
import { n as registerDebugSource } from "./debug-draw-CZmOYjL2.js";
|
|
5
|
-
import { T as Terrain3D, k as Joint3D } from "./register-
|
|
5
|
+
import { T as Terrain3D, k as Joint3D } from "./register-C-q0XJAn.js";
|
|
6
6
|
import { Euler, Quaternion } from "three";
|
|
7
7
|
//#region src/3d/physics/physics-3d.ts
|
|
8
8
|
var physics_3d_exports = /* @__PURE__ */ __exportAll({
|
package/dist/react.js
CHANGED
|
@@ -156,7 +156,7 @@ function IncantoCanvas(props) {
|
|
|
156
156
|
pointer: latest.pointer,
|
|
157
157
|
...keyboard !== void 0 ? { keyboard } : {}
|
|
158
158
|
};
|
|
159
|
-
const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-
|
|
159
|
+
const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-BaBDYcNj.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-CO3qo_7Y.js").then((n) => n.n)).createGame2D(o)))(opts);
|
|
160
160
|
if (disposed) {
|
|
161
161
|
next.dispose();
|
|
162
162
|
return;
|
|
@@ -4,7 +4,7 @@ import { t as Rng } from "./rng-DP-SR7eg.js";
|
|
|
4
4
|
import { i as getNodeSchema, l as registerNode } from "./registry-BVJ2HbCn.js";
|
|
5
5
|
import { t as createNoise2D } from "./noise-CGUMx44x.js";
|
|
6
6
|
import { i as applyParticlePreset, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-Bw7hB93B.js";
|
|
7
|
-
import { A as Water3D, B as colliderFootDrop, F as StaticBody3D, I as Node3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D } from "./gameplay-
|
|
7
|
+
import { A as Water3D, B as colliderFootDrop, F as StaticBody3D, I as Node3D, M as CharacterBody3D, N as PhysicsBody3D, P as RigidBody3D, j as Area3D } from "./gameplay-CXn_0_XD.js";
|
|
8
8
|
import { n as splatWeights, t as buildHeightmap } from "./heightmap-CRK0M4jT.js";
|
|
9
9
|
import { AdditiveBlending, AnimationClip, AnimationMixer, Box3, BoxGeometry, BufferAttribute, BufferGeometry, CanvasTexture, CapsuleGeometry, Color, ConeGeometry, CylinderGeometry, DataTexture, DirectionalLight, DoubleSide, DynamicDrawUsage, Euler, Group, IcosahedronGeometry, ImageBitmapLoader, InstancedBufferAttribute, InstancedMesh, LinearFilter, LoopOnce, LoopRepeat, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshPhysicalMaterial, MeshStandardMaterial, NearestFilter, NoBlending, NormalBlending, PerspectiveCamera, PlaneGeometry, PointLight, Points, PointsMaterial, Quaternion, QuaternionKeyframeTrack, RGBADepthPacking, RGBAFormat, RepeatWrapping, SRGBColorSpace, ShaderChunk, ShaderMaterial, SphereGeometry, Texture, TextureLoader, UniformsLib, UniformsUtils, Vector3, Vector4, VectorKeyframeTrack } from "three";
|
|
10
10
|
import { clone } from "three/addons/utils/SkeletonUtils.js";
|
package/dist/test.js
CHANGED
|
@@ -4,9 +4,9 @@ import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
|
4
4
|
import { t as auditScene } from "./audit-C6rMyict.js";
|
|
5
5
|
import { n as jsonEquals, t as jsonClone } from "./json-BLk7H2Qa.js";
|
|
6
6
|
import { i as getNodeSchema, s as mergeStaticProps } from "./registry-BVJ2HbCn.js";
|
|
7
|
-
import { n as registerGameplayBehaviors } from "./gameplay-
|
|
7
|
+
import { n as registerGameplayBehaviors } from "./gameplay-CXn_0_XD.js";
|
|
8
8
|
import { t as registerNodes2D } from "./register-CvpSUU3O.js";
|
|
9
|
-
import { t as registerNodes3D } from "./register-
|
|
9
|
+
import { t as registerNodes3D } from "./register-C-q0XJAn.js";
|
|
10
10
|
import { t as registerNodesNet } from "./register-BFFE1Mh1.js";
|
|
11
11
|
//#region src/test/index.ts
|
|
12
12
|
/**
|
|
@@ -127,7 +127,7 @@ async function runScript(json, opts) {
|
|
|
127
127
|
const { enablePhysics2D } = await import("./physics-2d-DiVFFlH3.js").then((n) => n.r);
|
|
128
128
|
await enablePhysics2D(engine);
|
|
129
129
|
} else if (physics === "3d" || physics === "auto" && scene.dimension === "3d") {
|
|
130
|
-
const { enablePhysics3D } = await import("./physics-3d-
|
|
130
|
+
const { enablePhysics3D } = await import("./physics-3d-B77uXt91.js").then((n) => n.r);
|
|
131
131
|
await enablePhysics3D(engine);
|
|
132
132
|
}
|
|
133
133
|
const failures = [];
|
|
@@ -232,7 +232,7 @@ async function createPlaySession(json, opts = {}) {
|
|
|
232
232
|
const { enablePhysics2D } = await import("./physics-2d-DiVFFlH3.js").then((n) => n.r);
|
|
233
233
|
await enablePhysics2D(engine);
|
|
234
234
|
} else if (physics === "3d" || physics === "auto" && scene.dimension === "3d") {
|
|
235
|
-
const { enablePhysics3D } = await import("./physics-3d-
|
|
235
|
+
const { enablePhysics3D } = await import("./physics-3d-B77uXt91.js").then((n) => n.r);
|
|
236
236
|
await enablePhysics3D(engine);
|
|
237
237
|
}
|
|
238
238
|
const stepMs = 1e3 / (opts.fixedHz ?? 60);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-WP3vGgq9.js";async function t(t){return new n((await e(()=>import(`./GameServer-C56iOUgF.js`),[],import.meta.url)).GameServer,t)}var n=class{raw;active=new Map;reconnecting=!1;disposed=!1;constructor(e,t){this.raw=new e({...t})}get account(){return this.raw.account}get connected(){return this.raw.connected}connect(){return this.raw.connected?Promise.resolve(!0):(this.disposed=!1,this.rawConnect())}rawConnect(){return this.raw.connect({onDisconnect:()=>void this.reconnect()})}disconnect(){this.disposed=!0;for(let e of this.active.values())e.off();return this.active.clear(),this.raw.disconnect()}remoteFunction(e,t,n){return this.raw.remoteFunction(e,t,n)}track(e){let t=Symbol(`sub`),n={make:e,off:e()};return this.active.set(t,n),()=>{n.off(),this.active.delete(t)}}async reconnect(){if(!this.disposed&&!this.reconnecting){this.reconnecting=!0;try{await this.rawConnect();for(let e of this.active.values())e.off(),e.off=e.make()}finally{this.reconnecting=!1}}}subscribeRoomState(e,t){return this.track(()=>this.raw.subscribeRoomState(e,t))}subscribeRoomMyState(e,t){return this.track(()=>this.raw.subscribeRoomMyState(e,t))}subscribeRoomAllUserStates(e,t){return this.track(()=>this.raw.subscribeRoomAllUserStates(e,e=>{let n={};for(let t of e??[]){if(!t||typeof t.account!=`string`||t.__leaved)continue;let{account:e,__updated:r,__leaved:i,...a}=t;n[e]=a}t(n)}))}subscribeRoomCollection(e,t,n){return this.track(()=>this.raw.subscribeRoomCollection(e,t,({items:e})=>{let t={};for(let n of e??[])n&&typeof n.__id==`string`&&(t[n.__id]=n);n(t)}))}onRoomMessage(e,t,n){return this.track(()=>this.raw.onRoomMessage(e,t,n))}onRoomUserJoin(e,t){return this.track(()=>this.raw.onRoomUserJoin(e,t))}onRoomUserLeave(e,t){return this.track(()=>this.raw.onRoomUserLeave(e,t))}subscribeGlobalState(e){return this.track(()=>this.raw.subscribeGlobalState(e))}subscribeGlobalMyState(e){return this.track(()=>this.raw.subscribeGlobalMyState(e))}subscribeGlobalUserState(e,t){return this.track(()=>this.raw.subscribeGlobalUserState(e,t))}subscribeGlobalCollection(e,t){return this.track(()=>this.raw.subscribeGlobalCollection(e,({items:e})=>{let n={};for(let t of e??[])t&&typeof t.__id==`string`&&(n[t.__id]=t);t(n)}))}subscribeAsset(e,t){return this.track(()=>this.raw.subscribeAsset(e,t))}onGlobalMessage(e,t){return this.track(()=>this.raw.onGlobalMessage(e,t))}};export{t as createAgent8Server};
|