Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cross-Plattform 2D- & 3D-Datenvisualisierung in JavaScript – guckst du!

Cross-Plattform 2D- & 3D-Datenvisualisierung in JavaScript – guckst du!

Zahlen und Ziffern, schwarz auf weiß, sind für sich genommen ziemlich langweilig und oftmals nur bedingt aussagekräftig. Es bedarf einer Visualisierung, um Zusammenhänge verstehen und Daten vergleichen zu können. Mit Web-Technologien stehen Ihnen hierfür mehr Möglichkeiten zur Verfügung denn je. Neben 2D-Diagrammen können Sie mithilfe von WebGL auch interaktive dreidimensionale Darstellungen plattformübergreifend realisieren – im Browser und Touch-optimiert auf mobilen Endgeräten. Christian Weyer und Christian Liebel zeigen Ihnen in dieser Session, wie Sie ansprechende 2D- und 3D-Visualisierungen Cross-Plattform implementieren und in existierende Anwendungen einbetten können.

Christian Liebel

June 15, 2015
Tweet

More Decks by Christian Liebel

Other Decks in Programming

Transcript

  1. ARCHITECTURE Windows: everybody can do it ;) SignalR on Mono

    on Raspbian on Raspberry Pi 2 Communication: WebSockets or Server-Sent Events 2D client based on HTML5 and JavaScript 3D client based on HTML5 and JavaScript Packaging the clients as an app using Cordova
  2. GOAL Visualizing real-time consumption of gummibears per region Update consumption

    of SouthAmerica to 13.3137317022187 Update consumption of NorthAmerica to 42.3913583840353 Update consumption of Antarctica to 83.7786154045535 Update consumption of Europe to 18.0006652489046 Update consumption of Africa to 4.14845326099586 Update consumption of Europe to 15.5524369351959 Update consumption of NorthAmerica to 19.4715459649452 Update consumption of Asia to 25.5628347470509 Update consumption of Europe to 3.95552857364278 Update consumption of SouthAmerica to 17.4139201632193 Update consumption of Antarctica to 53.6258920336672 Update consumption of Australia to 12.5058280857318
  3. <CANVAS> Plain bitmap for the web Content is defined by

    contexts Cross platform graphic manipulations High performance/Low energy consumption requestAnimationFrame
  4. REQUESTANIMATIONFRAME Just in time (matches screen refresh rate) Does not

    execute when window is minimized or tab in the background Does not execute when browser is busy No stacking/queueing
  5. WEBGL Web Graphics Library Hardware accelerated (GPU) New canvas rendering

    context webgl Proven Technology: based on OpenGL ES Can be exported from Blender and Unity
  6. THREE.JS Native WebGL is complex Open-source JavaScript library High-level API

    abstracting WebGL (and more) Includes touch-enabled controls
  7. LIVE DEMO “If you believed they put a man on

    the moon, man on the moon” — R.E.M.
  8. SUMMARY Cross platform high-performance graphic manipulation 2D & 3D Hardware

    acceleration Supported by all major browsers and platforms Touch-enabled
  9. RESOURCES GitHub repository Canvas documentation (MDN) Canvas 2D context specification

    requestAnimationFrame documentation (MDN) WebGL Specifications three.js WebGL Wiki tween.js Apache Cordova Enabling cross-platform touch interactions https://github.com/thinktecture/DWX2015 https://developer.mozilla.org/de/docs/Web/HTML/Canvas http://www.w3.org/TR/2dcontext/ https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame https://www.khronos.org/registry/webgl/specs/latest/ http://threejs.org/ https://www.khronos.org/webgl/wiki/Main_Page https://github.com/tweenjs/tween.js/ https://cordova.apache.org/ http://weblogs.thinktecture.com/christian_liebel/2015/05/enabling-cross-platform-touch- interactions-pointer-vs-touch-events.html