• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
changesbyjames

changesbyjames

SpaceCalc

Public
Like
SpaceCalc
Home
Code
3
backend
1
frontend
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v5
View latest version
README.md

Room Fitting Calculator

A web application that calculates and visualizes whether objects can fit in a specific room with a sloped ceiling.

Room Specifications

  • Width: 155 cm
  • Left wall height: 115 cm
  • Right wall height: 255 cm
  • Ceiling: Straight slope from left to right

Features

  • Real-time calculation: Enter object dimensions and see instant results
  • Visual feedback: Color-coded results (green = fits, red = doesn't fit)
  • Dual visualization:
    • Side view showing the sloped ceiling and object placement
    • Top view showing the floor plan and positioning
  • Detailed results: Shows exact positioning, clearance, and failure reasons

How to Use

  1. Enter your object's width (cm) - how wide it is along the floor
  2. Enter your object's height (cm) - how tall it is
  3. Enter the offset (cm) - gap you want from the tall wall
  4. View the results and visualizations

Algorithm

The application uses a precise geometric calculation that:

  1. Positions the object against the tall wall with the specified offset
  2. Calculates the maximum ceiling height at the object's position
  3. Determines if the object fits within the sloped ceiling constraints
  4. Provides detailed feedback on positioning and clearance

Project Structure

├── backend/
│   └── index.ts          # Hono server serving static files
├── frontend/
│   ├── index.html        # Main HTML interface
│   └── script.js         # Fitting algorithm and visualization
└── README.md

The core fitting algorithm handles edge cases like negative dimensions, objects extending beyond room boundaries, and precise height calculations along the sloped ceiling.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.