three-base 2.0.64 → 2.0.65

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/ThreeBase.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: xiaosihan
3
3
  * @Date: 2021-12-20 13:38:22
4
4
  * @Last Modified by: xiaosihan
5
- * @Last Modified time: 2024-06-18 21:03:02
5
+ * @Last Modified time: 2024-08-10 04:23:41
6
6
  */
7
7
  import { round } from "lodash";
8
8
  import { AxesHelper, Box3, DepthFormat, DepthTexture, EventDispatcher, GridHelper, LinearFilter, MOUSE, Mesh, NoBlending, NormalBlending, OrthographicCamera, PerspectiveCamera, RGBAFormat, Scene, TOUCH, UnsignedShortType, Vector2, Vector3, WebGLRenderTarget, WebGLRenderer } from "three";
@@ -132,11 +132,13 @@ export default class ThreeBase extends EventDispatcher {
132
132
  div.append(this.renderer.domElement);
133
133
  if (this.rendererLost) {
134
134
  this.renderer.forceContextRestore();
135
- this.renderer.domElement.style.opacity = "1";
136
135
  this.needRender = true;
137
136
  setTimeout(() => {
138
137
  this.needRender = true;
139
138
  }, 100);
139
+ setTimeout(() => {
140
+ this.renderer.domElement.style.opacity = "1";
141
+ }, 200);
140
142
  }
141
143
  this.setSize(div.clientWidth, div.clientHeight);
142
144
  // 开启时时渲染
package/ThreeBase.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: xiaosihan
3
3
  * @Date: 2021-12-20 13:38:22
4
4
  * @Last Modified by: xiaosihan
5
- * @Last Modified time: 2024-06-18 21:03:02
5
+ * @Last Modified time: 2024-08-10 04:23:41
6
6
  */
7
7
 
8
8
  import { add, round } from "lodash";
@@ -151,11 +151,13 @@ export default class ThreeBase extends EventDispatcher {
151
151
 
152
152
  if (this.rendererLost) {
153
153
  this.renderer.forceContextRestore();
154
- this.renderer.domElement.style.opacity = "1";
155
154
  this.needRender = true;
156
155
  setTimeout(() => {
157
156
  this.needRender = true;
158
157
  }, 100);
158
+ setTimeout(() => {
159
+ this.renderer.domElement.style.opacity = "1";
160
+ }, 200);
159
161
  }
160
162
 
161
163
  this.setSize(div.clientWidth, div.clientHeight);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-base",
3
- "version": "2.0.64",
3
+ "version": "2.0.65",
4
4
  "description": "three 3d three-base",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"