Comments (4)
我这里测试正常,不加css的话 canvas 是默认大小,没有发现自己变大的情况
如果需要自定义大小,可以通过 css 改变 canvas 大小:
from orillusion.
我确实遇到了这个问题,在其他电脑上也复现了,我还需要提供什么信息可以帮助排除这个问题
from orillusion.
@FliPPeDround 已排查到问题所在,主要是没有手动规范canvas的css大小,在dpr不等于1的屏幕上会导致canvas会根据内容大小resize,从而循环触发resize越来越大。
目前来讲,请手动设置一个 css 来规范canvas style 的 width 和 height,不要使用默认值(即无style width height)
我们后面会优化resize的方案,避免这种情况
from orillusion.
已在 #163 中修复canvas无默认大小的情况,会跟随下个版本发布
from orillusion.
Related Issues (20)
- [BUG]: 加载GLTF模型,模型显示错误 HOT 1
- [BUG]: 鼠标右键点击事件无效 HOT 1
- [BUG]: 设置PCF阴影,报错
- [BUG]: 加载obj文件失败
- [FR]: 给assets库添加了四个字体
- [BUG]: Blend首次打开页面不生效 HOT 1
- [BUG]: 控制台发出警告 HOT 2
- [FR]: 请问现在orillusion在绘制场景时,支持的模型文件最大是多少?单场景中模型的面数最大是多少? HOT 4
- [BUG]: The LoaderFunctions.OnUrl doesn't seem to be called HOT 3
- [FR]: 海量渲染WASM 申请内存时间太长 HOT 5
- [BUG]: 设置拾取模式为pixel后,添加bloompost报错 HOT 3
- [BUG]: 景深会影响2DUI HOT 1
- [BUG]: SSR,Fog会影响2DUI HOT 1
- [FR]: 关于属性动画,怎么导出json
- [BUG]: ConduitGeometry相关 HOT 1
- [BUG]: 天空盒bitmapcube加载注释错误
- [FR]: HoverCameraController可否增加pitch旋转的限制角度
- [BUG]: HoverCameraController在顶视图的时候鼠标上下移动,场景不位移 HOT 2
- [FR]: Support EXT_meshopt_compression and EXT_texture_webp glTF extension HOT 2
- [BUG]: GLTF 模型部份贴图未正确渲染
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orillusion.