\NeedsTeXFormat{LaTeX2e}[1994/05/21]
\ProvidesExplPackage{lua-tikz3dtools}{2026/05/28}{v3.2.0}{
    LuaLaTeX package for 3D illustrations in TikZ.
}

\RequirePackage{tikz}
\RequirePackage{xcolor}

\tikzset{
    /lua-tikz3dtools/.is~family % abbreviated "td"
    ,/lua-tikz3dtools/.cd 
        ,/lua-tikz3dtools/parametric/.cd % abbreviated "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"
                ,v/.code = {\protected@edef\luatikztdtools@p@la@v{#1}}
            ,/lua-tikz3dtools/parametric/point/.cd % abbreviated "p"
                ,v/.code = {\protected@edef\luatikztdtools@p@p@v{#1}}
                ,fill~options/.estore~in = \luatikztdtools@p@p@filloptions
                ,fill~options/.initial = {}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@p@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,filter/.code = {\protected@edef\luatikztdtools@p@p@filter{#1}}
                ,filter/.initial = return~true
            ,/lua-tikz3dtools/parametric/label/.cd % abbreviated "l"
                ,v/.code = {\protected@edef\luatikztdtools@p@l@v{#1}}
                ,text/.code = {\def\luatikztdtools@p@l@text{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@l@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,filter/.code = {\protected@edef\luatikztdtools@p@l@filter{#1}}
                ,filter/.initial = return~true
            ,/lua-tikz3dtools/parametric/curve/.cd % abbreviated "c"
                ,uparams/.code = {\protected@edef\luatikztdtools@p@c@uparams{#1}}
                ,uparams/.initial = return~Vector:new{0,1,10}
                ,v/.code = {\protected@edef\luatikztdtools@p@c@v{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@c@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,draw~options/.estore~in = \luatikztdtools@p@c@drawoptions
                ,draw~options/.initial = {}
                ,arrow~tip/.code = {\protected@edef\luatikztdtools@p@c@arrowtip{#1}}
                ,arrow~tail/.code = {\protected@edef\luatikztdtools@p@c@arrowtail{#1}}
                ,arrow~scale/.code = {\protected@edef\luatikztdtools@p@c@arrowscale{#1}}
                ,filter/.code = {\protected@edef\luatikztdtools@p@c@filter{#1}}
                ,filter/.initial = return~true
            ,/lua-tikz3dtools/parametric/surface/.cd % abbreviated "s"
                ,uparams/.code = {\protected@edef\luatikztdtools@p@s@uparams{#1}}
                ,uparams/.initial = return~Vector:new{0,1,10}
                ,vparams/.code = {\protected@edef\luatikztdtools@p@s@vparams{#1}}
                ,vparams/.initial = return~Vector:new{0,1,10}
                ,v/.code = {\protected@edef\luatikztdtools@p@s@v{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@s@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,fill~options/.code = {\protected@edef\luatikztdtools@p@s@filloptions{#1}}
                ,fill~options/.initial = {}
                ,filter/.code = {\protected@edef\luatikztdtools@p@s@filter{#1}}
                ,filter/.initial = return~true
                ,curve/.code = {\protected@edef\luatikztdtools@p@s@curve{#1}}
            ,/lua-tikz3dtools/parametric/triangle/.cd % abbreviated "t"
                ,m/.code = {\protected@edef\luatikztdtools@p@t@m{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@t@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,fill~options/.code = {\protected@edef\luatikztdtools@p@t@filloptions{#1}}
                ,fill~options/.initial = {}
                ,filter/.code = {\protected@edef\luatikztdtools@p@t@filter{#1}}
                ,filter/.initial = return~true
            ,/lua-tikz3dtools/parametric/solid/.cd % abbreviated "solid"
                ,uparams/.code = {\protected@edef\luatikztdtools@p@solid@uparams{#1}}
                ,uparams/.initial = return~Vector:new{0,1,10}
                ,vparams/.code = {\protected@edef\luatikztdtools@p@solid@vparams{#1}}
                ,vparams/.initial = return~Vector:new{0,1,10}
                ,wparams/.code = {\protected@edef\luatikztdtools@p@solid@wparams{#1}}
                ,wparams/.initial = return~Vector:new{0,1,10}
                ,v/.code = {\protected@edef\luatikztdtools@p@solid@v{#1}}
                ,transformation/.code = {\protected@edef\luatikztdtools@p@solid@transformation{#1}}
                ,transformation/.initial = return~Matrix.identity()
                ,fill~options/.estore~in = \luatikztdtools@p@solid@filloptions
                ,fill~options/.initial = {}
                ,filter/.code = {\protected@edef\luatikztdtools@p@solid@filter{#1}}
                ,filter/.initial = return~true
}% end tikzset

\lua_load_module:n { lua-tikz3dtools-implementation }

\NewDocumentCommand{\luatikztdtoolsset}{o}{\tikzset{/lua-tikz3dtools/.cd, #1}}
% Points are better drawn as oriented disks using \appendsurface
\iffalse
\NewDocumentCommand { \ltdtappendpoint } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/point/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/point/.cd
        ,#1
    }
    \__lua_tikztdtools_appendpoint:
    \group_end:
}
\fi
\NewDocumentCommand { \ltdtappendlabel } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/label/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/label/.cd
        ,#1
    }
    \__lua_tikztdtools_appendlabel:
    \group_end:
}
\NewDocumentCommand { \ltdtappendlight } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/light/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/light/.cd
        ,#1
    }
    \__lua_tikztdtools_appendlight:
    \group_end:
}
\NewDocumentCommand { \ltdtappendcurve } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/curve/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/curve/.cd
        ,#1
    }
    \__lua_tikztdtools_appendcurve:
    \group_end:
}
\NewDocumentCommand { \ltdtappendsurface } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/surface/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/surface/.cd
        ,#1
    }
    \__lua_tikztdtools_appendsurface:
    \group_end:
}
\NewDocumentCommand { \ltdtappendtriangle } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/triangle/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/triangle/.cd
        ,#1
    }
    \__lua_tikztdtools_appendtriangle:
    \group_end:
}
\NewDocumentCommand { \ltdtappendsolid } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/solid/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/solid/.cd
        ,#1
    }
    \__lua_tikztdtools_appendsolid:
    \group_end:
}
\NewDocumentCommand { \ltdtdisplaysimplices } {} {
    \group_begin:
    \__lua_tikztdtools_displaysimplices:
    \group_end:
}
\NewDocumentCommand { \ltdtsetobject } {o} {
    \group_begin:
    \tikzset{
        /lua-tikz3dtools/parametric/object/.search~also = {/tikz}
        ,/lua-tikz3dtools/parametric/object/.cd
        ,#1
    }
    \__lua_tikztdtools_setobject:
    \group_end:
}
