Repository navigation
Physics Plus and Light Theme
Two small packages that are also the best examples to learn package writing from.
Package
physics_plus· version 1.0.0 · Editor and Game · category Physics
Adds physics quality and gravity presets. Add it to a project and the chosen preset ships with the exported game (its settings.json lives in the project's packages/physics_plus folder).
Each tool cycles through its presets; the label shows the current one.
Physics quality: …
| Preset | Steps / second | Substeps | Solver iterations |
|---|---|---|---|
| Normal | 60 | 2 | 4 |
| High (package default) | 120 | 2 | 8 |
| Ultra | 120 | 4 | 14 |
Normal is the engine's own default. Higher quality makes stacking and fast objects more stable at the cost of CPU time.
Gravity: …
| Preset | Gravity (m/s²) |
|---|---|
| Earth | −9.81 |
| Mars | −3.71 |
| Moon | −1.62 |
| Low | −4.0 |
The whole package is about 40 lines. It sets PhysicsWorld.FIXED_DT, SUBSTEPS and SOLVER_ITERATIONS, sets engine.physics.gravity, and stores the choice with h3d.settings / h3d.save_settings(). Read packages/physics_plus/engine.py as your first package example.
Package
light_theme· version 1.0.0 · Hub and Editor · category Theme
A clean light look for the Hub and the editor. Install it, press Restart now on the Packages page, and switch it Off to go back to dark.
-
hub.pycallshub.set_theme({...})with every Hub colour key. -
engine.pycallsh3d.theme(...)with the editor'sTHEMEkeys:
h3d.theme(
bg="#EEF0F3", panel="#F8F9FB", panel_dark="#E3E6EB", border="#CDD2DA",
button="#E2E5EA", button_hover="#D5DAE2", selected="#C9DBFA",
accent="#2F6FD6", accent_dim="#A9C6F7", play_green="#3E9B57", green_text="#2E7D46",
danger="#D14343", danger_hover="#E05252",
text="#1F2328", text_bright="#0B0D10", text_dim="#5E6673",
)Copy it to make your own colour theme.
☁️ Heaven3D · Repository · Report a bug · Apache License 2.0
☁️ Heaven3D
Getting started
Using the editor
Making games
Packages
- Packages
- Writing Packages
- MakeHuman Characters
- Tropical Islands
- HQ FPS Weapons
- Car Race Kit and Spline Roads
- Physics Plus and Light Theme
Shipping
Reference