Skip to content

Commit

Permalink
feat(editor): update engine-whole package
Browse files Browse the repository at this point in the history
run test:
	publish local
	publish to platform
update version;
  • Loading branch information
yyc-git committed Mar 9, 2024
1 parent 32bd886 commit bc78aa1
Show file tree
Hide file tree
Showing 85 changed files with 533 additions and 67 deletions.
2 changes: 1 addition & 1 deletion contributes/meta3d-action-add-asset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-action-add-asset",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"repoLink": "",
"protocol": {
Expand Down
2 changes: 1 addition & 1 deletion contributes/meta3d-action-add-cube/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-action-add-cube",
"version": "1.3.1",
"version": "1.3.2",
"publisher": "meta3d",
"displayName": "add-cube",
"repoLink": "https://github.com/Meta3D-Technology/Meta3D/tree/master/contributes/meta3d-action-add-cube",
Expand Down
2 changes: 1 addition & 1 deletion contributes/meta3d-action-run/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-action-run",
"version": "1.3.3",
"version": "1.3.4",
"publisher": "meta3d",
"displayName": "meta3d-action-run",
"repoLink": "",
Expand Down
69 changes: 58 additions & 11 deletions doc/jiehuo.org
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,45 @@ get geometry
check only when trigger event


** TODO pass publish engine

* TODO fix: cancel load glb
* TODO fix: when stop, script asset->event file str not restore immdiatlly
# * TODO fix: cancel load glb
# TODO make add-asset update work!
# * TODO fix: when stop, script asset->event file str not restore immdiatlly



* TODO need update

* DONE pass publish engine

TODO web render:
add api
render job:add outline


TODO run test:
publish local
publish to platform


* DONE need update


TODO e,c,p:
gameview-render e, c and p
# meta3d-action-run
interact p
scenegraph
event
three-api p
run
# gameview-render e, c and p
# # meta3d-action-run
# interact p
# scenegraph
# event
# three-api p
# ui
# editor e, p
# webview e,c,p
# engine-whole e, p
# web-render

# run
# add asset
# add cube



Expand All @@ -88,6 +109,26 @@ TODO packages:






* TODO 优化: 错误 打印

use error instead of throw



TODO RunElementVisual:
if error, show error message and continue(loop)









* TODO future


Expand Down Expand Up @@ -127,6 +168,12 @@ TODO share allocate ECS ArrayBuffers when each run(visual, run)



** TODO add output ui control

show log, error(e.g. error by script->handler)



** TODO add MeshRender component

maintain visible
Expand Down
2 changes: 1 addition & 1 deletion packages/asset/extensions/meta3d-load-glb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"meta3d-load-glb-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-pipeline-root",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-pipeline-root-protocol"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-editor-webgl1-three-whole",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-editor-whole-protocol"
Expand All @@ -20,9 +20,8 @@
"meta3d-event-protocol": "^1.3.0",
"meta3d-export-scene-protocol": "^1.2.0",
"meta3d-import-scene-protocol": "^1.2.0",
"meta3d-interact-protocol": "^1.2.0",
"meta3d-lib-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0",
"meta3d-ui-protocol": "^1.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { service as exportSceneService } from "meta3d-export-scene-protocol/src/
import { inputContribute } from "meta3d-ui-protocol/src/contribute/InputContributeType"
import { service as assetService } from "meta3d-asset-protocol/src/service/ServiceType"
import { service as libService } from "meta3d-lib-protocol/src/service/ServiceType"
import { service as interactService } from "meta3d-interact-protocol/src/service/ServiceType"
// import { service as interactService } from "meta3d-interact-protocol/src/service/ServiceType"
import { getBeforeRenderEventName } from "meta3d-editor-event-utils/src/Main"
// import { init as initBackend } from "backend-cloudbase"

Expand Down Expand Up @@ -426,7 +426,7 @@ export let getExtensionService: getExtensionServiceMeta3D<
core: meta3dState => getExn(api.getPackageService<coreService>(meta3dState, "meta3d-core-protocol")),
asset: meta3dState => getExn(api.getPackageService<assetService>(meta3dState, "meta3d-asset-protocol")),
lib: meta3dState => getExn(api.getPackageService<libService>(meta3dState, "meta3d-lib-protocol")),
interact: meta3dState => getExn(api.getPackageService<interactService>(meta3dState, "meta3d-interact-protocol")),
// interact: meta3dState => getExn(api.getPackageService<interactService>(meta3dState, "meta3d-interact-protocol")),

addGroup: (meta3dState, scene) => {
return api.nullable.getExn(api.getPackageService<threeService>(meta3dState, "meta3d-three-protocol")).converter(meta3dState).addGroup(meta3dState, scene)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"meta3d-editor-sceneview-render-protocol": "^1.2.0",
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-export-scene-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-event-protocol": "^1.3.0",
"meta3d-import-scene-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-pipeline-webgl1-three-gameviewrender",
"version": "1.3.3",
"version": "1.3.4",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-pipeline-webgl1-three-gameviewrender-protocol"
Expand All @@ -21,10 +21,11 @@
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-event-protocol": "^1.3.0",
"meta3d-pipeline-webgl1-three-gameviewrender-protocol": "^1.3.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0",
"meta3d-ui-control-game-view-protocol": "^1.3.0",
"meta3d-ui-protocol": "^1.3.0"
"meta3d-ui-protocol": "^1.3.0",
"meta3d-interact-protocol": "^1.3.0"
},
"devDependencies": {
"clean-webpack-plugin": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-editor-gameview-render",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-editor-gameview-render-protocol"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-pipeline-webgl1-three-gameviewrender-protocol",
"version": "1.3.2",
"version": "1.3.3",
"description": "",
"publisher": "meta3d",
"author": "Meta3D",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-editor-gameview-render-protocol",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"description": "",
"author": "Meta3D",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-editor-whole-protocol",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"description": "",
"author": "Meta3D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { cleanScene, importScene } from "meta3d-import-scene-protocol/src/servic
import { exportScene } from "meta3d-export-scene-protocol/src/service/ServiceType"
import { service as assetService_ } from "meta3d-asset-protocol/src/service/ServiceType"
import { service as libService_ } from "meta3d-lib-protocol/src/service/ServiceType"
import { service as interactService_ } from "meta3d-interact-protocol/src/service/ServiceType"
// import { service as interactService_ } from "meta3d-interact-protocol/src/service/ServiceType"
import { initData, initFunc, updateData, env } from "../state/StateType";
import { uiControlContribute as uiControlContribute_ } from "meta3d-ui-protocol/src/contribute/UIControlContributeType"
import { inputContribute as inputContribute_ } from "meta3d-ui-protocol/src/contribute/InputContributeType"
Expand Down Expand Up @@ -45,7 +45,7 @@ export type assetService = assetService_

export type libService = libService_

export type interactService = interactService_
// export type interactService = interactService_

export type service = {
scene: (meta3dState: meta3dState) => engineSceneService,
Expand All @@ -54,7 +54,7 @@ export type service = {
core: (meta3dState: meta3dState) => coreService,
asset: (meta3dState: meta3dState) => assetService,
lib: (meta3dState: meta3dState) => libService,
interact: (meta3dState: meta3dState) => interactService,
// interact: (meta3dState: meta3dState) => interactService,

addGroup: addGroup,
cleanScene: cleanScene,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-event-protocol": "^1.3.0",
"meta3d-pipeline-webgl1-three-sceneviewrender-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0",
"meta3d-ui-control-scene-view-protocol": "^1.3.0",
"meta3d-ui-protocol": "^1.3.0"
Expand Down
389 changes: 388 additions & 1 deletion packages/editor-whole/ui/extensions/meta3d-ui/dist/static/js/main.js
100755 → 100644

Large diffs are not rendered by default.

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.
2 changes: 1 addition & 1 deletion packages/editor-whole/ui/extensions/meta3d-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-ui",
"version": "1.3.2",
"version": "1.3.3",
"publisher": "meta3d",
"displayName": "ui",
"protocol": {
Expand Down
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-engine-whole",
"version": "1.3.1",
"version": "1.3.2",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-engine-whole-protocol"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"meta3d-asset-protocol": "^1.3.0",
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-load-scene-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-engine-whole-protocol",
"version": "1.3.1",
"version": "1.3.2",
"publisher": "meta3d",
"description": "",
"author": "Meta3D",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta3d-pipeline-webgl1-three-webrender",
"version": "1.3.1",
"version": "1.3.3",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-pipeline-webgl1-three-webrender-protocol"
Expand All @@ -19,8 +19,9 @@
"meta3d-engine-scene-protocol": "^1.3.0",
"meta3d-engine-web-render-protocol": "^1.3.0",
"meta3d-event-protocol": "^1.3.0",
"meta3d-interact-protocol": "^1.3.0",
"meta3d-pipeline-webgl1-three-webrender-protocol": "^1.3.0",
"meta3d-three-protocol": "^1.2.0",
"meta3d-three-protocol": "^1.3.0",
"meta3d-type": "^1.3.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export let getContribute: getContributeMeta3D<pipelineContribute<config, state>>
renderer: null,
composer: null,
renderPass: null,
outlinePass: null,
canvas,
lastYaw: null,
lastPitch: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ export let execFunc: execFuncType = (meta3dState, { api, getStatesFunc, setState
let renderer = data[1] as WebGLRenderer
let composer = data[2] as any
let renderPass = data[3] as any
let outlinePass = data[4] as any

return setStatesFunc<states>(
meta3dState,
setState(states, {
...getState(states),
renderer,
composer,
renderPass
renderPass,
outlinePass
})
)
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { execFuncType } from "meta3d-core-protocol/src/service/ServiceType"
import { getState, setState } from "../Utils"
import { states } from "meta3d-pipeline-webgl1-three-webrender-protocol/src/StateType";
import { execEventHandle, getViewServiceForEditor } from "meta3d-script-utils/src/Main"
import { execEventHandle, getViewServiceForEngine } from "meta3d-script-utils/src/Main"

export let execFunc: execFuncType = (meta3dState, { api, getStatesFunc, setStatesFunc }) => {
let states = getStatesFunc<states>(meta3dState)
let { mostService } = getState(states)

return mostService.fromPromise(execEventHandle(meta3dState, api, "onInit", getViewServiceForEditor(meta3dState, api)))
return mostService.fromPromise(execEventHandle(meta3dState, api, "onInit", getViewServiceForEngine(meta3dState, api)))
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import { states } from "meta3d-pipeline-webgl1-three-webrender-protocol/src/Stat
import { state as converterState } from "meta3d-scenegraph-converter-three-protocol/src/state/StateType"
import { getExn } from "meta3d-commonlib-ts/src/NullableUtils"
import { renderForEngine } from "meta3d-pipeline-webgl1-three-utils/src/RenderJobUtils"
import { service as renderService } from "meta3d-engine-web-render-protocol/src/service/ServiceType"

export let execFunc: execFuncType = (meta3dState, { api, getStatesFunc, setStatesFunc }) => {
let states = getStatesFunc<states>(meta3dState)
let { mostService, composer, renderPass } = getState(states)
let { mostService, composer, renderPass, outlinePass } = getState(states)

return mostService.callFunc(() => {
let { perspectiveCamera, scene } = api.getExtensionState<converterState>(meta3dState,
Expand All @@ -16,6 +17,8 @@ export let execFunc: execFuncType = (meta3dState, { api, getStatesFunc, setState
perspectiveCamera = getExn(perspectiveCamera)
scene = getExn(scene)

return renderForEngine(meta3dState, scene, perspectiveCamera, composer, renderPass)
let { getSelectedObjects } = getExn(api.getPackageService<renderService>(meta3dState, "meta3d-engine-web-render-protocol"))

return renderForEngine(meta3dState, getSelectedObjects, scene, perspectiveCamera, composer, renderPass, outlinePass)
})
}
Loading

0 comments on commit bc78aa1

Please sign in to comment.