built shadow feasibility test
Tried to hardwire to landscape mode (e.g. on phones) per Mike
Did not find a way to do so in HTML5. I recommend a native Android port.
Achieve successful build on other machine(s) besides the one in my cubicle.
Built HTML version successfully on lubuntu-next 32-bit linux with openjdk-8-jdk
Test/fix HTML5 version on different browsers
      
Windows Chrome, IE, Edge yes
Linux firefox ESR 52.1.0 no, black screen
Linux chrome yes
iOS (iPad) Safari no, black screen
OSX Safari 10.0 yes
Android 5.0.1, 6.0.1, 7.0; Chrome, Firefox 51.0.4 yes, portrait mode issues
Android 5.1.1 Galaxy Tab A6 SM-T280 no, flashes until it goes black.
Implement menu/table of contents/thumbnail view of pages
In a nice big rectangle per Mike; fancier technique needed if a book had way more pages, such as a full text
Implement touch-driven Zoom/Pan camera control
Based on libgdx gesturelistener API
Implement keyboard-driven Zoom / Pan camera control
based on scroll wheel (zoom) and left/right/up/down arrows
use Mike's image-based graphics for buttons.
direct Texture constructor works everywhere; constructor via Pixmap works on desktop, fails on HTML5
made text box taller/skinnier on HTML5
modified to guarantee that the textbox is taller than it is wide
moved textbox to default to upper left corner
instead of lower left
added audio
  • from MP3 files
    revise hotspot rectangle mechanism to where it is "consistent" between HTML5 and desktop versions
    calculate x's as relative to center, but scaled .8 or so
    revised camera-altering hotspot mode
    so that camera slides over to where you send it, over a duration. At present, duration is 0.5 second.
    made it so when you are at the end you warp to the beginning
    cycling through animations and numbering is a little odd at present.
    develop a HUD; make HUD display curation text in gray window
    including line-breaking based on font width, adjustment of gray area height to fit height of text, use of Heiro font tool to generate a smaller bitmap font (freesans-13) suitable for the curation.
    Figure out how to make HUD elements transparent
    Turns out you have to call RIGHT BEFORE begin():
    	Gdx.gl.glEnable(GL20.GL_BLEND);
    	Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
    	hudRenderer.begin();
    
    problem: fonts broken on libgdx 1.9.5 HTML5, but 1.9.6 doesn't work
    • github relevant discussion
    • building your own copy of 1.9.5? easy enough with ant, but getting your own libgdx build to be used used in a project requires modifying build.gradle rules as in here and here
    • Maybe only the gdx-sources.jar line needs to happen in the build.gradle, but at the moment I have the following. In project(":html")
              compile files('/home/jefferycl/libgdx-1.9.5/dist/gdx-backend-gwt.jar')
              compile files('/home/jefferycl/libgdx-1.9.5/dist/sources/gdx-sources.jar')
      
      and in project(":core")
              compile files('/home/jefferycl/libgdx-1.9.5/dist/gdx.jar')
      
    study and polish resize handling and aspect ratios, center
    unproject() did not work for me, but FitViewport worked well for aspectratio, and viewport.getLeftGutterWidth() etc. were all good.
    (HUD) prototype a two-mode red toggling menu button
    mouseclick y is opposite direction of draw coordinate y. circle works better than arc(... 0, 360).
    develop a coding strategy for a 2D HUD atop the 3D scene
    per internet, just creating a separate SpriteBatch with Ortho2D works:
    	Matrix4 uiMatrix = camera.combined.cpy();
    	uiMatrix.setToOrtho2D(0,0,camwidth,camheight);
    	...
    	hudRenderer.setProjectionMatrix(uiMatrix);
    	hudRenderer.begin();...
    
    find out if libgdx supports vsync
    it has an api function to turn it in, but it is "best effort may not be supported on all platforms"
    get a demo with high res pages working on HTML5
    did up to 1024x2048
    find an HTML5 libgdx demo that includes a model animation
    testanim worked. texture didn't work initially, converted to jpg and resized to a power of 2
    Test on different browsers
    Linux firefox no
    Linux chrome yes
    Windows chrome yes
    Windows IE yes
    Got texture looking right for HTML5 testanim
    Probably just no png, yes jpg; maybe size must be power-of-2
    installed Eclipse, since libgdx source folks seem to prefer it
    current/4.6 Neon crashed w/ Java error shortly after launch; previous/4.5 Mars OK-ish?
    checked out libgdx (git clone git://github.com/libgdx/libgdx.git)
    and: (ant -f fetch.xml). See here about importing into Eclipse
    did HTML5 with powers-of-two textures
    used 512x512 textures, did not work, black screen like initialization never finishes (same as regular)
    did HTML5 test on a 3D model (static)
    did xoppa's loadmodels tutorial; it worked from apache localhost
    did HTML5 test on some textured 3D primitive(s)
    did for a cube textured w/ flag; it worked from apache localhost
    setup local apache
    Installed via yum. sudo apachectl start worked I think.
    do HTML5 test on badlogic gdxsetup default app, and on simpl3D cube demo
    serves up from www2.cs.uidaho.edu/~jeffery/dist after file permissions set. serves up from a python SimpleHTTPServer or some such. Serves up from ceb-stage-lx/~jefferycl/ and local /var/www/html.
    write a portable bandwidth detector
    jget.java was fairly successful in that regard
    • have sample files at different sizes, 1k, 10k, 100k, 1m
    • for example, cover.jpg is 1.3M
    • download bigger and bigger ones until you hit some time threshold
    write a portable resolution detector
    • Gdx.app.getGraphics().getWidth() and etc. give window sizes.
    • Gdx.app.getGraphics().getDisplayMode().height? or getDisplayModes() and iterate through the array?
    • Monitor[] monitors = Lwjgl3ApplicationConfiguration.getMonitors(); DisplayMode desktopMode = Lwjgl3ApplicationConfiguration.getDisplayMode( Lwjgl3ApplicationConfiguration.getPrimaryMonitor());
    research touch gestures / libraries in libgdx
    • import com.badlogic.gdx.input.GestureDetector;
      import com.badlogic.gdx.input.GestureDetector.GestureListener;
    • touchDown: A user touches the screen.
    • longPress: A user touches the screen for some time.
    • tap: A user touches the screen and lifts the finger again. The finger must not move outside a specified square area around the initial touch position for a tap to be registered. Multiple consecutive taps will be detected if the user performs taps within a specified time interval.
    • pan: A user drags a finger across the screen. The detector will report the current touch coordinates as well as the delta between the current and previous touch positions. Useful to implement camera panning in 2D.
    • panStop: Called when no longer panning.
    • fling: A user dragged the finger across the screen, then lifted it. Useful to implement swipe gestures.
    • zoom: A user places two fingers on the screen and moves them together/apart. The detector will report both the initial and current distance between fingers in pixels. Useful to implement camera zooming.
    • pinch: Similar to zoom. The detector will report the initial and current finger positions instead of the distance. Useful to implement camera zooming and more sophisticated gestures such as rotation.
    research antialiasing
    added config.samples=2 to Launcher, render() glClear call bits include |(Gdx.graphics.getBufferFormat().coverageSampling?GL20.GL_COVERAGE_BUFFER_BIT_NV:0) (config.samples=2 not portable to lwjgl3; switched to config.setBackBufferConfig(8,8,8,8,16,0,2);)
    check out Kryonet and libuv, vs. libgdx native networking
    Study the rendering of two textures on the same back, front and back.
    https://forum.openframeworks.cc/t/binding-texture-to-both-sides-of-the-mesh/13837/5 may help, especially
    in setup() I first enabled:
    
        glEnable(GL_CULL_FACE);
    
    Then I did this:
    
        front.getTextureReference().bind();
        glFrontFace(GL_CW);
        glCullFace(GL_FRONT);
        frontMesh.draw();
        front.getTextureReference().unbind();
    
        back.getTextureReference().bind();
        glCullFace(GL_BACK);
        frontMesh.draw();
        back.getTextureReference().unbind();
    
    Find out why the Crib demo is not responding to the Q key
    Needed to call Gdx.input.setInputProcessor(this) in create()
    Get a list of what documents the history folks have fully scanned.
    https://collections.nlm.nih.gov/
    • Johannes de Ketham's Fasiculo de Medicina is available in full (TTP has 12 pages, digital collections has 116)
    • Another attractive target: Defoe's history of the plague, compare with archive.org