Polar Games

A 3D peeling game for the web · 1.0.0

Peel and Pass

This guide explains how to install, play, customize and update the game. Pick your language at the top; screenshots stay in English.

Version 1.0.0 Edition Standalone buyer edition

This guide works without internet. Images, styles and scripts are already inside this file.

Contents
  1. Overview
  2. Installing on your website
  3. Requirements
  4. How to play
  5. Screens
  6. Files and folders
  7. Internal names in the code
  8. Customizing
  9. Languages
  10. Saving and resetting
  11. Development (optional)
  12. Updating and clearing the cache
  13. Licences and credits
  14. Common problems
  15. FAQ
  16. For AI assistants
  17. Support

1 Overview

Peel and Pass is a complete HTML5 3D peeling game set in a sunny blue-and-white bistro. The player drags a peeler over real 3D fruit and vegetables, the skin comes off in curly ribbons that fall onto the cutting board, and every finished ingredient is passed on to the next station.

The campaign has 9 days and 29 orders, each one a different ingredient: potato, apple, orange, carrot, pear, garlic, tangerine, banana, kiwi, beetroot, cucumber, turnip, sweet potato, zucchini, radish, onion, chayote, cassava, yam, lemon, peach, mango, grapefruit, papaya, plum, pomelo, persimmon, sapodilla and guava. Days 1 to 3 are in the blue bistro, days 4 to 6 in the garden kitchen and days 7 to 9 in the market kitchen, with a short story panel when a new kitchen opens.

Each order pays 10 tokens and each finished day 10 more. Tokens buy 12 items in the Tool Shop: seven blades, peel tongs, a finishing brush, a turntable, a grip mat and a tilting support. After the campaign, Free Prep lets the player choose any ingredient, tool, accessory and kitchen. The game has sound effects with recorded peeling sounds, music, vibration on phones, 14 interface languages and layouts for phone, tablet and desktop. It is drawn in real 3D with Three.js, which is included in the download.

2 Installing on your website

Installing takes a few minutes if you have FTP access or a file manager in your hosting panel.

  1. 1. Extract peel-and-pass-static-1.0.0.zip on your computer.
  2. 2. Connect to your hosting by FTP or its file manager and open the folder where the game should live, for example public_html/games/peel-and-pass/.
  3. 3. Upload only the contents of the game/ folder, so that index.html sits directly inside the target folder.
  4. 4. Keep assets/, lib/ and src/ beside index.html, with names and letter case unchanged.
  5. 5. Open https://your-domain.example/games/peel-and-pass/ in a modern browser.
Warning Do not upload the source/ folder, the documentation/ folder or the ZIP itself. Players need no Node.js, PHP, database or account.

3 Requirements

  • Any static web hosting with HTTPS (or HTTP). Opening index.html directly from the disk (file://) does not work, because browsers block JavaScript modules there.
  • A current browser with WebGL 2: Chrome, Edge, Firefox, Safari or Opera, on desktop or mobile. The game draws in 3D, so a phone or computer from the last few years works best.
  • About 9 MB of space on the server. The game makes no request to other websites: the Three.js library, fonts, pictures, videos and sounds are all inside game/.
  • Node.js is only needed to run the tests or to rebuild the game from source/ (see the development section).

4 How to play

Peel: drag the peeler over the food. You can pick up the peeler by its handle, or start the drag directly on the food. Fast, steady strokes make long ribbons. The percentage on the order card shows how much skin is gone.

Turn the food: drag on the counter beside the food, or press the Rotate button. Find peel shows the patches of skin that are left. Clear peels sweeps the ribbons off the board. When the food is at 100%, press Pass Board to deliver it and start the next order.

Keyboard: aim with the arrow keys and hold Space to peel. R rotates, H finds peel. Q and E also rotate the food, and Shift with Q or E tilts it. Escape closes the open panel.

Tools: the Tool Shop sells blades with different cuts and special tools for the market kitchen. The citrus blade starts at the top and is dragged down, the peel tongs open a flap and pull it, and the brush cleans small patches. Each market day lends one special tool for free. Progress, tokens, tools and settings are saved automatically; a food in the middle of a cut is saved too.

5 Screens

Main menu: New Game (Continue Shift once a campaign has started) and the Kitchen Tour. Sound and Settings stay
in the top corner.
Main menu: New Game (Continue Shift once a campaign has started) and the Kitchen Tour. Sound and Settings stay in the top corner.

Marks on the screenshot

  1. New Game or Continue Shift
  2. Kitchen Tour
  3. Sound: music and effects volume
  4. Settings
The story panel at the start of the campaign. A new panel appears when the garden and the market kitchens
open.
The story panel at the start of the campaign. A new panel appears when the garden and the market kitchens open.

Marks on the screenshot

  1. Start the shift
Peeling: the order card shows the day, the order and how much skin is gone. The Tool Shop, Rotate and Find
peel buttons sit around the board, with Pause, Sound and Settings at the top.
Peeling: the order card shows the day, the order and how much skin is gone. The Tool Shop, Rotate and Find peel buttons sit around the board, with Pause, Sound and Settings at the top.

Marks on the screenshot

  1. Order card: day, order and progress
  2. Tool Shop
  3. Rotate
  4. Find peel
  5. Pause
  6. Sound: music and effects volume
  7. Settings
Find peel marks the patches of skin that are left, so the last bits are easy to see.
Find peel marks the patches of skin that are left, so the last bits are easy to see.

Marks on the screenshot

  1. Find peel
The food is at 100%: Pass Board delivers it and brings the next order.
The food is at 100%: Pass Board delivers it and brings the next order.

Marks on the screenshot

  1. Pass Board
The end of a day: the three orders served and the tokens earned. Next Day opens the next kitchen.
The end of a day: the three orders served and the tokens earned. Next Day opens the next kitchen.
The Kitchen Tour: the 9 days of the campaign. Finished days can be played again, and each day unlocks the next.
The Kitchen Tour: the 9 days of the campaign. Finished days can be played again, and each day unlocks the next.
The Tool Shop: blades, special tools and accessories, each with its price in tokens and the day that unlocks it.
Compare blades shows short videos of the cuts.
The Tool Shop: blades, special tools and accessories, each with its price in tokens and the day that unlocks it. Compare blades shows short videos of the cuts.
The garden kitchen (days 4 to 6), peeling a beetroot.
The garden kitchen (days 4 to 6), peeling a beetroot.
The market kitchen (days 7 to 9). Each market day lends a special tool, here the citrus blade.
The market kitchen (days 7 to 9). Each market day lends a special tool, here the citrus blade.
Settings: language, vibration (on devices that can vibrate), reduced motion and full screen (when the
browser allows it).
Settings: language, vibration (on devices that can vibrate), reduced motion and full screen (when the browser allows it).

Marks on the screenshot

  1. Language
  2. Vibration
  3. Reduced motion
  4. Full screen
A phone in portrait: the same game, with the buttons below the board.
A phone in portrait: the same game, with the buttons below the board.
The Sound panel: one slider for the music and one for the effects.
The Sound panel: one slider for the music and one for the effects.

Marks on the screenshot

  1. Music volume
  2. Effects volume
The pause panel: resume, restart the order or go back to the main menu.
The pause panel: resume, restart the order or go back to the main menu.

Marks on the screenshot

  1. Resume
  2. Restart
  3. Menu
Free Prep, open after the campaign: choose the ingredient, the tool, the accessory and the kitchen.
Free Prep, open after the campaign: choose the ingredient, the tool, the accessory and the kitchen.

6 Files and folders

game/ is the ready-to-host game. source/ has the same editable files plus the tests, a local preview server and the build command. The code is plain JavaScript ES modules with no compile step and no npm dependency.

game/                        upload these contents to your web host
  index.html                 every screen and panel
  src/tuning.js              START HERE: feel numbers (FEEL), tools and shop prices
  src/campaign.js            the 9 days, their orders and the tokens paid
  src/peel-pass.js           starts everything: menu, campaign, shop, settings
  src/peeling.js             the peeling gesture
  src/ingredients.js         the 3D food and its skin mask
  src/produce.js, src/garden-produce.js   the ingredients
  src/bench.js, src/peeler-tool.js, src/ribbons.js   3D board, tools, peel ribbons
  src/workbench-view.js      mouse, touch and keyboard
  src/upgrades.js            the Tool Shop
  src/records.js             saving in the browser
  src/sound.js, src/peel-audio.js, src/foley.js   music and sounds
  src/debug.js               developer test mode (off)
  src/peel-locale.js, src/*-text.js   texts of the 14 languages
  src/*.css                  look of the interface
  assets/                    menu, kitchens, icons, food pictures (WebP)
  assets/gestos/             gesture videos of the shop (MP4)
  assets/audio/              recorded peeling sounds and music (MP3), credits
  assets/fonts/              Fredoka and its license
  lib/three/                 the Three.js library (MIT), unminified, and its license
  DOCUMENTATION.txt          short note that points to this guide
source/                      the same editable files, plus:
  package.json, package-lock.json
  README.md, DO-NOT-UPLOAD.txt
  tests/                     npm test (12 checks)
  tools/build.mjs            copies the game into dist/
  tools/serve.mjs            local preview server (npm run dev, npm run preview)
  tools/check-node.mjs       checks the Node.js version before the commands
documentation/index.html     this guide (offline, 14 languages)
documentation/customization.html   step-by-step customization guide
documentation/img/           the screenshots of the guides
DOCUMENTATION.html           shortcut to this guide
CUSTOMIZATION.html           shortcut to the customization guide
START-HERE.txt, CHANGELOG.txt
THIRD-PARTY-LICENSES/        Three.js, Fredoka and sound credits
  • src/tuning.js: the first file to edit. FEEL has the numbers that change how peeling feels (speed of a stroke, ribbons, finish, sound mix, vibration), TOOLS and UPGRADES the blades and tools with their prices, and ACCESSORIES the turntable, the mat and the support.
  • src/campaign.js: the 9 days, the ingredients of each order, the kitchen of each day and the tokens paid. src/produce.js and src/garden-produce.js: the ingredients (size, colors, skin thickness, sound).
  • src/peel-pass.js: starts everything and connects the menu, the campaign, the order card, the shop and the settings. src/peeling.js: the peeling gesture. src/ingredients.js: the 3D food and its skin. src/ribbons.js: the peel ribbons. src/workbench-view.js: mouse, touch and keyboard.
  • src/bench.js: the 3D board, camera and lights. src/peeler-tool.js and src/market-models.js: the 3D tools. src/upgrades.js: the Tool Shop. src/records.js: saving. src/sound.js, src/peel-audio.js and src/foley.js: music and sounds. src/debug.js: the developer test mode.
  • index.html: the page with every screen and panel. src/*.css: the look of the interface. src/peel-locale.js and the files that end in -text.js: the texts of the 14 languages.
  • assets/: the menu art, the kitchens, the order card and icons (hud/), food icons (bench/), skin pictures (materials/), map pictures (tour/), shop pictures, gesture videos (gestos/), sounds and music (audio/) and the font (fonts/). lib/three/: the Three.js library and its license.

7 Internal names in the code

Some names in the files are not the words on the screen. They are only names: players never see them. The table of this section tells you which file is which.

  • Some folders and files have Portuguese names: horta is the garden kitchen, mercado the market kitchen, gestos the gesture videos, apoio-inclinado the tilting support, tapete the mat, pinca the tongs, escova the brush, lamina-citrica the citrus blade and lamina-curva the curved blade.
  • In src/produce.js and src/garden-produce.js each ingredient has a Portuguese name (for example Batata, potato) used inside the code, and an English material name used for its pictures (assets/bench/potato.webp). The names on screen come from the language files.
  • In src/campaign.js an order is a number: the position of the ingredient in the list of src/produce.js (0 is the potato). In the code, prep is the campaign, free is Free Prep, blue, garden and market are the three kitchens, and tokens are kept in balance.
  • Some short texts of the game are written in Portuguese inside the code (for example Descascado!) and used only as keys: src/peel-locale.js and src/peel-translations.js turn them into the words of each language.

8 Customizing

Note Not a programmer? The Customization Guide shows the most common changes step by step. Open CUSTOMIZATION.html in the main folder of the download, or documentation/customization.html.

Customizing

Brand: the name in the browser tab is the <title> line of index.html. The logo is assets/logo.webp (860 x 430 pixels, transparent background). The page icon is assets/favicon.webp.

Pictures: replace a file in assets/ with another WebP of the same name and the same size. The menu is assets/menu-kitchen.webp, the first kitchen is assets/kitchen-wide-vaso.webp (wide screens) and assets/kitchen-portrait.webp (upright screens), and the skins of the 3D food are in assets/materials/.

Campaign and shop: the days and their orders are DAYS in src/campaign.js, and orderTokens and dayBonus in the same file are the tokens paid. The prices and unlock days of the shop are cost and unlockDay in UPGRADES and ACCESSORIES in src/tuning.js.

Feel: FEEL in src/tuning.js. slow and fast are the stroke speeds the cut reacts to, ribbon is how the peels curl and fall, finish is the burst when a food is done, audio is the sound mix and vibrate the vibration patterns.

Sounds and music

The recorded peeling sounds are assets/audio/dry.mp3, smooth.mp3, wet.mp3, paper.mp3, metal.mp3, board.mp3 and tangerine.mp3. Each file holds six short takes that the game mixes over the peeling sound made by the code. Replace a file and keep its name. Their sources and licenses are in assets/audio/AUDIO-CREDITS.txt.

The music is assets/audio/bistro-loop.mp3, which plays in a loop. The other sounds (buttons, tokens, the board, the main peeling texture) are made by the code in src/sound.js and src/peel-audio.js. The volume of each part is in FEEL.audio in src/tuning.js.

Warning Save keys: the settings and records are saved under peel-and-pass.save.v1, the shop and the campaign under peel-and-pass.shop.v1 and a cut in progress under peel-and-pass.cut.v1. If you host two copies of the game on the same domain, change these names in src/records.js and src/upgrades.js of one of them.

9 Languages

The game has 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese. The first visit uses the browser language; the player can change it in Settings.

Most texts are in the files that end in -text.js in src/: each language has one line, with the texts separated by | in the order of the list at the top of the file. Keep the same number of | in every line. The texts of the main screens are in src/peel-locale.js (English) and src/peel-translations.js.

There is no address switch for the language: the first visit uses the language of the browser and the player changes it in Settings, where it is remembered. Japanese, Korean, Chinese and Russian use the fonts of the device.

10 Saving and resetting

  • The campaign, the tokens, the tools, the settings, the language and the longest peels are saved automatically in the browser of each player (localStorage). A food in the middle of a cut is saved too. Nothing is sent to a server.
  • The data is stored under three keys: the settings and records under the key below, the shop and the campaign under peel-and-pass.shop.v1, and a cut in progress under peel-and-pass.cut.v1.
  • To start over, delete this key in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
peel-and-pass.save.v1

11 Development (optional)

This section is only for changing the code. The game/ folder already contains the finished game, so installing it needs no Node.js. The game has no npm dependencies and no compile step: npm run build only copies the files into dist/.

1. Install Node.js. Open https://nodejs.org/en/download and choose the latest Node.js 26 LTS installer for your system (minimum 26.13.0). npm is included.

Windows: run the .msi installer, keep npm and Add to PATH enabled, finish the installation and reopen Command Prompt. macOS: run the official .pkg installer and reopen Terminal. Linux: follow the instructions on the same page for your distribution.

2. Check the installation. Run node --version and npm --version separately. Both must print a version number, and Node.js must be 26.13.0 or newer. If a command is not found, reopen the terminal and check that Node.js is in PATH.

node --version
npm --version

3. Extract the complete ZIP first and open its source/ folder, where package.json is. Windows: type cmd in the address bar of that folder in File Explorer. macOS and Linux: open Terminal and use cd with the path of the folder.

4. Run the commands below one by one. npm ci checks the lock file (nothing is downloaded, the project has no dependencies). npm test runs 12 checks: the campaign and its tokens, the shop, the 14 languages and the package.

npm ci
npm test

5. Preview: npm run dev starts a local server; open http://localhost:5180/ in your browser, play for a while, and stop the server with Ctrl+C.

npm run dev

6. Build: npm run build empties source/dist/ and copies index.html, src/, assets/ and lib/ into it. dist/ is what you publish; while the source is unchanged it is identical to game/.

npm run build

7. Publish: back up the game on your website, then upload the contents of dist/ in place of the old files, keeping the folders. If you deleted or renamed a file, delete the old one on the server yourself. Clear the cache afterwards.

Note Troubleshooting: ENOENT or a missing package.json means the terminal is in the wrong folder. EBADENGINE, or the Node.js message printed before npm test, means Node.js is too old. If PowerShell blocks npm.ps1, use Command Prompt or run npm.cmd.
Note Test mode: while you work on the game, set DEBUG_MODE to true in src/debug.js. The shop then starts with 10,000 tokens, every tool is unlocked, every day of the Kitchen Tour can be opened, and the order card has buttons that skip an order or a day. The test mode uses its own save. Set it back to false before you publish.

12 Updating and clearing the cache

Clearing the cache without losing progress

Progress is stored in this browser, not on the server. Clearing cached images and files, or doing a hard reload, keeps your progress.

Computer: press Ctrl+F5 on Windows and Linux, or Cmd+Shift+R on macOS. Phone: in the browser settings, choose the option to clear cached images and files.

Do not choose cookies and site data, or clear site data, for the game's address. That deletes the local save.

13 Licences and credits

The game code, the artwork, the sound effects and the music are supplied under the license of the item you purchased.

Third-party parts, with their complete license texts in THIRD-PARTY-LICENSES/: the Three.js library, unminified in game/lib/three/ (MIT License), the Fredoka font (SIL Open Font License 1.1, also in assets/fonts/) and seven peeling recordings from Freesound (CC0 1.0, public domain, listed in assets/audio/AUDIO-CREDITS.txt).

14 Common problems

  • Blank page or a game that never opens: the game was opened from the disk or a file is missing. Use a web host and keep every file and folder of game/ next to index.html.
  • No sound: browsers start audio only after the first tap, click or key press. Check both volumes in the Sound panel and the volume of the device.
  • A blank page after you edit a code file: there is a typo in the file. Open the browser console (F12) to see the line, and run npm test before publishing.
  • The game feels slow on an old phone: turn on Reduce Motion in Settings. On slow touch devices the game also lowers its own drawing load.
  • The old version still appears after an update: clear the cache (see the section above). Two copies on the same domain share their progress: give each copy its own save keys.
  • A black or empty 3D view: the browser has no WebGL 2 or the graphics acceleration is turned off. Turn hardware acceleration on in the browser settings or try another browser.

15 FAQ

Does the game need a database or a server language?
No. It is a static website: HTML, CSS, JavaScript, pictures and sounds.
Does it use a game engine?
It uses the Three.js library for the 3D drawing (included, MIT License). The peeling, the ribbons, the campaign, the shop and the screens are original code.
Is there online play or a ranking?
No. It is a single-player game. Progress stays in the browser of each player.
Can I add an ingredient or change the orders?
Yes. The orders of each day are DAYS in src/campaign.js, and the ingredients are in src/produce.js and src/garden-produce.js (see the Customization Guide).
Does it work on phones?
Yes, in portrait and landscape, with touch. On a computer it works with the mouse and the keyboard.
Can I change the prices of the tools?
Yes. Change cost in UPGRADES and ACCESSORIES in src/tuning.js. unlockDay is the day that unlocks each one.

16 For AI assistants

If you ask an AI assistant to help you change this game, give it the prompt below together with your request. It describes the project so the assistant works on the right files and does not break the rules of the game.

You are helping me change "Peel and Pass", a finished HTML5 3D peeling game (version 1.0.0). Read these facts before you edit anything.

PROJECT
- Plain JavaScript ES modules, HTML and CSS. No bundler, no compile step, no npm dependencies.
- The 3D drawing uses Three.js r186, unminified, in lib/three/, imported by the files in src/ as ../lib/three/three.module.js. Do not upgrade, minify or reformat it.
- The editable project is source/ (the same files as game/, plus tests and tools). Edit source/, never game/ or source/dist/.
- npm run build copies index.html, src/, assets/ and lib/ into source/dist/ and nothing else. Upload the CONTENTS of dist/ (or game/) to a static web host.
- Node.js 26.13.0 or newer is needed only for: npm ci, npm test, npm run dev (http://localhost:5180/), npm run build, npm run preview.

GAME
- Campaign: DAYS in src/campaign.js, 9 days and 29 orders. An order is the index of an ingredient in the produce list (src/produce.js, which adds src/garden-produce.js). Kitchens: blue (default), garden, market. orderTokens and dayBonus are the tokens paid.
- Shop: UPGRADES (blades and tools) and ACCESSORIES (turntable, mat, support) in src/tuning.js, with cost and unlockDay. src/upgrades.js runs the shop and saves it.
- Peeling: src/peeling.js reads the pointer and cuts; src/ingredients.js keeps a skin mask per food (left = cells of skin still on); src/ribbons.js makes the peel strips. All feel numbers are FEEL in src/tuning.js.
- src/peel-pass.js connects menu, campaign, order card, Pass Board, shop, settings and the frame loop. src/workbench-view.js has the mouse, touch and keyboard controls.
- Texts: the *-text.js files keep one line per language, texts separated by | in the order of the key list at the top of each file; English and Portuguese base texts are in src/peel-locale.js and the other languages of those in src/peel-translations.js. 14 languages; a new text goes in all 14.
- Some names in the code are Portuguese (ingredient names in produce.js, folders horta = garden, mercado = market, gestos = gesture videos). Keep them unless you rename every use.
- Saving: localStorage keys peel-and-pass.save.v1 (settings, records), peel-and-pass.shop.v1 (shop and campaign) and peel-and-pass.cut.v1 (cut in progress), in src/records.js and src/upgrades.js.
- Developer test mode: DEBUG_MODE in src/debug.js (10,000 tokens, every tool and day open, skip buttons, separate save). Keep it false when publishing.
- Sounds: recorded takes in assets/audio/ (names in src/foley.js), music assets/audio/bistro-loop.mp3; the rest is made by src/sound.js and src/peel-audio.js.

RULES FOR YOU
1. Make the smallest change that does what I ask. Do not rename or move files.
2. Run npm test after every change and fix what it reports. Run npm run build at the end.
3. Test through a web server (npm run dev), never from file://.
4. Add no network request, CDN, analytics, advertising or external font. Keep THIRD-PARTY-LICENSES/ and lib/three/LICENSE.
5. Keep comments in English and keep the last line of each own JavaScript and CSS file: // End of <path> (complete file).

MY REQUEST:
(write what you want here)

Replace the last line with what you want, for example: make the tools cheaper, add a tenth day or change the color of the order card. Always run npm test after the change.

17 Support

Questions or problems: write to willian@polargames.com.br with your purchase code, the browser and a short description or screenshot.

Support request

When you write to support, include the browser and device, the game version, the page address, the steps that caused the problem, a screenshot and the first error shown in the browser console. Never send passwords, payment details or secret keys.