Linux 软件免费装
Banner图

Pratiks 3D Model Embedder

开发者 pratiklondhe
更新时间 2026年11月2日 03:14
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

stl 3d 3d viewer augmented reality glb

下载

1.0.0

详情介绍:

WordPress does not let you upload 3D files ("Sorry, you are not allowed to upload this file type"), and has no way to show one. Pratiks 3D Model Embedder adds both: upload the file like an image, insert the 3D Model block, publish. Visitors can turn the model around with the mouse or a finger. Upload 3D files safely GLB, glTF, STL, OBJ and USDZ files can be uploaded by anyone who can upload images. Each file is checked by its content, not just its name: a .glb must really be a binary glTF 2.0 file, an .stl must really be an STL, and text files that carry PHP or a script tag are refused. When a file is refused, you are told why. STL and OBJ are converted for you STL files (from 3D printing and CAD) and OBJ files are converted to GLB when you upload them. The conversion streams the file, so large models do not run the server out of memory. STL files are turned upright and scaled from millimetres, so they look right straight away. The original file is kept. The 3D Model block Light on your site The viewer is Google's open source <model-viewer>, bundled with the plugin together with its decoders for compressed models. Nothing is loaded from a CDN, and the viewer only loads on pages that show a 3D model. For developers Filters and actions for every default, limit and message, JavaScript hooks in the editor, wp pratiks-3d-model-embedder WP-CLI commands, REST routes, and Abilities API abilities (WordPress 6.9+) so AI agents can list models, convert them and set posters. See the reference. Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking.

安装:

  1. Install from Plugins > Add New Plugin, or upload the zip.
  2. Activate it.
  3. Upload a 3D file to the Media Library, or add the 3D Model block to a post and upload it there.

屏幕截图:

  • The 3D Model block in the editor, with its settings.
  • Uploading an STL file: it is converted to GLB and shown right away.
  • 3D models in the Media Library, with posters as thumbnails.

常见问题:

Which formats can I use?

GLB (recommended), glTF with everything embedded, STL and OBJ. STL and OBJ are converted to GLB at upload. USDZ can be uploaded too, as the iPhone and iPad version of a model for augmented reality.

My glTF file was refused. Why?

glTF files often come with separate files (a .bin file and texture images) that cannot be uploaded together with them. Export the model as a single .glb file from your 3D tool (Blender: File > Export > glTF 2.0, format "glTF Binary") and upload that.

My OBJ model is grey.

OBJ colours and textures live in separate .mtl and image files, which cannot come along with a single upload, so converted OBJ and STL models get a neutral grey. For colours and textures, upload a GLB.

A large STL was not converted.

Files over 64 MB are not converted during the upload, to keep uploads fast. The block tells you so. Ask whoever manages the server to run wp pratiks-3d-model-embedder convert <attachment ID> --ignore-limit, or raise the limit with the pratiks_3d_model_embedder_max_convert_bytes filter.

Who can upload 3D files?

Everyone who can upload images (the upload_files capability). To limit 3D uploads to administrators: add_filter( 'pratiks_3d_model_embedder_upload_capability', fn() => 'manage_options' );

Does it work on multisite?

Yes. On a network, add glb gltf usdz stl obj to Upload file types in Network Admin > Settings. Tools > Site Health tells you when they are missing.

Augmented reality does not start on my iPhone.

iPhones and iPads need a USDZ version of the model (choose it in the block's Augmented reality panel), and your server must send USDZ files as model/vnd.usdz+zip. Tools > Site Health checks this.

更新日志:

1.0.0