@fps-games/editor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/authoring-apply.d.ts +21 -0
  2. package/dist/authoring-apply.d.ts.map +1 -0
  3. package/dist/authoring-apply.js +45 -0
  4. package/dist/authoring-apply.js.map +1 -0
  5. package/dist/index.d.ts +85 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +539 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/local-editor-harness.d.ts +173 -0
  10. package/dist/local-editor-harness.d.ts.map +1 -0
  11. package/dist/local-editor-harness.js +969 -0
  12. package/dist/local-editor-harness.js.map +1 -0
  13. package/node_modules/@fps-games/editor-babylon/dist/camera-controller.d.ts +20 -0
  14. package/node_modules/@fps-games/editor-babylon/dist/camera-controller.d.ts.map +1 -0
  15. package/node_modules/@fps-games/editor-babylon/dist/camera-controller.js +239 -0
  16. package/node_modules/@fps-games/editor-babylon/dist/camera-controller.js.map +1 -0
  17. package/node_modules/@fps-games/editor-babylon/dist/edit-session.d.ts +30 -0
  18. package/node_modules/@fps-games/editor-babylon/dist/edit-session.d.ts.map +1 -0
  19. package/node_modules/@fps-games/editor-babylon/dist/edit-session.js +297 -0
  20. package/node_modules/@fps-games/editor-babylon/dist/edit-session.js.map +1 -0
  21. package/node_modules/@fps-games/editor-babylon/dist/editor-world.d.ts +30 -0
  22. package/node_modules/@fps-games/editor-babylon/dist/editor-world.d.ts.map +1 -0
  23. package/node_modules/@fps-games/editor-babylon/dist/editor-world.js +67 -0
  24. package/node_modules/@fps-games/editor-babylon/dist/editor-world.js.map +1 -0
  25. package/node_modules/@fps-games/editor-babylon/dist/event-guard.d.ts +13 -0
  26. package/node_modules/@fps-games/editor-babylon/dist/event-guard.d.ts.map +1 -0
  27. package/node_modules/@fps-games/editor-babylon/dist/event-guard.js +101 -0
  28. package/node_modules/@fps-games/editor-babylon/dist/event-guard.js.map +1 -0
  29. package/node_modules/@fps-games/editor-babylon/dist/index.d.ts +19 -0
  30. package/node_modules/@fps-games/editor-babylon/dist/index.d.ts.map +1 -0
  31. package/node_modules/@fps-games/editor-babylon/dist/index.js +18 -0
  32. package/node_modules/@fps-games/editor-babylon/dist/index.js.map +1 -0
  33. package/node_modules/@fps-games/editor-babylon/dist/input-controller.d.ts +3 -0
  34. package/node_modules/@fps-games/editor-babylon/dist/input-controller.d.ts.map +1 -0
  35. package/node_modules/@fps-games/editor-babylon/dist/input-controller.js +182 -0
  36. package/node_modules/@fps-games/editor-babylon/dist/input-controller.js.map +1 -0
  37. package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.d.ts +13 -0
  38. package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.d.ts.map +1 -0
  39. package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.js +94 -0
  40. package/node_modules/@fps-games/editor-babylon/dist/inspector-adapter.js.map +1 -0
  41. package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts +43 -0
  42. package/node_modules/@fps-games/editor-babylon/dist/inspector-host.d.ts.map +1 -0
  43. package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js +510 -0
  44. package/node_modules/@fps-games/editor-babylon/dist/inspector-host.js.map +1 -0
  45. package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.d.ts +5 -0
  46. package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.d.ts.map +1 -0
  47. package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.js +5 -0
  48. package/node_modules/@fps-games/editor-babylon/dist/legacy-runtime.js.map +1 -0
  49. package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts +22 -0
  50. package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.d.ts.map +1 -0
  51. package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js +408 -0
  52. package/node_modules/@fps-games/editor-babylon/dist/material-property-adapter.js.map +1 -0
  53. package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts +39 -0
  54. package/node_modules/@fps-games/editor-babylon/dist/monitor.d.ts.map +1 -0
  55. package/node_modules/@fps-games/editor-babylon/dist/monitor.js +780 -0
  56. package/node_modules/@fps-games/editor-babylon/dist/monitor.js.map +1 -0
  57. package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.d.ts +37 -0
  58. package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.d.ts.map +1 -0
  59. package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.js +268 -0
  60. package/node_modules/@fps-games/editor-babylon/dist/outline-adapter.js.map +1 -0
  61. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts +34 -0
  62. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.d.ts.map +1 -0
  63. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js +221 -0
  64. package/node_modules/@fps-games/editor-babylon/dist/projection-selection-controller.js.map +1 -0
  65. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +90 -0
  66. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -0
  67. package/node_modules/@fps-games/editor-babylon/dist/projection.js +479 -0
  68. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -0
  69. package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.d.ts +3 -0
  70. package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.d.ts.map +1 -0
  71. package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.js +7 -0
  72. package/node_modules/@fps-games/editor-babylon/dist/runtime-globals.js.map +1 -0
  73. package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts +18 -0
  74. package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.d.ts.map +1 -0
  75. package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js +213 -0
  76. package/node_modules/@fps-games/editor-babylon/dist/scene-view-camera-controller.js.map +1 -0
  77. package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.d.ts +36 -0
  78. package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.d.ts.map +1 -0
  79. package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.js +272 -0
  80. package/node_modules/@fps-games/editor-babylon/dist/scene-view-input-controller.js.map +1 -0
  81. package/node_modules/@fps-games/editor-babylon/dist/selection-controller.d.ts +27 -0
  82. package/node_modules/@fps-games/editor-babylon/dist/selection-controller.d.ts.map +1 -0
  83. package/node_modules/@fps-games/editor-babylon/dist/selection-controller.js +308 -0
  84. package/node_modules/@fps-games/editor-babylon/dist/selection-controller.js.map +1 -0
  85. package/node_modules/@fps-games/editor-babylon/dist/tool-controller.d.ts +17 -0
  86. package/node_modules/@fps-games/editor-babylon/dist/tool-controller.d.ts.map +1 -0
  87. package/node_modules/@fps-games/editor-babylon/dist/tool-controller.js +83 -0
  88. package/node_modules/@fps-games/editor-babylon/dist/tool-controller.js.map +1 -0
  89. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +47 -0
  90. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -0
  91. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +689 -0
  92. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -0
  93. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +111 -0
  94. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -0
  95. package/node_modules/@fps-games/editor-babylon/dist/types.js +2 -0
  96. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -0
  97. package/node_modules/@fps-games/editor-babylon/package.json +25 -0
  98. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +28 -0
  99. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -0
  100. package/node_modules/@fps-games/editor-browser/dist/index.js +54 -0
  101. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -0
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts +12 -0
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.d.ts.map +1 -0
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js +80 -0
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-input-router.js.map +1 -0
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.d.ts +11 -0
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.d.ts.map +1 -0
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.js +33 -0
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panel-registry.js.map +1 -0
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +9 -0
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +444 -0
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -0
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.d.ts +21 -0
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.d.ts.map +1 -0
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js +103 -0
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-primitives.js.map +1 -0
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.d.ts +12 -0
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.d.ts.map +1 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.js +123 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shared.js.map +1 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.d.ts +2 -0
  123. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.d.ts.map +1 -0
  124. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.js +115 -0
  125. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-shortcuts.js.map +1 -0
  126. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.d.ts +3 -0
  127. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.d.ts.map +1 -0
  128. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.js +68 -0
  129. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-theme.js.map +1 -0
  130. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +183 -0
  131. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -0
  132. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js +2 -0
  133. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -0
  134. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +58 -0
  135. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -0
  136. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +136 -0
  137. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -0
  138. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +4 -0
  139. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -0
  140. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +589 -0
  141. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -0
  142. package/node_modules/@fps-games/editor-browser/package.json +16 -0
  143. package/node_modules/@fps-games/editor-core/dist/authoring-source.d.ts +211 -0
  144. package/node_modules/@fps-games/editor-core/dist/authoring-source.d.ts.map +1 -0
  145. package/node_modules/@fps-games/editor-core/dist/authoring-source.js +511 -0
  146. package/node_modules/@fps-games/editor-core/dist/authoring-source.js.map +1 -0
  147. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +132 -0
  148. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -0
  149. package/node_modules/@fps-games/editor-core/dist/editor-session.js +265 -0
  150. package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -0
  151. package/node_modules/@fps-games/editor-core/dist/host-services.d.ts +24 -0
  152. package/node_modules/@fps-games/editor-core/dist/host-services.d.ts.map +1 -0
  153. package/node_modules/@fps-games/editor-core/dist/host-services.js +2 -0
  154. package/node_modules/@fps-games/editor-core/dist/host-services.js.map +1 -0
  155. package/node_modules/@fps-games/editor-core/dist/index.d.ts +106 -0
  156. package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -0
  157. package/node_modules/@fps-games/editor-core/dist/index.js +217 -0
  158. package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -0
  159. package/node_modules/@fps-games/editor-core/dist/scene-graph.d.ts +44 -0
  160. package/node_modules/@fps-games/editor-core/dist/scene-graph.d.ts.map +1 -0
  161. package/node_modules/@fps-games/editor-core/dist/scene-graph.js +86 -0
  162. package/node_modules/@fps-games/editor-core/dist/scene-graph.js.map +1 -0
  163. package/node_modules/@fps-games/editor-core/dist/scene-view-input.d.ts +41 -0
  164. package/node_modules/@fps-games/editor-core/dist/scene-view-input.d.ts.map +1 -0
  165. package/node_modules/@fps-games/editor-core/dist/scene-view-input.js +2 -0
  166. package/node_modules/@fps-games/editor-core/dist/scene-view-input.js.map +1 -0
  167. package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts +53 -0
  168. package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts.map +1 -0
  169. package/node_modules/@fps-games/editor-core/dist/serialized-object.js +32 -0
  170. package/node_modules/@fps-games/editor-core/dist/serialized-object.js.map +1 -0
  171. package/node_modules/@fps-games/editor-core/dist/transform-gizmo.d.ts +48 -0
  172. package/node_modules/@fps-games/editor-core/dist/transform-gizmo.d.ts.map +1 -0
  173. package/node_modules/@fps-games/editor-core/dist/transform-gizmo.js +2 -0
  174. package/node_modules/@fps-games/editor-core/dist/transform-gizmo.js.map +1 -0
  175. package/node_modules/@fps-games/editor-core/package.json +19 -0
  176. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +46 -0
  177. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -0
  178. package/node_modules/@fps-games/editor-forge-play/dist/index.js +156 -0
  179. package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -0
  180. package/node_modules/@fps-games/editor-forge-play/package.json +19 -0
  181. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +239 -0
  182. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -0
  183. package/node_modules/@fps-games/editor-protocol/dist/index.js +54 -0
  184. package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -0
  185. package/node_modules/@fps-games/editor-protocol/package.json +16 -0
  186. package/package.json +40 -0
@@ -0,0 +1,408 @@
1
+ import { getBabylonRuntime } from './runtime-globals';
2
+ export const MATERIAL_CANONICAL_PATHS = [
3
+ 'material.albedoColor',
4
+ 'material.emissiveColor',
5
+ 'material.metallic',
6
+ 'material.roughness',
7
+ 'material.alpha',
8
+ 'material.backFaceCulling',
9
+ 'material.albedoTexture.url',
10
+ 'material.normalTexture.url',
11
+ 'material.metallicTexture.url',
12
+ 'material.pbr.albedoColor',
13
+ 'material.pbr.baseWeight',
14
+ 'material.pbr.reflectivityColor',
15
+ 'material.pbr.microSurface',
16
+ 'material.pbr.emissiveColor',
17
+ 'material.pbr.ambientColor',
18
+ 'material.pbr.lightFalloff',
19
+ 'material.standard.diffuseColor',
20
+ 'material.standard.specularColor',
21
+ 'material.standard.specularPower',
22
+ 'material.standard.emissiveColor',
23
+ 'material.standard.ambientColor',
24
+ 'material.standard.useSpecularOverAlpha',
25
+ ];
26
+ const MATERIAL_SHARED_KEY_TO_PATH = {
27
+ alpha: 'material.alpha',
28
+ _alpha: 'material.alpha',
29
+ backFaceCulling: 'material.backFaceCulling',
30
+ _backFaceCulling: 'material.backFaceCulling',
31
+ albedoTexture: 'material.albedoTexture.url',
32
+ _albedoTexture: 'material.albedoTexture.url',
33
+ diffuseTexture: 'material.albedoTexture.url',
34
+ _diffuseTexture: 'material.albedoTexture.url',
35
+ normalTexture: 'material.normalTexture.url',
36
+ _normalTexture: 'material.normalTexture.url',
37
+ bumpTexture: 'material.normalTexture.url',
38
+ _bumpTexture: 'material.normalTexture.url',
39
+ metallicTexture: 'material.metallicTexture.url',
40
+ _metallicTexture: 'material.metallicTexture.url',
41
+ };
42
+ const MATERIAL_PBR_KEY_TO_PATH = {
43
+ albedoColor: 'material.pbr.albedoColor',
44
+ _albedoColor: 'material.pbr.albedoColor',
45
+ baseWeight: 'material.pbr.baseWeight',
46
+ _baseWeight: 'material.pbr.baseWeight',
47
+ reflectivityColor: 'material.pbr.reflectivityColor',
48
+ _reflectivityColor: 'material.pbr.reflectivityColor',
49
+ microSurface: 'material.pbr.microSurface',
50
+ _microSurface: 'material.pbr.microSurface',
51
+ emissiveColor: 'material.pbr.emissiveColor',
52
+ _emissiveColor: 'material.pbr.emissiveColor',
53
+ ambientColor: 'material.pbr.ambientColor',
54
+ _ambientColor: 'material.pbr.ambientColor',
55
+ lightFalloff: 'material.pbr.lightFalloff',
56
+ _lightFalloff: 'material.pbr.lightFalloff',
57
+ };
58
+ const MATERIAL_STANDARD_KEY_TO_PATH = {
59
+ diffuseColor: 'material.standard.diffuseColor',
60
+ _diffuseColor: 'material.standard.diffuseColor',
61
+ specularColor: 'material.standard.specularColor',
62
+ _specularColor: 'material.standard.specularColor',
63
+ specularPower: 'material.standard.specularPower',
64
+ _specularPower: 'material.standard.specularPower',
65
+ emissiveColor: 'material.standard.emissiveColor',
66
+ _emissiveColor: 'material.standard.emissiveColor',
67
+ ambientColor: 'material.standard.ambientColor',
68
+ _ambientColor: 'material.standard.ambientColor',
69
+ useSpecularOverAlpha: 'material.standard.useSpecularOverAlpha',
70
+ _useSpecularOverAlpha: 'material.standard.useSpecularOverAlpha',
71
+ };
72
+ const SKIP = Symbol('material-property-skip');
73
+ function sameValue(a, b) {
74
+ return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
75
+ }
76
+ function isMaterialLike(value) {
77
+ if (!value || typeof value !== 'object')
78
+ return false;
79
+ const className = value.getClassName?.();
80
+ if (typeof className === 'string' && /material$/i.test(className))
81
+ return true;
82
+ return 'albedoColor' in value
83
+ || 'diffuseColor' in value
84
+ || 'reflectivityColor' in value
85
+ || 'specularColor' in value
86
+ || 'metallic' in value
87
+ || 'roughness' in value
88
+ || 'microSurface' in value;
89
+ }
90
+ function hasMaterial(value) {
91
+ return !!value && typeof value === 'object' && !!value.material;
92
+ }
93
+ export function resolveMaterialRuntimeKind(material) {
94
+ if (!material || typeof material !== 'object')
95
+ return 'unknown';
96
+ const className = typeof material.getClassName === 'function' ? material.getClassName() : '';
97
+ const normalizedClassName = typeof className === 'string' ? className.toLowerCase() : '';
98
+ if (normalizedClassName.includes('standardmaterial'))
99
+ return 'standard';
100
+ if (normalizedClassName.includes('pbr'))
101
+ return 'pbr';
102
+ if ('diffuseColor' in material || 'specularColor' in material || 'specularPower' in material)
103
+ return 'standard';
104
+ if ('albedoColor' in material
105
+ || '_albedoColor' in material
106
+ || 'reflectivityColor' in material
107
+ || '_reflectivityColor' in material
108
+ || 'microSurface' in material
109
+ || '_microSurface' in material)
110
+ return 'pbr';
111
+ return 'unknown';
112
+ }
113
+ function normalizePropertyKey(propertyKey, materialRuntimeKind) {
114
+ if (typeof propertyKey !== 'string')
115
+ return null;
116
+ const trimmed = propertyKey.trim();
117
+ if (!trimmed)
118
+ return null;
119
+ if (MATERIAL_CANONICAL_PATHS.includes(trimmed))
120
+ return trimmed;
121
+ const normalized = trimmed.split('.').pop() ?? trimmed;
122
+ if (materialRuntimeKind === 'pbr' && MATERIAL_PBR_KEY_TO_PATH[normalized])
123
+ return MATERIAL_PBR_KEY_TO_PATH[normalized];
124
+ if (materialRuntimeKind === 'standard' && MATERIAL_STANDARD_KEY_TO_PATH[normalized])
125
+ return MATERIAL_STANDARD_KEY_TO_PATH[normalized];
126
+ return MATERIAL_SHARED_KEY_TO_PATH[normalized] ?? null;
127
+ }
128
+ function normalizeColor3(value) {
129
+ if (!value || typeof value !== 'object')
130
+ return SKIP;
131
+ const source = value;
132
+ const r = typeof source.r === 'number' ? source.r : typeof source.x === 'number' ? source.x : typeof source._r === 'number' ? source._r : null;
133
+ const g = typeof source.g === 'number' ? source.g : typeof source.y === 'number' ? source.y : typeof source._g === 'number' ? source._g : null;
134
+ const b = typeof source.b === 'number' ? source.b : typeof source.z === 'number' ? source.z : typeof source._b === 'number' ? source._b : null;
135
+ if (r == null || g == null || b == null)
136
+ return SKIP;
137
+ return { r, g, b };
138
+ }
139
+ function normalizeTextureUrl(value) {
140
+ if (value == null)
141
+ return null;
142
+ if (typeof value === 'string')
143
+ return value.trim() || null;
144
+ if (typeof value !== 'object')
145
+ return SKIP;
146
+ const source = value;
147
+ if (typeof source.url === 'string')
148
+ return source.url.trim() || null;
149
+ if (typeof source.name === 'string')
150
+ return source.name.trim() || null;
151
+ return SKIP;
152
+ }
153
+ function normalizeMaterialValue(path, value) {
154
+ switch (path) {
155
+ case 'material.albedoColor':
156
+ case 'material.emissiveColor':
157
+ case 'material.pbr.albedoColor':
158
+ case 'material.pbr.reflectivityColor':
159
+ case 'material.pbr.emissiveColor':
160
+ case 'material.pbr.ambientColor':
161
+ case 'material.standard.diffuseColor':
162
+ case 'material.standard.specularColor':
163
+ case 'material.standard.emissiveColor':
164
+ case 'material.standard.ambientColor':
165
+ return normalizeColor3(value);
166
+ case 'material.metallic':
167
+ case 'material.roughness':
168
+ case 'material.alpha':
169
+ case 'material.pbr.baseWeight':
170
+ case 'material.pbr.microSurface':
171
+ case 'material.pbr.lightFalloff':
172
+ case 'material.standard.specularPower':
173
+ return typeof value === 'number' && Number.isFinite(value) ? value : SKIP;
174
+ case 'material.backFaceCulling':
175
+ case 'material.standard.useSpecularOverAlpha':
176
+ return typeof value === 'boolean' ? value : SKIP;
177
+ case 'material.albedoTexture.url':
178
+ case 'material.normalTexture.url':
179
+ case 'material.metallicTexture.url':
180
+ return normalizeTextureUrl(value);
181
+ default:
182
+ return SKIP;
183
+ }
184
+ }
185
+ function stableNodeSegment(node) {
186
+ const candidates = [node?.name, node?.id];
187
+ for (const candidate of candidates) {
188
+ if (typeof candidate !== 'string')
189
+ continue;
190
+ const trimmed = candidate.trim();
191
+ if (trimmed)
192
+ return trimmed;
193
+ }
194
+ return null;
195
+ }
196
+ function matchesNodeSegment(candidate, expected) {
197
+ if (!candidate)
198
+ return false;
199
+ if (candidate === expected)
200
+ return true;
201
+ const suffix = candidate.includes(':') ? candidate.slice(candidate.lastIndexOf(':') + 1) : candidate;
202
+ return suffix === expected;
203
+ }
204
+ function buildOwnerNodePath(ownerNode, rootNode) {
205
+ if (ownerNode === rootNode)
206
+ return '';
207
+ const segments = [];
208
+ let current = ownerNode;
209
+ while (current && current !== rootNode) {
210
+ const segment = stableNodeSegment(current);
211
+ if (!segment)
212
+ return null;
213
+ segments.push(segment);
214
+ current = current.parent ?? null;
215
+ }
216
+ if (current !== rootNode)
217
+ return null;
218
+ return segments.reverse().join('/');
219
+ }
220
+ function findMaterialOwnerInRoot(rootNode, material) {
221
+ if (!rootNode)
222
+ return null;
223
+ if (rootNode.material === material)
224
+ return rootNode;
225
+ const childMeshes = rootNode.getChildMeshes?.(false) ?? [];
226
+ return childMeshes.find((mesh) => mesh?.material === material) ?? null;
227
+ }
228
+ function findMaterialOwnerInScene(scene, material) {
229
+ const meshes = scene?.meshes ?? [];
230
+ return meshes.find((mesh) => mesh?.material === material) ?? null;
231
+ }
232
+ function resolveRuntimeMaterialProperty(material, path) {
233
+ switch (path) {
234
+ case 'material.albedoColor':
235
+ return 'albedoColor' in material ? 'albedoColor' : 'diffuseColor' in material ? 'diffuseColor' : null;
236
+ case 'material.emissiveColor':
237
+ return 'emissiveColor' in material ? 'emissiveColor' : null;
238
+ case 'material.metallic':
239
+ return 'metallic' in material ? 'metallic' : null;
240
+ case 'material.roughness':
241
+ return 'roughness' in material ? 'roughness' : null;
242
+ case 'material.alpha':
243
+ return 'alpha' in material ? 'alpha' : null;
244
+ case 'material.backFaceCulling':
245
+ return 'backFaceCulling' in material ? 'backFaceCulling' : null;
246
+ case 'material.albedoTexture.url':
247
+ return 'albedoTexture' in material ? 'albedoTexture' : 'diffuseTexture' in material ? 'diffuseTexture' : null;
248
+ case 'material.normalTexture.url':
249
+ return 'normalTexture' in material ? 'normalTexture' : 'bumpTexture' in material ? 'bumpTexture' : null;
250
+ case 'material.metallicTexture.url':
251
+ return 'metallicTexture' in material ? 'metallicTexture' : null;
252
+ case 'material.pbr.albedoColor':
253
+ return '_albedoColor' in material ? '_albedoColor' : 'albedoColor' in material ? 'albedoColor' : null;
254
+ case 'material.pbr.baseWeight':
255
+ return '_baseWeight' in material ? '_baseWeight' : 'baseWeight' in material ? 'baseWeight' : null;
256
+ case 'material.pbr.reflectivityColor':
257
+ return '_reflectivityColor' in material ? '_reflectivityColor' : 'reflectivityColor' in material ? 'reflectivityColor' : null;
258
+ case 'material.pbr.microSurface':
259
+ return '_microSurface' in material ? '_microSurface' : 'microSurface' in material ? 'microSurface' : null;
260
+ case 'material.pbr.emissiveColor':
261
+ return '_emissiveColor' in material ? '_emissiveColor' : 'emissiveColor' in material ? 'emissiveColor' : null;
262
+ case 'material.pbr.ambientColor':
263
+ return '_ambientColor' in material ? '_ambientColor' : 'ambientColor' in material ? 'ambientColor' : null;
264
+ case 'material.pbr.lightFalloff':
265
+ return '_lightFalloff' in material ? '_lightFalloff' : 'lightFalloff' in material ? 'lightFalloff' : null;
266
+ case 'material.standard.diffuseColor':
267
+ return 'diffuseColor' in material ? 'diffuseColor' : '_diffuseColor' in material ? '_diffuseColor' : null;
268
+ case 'material.standard.specularColor':
269
+ return 'specularColor' in material ? 'specularColor' : '_specularColor' in material ? '_specularColor' : null;
270
+ case 'material.standard.specularPower':
271
+ return 'specularPower' in material ? 'specularPower' : '_specularPower' in material ? '_specularPower' : null;
272
+ case 'material.standard.emissiveColor':
273
+ return 'emissiveColor' in material ? 'emissiveColor' : '_emissiveColor' in material ? '_emissiveColor' : null;
274
+ case 'material.standard.ambientColor':
275
+ return 'ambientColor' in material ? 'ambientColor' : '_ambientColor' in material ? '_ambientColor' : null;
276
+ case 'material.standard.useSpecularOverAlpha':
277
+ return 'useSpecularOverAlpha' in material ? 'useSpecularOverAlpha' : '_useSpecularOverAlpha' in material ? '_useSpecularOverAlpha' : null;
278
+ default:
279
+ return null;
280
+ }
281
+ }
282
+ function resolveMaterialOwner(options, material) {
283
+ const explicitOwner = hasMaterial(options.entity) && options.entity.material === material ? options.entity : null;
284
+ const candidateBindings = [];
285
+ if (options.selectedEntity) {
286
+ const selectedBinding = options.resolveBinding(options.selectedEntity);
287
+ const selectedOwner = findMaterialOwnerInRoot(selectedBinding?.rootNode ?? options.selectedEntity, material);
288
+ candidateBindings.push({
289
+ owner: selectedOwner,
290
+ binding: selectedOwner ? (options.resolveBinding(selectedOwner) ?? selectedBinding) : selectedBinding,
291
+ });
292
+ }
293
+ if (explicitOwner)
294
+ candidateBindings.push({ owner: explicitOwner, binding: options.resolveBinding(explicitOwner) });
295
+ const sceneOwner = findMaterialOwnerInScene(options.scene, material);
296
+ if (sceneOwner)
297
+ candidateBindings.push({ owner: sceneOwner, binding: options.resolveBinding(sceneOwner) });
298
+ for (const candidate of candidateBindings) {
299
+ if (!candidate.owner || !candidate.binding)
300
+ continue;
301
+ const ownerNodePath = buildOwnerNodePath(candidate.owner, candidate.binding.rootNode);
302
+ if (ownerNodePath == null)
303
+ continue;
304
+ return { runtimeNode: candidate.owner, binding: candidate.binding, ownerNodePath };
305
+ }
306
+ return null;
307
+ }
308
+ export function adaptMaterialPropertyChange(options) {
309
+ const material = hasMaterial(options.entity)
310
+ ? options.entity.material
311
+ : isMaterialLike(options.entity)
312
+ ? options.entity
313
+ : null;
314
+ if (!material)
315
+ return null;
316
+ const materialRuntimeKind = resolveMaterialRuntimeKind(material);
317
+ const path = normalizePropertyKey(options.propertyKey, materialRuntimeKind);
318
+ if (!path)
319
+ return null;
320
+ const owner = resolveMaterialOwner(options, material);
321
+ if (!owner)
322
+ return null;
323
+ const before = normalizeMaterialValue(path, options.oldValue);
324
+ const after = normalizeMaterialValue(path, options.newValue);
325
+ if (before === SKIP || after === SKIP || sameValue(before, after))
326
+ return null;
327
+ return {
328
+ runtimeNode: owner.runtimeNode,
329
+ binding: owner.binding,
330
+ ownerNodePath: owner.ownerNodePath,
331
+ target: owner.ownerNodePath ? 'childMaterial' : 'root',
332
+ materialName: typeof material.name === 'string' && material.name.trim() ? material.name.trim() : '(unnamed-material)',
333
+ materialType: typeof material.getClassName === 'function' ? material.getClassName() : null,
334
+ materialRuntimeKind,
335
+ path,
336
+ before,
337
+ after,
338
+ };
339
+ }
340
+ export function applyMaterialValueToRuntimeMaterial(material, scene, path, value, options = {}) {
341
+ const writableMaterial = material;
342
+ if (!writableMaterial || typeof writableMaterial !== 'object')
343
+ return false;
344
+ const property = resolveRuntimeMaterialProperty(writableMaterial, path);
345
+ if (!property)
346
+ return false;
347
+ if (path === 'material.albedoColor'
348
+ || path === 'material.emissiveColor'
349
+ || path === 'material.pbr.albedoColor'
350
+ || path === 'material.pbr.reflectivityColor'
351
+ || path === 'material.pbr.emissiveColor'
352
+ || path === 'material.pbr.ambientColor'
353
+ || path === 'material.standard.diffuseColor'
354
+ || path === 'material.standard.specularColor'
355
+ || path === 'material.standard.emissiveColor'
356
+ || path === 'material.standard.ambientColor') {
357
+ if (!value || typeof value !== 'object')
358
+ return false;
359
+ const color = value;
360
+ const target = writableMaterial[property];
361
+ if (target?.copyFromFloats) {
362
+ target.copyFromFloats(color.r, color.g, color.b);
363
+ return true;
364
+ }
365
+ const Color3 = getBabylonRuntime(options.babylon)?.Color3;
366
+ writableMaterial[property] = Color3 ? new Color3(color.r, color.g, color.b) : { r: color.r, g: color.g, b: color.b };
367
+ return true;
368
+ }
369
+ if (path === 'material.albedoTexture.url' || path === 'material.normalTexture.url' || path === 'material.metallicTexture.url') {
370
+ if (value == null) {
371
+ writableMaterial[property] = null;
372
+ return true;
373
+ }
374
+ if (typeof value !== 'string' || !scene)
375
+ return false;
376
+ const Texture = getBabylonRuntime(options.babylon)?.Texture;
377
+ if (!Texture)
378
+ return false;
379
+ writableMaterial[property] = new Texture(value, scene, false, false);
380
+ return true;
381
+ }
382
+ writableMaterial[property] = value;
383
+ return true;
384
+ }
385
+ export function resolveMaterialOwnerNode(rootNode, ownerNodePath) {
386
+ if (!rootNode)
387
+ return null;
388
+ if (!ownerNodePath)
389
+ return rootNode;
390
+ const segments = ownerNodePath.split('/').filter(Boolean);
391
+ let current = rootNode;
392
+ let index = 0;
393
+ if (segments.length > 0 && matchesNodeSegment(stableNodeSegment(current), segments[0]))
394
+ index = 1;
395
+ for (; index < segments.length; index += 1) {
396
+ const segment = segments[index];
397
+ const children = current?.getChildren?.() ?? [];
398
+ const next = children.find((child) => matchesNodeSegment(stableNodeSegment(child), segment)) ?? null;
399
+ if (!next)
400
+ return null;
401
+ current = next;
402
+ }
403
+ return current;
404
+ }
405
+ export function applyMaterialValueToRuntimeNode(ownerNode, scene, path, value, options = {}) {
406
+ return applyMaterialValueToRuntimeMaterial(ownerNode?.material, scene, path, value, options);
407
+ }
408
+ //# sourceMappingURL=material-property-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-property-adapter.js","sourceRoot":"","sources":["../src/material-property-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,sBAAsB;IACtB,wBAAwB;IACxB,mBAAmB;IACnB,oBAAoB;IACpB,gBAAgB;IAChB,0BAA0B;IAC1B,4BAA4B;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,0BAA0B;IAC1B,yBAAyB;IACzB,gCAAgC;IAChC,2BAA2B;IAC3B,4BAA4B;IAC5B,2BAA2B;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AC;IAEpC,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1D,IAAI,OAAO,GAAQ,QAAQ,CAAC;IAC5B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,kBAAkB,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAE,CAAC;QAAE,KAAK,GAAG,CAAC,CAAC;IACnG,OAAO,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,OAAO,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC;QAC1G,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,SAA6B,EAC7B,KAA0B,EAC1B,IAAkB,EAClB,KAAoB,EACpB,UAAuC,EAAE;IAEzC,OAAO,mCAAmC,CAAE,SAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACxG,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { PersistentBinding } from '@fps-games/editor-protocol';
2
+ import { type BrowserHost } from '@fps-games/editor-browser';
3
+ import type { CanonicalMaterialChange, CanonicalOutlineChange, CanonicalTransformChange, RuntimeNode, RuntimeScene } from './types';
4
+ export type EditorRuntimeMonitorChange = {
5
+ time: number;
6
+ obj: RuntimeNode;
7
+ binding: PersistentBinding | null;
8
+ prop: string;
9
+ old: unknown;
10
+ new: unknown;
11
+ };
12
+ export interface EditorRuntimeMonitorOptions {
13
+ host?: BrowserHost;
14
+ getScene: () => RuntimeScene | null;
15
+ getSelectedEntity: () => RuntimeNode | null;
16
+ getSelectedEntities?: () => RuntimeNode[];
17
+ resolveBinding: (node: RuntimeNode) => PersistentBinding | null;
18
+ onSelectionChanged?: (node: RuntimeNode | null) => void;
19
+ onDocumentChanged?: () => void;
20
+ onChangesFlushed?: (changes: EditorRuntimeMonitorChange[]) => void;
21
+ onTransformChange?: (change: CanonicalTransformChange) => boolean | void;
22
+ onMaterialChange?: (change: CanonicalMaterialChange) => boolean | void;
23
+ onOutlineChange?: (change: CanonicalOutlineChange) => boolean | void;
24
+ onTransformBatchBegin?: () => void;
25
+ onTransformBatchEnd?: () => void;
26
+ debounceMs?: number;
27
+ log?: (message: string, data?: Record<string, unknown>) => void;
28
+ }
29
+ export interface EditorRuntimeMonitor {
30
+ readonly isDragging: boolean;
31
+ start(): void;
32
+ stop(): void;
33
+ reset(): void;
34
+ flush(): void;
35
+ rebase(nextNode?: RuntimeNode | null): void;
36
+ recordCanonicalMaterialChange(change: CanonicalMaterialChange): void;
37
+ }
38
+ export declare function createEditorRuntimeMonitor(options: EditorRuntimeMonitorOptions): EditorRuntimeMonitor;
39
+ //# sourceMappingURL=monitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../src/monitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGhF,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,YAAY,EAEb,MAAM,SAAS,CAAC;AAEj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