From 7114f93c7cf32f02512f0df35282e8b0bf5e71d8 Mon Sep 17 00:00:00 2001 From: Haowei Wen Date: Thu, 23 Sep 2021 10:13:59 +0800 Subject: [PATCH] update readme --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fd11fe9..f5f917d 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,18 @@ Three.js powered Minecraft skin viewer. // Load a cape skinViewer.loadCape("img/cape.png"); - // Load a elytra (from a cape texture) + // Load an elytra (from a cape texture) skinViewer.loadCape("img/cape.png", { backEquipment: "elytra" }); // Unload(hide) the cape / elytra skinViewer.loadCape(null); + // Set the background color + skinViewer.background = 0x5a76f3; + + // Set the background to a panoramic image! + skinViewer.loadPanorama("img/panorama1.png"); + // Control objects with your mouse! let control = skinview3d.createOrbitControls(skinViewer); control.enableRotate = true; @@ -74,16 +80,8 @@ Three.js powered Minecraft skin viewer. skinview3d supports FXAA (fast approximate anti-aliasing). To enable it, you need to replace `SkinViewer` with `FXAASkinViewer`. -You must use an **opaque** background when FXAA is enabled, -because FXAA is incompatible with transparent backgrounds. - -By default, when FXAA is enabled, the background color is white. -To use a different color: -```javascript -let skinViewer = new skinview3d.FXAASkinViewer(...); -// Set the background color to blue -skinViewer.background = 0x5a76f3; -``` +Note that FXAA is incompatible with transparent backgrounds. +So when FXAA is enabled, the default background color will be white instead of transparent. # Build `npm run build`