Skip to content

Commit a1e94a6

Browse files
authored
Add Camera Frame script and integrate SSAO settings (#131)
* Add Camera Frame script and integrate SSAO settings in physics cluster example * Remove duplicate camera frame script reference in physics cluster example * Remove camera frame script and update asset references in physics cluster example
1 parent e3ff214 commit a1e94a6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

examples/physics-cluster.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<pc-asset src="assets/skies/octagon-lamps-photo-studio-2k.hdr" id="studio"></pc-asset>
2323
<pc-asset src="assets/scripts/gravity.mjs"></pc-asset>
2424
<pc-asset src="assets/scripts/follow-pointer.mjs"></pc-asset>
25+
<pc-asset src="../node_modules/playcanvas/scripts/esm/camera-frame.mjs"></pc-asset>
2526
<pc-material id="mediumseagreen" diffuse="mediumseagreen"></pc-material>
2627
<!-- Scene -->
2728
<pc-scene gravity="0 0 0">
@@ -30,6 +31,20 @@
3031
<!-- Camera -->
3132
<pc-entity name="camera" position="0 0 5">
3233
<pc-camera clear-color="lightgray" tonemap="neutral"></pc-camera>
34+
<pc-scripts>
35+
<pc-script name="cameraFrame" attributes='{
36+
"ssao": {
37+
"type": "combine",
38+
"blurEnabled": true,
39+
"intensity": 0.5,
40+
"radius": 30,
41+
"samples": 12,
42+
"power": 6,
43+
"minAngle": 20,
44+
"scale": 1
45+
}
46+
}'></pc-script>
47+
</pc-entity>
3348
</pc-entity>
3449
<!-- Physical Sphere Template -->
3550
<template id="sphere-template">

0 commit comments

Comments
 (0)