Giter Club home page Giter Club logo

wonder.js's Introduction

Wonder.js

Wonder.js is a Functional, High performance 3D WebGL Engine.

stable version(v1.1) is here

build codecov commit downloads-npm GitHub release GitHub Release Date npm

License

MIT Licence

Snapshot

single1_wonder

room1_wonder

outdoor1_wonder

outdoor2_wonder

Donate

You are welcome to donate for Wonder.js project! Thanks very much!

微信支付: 下载.png-6.5kB

Donors

日期 头像 金额(元)
2020.02.13 liuxin2322 999
2020.03.04 rong 2000
2020.04.29 谢员外 1000
2020.04.29 mko_io 999
2020.09.09 mko_io 369
2020.09.27 mko_io 369

Special Spnonsors

云图三维--在线三维CAD设计软件

wonder.js's People

Contributors

amyorz avatar gastrodia avatar keheliya avatar yyc-git avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wonder.js's Issues

性能测试,给出比对报告

渲染1w个box

使用的优化(确保为通用优化):

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

测试维度:

内存
帧率
创建时间(初始化中的时间,如创建场景、注册插件等)

渲染1w个box,修改model matrix

优化:geometry增加3种规格

  • 3种buffer:
    big/middle/smallGeometryCount, big/middle/smallGeometryPointData

  • 设置顶点数据时,根据数据数量,决定放在哪个buffer中保存

add ui

2d UI

3d UI

add stop loop

should not stop ui loop logic!!!

*** TODO extend ui

webgpu render middleware

  • design: render and compute
  • add define and pass compile
  • finish draft; pass compile
  • pass draw cube test
  • pass particle test
  • pass frustum cull test
  • pass defer shading test
  • pass ray tracing test
  • finish all sytem(before is just hard coding!)
  • 设计:所有材质均为自定义材质组件+custom shader
  • be interface
  • bdd test
  • performance test

more asset

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

wonder-editor

inspector add a canvas for show

add engine state

add default direction light

material,geometry asset->icon should be show canvas->snapshot

material apply to sphere geometry data

geometry apply default light material
(use line mode instead of triangle mode)

imgui script is asset

wonderjs依赖安装及gulp问题

通过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)

发现node_modules目录下 wonder-log/lib/js目录没有/src/Log.js文件
截图

add collider

feature

  • add box collider;

  • support multi thread
    add collider thread

bug: box geometry undo bug

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?

add extend

extend files

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)

use .wonder_extend_package package(zip file) to include all extend files

integrate with editor

rewrite imgui

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!

    • use render command list with state for minor update???
  • not render each frame, only trigger rerender if state change

  • trigger event

  • with skin, custom control

  • Textures are automatically atlassed by default

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.