Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Three.js Homestead Economy

Build an editable farm with growing crops, movable buildings, inventory, trading and a resident request.

例

Three.js Homestead Economy
新しいタブで開く

Three.js Homestead Economy

この例はサンドボックス化されたフレームで実行され、このページにはアクセスできません。

Start with the complete archipelago, or take one system into your own Three.js game. Each Skill includes a standalone project.

得られるもの

A standalone farm editor with crops, buildings, paths and fences. Inventory, trading, a timed fishing interaction and a resident request. A local save namespace and tests for settlement, inventory and fishing state.

仕組み

  1. 01

    Start the farm example

    Three.js Homestead creates its project with node scripts/new-project.mjs --out ./my-homestead, then npm ci, npm test, npm run dev and npm run build. The farm starts with 40 timber and 24 coins. Press B to build, I for inventory and G to cast or reel. It needs Node.js 22.12+ and a current GPU-capable browser to play.

  2. 02

    Run the economy loop

    Till, sow and water a plot, wait for the harvest, then sell produce or fish to the trader and buy timber. Select Water or Harvest and click a facility to use it, including inviting Ahe at a cottage. Crop growth uses wall-clock time, so it continues while the page is closed. Saves stay in the current browser origin.

  3. 03

    Adapt state and verify

    sources/demo.js sets initial resources, layout and trader eligibility; settlement-state.js owns plot occupancy, costs and placement bounds; homestead-state.js owns crop times, starter plots and the resident request. Replace the homestead-demo: localStorage prefix with your own. Change geometry, collision and build bounds together, then run tests and try the interaction in the browser.

FAQ

What gameplay does Three.js Homestead include?

Three.js Homestead includes editable farm plots, crop growth, movable buildings, fishing, inventory, trading and one resident request. The sample trader is always available. Its fishing control exercises timing and rewards without a rendered rod or water scene, so add those visuals yourself when integrating it.

How many plots can Three.js Homestead hold?

Three.js Homestead keeps the inherited fixed farm footprint, with a limit of 256 plots and 160 buildings. settlement-state.js owns those bounds along with costs and occupancy. Raising them means changing render geometry, collision and build bounds together so placement stays consistent.

Do crops grow while Three.js Homestead is closed?

Yes. Three.js Homestead measures crop growth with wall-clock time, so plots keep growing while the page is closed. Progress lives in browser localStorage under the homestead-demo: prefix, which ties it to one browser origin; give each integrated game a distinct prefix.

Is Three.js Homestead free to build on?

Three.js Homestead is local source with no model calls or API keys, so playing and changing it is not billed. Setup fetches pinned npm packages, which keep their own licenses. Preserve assets/project/LICENSE and references/source-manifest.json, which cover its MIT-licensed components.

Can Three.js Homestead be added to an existing game?

Yes. Three.js Homestead is self-contained, with the full example in assets/project, source under sources/archipelago and a small integration in sources/demo.js. Copy or edit the modules inside your project, and read references/integration.md for the API contracts and the limits that remain.

Does the Three.js Homestead preview save my farm?

Three.js Homestead's embedded preview keeps the farm for the current session and starts fresh on reload. In a downloaded project, the farm is saved in local browser storage under its own save namespace.

Lab Skill · Games

Seagull Swoop

Build a 3D flight-and-delivery game with light fries, heavy fish, crosswinds and optional ring routes. The gull must bring lunch home; cargo weight changes which openings it can safely reach.

Lab Skill · Games

Wedding Cake Wobble

Build a 3D fragile-cargo delivery game around a wobbling wedding cake. Brake before turns, avoid crossing guests and steer around tables. Lost tiers change the score, while a partial delivery can still succeed.

Lab Skill · Games

Hermit Tide

Build a 3D route-and-timing game where a hermit crab changes shells to cross a tidal shore. Narrow gaps favour the cap, stronger shells resist waves, and dry stones provide shelter and checkpoints.

Lab Skill · Games

Clover Circuit: Estate Cut

Drive a coral ride-on mower through a fenced estate garden. Steering, braking and the moving blade cut actual grass tufts; Overview reveals the genuine trail. Edit three gardens and three scene palettes offline. Coverage counts trimmed tuft centers rather than continuous ground area.

Lab Skill · Games

Glide Gates: Lagoon Run

Flap a golden bird through emerald pipe pairs above a turquoise lagoon. Actual fixed-step gravity, swept circle contacts and full-gate scoring power both manual flight and clearly labeled practice. Edit three courses and three scene palettes offline.

Lab Skill · Games

3D Interactive Garden Islands

Walk a curved garden, harvest fruit, share gifts, catch butterflies, fish, grow flowers and craft furniture. Four lighting states and one offline HTML with bilingual keyboard and touch controls.