A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(examples): Terrain & Water stones sit on the slope they stand on
yhhce0ae19d09ca
diff --git a/examples/terrain-water/assets/worlds/plants.esworld b/examples/terrain-water/assets/worlds/plants.esworldindex fe8099d94..8d4d1d3ed 100644--- a/examples/terrain-water/assets/worlds/plants.esworld+++ b/examples/terrain-water/assets/worlds/plants.esworld@@ -2581,6 +2581,7 @@{"id": "small","plant": "granite-split",+ "attach": "align","count": [1,4@@ -2619,6 +2620,7 @@{"id": "small","plant": "granite-split",+ "attach": "align","count": [1,4@@ -2657,6 +2659,7 @@{"id": "small","plant": "granite-split",+ "attach": "align","count": [1,4@@ -3388,6 +3391,7 @@"anchor": {"id": "boulder","plant": "boulder-round",+ "attach": "align","scale": [0.8,1.5@@ -3400,6 +3404,7 @@{"id": "bed","plant": "pebbles",+ "attach": "align","count": [1,3@@ -3427,6 +3432,7 @@"anchor": {"id": "boulder","plant": "boulder-flat",+ "attach": "align","scale": [0.8,1.5@@ -3439,6 +3445,7 @@{"id": "bed","plant": "pebbles",+ "attach": "align","count": [1,3@@ -3466,6 +3473,7 @@"anchor": {"id": "bed","plant": "pebbles",+ "attach": "align","scale": [0.9,1.6diff --git a/examples/terrain-water/tools/plants.mjs b/examples/terrain-water/tools/plants.mjsindex 827fbe341..7ba456337 100644--- a/examples/terrain-water/tools/plants.mjs+++ b/examples/terrain-water/tools/plants.mjs@@ -141,7 +141,7 @@ export function plantRules({ project, lakeLevel, snow }) {});const rock = (id) => ({id: `rocks-${id}`, version: 1, tags: ['stone'], anchor: { id, plant: `granite-${id}`, scale: [0.8, 1.6], footprint: 120, canopy: 160, minUp: 0.6 },- members: [{ id: 'small', plant: 'granite-split', count: [1, 4], ring: [120, 420], scale: [0.35, 0.7], footprint: 40, minUp: 0.6 }],+ members: [{ id: 'small', plant: 'granite-split', attach: 'align', count: [1, 4], ring: [120, 420], scale: [0.35, 0.7], footprint: 40, minUp: 0.6 }],});const drift = (colour) => ({id: `drift-${colour}`, version: 1, tags: ['flower'], anchor: { id: 'bloom', plant: `flower-${colour}`, scale: [1, 1.4], footprint: 10, minUp: 0.85 },@@ -292,15 +292,15 @@ export function plantRules({ project, lakeLevel, snow }) {},// The shoals: a water-worn boulder with a bed of pebbles round it, under the water.{- id: 'shoal-round', version: 1, tags: ['stone'], anchor: { id: 'boulder', plant: 'boulder-round', scale: [0.8, 1.5], footprint: 70, waterDepth: 160, minUp: 0.5 },- members: [{ id: 'bed', plant: 'pebbles', count: [1, 3], ring: [90, 320], scale: [0.8, 1.4], footprint: 60, waterDepth: 160, minUp: 0.5 }],+ id: 'shoal-round', version: 1, tags: ['stone'], anchor: { id: 'boulder', plant: 'boulder-round', attach: 'align', scale: [0.8, 1.5], footprint: 70, waterDepth: 160, minUp: 0.5 },+ members: [{ id: 'bed', plant: 'pebbles', attach: 'align', count: [1, 3], ring: [90, 320], scale: [0.8, 1.4], footprint: 60, waterDepth: 160, minUp: 0.5 }],},{- id: 'shoal-flat', version: 1, tags: ['stone'], anchor: { id: 'boulder', plant: 'boulder-flat', scale: [0.8, 1.5], footprint: 80, waterDepth: 160, minUp: 0.5 },- members: [{ id: 'bed', plant: 'pebbles', count: [1, 3], ring: [90, 320], scale: [0.8, 1.4], footprint: 60, waterDepth: 160, minUp: 0.5 }],+ id: 'shoal-flat', version: 1, tags: ['stone'], anchor: { id: 'boulder', plant: 'boulder-flat', attach: 'align', scale: [0.8, 1.5], footprint: 80, waterDepth: 160, minUp: 0.5 },+ members: [{ id: 'bed', plant: 'pebbles', attach: 'align', count: [1, 3], ring: [90, 320], scale: [0.8, 1.4], footprint: 60, waterDepth: 160, minUp: 0.5 }],},{- id: 'pebble-field', version: 1, tags: ['stone'], anchor: { id: 'bed', plant: 'pebbles', scale: [0.9, 1.6], footprint: 60, waterDepth: 160, minUp: 0.5 },+ id: 'pebble-field', version: 1, tags: ['stone'], anchor: { id: 'bed', plant: 'pebbles', attach: 'align', scale: [0.9, 1.6], footprint: 60, waterDepth: 160, minUp: 0.5 },},{id: 'reed-strip', version: 1, tags: ['reed'], anchor: { id: 'reed', plant: 'reed', scale: [0.9, 1.4], footprint: 25, waterDepth: 70, minUp: 0.5 },