Skip to content

Commit

Permalink
refactor: clear some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Dec 25, 2023
1 parent 9751763 commit 083e18d
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 195 deletions.
2 changes: 0 additions & 2 deletions defaults/meta3d/src/Main.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// TODO unify .d.ts, .ts!

import { extensionProtocolName, getExtensionService, getExtensionLife, state, api, contributeProtocolName, getContribute, getContributeFuncResult, startConfigData, packageProtocolName } from "meta3d-type"
import { actionName, supportedEventName, } from "meta3d-type/src/contribute/UIControlProtocolConfigType"
import { needConfigData } from "meta3d-type/src/package/StartPackageProtocolConfigType"
Expand Down
67 changes: 0 additions & 67 deletions defaults/meta3d/src/app_and_package/AppManager.res
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,6 @@ let convertAllFileData = (
// allExtensionFileData: array<ExtensionFileType.extensionFileData>,
allContributeFileData: array<ExtensionFileType.contributeFileData>,
) => {
// allPackageEntryExtensionProtocolData: array<ExtensionFileType.extensionProtocolData>,
// TODO change to startExtensionProtocolNames
// startExtensionNames: array<Meta3dType.Index.extensionName>,

// ManagerUtils.convertAllFileData(
// allExtensionFileData,
// allContributeFileData,
// allPackageEntryExtensionProtocolData,
// (allExtensionNewNames, (startExtensionNames, []), allContributeNewNames),
// )
// TODO check:allExtensionNewNames.length == allExtensionFileData.length
// TODO check:allContributeNewNames.length == allContributeFileData.length

// (
// // allExtensionFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
// // (. result, {extensionPackageData, extensionFuncData}, i) => {
// // // let newName = allExtensionNewNames->Meta3dCommonlib.ArraySt.getExn(i)

// // result->Meta3dCommonlib.ArraySt.push((
// // (
// // {
// // name: extensionPackageData.name,
// // version: extensionPackageData.version,
// // account: extensionPackageData.account,
// // displayName: extensionPackageData.displayName,
// // repoLink: extensionPackageData.repoLink,
// // description: extensionPackageData.description,
// // protocol: extensionPackageData.protocol,
// // type_: startExtensionNames->Meta3dCommonlib.ArraySt.includes(
// // extensionPackageData.name,
// // )
// // ? Start
// // : Default,
// // dependentPackageStoredInAppProtocolNameMap: extensionPackageData.dependentPackageStoredInAppProtocolNameMap,
// // dependentBlockProtocolNameMap: extensionPackageData.dependentBlockProtocolNameMap,
// // }: extensionPackageData
// // ),
// // extensionFuncData,
// // ))
// // },
// // [],
// // ),
// allContributeFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
// (. result, {contributePackageData, contributeFuncData}, i) => {
// // let newName = allContributeNewNames->Meta3dCommonlib.ArraySt.getExn(i)

// result->Meta3dCommonlib.ArraySt.push((
// (
// {
// name: contributePackageData.name,
// version: contributePackageData.version,
// account: contributePackageData.account,
// displayName: contributePackageData.displayName,
// repoLink: contributePackageData.repoLink,
// description: contributePackageData.description,
// protocol: contributePackageData.protocol,
// dependentPackageStoredInAppProtocolNameMap: contributePackageData.dependentPackageStoredInAppProtocolNameMap,
// dependentBlockProtocolNameMap: contributePackageData.dependentBlockProtocolNameMap,
// }: contributePackageData
// ),
// contributeFuncData,
// ))
// },
// [],
// ),
// )

allContributeFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
(. result, {contributePackageData, contributeFuncData}, i) => {
// let newName = allContributeNewNames->Meta3dCommonlib.ArraySt.getExn(i)
Expand Down
51 changes: 2 additions & 49 deletions defaults/meta3d/src/app_and_package/PackageManager.res
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,6 @@ let convertAllFileData = (
// TODO change to entryExtensionProtocolNames
entryExtensionNames: array<Meta3dType.Index.extensionName>,
) => {
// ManagerUtils.convertAllFileData(
// allExtensionFileData,
// allContributeFileData,
// allPackageEntryExtensionProtocolData,
// (allExtensionNewNames, ([], entryExtensionNames), allContributeNewNames),
// )

// TODO check:allExtensionNewNames.length == allExtensionFileData.length
// TODO check:allContributeNewNames.length == allContributeFileData.length

// let allExtensionDataMap =
// allExtensionFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
// (. result, {extensionPackageData}, i) => {
// result->Meta3dCommonlib.ImmutableHashMap.set(
// extensionPackageData.protocol.name,
// (
// allExtensionNewNames->Meta3dCommonlib.ArraySt.getExn(i),
// extensionPackageData.protocol.version,
// ),
// )
// },
// Meta3dCommonlib.ImmutableHashMap.createEmpty(),
// )
// let allExtensionDataMap =
// allPackageEntryExtensionProtocolData->Meta3dCommonlib.ArraySt.reduceOneParam(
// (. allExtensionDataMap, ({name, version}, entryExtensionName)) => {
// allExtensionDataMap->Meta3dCommonlib.ImmutableHashMap.set(
// name,
// (entryExtensionName, version),
// )
// },
// allExtensionDataMap,
// )

// let allContributeDataMap =
// allContributeFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
// (. result, {contributePackageData}, i) => {
// result->Meta3dCommonlib.ImmutableHashMap.set(
// contributePackageData.protocol.name,
// (
// allContributeNewNames->Meta3dCommonlib.ArraySt.getExn(i),
// contributePackageData.protocol.version,
// ),
// )
// },
// Meta3dCommonlib.ImmutableHashMap.createEmpty(),
// )

(
allExtensionFileData->Meta3dCommonlib.ArraySt.reduceOneParami(
(. result, {extensionPackageData, extensionFuncData}, i) => {
Expand Down Expand Up @@ -164,7 +116,8 @@ let load = (packageBinaryFile: ArrayBuffer.t): (
array<extensionFileData>,
Meta3dType.Index.extensionProtocolName,
) => {
let (state, allExtensionDataArr) = packageBinaryFile->BinaryFileOperator.load->ManagerUtils.loadPackage
let (state, allExtensionDataArr) =
packageBinaryFile->BinaryFileOperator.load->ManagerUtils.loadPackage

(state, allExtensionDataArr, _getEntryExtensionProtocolName(allExtensionDataArr))
}
Expand Down
8 changes: 3 additions & 5 deletions doc/1.0.0-beta.3.org
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ switch between action
# * TODO guide: add end guide button


* TODO 优化:减小engine-whole、editor-whole包体积
# * TODO 优化:减小engine-whole、editor-whole包体积


* TODO 优化:减小发布的app的大小
# * TODO 优化:减小发布的app的大小



Expand All @@ -246,9 +246,7 @@ switch between action





* TODO check all * TODOs and clear
* DONE check all * TODOs and clear



Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Start(1703419189530)
#Done(1703419189599)
#Start(1703462971468)
#Done(1703462971519)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ninja log v6
0 15 1703419189544178814 src/service/ServiceType.ast 785165cefc5839bb
1 16 1703419189544405667 Meta3dEditorWholeProtocol.cmi 27dde7c45547adb8
15 38 1703419189567862452 src/service/ServiceType.d 702d225c4edca7ca
38 69 1703419189594504574 src/service/ServiceType-Meta3dEditorWholeProtocol.cmj aa8f9ec241cffa08
38 69 1703419189594504574 src/service/ServiceType-Meta3dEditorWholeProtocol.cmi aa8f9ec241cffa08
38 69 1703419189594504574 ../es6_global/src/service/ServiceType.bs.js aa8f9ec241cffa08
38 69 1703419189594504574 ../js/src/service/ServiceType.bs.js aa8f9ec241cffa08
0 18 1703462971484960575 src/service/ServiceType.ast 785165cefc5839bb
1 20 1703462971485725040 Meta3dEditorWholeProtocol.cmi 27dde7c45547adb8
18 28 1703462971496218758 src/service/ServiceType.d 702d225c4edca7ca
28 51 1703462971518224088 src/service/ServiceType-Meta3dEditorWholeProtocol.cmj dab474072c2f1688
28 51 1703462971518224088 src/service/ServiceType-Meta3dEditorWholeProtocol.cmi dab474072c2f1688
28 51 1703462971518224088 ../es6_global/src/service/ServiceType.bs.js dab474072c2f1688
28 51 1703462971518224088 ../js/src/service/ServiceType.bs.js dab474072c2f1688
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ let make = (~service: FrontendType.service) => {
// )
// : ()

//// TODO perf: use batchXxx to merge request
UIControlUtils.selectAllUIControls(service, dispatch, release)->Js.Promise.then_(() => {
SelectPackageUtils.selectEditorWholeAndEngineWholePackages(service, dispatch, release)
}, _)->Js.Promise.then_(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ let buildFrontendService = (): FrontendType.backendService => {
{
init,
handleLoginForWeb3,
// TODO finish
checkUserName: Obj.magic(1),
registerUser: Obj.magic(1),
isLoginSuccess: Obj.magic(1),
// TODO finish
getAllPublishExtensionProtocolsCount: Obj.magic(1),
getAllPublishExtensionProtocols,
getAllPublishExtensionProtocolConfigs,
Expand Down
58 changes: 29 additions & 29 deletions utils/meta3d-scenegraph-converter-three-utils/src/Classes.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import { basicCameraView } from "meta3d-component-basiccameraview-protocol";
import {
type Blending, type Side,
type BufferAttribute as BufferAttributeType,
type CubeTexture,
type Texture as TextureType,
type Color as ColorType,
type Layers as LayersType, Matrix3 as Matrix3Type,
type Matrix4 as Matrix4Type,
type Sphere as SphereType,
type Object3D as Object3DType,
type Camera as CameraType,
type PerspectiveCamera as PerspectiveCameraType,
type Mesh as MeshType,
type TypedArray,
type BufferGeometry as BufferGeometryType,
type MeshStandardMaterial as MeshStandardMaterialType,
type Source as SourceType,
type Wrapping,
type AnyMapping,
type MinificationTextureFilter,
type MagnificationTextureFilter,
// type AnyPixelFormat,
type TextureDataType, Vector2 as Vector2Type, Vector3 as Vector3Type,
type NormalMapTypes,
type WebGL1PixelFormat,
type TextureFilter,
type DirectionalLight as DirectionalLightType,
type ColorSpace,
type Quaternion as QuaternionType
import type {
Blending, Side,
BufferAttribute as BufferAttributeType,
CubeTexture,
Texture as TextureType,
Color as ColorType,
Layers as LayersType, Matrix3 as Matrix3Type,
Matrix4 as Matrix4Type,
Sphere as SphereType,
Object3D as Object3DType,
Camera as CameraType,
PerspectiveCamera as PerspectiveCameraType,
Mesh as MeshType,
TypedArray,
BufferGeometry as BufferGeometryType,
MeshStandardMaterial as MeshStandardMaterialType,
Source as SourceType,
Wrapping,
AnyMapping,
MinificationTextureFilter,
MagnificationTextureFilter,
// AnyPixelFormat,
TextureDataType, Vector2 as Vector2Type, Vector3 as Vector3Type,
NormalMapTypes,
WebGL1PixelFormat,
TextureFilter,
DirectionalLight as DirectionalLightType,
ColorSpace,
Quaternion as QuaternionType
// Quaternion,
} from "three";
import { getExn, getWithDefault, map, isNullable, bind, return_ } from "meta3d-commonlib-ts/src/NullableUtils"
Expand Down
62 changes: 31 additions & 31 deletions utils/meta3d-scenegraph-converter-three-utils/src/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ import { service } from "meta3d-scenegraph-converter-three-protocol/src/service/
import { state } from "meta3d-scenegraph-converter-three-protocol/src/state/StateType"
import { state as meta3dState, getExtensionService as getExtensionServiceMeta3D, createExtensionState as createExtensionStateMeta3D, getExtensionLife as getLifeMeta3D, extensionLife, api } from "meta3d-type"
import { basicCameraView } from "meta3d-component-basiccameraview-protocol";
import {
type Blending, type Side,
type BufferAttribute as BufferAttributeType,
type CubeTexture,
type Texture as TextureType,
type Color as ColorType,
type Layers as LayersType, Matrix3 as Matrix3Type,
type Matrix4 as Matrix4Type,
type Sphere as SphereType,
type Object3D as Object3DType,
type Camera as CameraType,
type PerspectiveCamera as PerspectiveCameraType,
type Mesh as MeshType,
type TypedArray,
type BufferGeometry as BufferGeometryType,
type Material as MaterialType,
type MeshStandardMaterial as MeshStandardMaterialType,
type MeshPhysicalMaterial as MeshPhysicalMaterialType,
type Source as SourceType,
type Wrapping,
type AnyMapping,
type MinificationTextureFilter,
type MagnificationTextureFilter,
// type AnyPixelFormat,
type TextureDataType, Vector2 as Vector2Type, Vector3 as Vector3Type,
type NormalMapTypes,
type WebGL1PixelFormat,
type TextureFilter,
type DirectionalLight as DirectionalLightType,
type ColorSpace,
type Quaternion as QuaternionType
import type {
Blending, Side,
BufferAttribute as BufferAttributeType,
CubeTexture,
Texture as TextureType,
Color as ColorType,
Layers as LayersType, Matrix3 as Matrix3Type,
Matrix4 as Matrix4Type,
Sphere as SphereType,
Object3D as Object3DType,
Camera as CameraType,
PerspectiveCamera as PerspectiveCameraType,
Mesh as MeshType,
TypedArray,
BufferGeometry as BufferGeometryType,
Material as MaterialType,
MeshStandardMaterial as MeshStandardMaterialType,
MeshPhysicalMaterial as MeshPhysicalMaterialType,
Source as SourceType,
Wrapping,
AnyMapping,
MinificationTextureFilter,
MagnificationTextureFilter,
// AnyPixelFormat,
TextureDataType, Vector2 as Vector2Type, Vector3 as Vector3Type,
NormalMapTypes,
WebGL1PixelFormat,
TextureFilter,
DirectionalLight as DirectionalLightType,
ColorSpace,
Quaternion as QuaternionType
// Quaternion,
} from "three";
import { getExn, getWithDefault, map, isNullable, bind, return_ } from "meta3d-commonlib-ts/src/NullableUtils"
Expand Down

0 comments on commit 083e18d

Please sign in to comment.