Use CDN threejs
This module is based on https://github.com/eneus/drupal_threejs (but it's not totally the same I reuse about 30%).
How to use:

  1. Enable modules Threejs + Threejs field
  2. Configuration Threejs
  3. Configuration field Threejs formatter

Commonly Supported Formats:

  • OBJ: A widely used format for describing 3D object geometry.
  • glTF (and GLB): A royalty-free specification for the transmission and loading of 3D scenes and models. GLB is the binary version.
  • STL: A standard format for 3D printing and CAD/CAM applications.
  • PLY: A format primarily used for storing 3D data, especially point clouds.
  • 3MF: A 3D manufacturing format designed for 3D printing.
  • FBX: A popular format for exchanging 3D data between different software packages, though support has been discontinued.

Another format can load:

  • 3DM Rhino 3D Model
  • AMF Additive Manufacturing Format
  • BVH Biovision Hierarchy
  • DDS DirectDraw Surface
  • DRC Draco compressed format
  • EXR OpenEXR
  • GCode G-code CNC
  • KMZ Google Earth zip
  • KTX/KTX2 Khronos Texture
  • LWO LightWave Object
  • MMD MikuMikuDance
  • MD2 Quake II Model
  • Mpd LDraw Model
  • MTL Material Template Library
  • NRRD Nearly Raw Raster Data
  • TIFF 3D image data in scientific and medical imaging
  • Tilt Tilt Brush
  • TGA Targa
  • TTF Text 3D
  • PCD Point Cloud Data
  • PVR PowerVR Texture
  • PRWM Compressed geometry
  • PDB Protein Data Bank
  • RGBM/RGBE High-dynamic range textures
  • VOX MagicaVoxel
  • WRL VRML (Virtual Reality Modeling Language)
  • VTK Visualization Toolkit
  • XYZ Point Cloud

some issue:
- camera fit to object (i set for scanner box)
- texture not work some case

the module uses cdn version r149 because threejs from r150+ will use script type=importmap. but Drupal does not support these attributes yet.

You can modify version by yourself in threejs.libraries.yml
example:
//cdn.jsdelivr.net/npm/three@0.160.0/build/three.min.js: { external, minified: true, crossorigin: anonymous}
it still works but you will see a warning message in the console log

Do you like this module? Show your appreciation by buying me ☕.

Supporting organizations: 

Project information

Releases