Skip to content

Commit

Permalink
[front] BSOD fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onizucraft committed Nov 14, 2024
1 parent 54b8e65 commit ffcae26
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 18 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{T as h,a as x,n as c}from"./index-CQrWNA4L.js";let m=0;class f{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1}createTexture(e,o,t){const i=new h({...this.textureOptions,width:e,height:o,resolution:1,antialias:t,autoGarbageCollect:!0});return new x({source:i,label:`texturePool_${m++}`})}getOptimalTexture(e,o,t=1,i){let s=Math.ceil(e*t-1e-6),u=Math.ceil(o*t-1e-6);s=c(s),u=c(u);const n=(s<<17)+(u<<1)+(i?1:0);this._texturePool[n]||(this._texturePool[n]=[]);let r=this._texturePool[n].pop();return r||(r=this.createTexture(s,u,i)),r.source._resolution=t,r.source.width=s/t,r.source.height=u/t,r.source.pixelWidth=s,r.source.pixelHeight=u,r.frame.x=0,r.frame.y=0,r.frame.width=e,r.frame.height=o,r.updateUvs(),this._poolKeyHash[r.uid]=n,r}getSameSizeTexture(e,o=!1){const t=e.source;return this.getOptimalTexture(e.width,e.height,t._resolution,o)}returnTexture(e){const o=this._poolKeyHash[e.uid];this._texturePool[o].push(e)}clear(e){if(e=e!==!1,e)for(const o in this._texturePool){const t=this._texturePool[o];if(t)for(let i=0;i<t.length;i++)t[i].destroy(!0)}this._texturePool={}}}const p=new f,a={name:"local-uniform-bit",vertex:{header:`
import{T as h,a as x,n as c}from"./index-DKTylTFu.js";let m=0;class f{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1}createTexture(e,o,t){const i=new h({...this.textureOptions,width:e,height:o,resolution:1,antialias:t,autoGarbageCollect:!0});return new x({source:i,label:`texturePool_${m++}`})}getOptimalTexture(e,o,t=1,i){let s=Math.ceil(e*t-1e-6),u=Math.ceil(o*t-1e-6);s=c(s),u=c(u);const n=(s<<17)+(u<<1)+(i?1:0);this._texturePool[n]||(this._texturePool[n]=[]);let r=this._texturePool[n].pop();return r||(r=this.createTexture(s,u,i)),r.source._resolution=t,r.source.width=s/t,r.source.height=u/t,r.source.pixelWidth=s,r.source.pixelHeight=u,r.frame.x=0,r.frame.y=0,r.frame.width=e,r.frame.height=o,r.updateUvs(),this._poolKeyHash[r.uid]=n,r}getSameSizeTexture(e,o=!1){const t=e.source;return this.getOptimalTexture(e.width,e.height,t._resolution,o)}returnTexture(e){const o=this._poolKeyHash[e.uid];this._texturePool[o].push(e)}clear(e){if(e=e!==!1,e)for(const o in this._texturePool){const t=this._texturePool[o];if(t)for(let i=0;i<t.length;i++)t[i].destroy(!0)}this._texturePool={}}}const p=new f,a={name:"local-uniform-bit",vertex:{header:`
struct LocalUniforms {
uTransformMatrix:mat3x3<f32>,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions front/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<link rel="icon" type="image/png" href="/codeconz-lighthouses-engine/assets/logo-sin-fondo-CWtypusJ.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lighthouses</title>
<script type="module" crossorigin src="/codeconz-lighthouses-engine/assets/index-CQrWNA4L.js"></script>
<link rel="stylesheet" crossorigin href="/codeconz-lighthouses-engine/assets/index-D00qmZF7.css">
<script type="module" crossorigin src="/codeconz-lighthouses-engine/assets/index-DKTylTFu.js"></script>
<link rel="stylesheet" crossorigin href="/codeconz-lighthouses-engine/assets/index-DlXr-n9N.css">
</head>

<body>
Expand Down
5 changes: 1 addition & 4 deletions front/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@
};
const initStage = async () => {
if (loadFile) {
return;
}
if (!stageContainer.value) {
console.error("Stage container not found");
console.warn("Stage container not found");
return;
}
stage.init(stageContainer.value, playback);
Expand Down

0 comments on commit ffcae26

Please sign in to comment.