{"id":203700,"date":"2024-09-24T08:34:31","date_gmt":"2024-09-24T08:34:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/threewp\/"},"modified":"2025-12-20T20:21:02","modified_gmt":"2025-12-20T20:21:02","slug":"threewp","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/threewp\/","author":23125134,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.2","stable_tag":"2.0.2","tested":"6.9.4","requires":"5.4","requires_php":"7.4","requires_plugins":null,"header_name":"ThreeWP","header_author":"Rownok Bosunia","header_description":"A plugin to integrate Three.js with WordPress for creating custom 3D models.","assets_banners_color":"1b4688","last_updated":"2025-12-20 20:21:02","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.github.com\/rondevs\/threewp","header_author_uri":"https:\/\/www.github.com\/rondevs","rating":5,"author_block_rating":0,"active_installs":200,"downloads":2678,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq"],"tags":{"2.0.2":{"tag":"2.0.2","author":"rondevs","date":"2025-12-20 20:21:02"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3156765,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3156749,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[232051,147250,18208,805,232052],"plugin_category":[],"plugin_contributors":[232053],"plugin_business_model":[],"class_list":["post-203700","plugin","type-plugin","status-publish","hentry","plugin_tags-3d-graphics","plugin_tags-three-js","plugin_tags-visualization","plugin_tags-webgl","plugin_tags-wordpress-3d","plugin_contributors-rondevs","plugin_committers-rondevs"],"banners":{"banner":"https:\/\/ps.w.org\/threewp\/assets\/banner-772x250.png?rev=3156749","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/threewp\/assets\/icon-256x256.png?rev=3156765","icon_2x":"https:\/\/ps.w.org\/threewp\/assets\/icon-256x256.png?rev=3156765","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>ThreeWP is a WordPress plugin that integrates the Three.js library and its addons into your WordPress site using a custom bundle file. This setup allows you to create and manage custom 3D models, animations, and interactive graphics directly within your WordPress theme or custom JavaScript code.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Custom Bundle Integration: Enqueues the Three.js library and essential addons using a custom bundle file, avoiding reliance on a CDN.<\/li>\n<li>Easy Setup: Straightforward installation and activation process.<\/li>\n<li>Custom Integration: No built-in shortcodes or settings; users add their own Three.js code for full customization.<\/li>\n<\/ul>\n\n<h3>Source Code<\/h3>\n\n<p>The source code for the minified JavaScript bundle file used in this plugin is publicly available at the following URL: https:\/\/github.com\/rondevs\/threejs-custom-bundler<\/p>\n\n<h3>Usage<\/h3>\n\n<p>After activating the plugin, Use the <code>[use_threewp]<\/code> shortcode to enable Three.js for specific pages. Three.js and its addons will be available for use in your theme or custom JavaScript files. You need to manually add your Three.js code to create and manage 3D content.<\/p>\n\n<h3>Example Usage<\/h3>\n\n<p>Add Custom JavaScript:\n- Add your Three.js initialization and rendering code to your theme\u2019s JavaScript file or use a custom script. Here\u2019s a basic example:<\/p>\n\n<pre><code>document.addEventListener('DOMContentLoaded', function () {\n    if (typeof ThreeWP !== 'undefined') {\n        \/\/ Destructure THREE and THREE_ADDONS from ThreeWP\n        const { THREE, OrbitControls } = ThreeWP;\n        \/\/ Create a scene\n        const scene = new THREE.Scene();\n        \/\/ Setup a camera\n        const camera = new THREE.PerspectiveCamera(\n            75,\n            window.innerWidth \/ window.innerHeight,\n            0.1,\n            1000,\n        );\n        \/\/ Setup a renderer\n        const renderer = new THREE.WebGLRenderer();\n        \/\/ Give the renderer a width and height\n        renderer.setSize(window.innerWidth, window.innerHeight);\n        \/\/ Append the renderer into the html body\n        document.body.appendChild(renderer.domElement);\n        \/\/ Set camera position\n        camera.position.z = 2;\n        \/\/ Load a texture\n        const textureLoader = new THREE.TextureLoader();\n        const texture = textureLoader.load(\n            'https:\/\/threejsfundamentals.org\/threejs\/resources\/images\/wall.jpg',\n        ); \/\/ Replace with your image URL\n        \/\/ Create geometry\n        const geometry = new THREE.BoxGeometry(1, 1, 1);\n        \/\/ Create material\n        const material = new THREE.MeshStandardMaterial({ map: texture });\n        \/\/ Combine into mesh\n        const sphere = new THREE.Mesh(geometry, material);\n        scene.add(sphere);\n        const light = new THREE.AmbientLight(0xffffff);\n        scene.add(light);\n        \/\/ Set up OrbitControls\n        const controls = new OrbitControls(\n            camera,\n            renderer.domElement,\n        );\n        \/\/ Optional: Adjust controls settings (e.g., damping, auto-rotation)\n        controls.enableDamping = true; \/\/ Adds smoothness when dragging\n        controls.dampingFactor = 0.03;\n        controls.autoRotate = true;\n        controls.autoRotateSpeed = 2;\n        function animate(t = 0) {\n            requestAnimationFrame(animate);\n            controls.update();\n            renderer.render(scene, camera);\n        }\n        animate();\n        \/\/ Responsive\n        window.addEventListener('resize', () =&gt; {\n            camera.aspect = window.innerWidth \/ window.innerHeight;\n            camera.updateProjectionMatrix();\n            renderer.setSize(window.innerWidth, window.innerHeight);\n        });\n    } else {\n        console.error('Three.js could not be loaded.');\n    }\n});\n<\/code><\/pre>\n\n<p>NOTE: Destructure THREE and the addons to access from ThreeWP bundle.<\/p>\n\n<h3>Tips<\/h3>\n\n<p>Responsive Design: Adjust the size of the Three.js container or renderer according to your design requirements. Handle window resizing events to keep the 3D content responsive.\nDocumentation: Refer to the Three.js documentation for detailed information on creating more complex scenes, objects, and animations.<\/p>\n\n<h3>Available Tools in This Plugin<\/h3>\n\n<ul>\n<li><strong>THREE<\/strong><\/li>\n<li><strong>Addons:<\/strong>\n\n<ul>\n<li>ArcballControls<\/li>\n<li>BufferGeometryUtils<\/li>\n<li>CameraUtils<\/li>\n<li>CCDIKSolver<\/li>\n<li>ConvexGeometry<\/li>\n<li>ConvexH<\/li>\n<li>CSS2DRenderer<\/li>\n<li>CSS3DRenderer<\/li>\n<li>DecalGeometry<\/li>\n<li>DRACOLoader<\/li>\n<li>DragControls<\/li>\n<li>EdgeSplitModifier<\/li>\n<li>EffectComposer<\/li>\n<li>FirstPersonControls<\/li>\n<li>FlyControls<\/li>\n<li>FontLoader<\/li>\n<li>GLTFLoader<\/li>\n<li>KTX2Loader<\/li>\n<li>LDrawLoader<\/li>\n<li>Lensflare<\/li>\n<li>LensflareElement<\/li>\n<li>LightProbeGenerator<\/li>\n<li>LightProbeHelper<\/li>\n<li>Lut<\/li>\n<li>LUT3dlLoader<\/li>\n<li>LUTCubeLoader<\/li>\n<li>MapControls<\/li>\n<li>MeshSurfaceSampler<\/li>\n<li>MMDAnimationHelper<\/li>\n<li>MMDLoader<\/li>\n<li>MMDPhysics<\/li>\n<li>MTLLoader<\/li>\n<li>OBB<\/li>\n<li>OBJLoader<\/li>\n<li>OrbitControls<\/li>\n<li>ParametricGeometry<\/li>\n<li>PCDLoader<\/li>\n<li>PDBLoader<\/li>\n<li>PointerLockControls<\/li>\n<li>PositionalAudioHelper<\/li>\n<li>RectAreaLightHelper<\/li>\n<li>Rhino3dmLoader<\/li>\n<li>SceneUtils<\/li>\n<li>SDFGeometryGenerator<\/li>\n<li>SkeletonUtils<\/li>\n<li>Sky<\/li>\n<li>SVGLoader<\/li>\n<li>SVGRenderer<\/li>\n<li>TeapotGeometry<\/li>\n<li>TextGeometry<\/li>\n<li>TGALoader<\/li>\n<li>Timer<\/li>\n<li>TrackballControls<\/li>\n<li>TransformControls<\/li>\n<li>VertexNormalsHelper<\/li>\n<li>VertexTangentsHelper<\/li>\n<li>XREstimatedLight<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h3>v2.0.2<\/h3>\n\n<ul>\n<li>Updated custom bundle file.<\/li>\n<li>Removed external dependencies from the bundle.<\/li>\n<li>Introduced shortcode [use_threewp] to load the Three.js bundle script only on pages that contain the shortcode.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Added <code>defer<\/code> attribute to the Three.js script for improved performance and load times.<\/li>\n<li>Updated plugin code for better compatibility with modern browsers.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<p>*Introduced custom bundle file integration for Three.js and essential addons like OrbitControls, GLTFLoader, EffectComposer, and BloomPass etc. \n*This version enhances the plugin's capabilities and provides a more comprehensive setup for integrating Three.js with WordPress.<\/p>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added Three.js Addons Support with CDN<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release of the Three.js CDN Integration plugin.<\/li>\n<\/ul>\n\n<h3>Contributing<\/h3>\n\n<p>We welcome contributions to improve this plugin. If you have suggestions, bug reports, or feature requests, please open an issue on https:\/\/github.com\/rondevs\/threewp\/issues.<\/p>\n\n<h3>License<\/h3>\n\n<p>This plugin is licensed under the GPLv2 or later. See the LICENSE file for details.<\/p>\n\n<h3>Support<\/h3>\n\n<p>If you encounter any issues or need assistance, please reach out via https:\/\/github.com\/rondevs\/threewp\/issues.<\/p>\n\n<p>Thank you for using ThreeWP! We hope it enhances your WordPress site with exciting 3D content.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>From WordPress Dashboard:<\/li>\n<\/ol>\n\n<p>- Go to your WordPress dashboard.\n- Navigate to <strong>Plugins<\/strong> &gt; <strong>Add New<\/strong>.\n- In the search bar, type <strong>ThreeWP<\/strong>.\n- Locate the <strong>ThreeWP<\/strong> plugin and click <strong>Install Now<\/strong>.\n- After installation, click <strong>Activate<\/strong>.<\/p>\n\n<ol>\n<li>Manual Installation:<\/li>\n<\/ol>\n\n<p>- Download the plugin zip file from the <a href=\"https:\/\/wordpress.org\/plugins\/threewp\">WordPress.org plugin repository<\/a>.\n- Go to your WordPress dashboard.\n- Navigate to <strong>Plugins<\/strong> &gt; <strong>Add New<\/strong>.\n- Click on <strong>Upload Plugin<\/strong> and select the downloaded zip file.\n- Click <strong>Install Now<\/strong> and then <strong>Activate<\/strong> the plugin.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='after%20activating%20the%20plugin%2C%20you%20can%20include%20three.js%20code%20in%20your%20theme%2C%20html%20element%20or%20custom%20plugin%20to%20create%20and%20manage%203d%20models.'><h3>After activating the plugin, you can include Three.js code in your theme, html element or custom plugin to create and manage 3D models.<\/h3><\/dt>\n<dd><\/dd>\n\n<\/dl>","raw_excerpt":"Easily integrate Three.js with WordPress to create and display 3D models and animations.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/203700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=203700"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rondevs"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=203700"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=203700"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=203700"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=203700"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=203700"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=203700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}