this is how 3d in html should have been done!

displaying 3d models is the easy part...then using javascript, python, actionscript or java the edit the scene

the tag "3dobject" denotes a single 3d file solely for viewing

the tag "3dworld" denotes a list of 3d files within a world to be interactive and scripted

<3dworld type=(rasterized/raytraced) id= name= class=> <3dobject src=(obj,colada,3ds) height= width= depth= /> </3dworld>

Dani AI

Generated

pitched the right mental model: make 3D assets first-class like images or video. asked the practical question of how a browser would render them. Since this thread was started, the ecosystem settled on three complementary pieces that accomplish exactly that: a compact runtime format (glTF), GPU APIs for rendering (WebGL today, WebGPU emerging), and higher-level components/libraries that present a simple declarative surface on top of those primitives.

A widely used declarative solution is the model-viewer web component. It wraps a GPU context, loaders and AR/camera controls so an author can embed an interactive 3D asset without building a render loop:

<model-viewer src="scene.glb" alt="Product model" camera-controls ar></model-viewer>

model-viewer provides accessible fallbacks, controls and AR hooks while relying on standards underneath (model-viewer). For interchange, the Khronos glTF format is now the common way to transmit materials, animations and binary payloads efficiently (glTF). For scripted, multi-object worlds where app logic, physics or custom rendering are needed, libraries such as three.js (or Babylon) sit on top of WebGL/WebGPU and expose scene graphs plus loaders.

Practical notes that were missing from the original posts: prefer binary glTF (.glb) for single-file delivery, use geometry/texture compression (Draco/KTX2) for mobile, serve correct MIME/CORS headers, provide low-end fallbacks (static image or simplified model), and treat heavy scenes as progressive enhancement. Ray tracing in-browser exists experimentally via WebGPU/WASM, but it is still heavy for general web pages. For most cases today, glTF + a declarative component or a small library gives the effect described with far less boilerplate.

Recommended Answers

All 2 Replies

displaying 3d models is the easy part

How a browser do that on a webpage???

How a browser do that on a webpage???

ever heard of webgl...well apparently you can display 3d content via javascript, yuo should check it out...chrome dev preview/mozilla latest alpha. my argument is that why not -like images or videos- display 3d files directly within html, with out extensive javascript know how.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.