lythreeframe 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs.js +3 -3
- package/dist/bundle.esm.js +3 -3
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1749,13 +1749,13 @@ class Viewport {
|
|
|
1749
1749
|
this.isRenderStateDirty = false;
|
|
1750
1750
|
}
|
|
1751
1751
|
async renderAsImage(width = 1024, height = 1024) {
|
|
1752
|
-
return new Promise((resolve, reject) => {
|
|
1752
|
+
return new Promise(async (resolve, reject) => {
|
|
1753
1753
|
try {
|
|
1754
1754
|
if (this.postProcessing) {
|
|
1755
|
-
this.postProcessing.renderAsync();
|
|
1755
|
+
await this.postProcessing.renderAsync();
|
|
1756
1756
|
}
|
|
1757
1757
|
else {
|
|
1758
|
-
this.renderer.renderAsync(this.app.world.scene, this.app.camera);
|
|
1758
|
+
await this.renderer.renderAsync(this.app.world.scene, this.app.camera);
|
|
1759
1759
|
}
|
|
1760
1760
|
const offscreenCanvas = document.createElement('canvas');
|
|
1761
1761
|
offscreenCanvas.width = width;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1747,13 +1747,13 @@ class Viewport {
|
|
|
1747
1747
|
this.isRenderStateDirty = false;
|
|
1748
1748
|
}
|
|
1749
1749
|
async renderAsImage(width = 1024, height = 1024) {
|
|
1750
|
-
return new Promise((resolve, reject) => {
|
|
1750
|
+
return new Promise(async (resolve, reject) => {
|
|
1751
1751
|
try {
|
|
1752
1752
|
if (this.postProcessing) {
|
|
1753
|
-
this.postProcessing.renderAsync();
|
|
1753
|
+
await this.postProcessing.renderAsync();
|
|
1754
1754
|
}
|
|
1755
1755
|
else {
|
|
1756
|
-
this.renderer.renderAsync(this.app.world.scene, this.app.camera);
|
|
1756
|
+
await this.renderer.renderAsync(this.app.world.scene, this.app.camera);
|
|
1757
1757
|
}
|
|
1758
1758
|
const offscreenCanvas = document.createElement('canvas');
|
|
1759
1759
|
offscreenCanvas.width = width;
|