Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255432

Add webgl inside JavaFx

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: openjfx11
    • Fix Version/s: None
    • Component/s: javafx
    • Subcomponent:
      web
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: java.lang.String cannot be cast to jdk.nashorn.api.scripting.JSObject
      at WebViewSample.Browser.CargarProyectos(WebViewSample.java:431)
      at WebViewSample.Browser.lambda$new$0(WebViewSample.java:169)
      at com.sun.javafx.webkit.UIClientImpl.lambda$dispatchWebEvent$1(UIClientImpl.java:134)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.webkit.UIClientImpl.dispatchWebEvent(UIClientImpl.java:133)
      at com.sun.javafx.webkit.UIClientImpl.alert(UIClientImpl.java:192)
      at com.sun.webkit.WebPage.fwkAlert(WebPage.java:2312)
      at com.sun.webkit.WebPage.twkProcessMouseEvent(Native Method)
      at com.sun.webkit.WebPage.dispatchMouseEvent(WebPage.java:814)
      at javafx.scene.web.WebView.processMouseEvent(WebView.java:1045)
      at javafx.scene.web.WebView.lambda$registerEventHandlers$3(WebView.java:1168)
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:198)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:432)
      at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:410)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
      at com.sun.glass.ui.View.notifyMouse(View.java:937)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:186)
      at java.lang.Thread.run(Thread.java:748)
      Alerta :<!DOCTYPE html>
      <html xmlns='http://www.w3.org/1999/xhtml&#39;>
      <head>
      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
      <title>Babylon Template</title>
      <style>
      html, body {
      overflow: hidden;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      }
      #renderCanvas {
      width: 100%;
      height: 100%;
      touch-action: none;
      }
      </style>
      <script src='https://preview.babylonjs.com/babylon.js&#39;&gt;&lt;/script>
      <script src='https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js&#39;&gt;&lt;/script>
      <script src='https://code.jquery.com/pep/0.4.3/pep.js&#39;&gt;&lt;/script>
      </head>
      <body>
      <canvas id='renderCanvas' touch-action='none'></canvas>
      <script>
      var canvas = document.getElementById('renderCanvas');
      var engine = new BABYLON.Engine(canvas, true);
      var scene = createScene();
      engine.runRenderLoop(function () {
      scene.render();
      });
      window.addEventListener('resize', function () {
      engine.resize();
      });
      </script>
      </body>
      </html>

      A DESCRIPTION OF THE PROBLEM :
      It would be very interesting to be able to open a website that uses WebGl technology in JavaFX.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pnarayanaswa Praveen Narayanaswamy
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: