Skip to content

Commit

Permalink
fix(editor): fix "cube not affect by ambient light" bug
Browse files Browse the repository at this point in the history
solution
set pbrmaterial's default metalness to 0.0;
refer to
https://stackoverflow.com/questions/69821345/why-doesnt-the-3d-model-work-with-ambientlight
  • Loading branch information
yyc-git committed Mar 15, 2024
1 parent 127795d commit a25d0cf
Show file tree
Hide file tree
Showing 83 changed files with 73 additions and 60 deletions.
57 changes: 43 additions & 14 deletions doc/jiehuo.org
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ https://www.grapecity.com.cn/blogs/wyn-3dmodel-bi-analize-data-visualization-sol
* DONE fix in it even though run in pc



* TODO generate model
* DONE generate model


# ** TODO use CSG to generate wall with window
Expand All @@ -488,15 +487,16 @@ https://www.grapecity.com.cn/blogs/wyn-3dmodel-bi-analize-data-visualization-sol

** DONE feat: add empty gameObject to scenetree

** TODO fix Cube's normal
# ** TODO fix Cube's normal
** DONE fix Cube not affect by ambient


** TODO generate wall models(white)
** DONE generate wall models(white)

TODO use Cube as wall


** TODO update ground
** DONE update ground

use gray color on one plane(cube)

Expand Down Expand Up @@ -536,19 +536,45 @@ https://www.dhzn3d.com/?cat=&s=%E6%9F%9C



* TODO move all scripts, ui to published project; only use meta3d editor to build scene!

TODO move Page out

TODO scene only has one script:
invoke script func implemented in published project


TODO update publish action


TODO script api add get scene, perspectiveCamera and three api



* TODO update page position: use screen coordinate


* TODO add Sprite(billboard) demo

refer to:
https://juejin.cn/post/7107223446999793695




* TODO update

scenegraph
# component-pbrmaterial

# event

# publish action

# actions

event
# scenegraph

# event



Expand All @@ -565,6 +591,9 @@ TODO run test in mobile



* TODO arcball add pointer lock


* TODO add 第一人称 走路 漫游

TODO use FirstPersonControl
Expand Down Expand Up @@ -595,6 +624,8 @@ TODO update demmo

need get picture, size?

TODO get picture in front, side, back


refer to:
https://www.tuguan.net/doc/scene-editor/createmodel/modeling/
Expand All @@ -610,11 +641,6 @@ https://www.tuguan.net/doc/scene-editor/createmodel/modeling/



* TODO add Sprite(billboard) demo

refer to:
https://juejin.cn/post/7107223446999793695



* TODO add 3d ui(billboard or face to one direction) demo
Expand Down Expand Up @@ -927,10 +953,8 @@ TODO add instance componenet
can add util functions!


** TODO add transform gizmo


** TODO add AssetBundle



Expand All @@ -941,8 +965,10 @@ can add util functions!



** TODO add transform gizmo


** TODO add AssetBundle


** TODO add keyframe animation editor
Expand All @@ -964,6 +990,9 @@ https://docs.unity3d.com/Packages/[email protected]/manual/index.html
** TODO add Stream Load


** TODO improve model editor, 2d ui editor, data binding editor





Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function createState(isDebug, pbrMaterialCount) {
1.0,
defaultSpecularColor,
1.0,
1.0,
0.0,
0.0,
1.5
]);
Expand All @@ -122,7 +122,7 @@ function createState(isDebug, pbrMaterialCount) {
1.0,
defaultSpecularColor,
1.0,
1.0,
0.0,
0.0,
1.5
], {
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function createState(isDebug, pbrMaterialCount) {
1.0,
defaultSpecularColor,
1.0,
1.0,
0.0,
0.0,
1.5
]);
Expand All @@ -122,7 +122,7 @@ function createState(isDebug, pbrMaterialCount) {
1.0,
defaultSpecularColor,
1.0,
1.0,
0.0,
0.0,
1.5
], {
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-component-pbrmaterial",
"version": "1.3.1",
"version": "1.3.2",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-component-pbrmaterial-protocol"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ let createState = (isDebug: bool, pbrMaterialCount: int) => {
let defaultSpecular = 1.0
let defaultSpecularColor = (1., 1., 1.)
let defaultRoughness = 1.0
let defaultMetalness = 1.0
let defaultMetalness = 0.0
let defaultTransmission = 0.0
let defaultIOR = 1.5

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-pipeline-event",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-pipeline-event-protocol"
Expand Down
36 changes: 18 additions & 18 deletions packages/event/extensions/meta3d-event/dist/static/js/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -294,24 +294,7 @@ function _fromMobileDomEventArr(state, eventExtensionProtocolName) {

function fromDomEvent(state, eventExtensionProtocolName) {
var match = BrowserDoService$Meta3dEvent.getBrowser(state);
var tmp;
if (match >= 2) {
if (match >= 4) {
throw {
RE_EXN_ID: "Match_failure",
_1: [
"InitEventDoService.res",
444,
4
],
Error: new Error()
};
}
tmp = _fromMobileDomEventArr(state, eventExtensionProtocolName);
} else {
tmp = _fromPCDomEventArr(state, eventExtensionProtocolName);
}
return Most.mergeArray(tmp);
return Most.mergeArray(match === 3 || match === 2 ? _fromMobileDomEventArr(state, eventExtensionProtocolName) : _fromPCDomEventArr(state, eventExtensionProtocolName));
}

var handleDomEventStreamError = Log$Meta3dCommonlib.logForDebug;
Expand Down
2 changes: 1 addition & 1 deletion packages/event/extensions/meta3d-event/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-event",
"version": "1.3.3",
"version": "1.3.5",
"publisher": "meta3d",
"displayName": "event",
"protocol": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ let bindDomEventToTriggerPointEvent = (
) =>
switch browser {
| Chrome
| Firefox =>
| Firefox
| Unknown =>
stateForEventHandler
->_bindMouseEventToTriggerPointEvent(Click, NameEventDoService.getPointTapEventName(), PointTap)
->_bindMouseEventToTriggerPointEvent(MouseUp, NameEventDoService.getPointUpEventName(), PointUp)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-scenegraph-converter-three",
"version": "1.3.5",
"version": "1.3.6",
"publisher": "meta3d",
"displayName": "meta3d-scenegraph-converter-three",
"protocol": {
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit a25d0cf

Please sign in to comment.