Skip to content

Commit

Permalink
Added draw_plane
Browse files Browse the repository at this point in the history
changed the logic of obtaining UP vector.
`draw_cylinder_ab` now uses a separate model.
added `draw_plane` backside color.
added support for inf and -inf in c# bindings generator.
updated documentation.
updated demo. improved physics tick support.
added cache for doxygen.
slightly updated css.
  • Loading branch information
DmitriySalnikov committed Dec 28, 2023
1 parent 8dd3f5b commit 361cc94
Show file tree
Hide file tree
Showing 45 changed files with 1,008 additions and 238 deletions.
5 changes: 2 additions & 3 deletions .github/actions/compile_gdextension/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ runs:
- name: Restore .scons_cache directory
if: inputs.use_cache != 'false'
id: restore_scons_cache
uses: actions/cache/restore@v3
with:
path: ${{env.SCONS_CACHE}}
key: ${{github.job}}-${{inputs.artifact}}-${{steps.get_godot_cpp_sha.outputs.sha}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{github.job}}-${{inputs.artifact}}-${{steps.get_godot_cpp_sha.outputs.sha}}-${{github.ref}}
${{github.job}}-${{inputs.artifact}}-${{steps.get_godot_cpp_sha.outputs.sha}}
continue-on-error: true
- name: Set up Python 3.x
uses: actions/setup-python@v4
Expand Down Expand Up @@ -113,9 +113,8 @@ runs:
path: ${{inputs.output_libs_path}}/*

- name: Save .scons_cache directory
if: inputs.use_cache != 'false'
if: ${{!steps.restore_scons_cache.outputs.cache-hit && inputs.use_cache != 'false'}}
uses: actions/cache/save@v3
with:
path: ${{env.SCONS_CACHE}}
key: ${{github.job}}-${{inputs.artifact}}-${{steps.get_godot_cpp_sha.outputs.sha}}-${{github.ref}}-${{github.sha}}
continue-on-error: true
23 changes: 21 additions & 2 deletions .github/workflows/web_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: 🚀 Deploy content to Github Pages
on:
push:
branches-ignore: gh-pages
paths: [docs/**, images/**, dd3d_web_build/**, examples_dd3d/**, Doxyfile, src/**, .github/**, "!.github/**/util_*", "patches/**", lib_utils.py, SConstruct]
# Must not overlap with conditions in `gdextension_build.yml`
paths: [docs/**, images/**, dd3d_web_build/**, examples_dd3d/**, Doxyfile,
src/**, .github/**, "!.github/**/util_*", "patches/**", lib_utils.py, SConstruct
]
workflow_call:
workflow_dispatch:
inputs:
dev_deploy:
Expand Down Expand Up @@ -159,7 +163,7 @@ jobs:
runs-on: ubuntu-latest

env:
DOXYGEN_VERSION: 1.9.8
DOXYGEN_VERSION: 1.10.0

steps:
- name: Checkout
Expand All @@ -168,14 +172,29 @@ jobs:
lfs: true
submodules: recursive

- name: Restore doxygen directory
uses: actions/cache/restore@v3
id: restore_doxygen
with:
path: obj/doxygen-${{env.DOXYGEN_VERSION}}
key: doxygen-${{env.DOXYGEN_VERSION}}

- name: Install Doxygen
if: ${{!steps.restore_doxygen.outputs.cache-hit}}
shell: bash
run: |
mkdir obj
cd obj
wget -nv https://www.doxygen.nl/files/doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz
tar -xf doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz
- name: Save doxygen directory
if: ${{!steps.restore_doxygen.outputs.cache-hit}}
uses: actions/cache/save@v3
with:
path: obj/doxygen-${{env.DOXYGEN_VERSION}}
key: doxygen-${{env.DOXYGEN_VERSION}}

- name: Run Doxygen
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ obj/
bin/
src/gen/*
addons/debug_draw_3d/libs/~*
addons/debug_draw_3d/csharp/*
addons/debug_draw_3d/gen/*
clang_rt.asan_*
docs/images/classes/temp/
2 changes: 1 addition & 1 deletion addons/debug_draw_3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Your support adds motivation to develop my public projects.

<a href="https://boosty.to/dmitriysalnikov/donate"><img src="./docs/images/boosty.png" alt="Boosty" width=150px/></a>

<a href="https://qiwi.com/n/DMITRIYSALNIKOV"><img src="https://upload.wikimedia.org/wikipedia/commons/8/8f/QIWI_logo.svg" alt="qiwi" width=90px/></a>
<b>USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v</b>

## Features

Expand Down
2 changes: 2 additions & 0 deletions docs/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Your support adds motivation to develop my public projects.

[![](images/boosty.png){html: width=192px}](https://boosty.to/dmitriysalnikov/donate)

![USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v](images/USDT-TRC20.png)

<h2><a href="https://dd3d.dmitriysalnikov.ru/demo/">Interactive Web Demo</a></h2>

[![](/images/screenshot_web.png)](https://dd3d.dmitriysalnikov.ru/demo/)
Expand Down
40 changes: 33 additions & 7 deletions docs/doxygen_resources/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ html {
html {
/* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */
--primary-color: #ff810b;
--primary-dark-color: #f18c2c;
--primary-light-color: #e0c33e;
--primary-dark-color: #d56f15;
--primary-light-color: #dd9921;

--page-background-color: #ffffff;
--page-foreground-color: #1b1e21;
Expand All @@ -45,26 +45,34 @@ html {
--side-nav-background: #f3f3f3;
}

.paramname em {
color: var(--primary-light-color);
}

@media (prefers-color-scheme: dark) {
html:not(.light-mode) {
--primary-color: #f59031;
--primary-dark-color: #c07f42;
--primary-light-color: #e0c33e;
--primary-dark-color: #dd7d22;
--primary-light-color: #d9c775;

--page-background-color: #21232b;
--page-foreground-color: #ebf0f1;
--separator-color: #121212;

--side-nav-background: #282b35;
}

.paramname em {
color: var(--primary-light-color);
}
}

html.dark-mode {
color-scheme: dark;

--primary-color: #f59031;
--primary-dark-color: #c07f42;
--primary-light-color: #e0c33e;
--primary-dark-color: #dd7d22;
--primary-light-color: #d9c775;

--page-background-color: #21232b;
--page-foreground-color: #ebf0f1;
Expand All @@ -74,17 +82,33 @@ html.dark-mode {
}

#nav-tree .selected .arrow {
color: #f59031;
color: var(--primary-color);
text-shadow: none;
}

a:hover {
text-decoration: underline;
background: none;
}

#nav-tree .label a:hover {
background: linear-gradient(to bottom, transparent 0, transparent calc(100% - 1px), currentColor 100%);
}

a:hover>span.arrow {
text-decoration: none;
background: transparent;
}

span.mlabel {
background: var(--primary-color);
border-radius: 5px;
color: rgb(20, 20, 20);
font-weight: 800;
}

/* Version select */

select#dd3d_version_select {
color: var(--primary-color);
font-weight: 600;
Expand All @@ -97,6 +121,8 @@ select#dd3d_version_select option {
color: var(--page-foreground-color);
}

/* !Version select */

/* Octocat corner */

a.github-corner:hover .octo-arm {
Expand Down
6 changes: 3 additions & 3 deletions docs/doxygen_resources/footer.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- HTML footer for doxygen 1.9.8-->
<!-- HTML footer for doxygen 1.10.0-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer" id="dd3d_version_block">Docs version: <select id="dd3d_version_select"></select></li>
<li class="footer">$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer"
src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen" /></a> $doxygenversion </li>
src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen" /></a> $doxygenversion
<span id="dd3d_version_block" style="margin-left: 10px">Docs version: <select id="dd3d_version_select"></select></span></li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
Expand Down
17 changes: 17 additions & 0 deletions docs/image_generator/preview_generator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ enum PreviewCase {
LineBevel,
SphereDensity,
IcoSphere,
PlaneSize,

Line,
Arrow,

Expand All @@ -38,6 +40,7 @@ enum PreviewCase {
DrawGizmoCentered,
DrawGrid,
DrawFrustum,
DrawPlane,
}

class CaseData:
Expand All @@ -51,6 +54,8 @@ var case_maps = {
PreviewCase.LineBevel : CaseData.new(),
PreviewCase.SphereDensity : CaseData.new(),
PreviewCase.IcoSphere : CaseData.new(),
PreviewCase.PlaneSize : CaseData.new(),

PreviewCase.Line : CaseData.new(),
PreviewCase.Arrow : CaseData.new("DrawMethods360Lines"),

Expand All @@ -75,6 +80,7 @@ var case_maps = {
PreviewCase.DrawGizmoCentered : CaseData.new("DrawMethods360Lines"),
PreviewCase.DrawGrid : CaseData.new("DrawMethods180"),
PreviewCase.DrawFrustum : CaseData.new("DrawMethods360Camera"),
PreviewCase.DrawPlane : CaseData.new(),
}

var changed_by_code := false
Expand Down Expand Up @@ -275,6 +281,11 @@ func _process(delta):

var up_vec = $OriginUpVector.global_position - $OriginUpVector/Up.global_position

# Plane
var pxf: Transform3D = $OriginPlane.global_transform
var normal: = pxf.basis.y.normalized()
var plane = Plane(normal, pxf.origin.dot(normal))

match preview_case:
PreviewCase.LineThickness:
var _s = DebugDraw3D.new_scope_config().set_thickness(anim_value_1)
Expand All @@ -291,6 +302,9 @@ func _process(delta):
PreviewCase.IcoSphere:
var _s = DebugDraw3D.new_scope_config().set_thickness(0.02)
DebugDraw3D.draw_sphere_xf(%OriginInstances.global_transform, Color.INDIAN_RED)
PreviewCase.PlaneSize:
var _s = DebugDraw3D.new_scope_config().set_plane_size(anim_value_1)
DebugDraw3D.draw_plane(plane, Color.SEA_GREEN * Color(1,1,1,0.6), pxf.origin)

PreviewCase.Line:
var _s = DebugDraw3D.new_scope_config().set_center_brightness(0.7).set_thickness(0.2)
Expand Down Expand Up @@ -350,6 +364,9 @@ func _process(delta):
PreviewCase.DrawFrustum:
var _s = DebugDraw3D.new_scope_config().set_thickness(0.015)
DebugDraw3D.draw_camera_frustum($OriginCameraFrustum/Camera3D, Color.CORAL)
PreviewCase.DrawPlane:
var _s = DebugDraw3D.new_scope_config().set_plane_size(1)
DebugDraw3D.draw_plane(plane, Color.SEA_GREEN * Color(1,1,1,0.6), pxf.origin)


_end_of_frame(delta)
Expand Down
Loading

0 comments on commit 361cc94

Please sign in to comment.