A PoC extension that models a PHP runtime in 3D with SketchUp.
- PHP 8.1+
- SketchUp C API
- macOS (The SketchUp C API only supports Windows and macOS)
Download and extract the SketchUp C API and copy the SketchUpAPI framework to your local Frameworks
directory.
$ mkdir -p ~/Library/Frameworks
$ cp -r /path/to/sketchup-sdk/SketchUpAPI.framework ~/Library/Frameworks
Install the extension.
$ phpize; \
./configure --enable-3d \
make; \
make test; \
make install;
If you installed the SketchUpAPI framework in a non-standard path, you can specify the frameworks directory with --with-sketchup-api=/path/to/frameworks/dir
.
Once the extension is enabled, make a request with INI setting php_3d.generate_model=1
. This will generate a SketchUp file with a 3D model of the request's runtime. Open the .skp
file with SketchUp and enjoy the 3D PHP experience.