-
Notifications
You must be signed in to change notification settings - Fork 52
Release Notes
James Baicoianu edited this page Dec 16, 2019
·
15 revisions
- Improved mobile touch controls
- Reduced mouse smoothing for more responsive mouse movement
- New client arguments
<janus-viewer shownavigation="false" corsproxy="<url>"></janus-viewer>
- Disabled Google Analytics tracking
- Sync view source text editor with in-game build-mode changes
- Show light helpers in edit mode
- Show markup parse errors
<light light_penumbra="[0-1]" light_decay="[1-2]" />
-
object.lookAt()
/player.lookAt()
-
<object fog="false"/>
parameter for disabling fog on a per-object basis - image_id thumbnails on videos and websurfaces
- Basis texture support
<deepzoom>
<streetlight>
-
<path>
/<pathpoint>
<scrollpath>
<elasticband>
- 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.
- 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 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.
- 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.
- 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.
- 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.
- JML
<room require="treasurechest"><treasurechest pos="1 2 3" />
-
- Script
room.require('treasurechest').then(...)
- JML
- Exert more control over the output of your scene with tonemapping. Set the room's
tonemapping_type
andtonemapping_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.- JML
<room tonemapping_exposure=".5" tonemapping_type="acesfilmic">
- Script
room.tonemapping_exposure = .5;
- JML
- Lock objects to face towards camera, aligned to the specified axis
- JML
<object id="plane" billboard="y" />
- Script
room.objects['foo'].billboard = 'y'
room.createObject('object', { id: 'plane', billboard: 'y' })
- JML
- 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.
- JML
-
- Script
let sprite = room.createObject('object', { id: 'plane', image_id: 'spritesheet01', texture_repeat: [1/numframes, 1]});
sprite.update = (dt) => { if (frametime + dt >= nextframe) { sprite.texture_offset.x = framenum++ % numframes; nextframe = now + frametime; } }
- JML
- Control whether an object writes to or tests against the depth buffer. Can be used to resolve transparency problems and overlay effects
- JML
-
- Script
room.createObject('object', { id: 'spookyghost', depth_write: false,depth_test: false })
- JML
- In supported browsers, you can now load dat:// URLs directly, and all room assets will be loaded directly from DAT.
- 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
- Script
- 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
- JML
- 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
- Script
- Specify custom lists of vertices, face indices, normals, and uvs to generate new geometry via scripts
- JML
-
- Script
room.loadNewAsset('object', { id: 'mycustomgeo', mesh_verts: [...], mesh_faces: [...], mesh_normals: [...], mesh_uvs: [...] })
- JML
- Uses MeshToonMaterial to give objects a simple celshaded lighting model
- JML
-
- JML
- 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.
- JML
-
- Script
button.onclick = (ev) => room.flying = !room.flying;
- JML
- If a 3d object provides vertex colors, we will now use them!
- 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! */ }
- Script
- Reduced memory usage and time while transferring 3d models from asset workers.
- Limited per-triangle collision detection for mesh colliders. Currently works with sphere-mesh collisions, needs more work for cubes, cylinders, capsules, etc.
- JML
-
- JML
- Support for per-particle color, opacity, and size
- Script
myparticles.setPoint(i, newpos, newvel, newaccel, newcol, newsize, newopacity)
- Script
- objectpool
- linesegments
- labelset
- instancedobject
- instancedlabelset
- fpscounter
- tree
- forest
- water
- triggerzone
- treasurechest
- aacabinet
- shooter
- pushbutton
- slider
- layout
- contextmenu
- vr180viewer
- mindmap
- trackedplayer
- trackedplayer_hands
- trackedplayer_head
- trackedplayer_controller
- 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.
- An example of how to use depth_write and depth_test
- Demonstration of mesh colliders and the physics debug system
- Demonstrates the use of force generators
- Fixed errors with ghost objects
- Fixed error while starting portal objects
- Fix for child objects not initializing properly
- Fixed double click event bug
- Fixed websurface accidentally re-stealing focus after clicking out
- Rotation fixes
- Added experimental teleporter (click-and-hold, move to aim, release to jump)
- tex/tex0 fixes
- xdir/ydir/zdir orthonormalization is now consistent with native
- rotation / rotation_order
- ongazeenter / ongazemove / ongazeleave / ongazeactivate events (see https://docs.google.com/document/d/10AuBi7IhdPv6koolGJdT2_8AK9JeOgsU_yRVtW-IN5g for proposal, TODO - turn this into docs)
- room.raycast() and object.raycast() (see https://docs.google.com/document/d/1Nm0CBd70fiuLwGGdC3UpOLg35FimyWa6ARO3uq41P8A/edit for proposal, TODO - turn this into docs)
- Improved Leap Motion support (desktop + HMD mount) options now available via config panel
- Emissive map support
- object.class parameter
- object.addClass() / removeClass() / hasClass()
- room.class parameter
- room.addClass() / removeClass() / hasClass()
- player.addForce() / removeForce()
- Sound fixes
- Custom element improvements/bugfixes
- Improved ghost asset handling
- Support for creating dynamic AssetImages from elements
- Support for non-localized sounds ( without specifying pos="")
- Dynamic room.fog_col support
- Support for setting object alpha via object.col = V(r,g,b,a)
- Improved per-room asset tracking (no more asset naming conflicts between rooms)
- Asset loading bugs (spaces, multiple references, etc)
- Optimize asset loading worker thread management (use number of cores to determine number of workers, load minimal code into worker)
- Experimental collision enhancements
- JanusWeb one-liners (
<janus-viewer></janus-viewer>
,<janus-viewer-video360 src="..."></janus-viewer-video360>
, etc)