Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.dropbox
nbproject
local

.DS_Store
.claude/
16 changes: 12 additions & 4 deletions visualcube.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,18 @@
$sw = 0;

// Viewport
$ox = -0.9;
$oy = -0.9;
$vw = 1.8;
$vh = 1.8;
$default_port = 1.8;
$vw = $default_port;
$vh = $default_port;
$ox = -$vw / 2;
$oy = -$vh / 2;
// Allow user to override viewport size via 'port' parameter
if (array_key_exists('port', $_REQUEST) && is_numeric($_REQUEST['port'])) {
$vw = floatval($_REQUEST['port']);
$vh = $vw;
$ox = -$vw / 2;
$oy = -$vh / 2;
}

// ------------------[ 3D Cube Generator ]-----------------------

Expand Down
2 changes: 2 additions & 0 deletions visualcube_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ function setCookie(cname, value){
<td>Setting this value causes the facelets to be rendered with transparency.</td></tr>
<tr><td><em>dist</em></td><td>Projection Distance</td><td>1 to 100</td><td><?php echo $DEFAULTS['dist']; ?></td>
<td>Controls the distance of the cube from the perspective of the viewer.</td></tr>
<tr><td><em>port</em></td><td>Viewport Size</td><td>Any number (e.g., 1.6)</td><td>1.8</td>
<td>Controls the size of the viewport, effectively zooming in or out. Smaller numbers zoom in, reducing the border. 1.5 works well with view=plan</td></tr>
<tr><th colspan="5">Added Features</th></tr>
<tr><td><em>arw</em></td><td>Arrow Definition</td>
<td>Comma separated list in the form:<br/><br/>
Expand Down