% lua-tikz3dtools.sty
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesExplPackage{lua-tikz3dtools}{2026/01/22}{v2.3.0}{
    LuaLaTeX package for 3D illustrations in TikZ.
}

\RequirePackage{tikz}
\RequirePackage{xcolor}

\NewDocumentCommand{\luatikztdtoolsset}{o}{\tikzset{/lua-tikz3dtools/.cd, #1}}
\tikzset{
    /lua-tikz3dtools/.is~family % abbreviated "td"
    ,/lua-tikz3dtools/.cd 
        ,/lua-tikz3dtools/parametric/.cd % appreviated "p"
            ,/lua-tikz3dtools/parametric/object/.cd % abbreviated "m"
                ,object/.code = {\protected@edef\luatikztdtools@p@m@object{#1}}
                ,name/.code = {\protected@edef\luatikztdtools@p@m@name{#1}}
            ,/lua-tikz3dtools/parametric/light/.cd % abbreviated "la"
                ,x/.code = {\protected@edef\luatikztdtools@p@l@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@l@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@l@z{#1}}
            ,/lua-tikz3dtools/parametric/point/.cd % abbreviated "p"
                ,x/.code = {\protected@edef\luatikztdtools@p@p@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@p@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@p@z{#1}}
                ,fill~options/.estore~in = \luatikztdtools@p@p@filloptions
                ,transformation/.code = {\protected@edef\luatikztdtools@p@p@transformation{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@p@filter{#1}}
            ,/lua-tikz3dtools/parametric/label/.cd % abbreviated "l"
                ,x/.code = {\protected@edef\luatikztdtools@p@l@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@l@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@l@z{#1}}
                ,name/.code = {\protected@edef\luatikztdtools@p@l@name{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@l@transformation{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@l@filter{#1}}
            ,/lua-tikz3dtools/parametric/curve/.cd % abbreviated "c"
                ,ustart/.estore~in = \luatikztdtools@p@c@ustart
                ,ustop/.estore~in = \luatikztdtools@p@c@ustop
                ,usamples/.estore~in = \luatikztdtools@p@c@usamples
                ,x/.code = {\protected@edef\luatikztdtools@p@c@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@c@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@c@z{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@c@transformation{#1}}
                ,draw~options/.estore~in = \luatikztdtools@p@c@drawoptions
                ,arrow~tip/.code = {\protected@edef\luatikztdtools@p@c@arrowtip{#1}}
                ,arrow~tail/.code = {\protected@edef\luatikztdtools@p@c@arrowtail{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@c@filter{#1}}
            ,/lua-tikz3dtools/parametric/surface/.cd % abbreviated "s"
                ,ustart/.estore~in = \luatikztdtools@p@s@ustart
                ,ustop/.estore~in = \luatikztdtools@p@s@ustop 
                ,usamples/.estore~in = \luatikztdtools@p@s@usamples 
                ,vstart/.estore~in = \luatikztdtools@p@s@vstart
                ,vstop/.estore~in = \luatikztdtools@p@s@vstop 
                ,vsamples/.estore~in = \luatikztdtools@p@s@vsamples 
                ,x/.code = {\protected@edef\luatikztdtools@p@s@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@s@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@s@z{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@s@transformation{#1}}
                ,fill~options/.code = {\protected@edef\luatikztdtools@p@s@filloptions{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@s@filter{#1}}
            ,/lua-tikz3dtools/parametric/triangle/.cd % abbreviated "t"
                ,A/.code = {\protected@edef\luatikztdtools@p@t@A{#1}}
                ,B/.code = {\protected@edef\luatikztdtools@p@t@B{#1}}
                ,C/.code = {\protected@edef\luatikztdtools@p@t@C{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@t@transformation{#1}}
                ,fill~options/.code = {\protected@edef\luatikztdtools@p@t@filloptions{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@t@filter{#1}}
            ,/lua-tikz3dtools/parametric/solid/.cd % abbreviated "solid"
                ,ustart/.estore~in = \luatikztdtools@p@solid@ustart
                ,ustop/.estore~in = \luatikztdtools@p@solid@ustop 
                ,usamples/.estore~in = \luatikztdtools@p@solid@usamples 
                ,vstart/.estore~in = \luatikztdtools@p@solid@vstart
                ,vstop/.estore~in = \luatikztdtools@p@solid@vstop 
                ,vsamples/.estore~in = \luatikztdtools@p@solid@vsamples 
                ,wstart/.estore~in = \luatikztdtools@p@solid@wstart
                ,wstop/.estore~in = \luatikztdtools@p@solid@wstop 
                ,wsamples/.estore~in = \luatikztdtools@p@solid@wsamples 
                ,x/.code = {\protected@edef\luatikztdtools@p@solid@x{#1}}
                ,y/.code = {\protected@edef\luatikztdtools@p@solid@y{#1}}
                ,z/.code = {\protected@edef\luatikztdtools@p@solid@z{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@solid@transformation{#1}}
                ,fill~options/.estore~in = \luatikztdtools@p@solid@filloptions
                ,filter/.code = {\protected@edef\luatikztdtools@p@solid@filter{#1}}
}

\lua_load_module:n { lua-tikz3dtools-implementation }

\NewDocumentCommand { \appendpoint } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/point/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/point/.cd
        ,#1
    }
    \__lua_tikztdtools_appendpoint:
    \group_end:
}
\NewDocumentCommand { \appendlabel } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/label/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/label/.cd
        ,#1
    }
    \__lua_tikztdtools_appendlabel:
    \group_end:
}
\NewDocumentCommand { \appendlight } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/light/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/light/.cd
        ,#1
    }
    \__lua_tikztdtools_appendlight:
    \group_end:
}
\NewDocumentCommand { \appendcurve } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/curve/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/curve/.cd
        ,#1
    }
    \__lua_tikztdtools_appendcurve:
    \group_end:
}
\NewDocumentCommand { \appendsurface } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/surface/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/surface/.cd
        ,#1
    }
    \__lua_tikztdtools_appendsurface:
    \group_end:
}
\NewDocumentCommand { \appendtriangle } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/triangle/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/triangle/.cd
        ,#1
    }
    \__lua_tikztdtools_appendtriangle:
    \group_end:
}
\NewDocumentCommand { \appendsolid } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/solid/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/solid/.cd
        ,#1
    }
    \__lua_tikztdtools_appendsolid:
    \group_end:
}
\NewDocumentCommand { \displaysimplices } {} {
    \group_begin:
    \__lua_tikztdtools_displaysimplices:
    \group_end:
}
\NewDocumentCommand { \setobject } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/object/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/object/.cd
        ,#1
    }
    \__lua_tikztdtools_setobject:
    \group_end:
}

.
