Skip to content

v1.56.0

Compare
Choose a tag to compare
@GSterbrant GSterbrant released this 30 Aug 14:36

Larger Features

What's new

  • Add Korean language README file by @kangjung in #4479
  • Append action function by @jath-git in #4469
  • Remove negative mouse action requirement by @jath-git in #4458
  • Added validation for the chunks with changed APIs by @GSterbrant in #4496
  • Provide default textures for the new material textures. by @GSterbrant in #4523
  • Unified standard + basic shader intro code by @mvaligursky in #4565
  • Print a warning when resource loader is not registered by @mvaligursky in #4574
  • Asset viewer example by @GSterbrant in #4583
  • Moved lightmapper only chunks to separate module to allow for their tree-shaking by @mvaligursky in #4588

Bug Fixes

New Contributors

Full Changelog: v1.55.0...v1.56.0

Notes

To enable the new dynamic refractions, a few modifications are required on the application side, first, you need to add this:

            const depthLayer = app.scene.layers.getLayerById(pc.LAYERID_DEPTH);
            app.scene.layers.remove(depthLayer);
            app.scene.layers.insertOpaque(depthLayer, 2);

What this does is to rearrange the layers such that the skydome will be part of the grab pass. Then we need to make the camera actually perform the grab pass:

            const camera = new pc.Entity();
            camera.addComponent("camera", {
                clearColor: new pc.Color(0.4, 0.45, 0.5)
            });
            camera.setLocalPosition(0, 5, 30);
            camera.camera.requestSceneColorMap(true);

The last thing to do is to make sure you create the graphics device with the alpha option set to true

        // Create the app and start the update loop
        const app = new pc.Application(canvas, {
            graphicsDeviceOptions: {
                alpha: true
            },
            mouse: new pc.Mouse(document.body),
            keyboard: new pc.Keyboard(document.body),
            touch: new pc.TouchDevice(document.body)
        });