New HTML Element to Display a 3D Scene ANDO Yasushi Kabuku Inc. - - PowerPoint PPT Presentation

new html element to display a 3d scene
SMART_READER_LITE
LIVE PREVIEW

New HTML Element to Display a 3D Scene ANDO Yasushi Kabuku Inc. - - PowerPoint PPT Presentation

New HTML Element to Display a 3D Scene ANDO Yasushi Kabuku Inc. Email: andyjpn@gmail.com Twitter: @technohippy Summary We should have a new HTML element to display a 3D scene. Problem 3D contents are not popular enough for standard web


slide-1
SLIDE 1

New HTML Element to Display a 3D Scene

ANDO Yasushi Kabuku Inc. Email: andyjpn@gmail.com Twitter: @technohippy

slide-2
SLIDE 2

Summary

We should have a new HTML element to display a 3D scene.

slide-3
SLIDE 3

Problem

  • 3D contents are not popular enough for standard web sites.
  • Many developers develop a kind of 3D viewer similar to each
  • ther.

○ Waste of: ■ Human resource ■ Time ■ Network traffic

slide-4
SLIDE 4

Solution: HTML Element to Display 3D Scene

By introducing the new element

  • 3D contents can be true first class citizens of the Web.
  • Developers can avoid developing similar feature sets of 3D viewers.
  • Through well-argued JS APIs, casual games can be built on the element.
  • IMVHO: Similar to the <video> element, a browser can load 3D models

into the element in cryptic way.

slide-5
SLIDE 5

Functionalities the Element Should Have

  • Load and display 3D models (probably written in glTF)
  • Control a camera by a mouse or fingers
  • Show camera controls (for example, a viewcube) if required
  • Events

○ Enter/Exit XR mode, Hit test and so on...

  • JS APIs

○ Control a camera, Invoke a registered animation, Enter/Exit XR mode and so on...

slide-6
SLIDE 6

Conceptual Code (HTML Element)

<scene controls vrenabled width="300"> <source src="http://example.com/Monster_small.glb" type="model/gltf-binary" media="(min-width: 320px)"> <source src="http://example.com/Monster.gltf" type="model/gltf+json" media="(min-width: 640px)"> Message for unsupported browsers </scene>

slide-7
SLIDE 7

Conceptual Code (HTML Element)

<scene controls vrenabled width="300"> <source src="http://example.com/Monster_small.glb" type="model/gltf-binary" media="(min-width: 320px)"> <source src="http://example.com/Monster.gltf" type="model/gltf+json" media="(min-width: 640px)"> Message for unsupported browsers </scene>

slide-8
SLIDE 8

Conceptual Code (JS API)

const scene = document.getElementsByTagName("scene")[0]; scene.addEventListener("hit", (evt) => { // "monster" can be found in the `meshes' property of Monster.gltf. if (evt.meshes[0].name === "monster") { // "animation_9" can be found in the `animations' property of Monster.gltf. scene.startAnimation("animation_9"); } });

slide-9
SLIDE 9

Conclusion

We should have a new HTML element to display a 3D scene.