Post-Processing Effects
rooomProducts Viewer API post-processing effects for professional product presentation. Apply bloom, depth of field, and other visual enhancements to create stunning 3D product renders.
setBloom
setBloom(options: object, [callback: Function])
Sets bloom post-processing effect options. Bloom creates a glow effect around bright areas of the scene.
Options (all optional):
isEnabled- Whether the effect is enabled (boolean)threshold- The brightness threshold for bloom (number, 0–1)weight- The strength of the bloom effect (number)kernel- The kernel size (number)scale- The scale of the bloom effect (number)
api.setBloom({
isEnabled: true,
threshold: 0.8,
weight: 0.5
}, function() {
console.log('Bloom effect updated');
});setChromaticAberration
setChromaticAberration(options: object, [callback: Function])
Sets chromatic aberration post-processing effect options. This effect simulates the color fringing that occurs in real camera lenses.
Options (all optional):
isEnabled- Whether the effect is enabled (boolean)aberrationAmount- The amount of chromatic aberration (number)radialIntensity- The radial intensity of the effect (number)direction- The direction of the aberration as[x, y](array of two numbers)
api.setChromaticAberration({
isEnabled: true,
aberrationAmount: 0.3
}, function() {
console.log('Chromatic aberration updated');
});setColorize
setColorize(options: object, [callback: Function])
Sets colorize post-processing effect options. This effect tints the entire scene using HSL values.
Options:
isEnabled- Must betrueto enable the effect (boolean, required)hue- The hue shift in degrees (number, optional)saturation- The saturation level (number, optional)lightness- The lightness level (number, optional)
api.setColorize({
isEnabled: true,
hue: 180,
saturation: 0.5
}, function() {
console.log('Colorize effect updated');
});setGrain
setGrain(options: object, [callback: Function])
Sets grain post-processing effect options. This effect adds film grain noise to the scene.
Options (all optional):
isEnabled- Whether the effect is enabled (boolean)intensity- The intensity of the grain effect (number)isAnimated- Whether the grain is animated (boolean)
api.setGrain({
isEnabled: true,
intensity: 0.2,
isAnimated: true
}, function() {
console.log('Grain effect updated');
});updateFog
updateFog(options: object, [callback: Function])
Updates fog settings in the scene.
Options (all optional):
fogStart- The distance at which fog begins (number)fogEnd- The distance at which fog is fully opaque (number)color- The fog color as an RGB array[r, g, b](numbers 0–255)
api.updateFog({
fogStart: 10,
fogEnd: 100,
color: [255, 255, 255]
}, function() {
console.log('Fog updated');
});