incanto 0.25.3 → 0.25.4
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-K8A82JK5.js → create-game-DyAPwm0j.js} +3 -3
- package/dist/{create-game-yGqGR-Ic.js → create-game-iYptFr-q.js} +1 -1
- package/dist/{gameplay-B8zVO3Dg.js → gameplay-BFzBVqhr.js} +13 -6
- package/dist/gameplay.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{physics-3d-DY0EtjfT.js → physics-3d-ob23XE0Y.js} +2 -2
- package/dist/react.js +1 -1
- package/dist/{register-BgeMHtcG.js → register-CmtGqGSS.js} +1 -1
- package/dist/test.js +4 -4
- package/package.json +1 -1
- package/skills/incanto-gameplay-behaviors.md +18 -2
- package/skills/incanto-node-reference.md +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-iYptFr-q.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-BFzBVqhr.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-DyAPwm0j.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-CmtGqGSS.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-ob23XE0Y.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-BFzBVqhr.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-CmtGqGSS.js";
|
|
9
|
+
import { n as enablePhysics3D } from "./physics-3d-ob23XE0Y.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-BFzBVqhr.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";
|
|
@@ -3529,7 +3529,9 @@ depthOnlyMaterial.colorWrite = false;
|
|
|
3529
3529
|
/** Gravity the float is sized against (m/s²) — the cap is expressed in g. */
|
|
3530
3530
|
const G = 9.81;
|
|
3531
3531
|
/** Hard ceiling on the lift, in g. Water pushes back; it does not launch. */
|
|
3532
|
-
const MAX_LIFT_G =
|
|
3532
|
+
const MAX_LIFT_G = 6;
|
|
3533
|
+
/** Depth scale the restoring force is measured against when `draft` is tiny. */
|
|
3534
|
+
const MIN_DRAFT_REF = .15;
|
|
3533
3535
|
/**
|
|
3534
3536
|
* Float on water.
|
|
3535
3537
|
*
|
|
@@ -3553,10 +3555,13 @@ var Buoyancy = class extends Behavior {
|
|
|
3553
3555
|
static props = {
|
|
3554
3556
|
/** Water node path; empty = the first Water3D in the tree. */
|
|
3555
3557
|
water: { default: "" },
|
|
3556
|
-
/**
|
|
3558
|
+
/** Where the resting WATERLINE sits below the body origin, in meters. A
|
|
3559
|
+
* hull whose origin is its interior floor wants a draft of ~0.1: the water
|
|
3560
|
+
* then rests that far under the floor and the boat is dry inside. */
|
|
3557
3561
|
draft: { default: .35 },
|
|
3558
|
-
/**
|
|
3559
|
-
|
|
3562
|
+
/** How stiffly the hull returns to its waterline (extra g per draft of
|
|
3563
|
+
* submersion). 1 wallows, 3 is a firm dinghy, 8 is a cork. */
|
|
3564
|
+
stiffness: { default: 3 },
|
|
3560
3565
|
/** Vertical damping (1/s) — how fast the bobbing settles. */
|
|
3561
3566
|
damping: { default: 3.5 },
|
|
3562
3567
|
/** How hard wave slopes carry the body along (0 = bob in place). */
|
|
@@ -3570,8 +3575,10 @@ var Buoyancy = class extends Behavior {
|
|
|
3570
3575
|
};
|
|
3571
3576
|
static signals = ["submerged", "surfaced"];
|
|
3572
3577
|
water = "";
|
|
3578
|
+
/** Resting waterline, in meters BELOW the body origin. */
|
|
3573
3579
|
draft = .35;
|
|
3574
|
-
|
|
3580
|
+
/** Extra g of lift per draft of submersion below the waterline. */
|
|
3581
|
+
stiffness = 3;
|
|
3575
3582
|
damping = 3.5;
|
|
3576
3583
|
drift = .6;
|
|
3577
3584
|
drag = .9;
|
|
@@ -3606,7 +3613,7 @@ var Buoyancy = class extends Behavior {
|
|
|
3606
3613
|
const depth = water.heightAt(px, pz) - (y - this.draft);
|
|
3607
3614
|
if (depth <= 0) continue;
|
|
3608
3615
|
wetPoints++;
|
|
3609
|
-
liftAccel += this.stiffness * depth;
|
|
3616
|
+
liftAccel += G * (1 + this.stiffness * (depth / Math.max(this.draft, MIN_DRAFT_REF)));
|
|
3610
3617
|
const e = .6;
|
|
3611
3618
|
slopeX += water.heightAt(px + e, pz) - water.heightAt(px - e, pz);
|
|
3612
3619
|
slopeZ += water.heightAt(px, pz + e) - water.heightAt(px, pz - e);
|
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-BFzBVqhr.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.4";
|
|
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-BFzBVqhr.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-CmtGqGSS.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-DyAPwm0j.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-iYptFr-q.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-BFzBVqhr.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-BFzBVqhr.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-CmtGqGSS.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-ob23XE0Y.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-ob23XE0Y.js").then((n) => n.r);
|
|
236
236
|
await enablePhysics3D(engine);
|
|
237
237
|
}
|
|
238
238
|
const stepMs = 1e3 / (opts.fixedHz ?? 60);
|
package/package.json
CHANGED
|
@@ -471,8 +471,8 @@ all a raft, a buoy, a crate or a body needs to bob, settle and ride the swell.
|
|
|
471
471
|
| Prop | Default | Meaning |
|
|
472
472
|
|---|---|---|
|
|
473
473
|
| `water` | `""` | Water3D node path; empty = the first Water3D in the tree (a wrong path fails hard) |
|
|
474
|
-
| `draft` | `0.35` |
|
|
475
|
-
| `stiffness` | `
|
|
474
|
+
| `draft` | `0.35` | where the resting WATERLINE sits below the body origin, in meters — the hull floats with its origin that far above the water |
|
|
475
|
+
| `stiffness` | `3` | how stiffly it returns to that waterline (extra g of lift per draft of submersion): 1 wallows, 3 is a firm dinghy, 8 is a cork |
|
|
476
476
|
| `damping` | `3.5` | vertical damping (1/s) — how fast the bobbing settles |
|
|
477
477
|
| `drift` | `0.6` | how hard wave SLOPES carry the body along (0 = bob on the spot) |
|
|
478
478
|
| `drag` | `0.9` | horizontal drag while submerged (1/s) |
|
|
@@ -492,6 +492,22 @@ thing slides down it, so a raft left alone wanders with the swell instead of
|
|
|
492
492
|
bobbing on the spot. The lift is capped at a few g — water pushes back, it
|
|
493
493
|
never launches a body that has been dragged deep.
|
|
494
494
|
|
|
495
|
+
**The lift cancels gravity AT the waterline**, so the hull holds that line
|
|
496
|
+
instead of sinking until a spring happens to match its weight. That is what
|
|
497
|
+
`draft` buys you: set it to the freeboard you want and the boat sits there.
|
|
498
|
+
|
|
499
|
+
**Model the hull BELOW the floor.** A boat whose lowest surface is its interior
|
|
500
|
+
floor cannot float dry — the sea closes over that floor and renders inside the
|
|
501
|
+
hull. Give it something to displace with (a keel/hull box under the floor) and
|
|
502
|
+
a `draft` that puts the waterline on it:
|
|
503
|
+
|
|
504
|
+
```json
|
|
505
|
+
{ "name": "Hull", "type": "MeshInstance3D",
|
|
506
|
+
"props": { "mesh": "box", "size": [3, 0.34, 1.06], "position": [0, -0.24, 0] } }
|
|
507
|
+
// …with the body origin at the interior floor and "draft": 0.2 — the water
|
|
508
|
+
// then rests 20 cm below the floor, on the hull, and the boat is dry inside.
|
|
509
|
+
```
|
|
510
|
+
|
|
495
511
|
For the water's own height anywhere (jetties, spawn heights, an AI deciding
|
|
496
512
|
where the shore is), `Water3D.heightAt(x, z)` answers the same surface.
|
|
497
513
|
|
|
@@ -1008,7 +1008,7 @@ wire their signals through scene `connections`. Full guide: `incanto-gameplay-be
|
|
|
1008
1008
|
|---|---|---|
|
|
1009
1009
|
| `water` | `""` | string |
|
|
1010
1010
|
| `draft` | `0.35` | number |
|
|
1011
|
-
| `stiffness` | `
|
|
1011
|
+
| `stiffness` | `3` | number |
|
|
1012
1012
|
| `damping` | `3.5` | number |
|
|
1013
1013
|
| `drift` | `0.6` | number |
|
|
1014
1014
|
| `drag` | `0.9` | number |
|