wonder-technology / wonder.js Goto Github PK
View Code? Open in Web Editor NEW:rocket:Functional, High performance 3D Webgl Engine
License: MIT License
:rocket:Functional, High performance 3D Webgl Engine
License: MIT License
使用的优化(确保为通用优化):
RenderBundle
dynamic uniform buffer offset
one vertex buffer
one model matrix buffer
one material buffer
one camera buffer(view matrix, p matrix)
update dirty ones by device.writeBuffer
instance
不使用的优化:
需要的修改:
box由六个面组成(与three.js一样)
共用geometry
不共用material
测试维度:
内存
帧率
创建时间(初始化中的时间,如创建场景、注册插件等)
v1.0.0-alpha.17.7
deep copy buffer spend too much memory, it will cause browser fail
update engine version
通过yarn安装依赖失败:(
yarn
yarn install v1.7.0
[1/4] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/4] ⠂ waiting...
[-/4] ⠂ waiting...
[3/4] ⠂ puppeteer
error E:\WonderLab\Wonder.js\node_modules\puppeteer: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: E:\WonderLab\Wonder.js\node_modules\puppeteer
Output:
ERROR: Failed to download **Chromium r555668!** Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: read ECONNRESET
yarn install --ignore-scripts似乎可以解决问题,但是运行gulp有奇怪错误。
yarn install --ignore-scripts
yarn install v1.7.0
[1/4] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 13.43s.
运行gullp报错
gulp
module.js:538
throw err;
^
Error: Cannot find module **'wonder-log/lib/js/src/Log.js'**
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\WonderLab\Wonder.js\lib\js\test\e2e\performance\TestPerformance.js:6:21)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
description
not open the depth test
reason
solution
should open it
although split files can reduce complie time, import a lot module and function are not comfortable to user
should not stop ui loop logic!!!
*** TODO extend ui
extend material(? material asset?), shader(.glsl), job(.js), script(.js), config data(.json->./Wonder.js/data/ json files)
extend service(.js?)
add config(.json) to specific the file structure in project file(.wd_project.package)
material
geometry
imgui script
script
...
remove BoxGeometry, only remain CustomGeometry
different gameObject can use the same asset
(share the asset)
asset name should be unique!
basicMaterial,lightMaterial all has one name: material name
api: getMaterialName/setMaterialName
add engine state
add default direction light
material apply to sphere geometry data
geometry apply default light material
(use line mode instead of triangle mode)
1.optimize
2.give benchmark report
3种buffer:
big/middle/smallGeometryCount, big/middle/smallGeometryPointData
设置顶点数据时,根据数据数量,决定放在哪个buffer中保存
description
camera box geometry size = 1
gameObject1 box geometry size = 5
added box geometry size = 5
1.select gameObject1
2.undo
3.add box
4.add box
cause camera box geometry size change
reason
box geometry deepCopy share configDataMap
solution
update engine version?
refer to 【Unity】UIElements 渲染细节,比NGUI/UGUI/FairyGUI好在哪?
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
abstract render, extract IRender
support webgpu render
one draw call;
one vertex buffer;
(only update changed vertices instead of all!)
one uber shader(render pipeline);
change to bdd, rescript
firstly implement box
support state
dispatch state like react;
can get which elements are changed by compare state!
not render each frame, only trigger rerender if state change
trigger event
with skin, custom control
Textures are automatically atlassed by default
description
add sourceInstance component cause the gameObject disappear, exist in the scene children, but can't render it
reason
solution
add box collider;
support multi thread
add collider thread
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.