<object fog="false"/> parameter for disabling fog on a per-object basis
image_id thumbnails on videos and websurfaces
Basis texture support
New Elements
<deepzoom>
<streetlight>
<path> / <pathpoint>
<scrollpath>
<elasticband>
JanusWeb 1.5 (October 20, 2019)
New Features
Updated to Three.js r109
This upgrade has been a long time coming. We've been using Three.js r97 with some custom patches for over a year now. Three.js has gone through a number of major system upgrades since then, and includes huge improvements to PBR material/lights, glTF workflow, WebVR and WebXR, skinned meshes, tonemapping, and countless other features. Many of these upgrades combine together to immediately improve the render quality of scenes which are set up with PBR and well-crafted lighting, and all of the new functionality exposed by the Three.js library is now available to use in custom elements and room scripts. This is also the first time in years that we've been able to run an unpatched off-the-shelf version of Three.js, due to a number of our patches landing in Three.js core. This should make future upgrades much easier to handle, since Three.js has stabilized a lot since we started.
New Editor
Improved editor UI adds in-scene manipulator widgets and improved keyboard/mouse controls for posing objects in the scene. Drag and drop images, video, sounds, 3d models, and website URLs from local files or from other websites. Position, rotate, and scale them using the gizmo, keyboard shortcuts, or the mousewheel.
WebXR Support
WebXR is coming soon, now we're ready for it! At some point in the near future, browsers will make the switch from WebVR to WebXR, and we'll continue to support both. As WebXR matures, this will also give us access to other platforms like phone and headset-based AR.
Exokit Support
In addition to supporting WebXR directly, we now have full compatibility with Exokit as well, allowing JanusWeb to be composed with other WebXR-based apps as reality layers within the Exokit browser. This also gives us another route to display content on headsets which may not yet support WebXR natively.
Physics debugging tool
Activate physics debug mode to see colliders overlaid on the visible scene, as well as visual debug info about each object's projectile motion, active forces, and collisions as they happen.
Package Repository
Dynamic dependency resolution for rooms scripts lets you easily pull in components that you or others have written, and compose them within your scene, without having to track down URLs manually.
Exert more control over the output of your scene with tonemapping. Set the room's tonemapping_type and tonemapping_exposure attributes to lighten or darken the scene, making it easier to create moody dark scenes without them feeling underlit, and bright scenes without being too washed out. Changing this dynamically can be used to simulate eyes adjusting between dark and light.
Allows you to alter texture scaling and rotation via object attributes. Can be used to create repeated tiling textures, or to implement atlasing or sprite animation strips.
In supported browsers, you can now load dat:// URLs directly, and all room assets will be loaded directly from DAT.
Per-object control contexts
When defining custom objects, control contexts can be used to define special keyboard, mouse, and gamepad bindings that apply when your object is active. For example, the player has its own default control context which implements WASD movement, but if the player enters into a car, the car can activate its own control context which captures WASD to drive the car while the player sits inside
Script
// TODO - write a control context example
Custom shader support
Define custom shaders using markup which references external .glsl files. Specify custom uniforms and attributes in markup, and change their values in code.
JML
Script
// TODO - show how to manipulate uniforms on objects with custom shaders
Event bubbling for custom events
When your custom object emits custom events, these events now bubble up to the room unless otherwise specified. This allows for objects to respond to events which were thrown somewhere else in the room, without having to know ahead of time who was going to throw it.
Script
// TODO - write an event bubbling example
Generative geometry
Specify custom lists of vertices, face indices, normals, and uvs to generate new geometry via scripts
Uses MeshToonMaterial to give objects a simple celshaded lighting model
JML
Room "flying" option
Control whether player is flying or if they are walking. Default is currently flying, disabling this will enable gravity so make sure you have a collision mesh that works well.
If a 3d object provides vertex colors, we will now use them!
Expose player view frustum
Room scripts can now access the player's current view frustum using player.getViewFrustum()
Script
let frustum = player.getViewFrustum(); if (frustum.containsPoint(myobject.pos)) { /* do something cool! */ }
Model loading optimizations
Reduced memory usage and time while transferring 3d models from asset workers.
Mesh colliders
Limited per-triangle collision detection for mesh colliders. Currently works with sphere-mesh collisions, needs more work for cubes, cylinders, capsules, etc.
Changing color in script doesn't affect subobjects
Fixed assets.json loading race condition
Safari fixes
Fixed equirect screenshots
New Elements
Utils
objectpool
linesegments
labelset
instancedobject
instancedlabelset
fpscounter
Scenery
tree
forest
water
Game Elements
triggerzone
treasurechest
aacabinet
shooter
UI
pushbutton
slider
layout
contextmenu
Media
vr180viewer
mindmap
Player
trackedplayer
trackedplayer_hands
trackedplayer_head
trackedplayer_controller
New Demos
DWebCamp 2019
A custom experience built for the Decentralized Web Camp event in July 2019. Demonstrates a number of new components such as <mindmap> and <treasurechest>, which make use of the package repository system.
Depth buffer test
An example of how to use depth_write and depth_test