%% examples/debug-demo.tex
%%
%% Demonstrates the physics debug/... family of keys.
%% The key is cascadable: works at tikzpicture, scope, or node level.
%%
%%   physics debug/anchors = true    numbered dots + legend table
%%   physics debug/keys    = true    accepted keys box
%%   physics debug/all     = true    both of the above

\documentclass[tikz, border=8mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{tikzphysics.surface, tikzphysics.mechanics, tikzphysics.optics}

\begin{document}

%% Picture-wide: every node gets a native-preferred key panel
\begin{tikzpicture}[physics debug/keys=true]
  \node[wedge, wedge angle=30, minimum width=4cm] at (0,0) {};
  \node[platform-left, minimum width=3cm, minimum height=1.5cm]
    at (7,0) {};
\end{tikzpicture}

\vspace{5mm}

%% New optical components use concise names in their debug key panels
\begin{tikzpicture}[physics debug/keys=true]
  \node[convex-lens, convex lens aperture angle=22] at (0,0) {};
  \node[concave-lens, concave lens aperture angle=22] at (6,0) {};
  \node[slab, minimum width=1cm, minimum height=2.5cm] at (12,0) {};
  \node[prism, prism width=2.6cm, prism apex angle=60] at (18,0) {};
\end{tikzpicture}

\vspace{5mm}

%% Per-node: only the second wedge shows debug
\begin{tikzpicture}
  \node[wedge, wedge angle=30, minimum width=4cm] at (0,0) {};
  \node[wedge, wedge angle=45, wedge right angle at=top,
        minimum width=4cm, physics debug/anchors=true] at (6,0) {};
\end{tikzpicture}

\vspace{5mm}

%% physics debug/all = anchors + keys
\begin{tikzpicture}[physics debug/keys=true]
  \node[pulley, minimum size=1.5cm] at (0,0) {};
  \node[block, minimum width=1.5cm, minimum height=1cm] at (6,0) {};
  \node[wedge, wedge angle=30, minimum width=4cm] at (13,0) {};
\end{tikzpicture}

\end{document}
