Skip to content

Commit

Permalink
apps voxel tools
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Nov 5, 2024
1 parent 2e471e5 commit 4d8684b
Show file tree
Hide file tree
Showing 38 changed files with 6,929 additions and 4 deletions.
22 changes: 21 additions & 1 deletion app/asset/launcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,26 @@
},
{
"id": 12,
"url": "https://gigamaster.github.io/codemo/web-app/vixel/",
"name": "Vixel",
"author": "Author",
"desc": "Web app A WebGL path tracing voxel renderer built with regl",
"cat": "3D graphics",
"icon": "icon-apps",
"image": "https://gigamaster.github.io/codemo/web-app/vixel.webp"
},
{
"id": 13,
"url": "https://gigamaster.github.io/codemo/web-app/voxedit/",
"name": "Voxedit",
"author": "Author",
"desc": "Web app Voxel editor with animation support, a collection of voxel tools and volume formats",
"cat": "3D graphics",
"icon": "icon-apps",
"image": "https://gigamaster.github.io/codemo/web-app/voxedit.webp"
},
{
"id": 14,
"url": "https://gigamaster.github.io/codemo/web-app/voxel-builder/",
"name": "Voxel-builder",
"author": "Author",
Expand All @@ -120,7 +140,7 @@
"image": "https://gigamaster.github.io/codemo/web-app/voxel-builder.webp"
},
{
"id": 13,
"id": 15,
"url": "https://gigamaster.github.io/codemo/web-app/vvvebjs/",
"name": "Vvvebjs",
"author": "Author",
Expand Down
22 changes: 19 additions & 3 deletions app/asset/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,38 @@
},
{
"id": 13,
"page_url": "https://gigamaster.github.io/codemo/web-app/vixel/",
"page_title": "vixel",
"page_desc": "Web app A WebGL path tracing voxel renderer built with regl",
"page_cat": "web-app",
"page_icon": "icon-apps"
},
{
"id": 14,
"page_url": "https://gigamaster.github.io/codemo/web-app/voxedit/",
"page_title": "Voxedit",
"page_desc": "Web app Voxel editor, animation, tools and volume formats",
"page_cat": "web-app",
"page_icon": "icon-apps"
},
{
"id": 15,
"page_url": "https://gigamaster.github.io/codemo/web-app/voxel-builder/",
"page_title": "voxel-builder",
"page_title": "Voxel-builder",
"page_desc": "Web app to create 3D voxel art, modeling art game graphics",
"page_cat": "web-app",
"page_icon": "icon-apps"
},
{
"id": 14,
"id": 16,
"page_url": "https://gigamaster.github.io/codemo/web-app/vvvebjs/",
"page_title": "vvvebjs",
"page_desc": "Drag and drop web page builder ",
"page_cat": "web-app",
"page_icon": "icon-apps"
},
{
"id": 15,
"id": 20,
"page_url": "https://gigamaster.github.io/codemo/web-app/notification/",
"page_title": "Notification",
"page_desc": "Toast, inline, actionable, non-intrusive messages and updates",
Expand Down
Binary file added app/web-app/vixel.webp
Binary file not shown.
1 change: 1 addition & 0 deletions app/web-app/vixel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
24 changes: 24 additions & 0 deletions app/web-app/vixel/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
57 changes: 57 additions & 0 deletions app/web-app/vixel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Vixel

A javascript & webgl voxel path tracer. See it live [here](https://wwwtyro.github.io/vixel-editor).

Author: Rye Terrell

![vixel screenshot](media/screenshot-000.png)

![vixel screenshot](media/screenshot-001.png)

## Materials

- **Color** is the material's base color.

- **Roughness** describes how randomly specular light is reflected from the surface.

- **Metalness** describes how much of the light it reflects is diffusive. A purely metallic surface reflects zero light diffusively.

- **Emission** is how much light the material emits. If this value is greater than zero, only the **color** component of the material is used.

| Roughness | Metalness | Real world analogue | Rendered example |
| --------- | --------- | ------------------- | -------------------------------- |
| 0.0 | 0.0 | Smooth plastic | ![thing](media/material-000.png) |
| 1.0 | 0.0 | Chalk | ![thing](media/material-001.png) |
| 0.0 | 1.0 | Mirror | ![thing](media/material-002.png) |
| 1.0 | 0.05 | Unpolished metal | ![thing](media/material-003.png) |

## Ground

The **color**, **roughness**, and **metalness** properties can also be set for the ground plane, and are identical in meaning.

## Sky

- **Time** is simply the time of day on a 24-hour clock. The sun rises at 6:00 and sets at 18:00.

- **Azimuth** is the direction of the sun _around_ the up/down axis.

## Rendering

- **Width** and **Height** define the resolution of your rendered image.

- **DOF Distance** is how far into your scene the focus plane lies.

- **DOF Magnitude** is how strong the DOF effect is.

- **Samples/Frame** describes how many samples are taken per frame. `1` is one sample per pixel, per frame. If the interactivity of the editor is slow or
choppy, you can reduce this to improve your framerate. Similarly, if you want to converge the scene faster, you can increase it (though increasing it is only
effective until you're GPU bound).

- **Take Screenshot** will download a screenshot.

## Scene

- **Copy URL** copies the current scene to the clipboard and updates the URL. For now, this is the only way to save and share your scene. Feel free to paste it
into a text file to save it longer term. Yes, there are absolutely plans to improve this.

- **Clear Scene** clears the scene of all voxels save one.
105 changes: 105 additions & 0 deletions app/web-app/vixel/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@

<html>
<head>
<script src='static/bundle.js' defer></script>
<style>
body {
background: #333;
font-family: normal 16px system-ui, sans-serif;
color: white;
font-size: 90%;
}
table {
border-collapse: collapse;
}
a {
color: white;
}
.no-user-select {
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-webkit-touch-callout: none;
-o-user-select: none;
-moz-user-select: none;
}
.center {
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
display: flex;
justify-content: center;
align-items: center;
}
#stats {
position: fixed;
bottom: 8px;
right: 8px;
background: rgba(0,0,0,0.8);
color: white;
border-radius: 3px;
padding: 8px;
}
#help-button {
position: fixed;
bottom: 8px;
left: 8px;
color: white;
background: rgba(0,0,0,0.8);
border-radius: 5px;
padding: 8px;
cursor: pointer;
color: lime;
}
#help {
background: rgba(0,0,0,0.8);
border-radius: 3px;
padding: 8px;
font-size: 80%;
display: none;
position: fixed;
bottom: 8px;
left: 8px;
}
#help table {
font-size: inherit;
}
#help td {
font-size: inherit;
color: white;
padding: 4px;
padding-left: 0px;
padding-right: 8px;
}
#help tr {
border-top: 1px solid gray;
border-bottom: 1px solid gray;
}
</style>
</head>
<body>
<div class='center'>
<canvas id='render-canvas'></canvas>
</div>
<div id='stats' class='no-user-select'></div>
<div id='help' class='no-user-select'>
<div style='width: 100%; cursor: pointer; text-align: right; color: lime'></div>
<br>
Controls
<br><br>
<table>
<tr><td>Left mouse button</td><td>Place voxel</td></tr>
<tr><td>Shift + left mouse button</td><td>Remove voxel</td></tr>
<tr><td>Control + left mouse button</td><td>Copy voxel</td></tr>
<tr><td>Right mouse button + drag</td><td>Rotate camera</td></tr>
<tr><td>Mouse wheel</td><td>Zoom</td></tr>
<tr><td>H key</td><td>Hide/show controls</td></tr>
</table>
<br>
<a href='https://github.com/wwwtyro/vixel' target='_blank'>More information</a>
</div>
<div id='help-button'>help</div>
</body>
</html>
Binary file added app/web-app/vixel/media/material-000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/web-app/vixel/media/material-001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/web-app/vixel/media/material-002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/web-app/vixel/media/material-003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/web-app/vixel/media/screenshot-000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/web-app/vixel/media/screenshot-001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4d8684b

Please sign in to comment.