@woosh/meep-engine 2.46.29 → 2.46.30

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 (165) hide show
  1. package/editor/Editor.js +793 -0
  2. package/editor/SelectionVisualizer.js +148 -0
  3. package/editor/actions/concrete/ActionUpdateTexture.js +21 -0
  4. package/editor/actions/concrete/ArrayCopyAction.js +39 -0
  5. package/editor/actions/concrete/ComponentAddAction.js +47 -0
  6. package/editor/actions/concrete/ComponentRemoveAction.js +38 -0
  7. package/editor/actions/concrete/EntityCreateAction.js +47 -0
  8. package/editor/actions/concrete/EntityRemoveAction.js +51 -0
  9. package/editor/actions/concrete/ModifyPatchSampler2DAction.js +118 -0
  10. package/editor/actions/concrete/ModifyPatchSampler2DAction.spec.js +30 -0
  11. package/editor/actions/concrete/ModifyPatchTextureArray2DAction.js +182 -0
  12. package/editor/actions/concrete/PaintTerrainOverlayAction.js +45 -0
  13. package/editor/actions/concrete/PatchTerrainHeightAction.js +67 -0
  14. package/editor/actions/concrete/PatchTerrainTextureAction.js +152 -0
  15. package/editor/actions/concrete/SelectionAddAction.js +36 -0
  16. package/editor/actions/concrete/SelectionClearAction.js +22 -0
  17. package/editor/actions/concrete/SelectionRemoveAction.js +30 -0
  18. package/editor/actions/concrete/TransformModifyAction.js +46 -0
  19. package/editor/actions/concrete/WriteGridValueAction.js +46 -0
  20. package/editor/ecs/EditorEntity.js +12 -0
  21. package/editor/ecs/EditorEntitySystem.js +14 -0
  22. package/editor/ecs/component/FieldDescriptor.js +34 -0
  23. package/editor/ecs/component/FieldValueAdapter.js +20 -0
  24. package/editor/ecs/component/TypeEditor.js +33 -0
  25. package/editor/ecs/component/TypeSchema.d.ts +38 -0
  26. package/editor/ecs/component/createFieldEditor.js +92 -0
  27. package/editor/ecs/component/createObjectEditor.js +361 -0
  28. package/editor/ecs/component/editors/ColorEditor.js +39 -0
  29. package/editor/ecs/component/editors/HTMLElementEditor.js +17 -0
  30. package/editor/ecs/component/editors/ImagePathEditor.js +82 -0
  31. package/editor/ecs/component/editors/LargeStrongEditor.js +107 -0
  32. package/editor/ecs/component/editors/NumericIntervalEditor.js +86 -0
  33. package/editor/ecs/component/editors/ObservedBooleanEditor.js +13 -0
  34. package/editor/ecs/component/editors/ObservedEnumEditor.js +32 -0
  35. package/editor/ecs/component/editors/ObservedIntegerEditor.js +43 -0
  36. package/editor/ecs/component/editors/ObservedStringEditor.js +51 -0
  37. package/editor/ecs/component/editors/Sampler2DEditor.js +221 -0
  38. package/editor/ecs/component/editors/collection/ListEditor.js +83 -0
  39. package/editor/ecs/component/editors/common/BitFlagsEditor.js +80 -0
  40. package/editor/ecs/component/editors/common/EnumEditor.js +41 -0
  41. package/editor/ecs/component/editors/common/makeV3_editor.js +85 -0
  42. package/editor/ecs/component/editors/common/noEditor.js +9 -0
  43. package/editor/ecs/component/editors/ecs/GridObstacleEditor.js +17 -0
  44. package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.js +16 -0
  45. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +225 -0
  46. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +17 -0
  47. package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +18 -0
  48. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +58 -0
  49. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +58 -0
  50. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +21 -0
  51. package/editor/ecs/component/editors/ecs/Trail2DEditor.js +33 -0
  52. package/editor/ecs/component/editors/ecs/TransformEditor.js +23 -0
  53. package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.js +21 -0
  54. package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.js +95 -0
  55. package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.js +18 -0
  56. package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.js +22 -0
  57. package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.js +20 -0
  58. package/editor/ecs/component/editors/geom/QuaternionEditor.js +63 -0
  59. package/editor/ecs/component/editors/geom/Vector1Editor.js +57 -0
  60. package/editor/ecs/component/editors/geom/Vector2Editor.js +11 -0
  61. package/editor/ecs/component/editors/geom/Vector3Editor.js +13 -0
  62. package/editor/ecs/component/editors/geom/Vector4Editor.js +12 -0
  63. package/editor/ecs/component/editors/primitive/ArrayEditor.js +46 -0
  64. package/editor/ecs/component/editors/primitive/BooleanEditor.js +27 -0
  65. package/editor/ecs/component/editors/primitive/FunctionEditor.js +29 -0
  66. package/editor/ecs/component/editors/primitive/NumberEditor.js +60 -0
  67. package/editor/ecs/component/editors/primitive/ObjectEditor.js +12 -0
  68. package/editor/ecs/component/editors/primitive/StringEditor.js +31 -0
  69. package/editor/ecs/component/editors/three/BufferGeometryEditor.js +28 -0
  70. package/editor/ecs/component/editors/three/MaterialEditor.js +27 -0
  71. package/editor/ecs/component/editors/three/MeshEditor.js +35 -0
  72. package/editor/ecs/component/editors/three/TextureEditor.js +112 -0
  73. package/editor/ecs/component/findNearestRegisteredType.js +59 -0
  74. package/editor/ecs/component/prototypeObjectEditor.js +379 -0
  75. package/editor/enableEditor.js +85 -0
  76. package/editor/library/MeshLibrary.js +33 -0
  77. package/editor/process/DisableGameUIProcess.js +43 -0
  78. package/editor/process/EditorProcess.js +35 -0
  79. package/editor/process/ObstacleGridDisplayProcess.js +120 -0
  80. package/editor/process/ProcessEngine.js +123 -0
  81. package/editor/process/SymbolicDisplayProcess.js +132 -0
  82. package/editor/process/symbolic/ComponentSymbolicDisplay.js +34 -0
  83. package/editor/process/symbolic/SymbolicDisplayInternalAPI.js +159 -0
  84. package/editor/process/symbolic/buildThreeJSHelperEntity.js +36 -0
  85. package/editor/process/symbolic/make3DSymbolicDisplay.js +91 -0
  86. package/editor/process/symbolic/makeCameraSymbolicDisplay.js +32 -0
  87. package/editor/process/symbolic/makeGridPositionSymbolDisplay.js +176 -0
  88. package/editor/process/symbolic/makeHelperBoxGeometry.js +44 -0
  89. package/editor/process/symbolic/makeHelperSphereGeometry.js +73 -0
  90. package/editor/process/symbolic/makeLightSymbolicDisplay.js +77 -0
  91. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.js +146 -0
  92. package/editor/process/symbolic/makePathSymbolicDisplay.js +105 -0
  93. package/editor/process/symbolic/makePositionedIconDisplaySymbol.js +74 -0
  94. package/editor/process/symbolic/makeSocketsSymbolicDisplay.js +153 -0
  95. package/editor/process/symbolic/makeSolidArrowGeometry.js +391 -0
  96. package/editor/process/symbolic/makeSoundEmitterSymbolicDisplay.js +89 -0
  97. package/editor/process/symbolic/makeStoryTriggerSetAreaDisplay.js +114 -0
  98. package/editor/process/symbolic/synchronizeTransform.js +50 -0
  99. package/editor/tools/FoliagePaintTool.js +168 -0
  100. package/editor/tools/GridPaintTool.js +247 -0
  101. package/editor/tools/SelectionTool.js +407 -0
  102. package/editor/tools/TopDownCameraControlTool.js +59 -0
  103. package/editor/tools/TransformTool.js +370 -0
  104. package/editor/tools/engine/Tool.js +121 -0
  105. package/editor/tools/engine/ToolEngine.js +193 -0
  106. package/editor/tools/engine/ToolState.js +9 -0
  107. package/editor/tools/engine/ToolStateMachine.js +53 -0
  108. package/editor/tools/paint/TerrainHeightPaintTool.js +297 -0
  109. package/editor/tools/paint/TerrainPaintTool.js +211 -0
  110. package/editor/tools/paint/TerrainTexturePaintTool.js +193 -0
  111. package/editor/tools/paint/prototypeTerrainEditor.js +135 -0
  112. package/editor/tools/v2/BlenderCameraOrientationGizmo.d.ts +50 -0
  113. package/editor/tools/v2/BlenderCameraOrientationGizmo.js +500 -0
  114. package/editor/tools/v2/TransformControls.d.ts +20 -0
  115. package/editor/tools/v2/TransformControls.js +1782 -0
  116. package/editor/tools/v2/prototypeTransformControls.js +92 -0
  117. package/editor/view/EditorView.js +462 -0
  118. package/editor/view/GridPickCoordinateView.js +88 -0
  119. package/editor/view/ecs/ComponentControlFactory.js +48 -0
  120. package/editor/view/ecs/ComponentControlView.js +214 -0
  121. package/editor/view/ecs/EntityEditor.js +258 -0
  122. package/editor/view/ecs/EntityList.js +258 -0
  123. package/editor/view/ecs/components/BlackboardController.js +50 -0
  124. package/editor/view/ecs/components/DatGuiController.js +216 -0
  125. package/editor/view/ecs/components/FogOfWarController.js +78 -0
  126. package/editor/view/ecs/components/FogOfWarRevealerController.js +44 -0
  127. package/editor/view/ecs/components/GeneratedArmyController.js +42 -0
  128. package/editor/view/ecs/components/GridObstacleController.js +72 -0
  129. package/editor/view/ecs/components/GridPositionController.js +40 -0
  130. package/editor/view/ecs/components/HeadsUpDisplayController.js +30 -0
  131. package/editor/view/ecs/components/HighlightController.js +47 -0
  132. package/editor/view/ecs/components/MeshController.js +125 -0
  133. package/editor/view/ecs/components/PathFollowerController.js +87 -0
  134. package/editor/view/ecs/components/TagController.js +80 -0
  135. package/editor/view/ecs/components/TerrainController.js +225 -0
  136. package/editor/view/ecs/components/TransformController.js +103 -0
  137. package/editor/view/ecs/components/UnitShopController.js +112 -0
  138. package/editor/view/ecs/components/army/ArmyController.js +130 -0
  139. package/editor/view/ecs/components/color/GaugeView.js +107 -0
  140. package/editor/view/ecs/components/common/AutoCanvasView.js +53 -0
  141. package/editor/view/ecs/components/common/LineView.js +17 -0
  142. package/editor/view/ecs/components/common/NumberController.js +112 -0
  143. package/editor/view/ecs/components/common/NumericIntervalController.js +64 -0
  144. package/editor/view/ecs/components/gui/GUIElementController.js +117 -0
  145. package/editor/view/ecs/components/items/ItemContainerController.js +132 -0
  146. package/editor/view/ecs/components/items/ItemContainerController.stories.js +50 -0
  147. package/editor/view/ecs/components/items/ItemController.js +52 -0
  148. package/editor/view/ecs/components/particles/ColorParameterLUTController.js +444 -0
  149. package/editor/view/ecs/components/particles/ParameterTrackController.js +51 -0
  150. package/editor/view/ecs/components/particles/ParticleEmitterController.js +213 -0
  151. package/editor/view/ecs/components/particles/ParticleLayerController.js +213 -0
  152. package/editor/view/ecs/components/particles/ScalarParameterLUTController.js +401 -0
  153. package/editor/view/ecs/components/sockets/AttachmentSocketsController.js +51 -0
  154. package/editor/view/ecs/components/sound/SoundEmitterController.js +137 -0
  155. package/editor/view/ecs/components/story/StoryTriggerSetController.js +214 -0
  156. package/editor/view/ecs/components/unit/AuraController.js +45 -0
  157. package/editor/view/library/MeshLibraryView.js +164 -0
  158. package/editor/view/node-graph/NodeGraphEditorView.js +170 -0
  159. package/editor/view/node-graph/NodeGraphView.js +453 -0
  160. package/editor/view/node-graph/NodeView.js +135 -0
  161. package/editor/view/node-graph/PortView.js +69 -0
  162. package/editor/view/process/ProcessView.js +63 -0
  163. package/editor/view/tools/ToolSettingsView.js +143 -0
  164. package/editor/view/tools/ToolView.js +58 -0
  165. package/package.json +2 -1
@@ -0,0 +1,193 @@
1
+ import { TerrainPaintTool } from "./TerrainPaintTool.js";
2
+ import { convertSampler2D2DataURL } from "../../../src/engine/graphics/texture/sampler/convertSampler2D2DataURL.js";
3
+ import { obtainTerrain } from "../../../src/engine/ecs/terrain/util/obtainTerrain.js";
4
+ import { ModifyPatchTextureArray2DAction } from "../../actions/concrete/ModifyPatchTextureArray2DAction.js";
5
+ import { ArrayCopyAction } from "../../actions/concrete/ArrayCopyAction.js";
6
+ import { ActionUpdateTexture } from "../../actions/concrete/ActionUpdateTexture.js";
7
+
8
+ export class TerrainTexturePaintTool extends TerrainPaintTool {
9
+ constructor() {
10
+ super();
11
+
12
+ this.name = "texture-paint-terrain";
13
+
14
+ /**
15
+ *
16
+ * @type {number}
17
+ */
18
+ this.settings.splatIndex = 0;
19
+
20
+ /**
21
+ *
22
+ * @type {Float32Array}
23
+ * @private
24
+ */
25
+ this.__splatMapScratch = new Float32Array(0);
26
+
27
+ this.__iconLayer = null;
28
+ }
29
+
30
+
31
+ updateIcon(editor) {
32
+
33
+ /**
34
+ *
35
+ * @type {Terrain}
36
+ */
37
+ const terrain = obtainTerrain(editor.engine.entityManager.dataset);
38
+
39
+ if (terrain === null) {
40
+ // no terrain
41
+ return;
42
+ }
43
+
44
+ /**
45
+ *
46
+ * @type {TerrainLayer}
47
+ */
48
+ const layer = terrain.layers.get(this.settings.splatIndex);
49
+
50
+ if (layer === this.__iconLayer) {
51
+ return;
52
+ }
53
+
54
+ this.__iconLayer = layer;
55
+
56
+ this.buildIcon(terrain);
57
+ }
58
+
59
+ /**
60
+ *
61
+ * @param {Terrain} terrain
62
+ */
63
+ buildIcon(terrain) {
64
+
65
+ /**
66
+ *
67
+ * @type {TerrainLayer}
68
+ */
69
+ const layer = terrain.layers.get(this.settings.splatIndex);
70
+
71
+ if (layer === undefined) {
72
+ return;
73
+ }
74
+
75
+ const url = convertSampler2D2DataURL(layer.diffuse);
76
+
77
+ this.icon.set(url);
78
+ }
79
+
80
+ initialize() {
81
+ super.initialize();
82
+ }
83
+
84
+ shutdown() {
85
+ super.shutdown();
86
+ }
87
+
88
+ async paint(timeDelta) {
89
+
90
+ const power = this.settings.brushStrength * timeDelta;
91
+
92
+ /**
93
+ *
94
+ * @type {Terrain}
95
+ */
96
+ const terrain = this.terrain;
97
+
98
+ const brushPosition = this.__brushPosition;
99
+ const brushSize = this.settings.brushSize;
100
+
101
+ const terrainSize = terrain.size;
102
+
103
+ const terrainHeight = terrainSize.y;
104
+ const terrainWidth = terrainSize.x;
105
+
106
+ const uv_x = brushPosition.x / terrainWidth;
107
+ const uv_y = brushPosition.y / terrainHeight;
108
+
109
+ const uv_w = brushSize / terrainWidth;
110
+ const uv_h = brushSize / terrainHeight;
111
+
112
+ const uv_x0 = uv_x - uv_w / 2;
113
+ const uv_x1 = uv_x + uv_w / 2;
114
+
115
+ const uv_y0 = uv_y - uv_h / 2;
116
+ const uv_y1 = uv_y + uv_h / 2;
117
+
118
+ const marker = this.settings.marker;
119
+
120
+ const direction = this.modifiers.shift ? -1 : 1;
121
+
122
+ const speed = power * direction;
123
+
124
+ /**
125
+ *
126
+ * @type {Float32Array}
127
+ */
128
+ const weightData = this.__splatMapScratch;
129
+
130
+ /**
131
+ *
132
+ * @type {SplatMapping}
133
+ */
134
+ const splat = terrain.splat;
135
+
136
+ const splatWidth = splat.size.x;
137
+ const splatHeight = splat.size.y;
138
+
139
+
140
+ const h_x0 = uv_x0 * splatWidth;
141
+ const h_x1 = uv_x1 * splatWidth;
142
+
143
+ const h_y0 = uv_y0 * splatHeight;
144
+ const h_y1 = uv_y1 * splatHeight;
145
+
146
+ const x0 = Math.ceil(h_x0);
147
+ const x1 = Math.floor(h_x1);
148
+
149
+ const y0 = Math.ceil(h_y0);
150
+ const y1 = Math.floor(h_y1);
151
+
152
+ const splatIndex = this.settings.splatIndex;
153
+
154
+ //create action
155
+
156
+ // const m_action = new ModifyPatchSampler2DAction(splat_layer_sampler, [x0, y0, x1, y1]);
157
+ const m_action = new ModifyPatchTextureArray2DAction(weightData, [splat.size.x, splat.size.y, splat.depth], [x0, y0, x1, y1]);
158
+
159
+ m_action.applyWeightStampToLayer(
160
+ uv_x * splat.size.x, uv_y * splat.size.y,
161
+ marker, splatIndex, speed,
162
+ 0, 255
163
+ );
164
+
165
+ await this.editor.actions.doMany([
166
+ m_action,
167
+ new ArrayCopyAction(weightData, splat.weightData),
168
+ new ActionUpdateTexture(splat.weightTexture)
169
+ ]);
170
+ }
171
+
172
+ start() {
173
+ super.start();
174
+
175
+ /**
176
+ *
177
+ * @type {Terrain}
178
+ */
179
+ const terrain = this.terrain;
180
+
181
+ const splat = terrain.splat;
182
+
183
+ const weightData = splat.weightData;
184
+
185
+ /**
186
+ *
187
+ * @type {Float32Array}
188
+ */
189
+ this.__splatMapScratch = new Float32Array(weightData);
190
+
191
+ this.editor.actions.mark('paint terrain texture');
192
+ }
193
+ }
@@ -0,0 +1,135 @@
1
+ import { EngineHarness } from "../../../src/engine/EngineHarness.js";
2
+ import { GizmoRenderingPlugin } from "../../../src/engine/graphics/render/gizmo/GizmoRenderingPlugin.js";
3
+ import { GameAssetType } from "../../../src/engine/asset/GameAssetType.js";
4
+ import { TextureAssetLoader } from "../../../src/engine/asset/loaders/texture/TextureAssetLoader.js";
5
+ import Vector2 from "../../../src/core/geom/Vector2.js";
6
+ import { enableEditor } from "../../enableEditor.js";
7
+ import { initializeEditor } from "../../../../model/game/initializeEditor.js";
8
+
9
+ import '../../../../../../css/game.scss';
10
+ import '../../../../../../css/editor/EntityEditorView.scss';
11
+ import '../../../../../../css/editor/EditorView.scss';
12
+ import { TerrainLayer } from "../../../src/engine/ecs/terrain/ecs/layers/TerrainLayer.js";
13
+ import Terrain from "../../../src/engine/ecs/terrain/ecs/Terrain.js";
14
+ import Vector3 from "../../../src/core/geom/Vector3.js";
15
+ import { BlenderCameraOrientationGizmo } from "../v2/BlenderCameraOrientationGizmo.js";
16
+ import { Transform } from "../../../src/engine/ecs/transform/Transform.js";
17
+ import TopDownCameraController from "../../../src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js";
18
+
19
+ new EngineHarness()
20
+ .initialize({
21
+ configuration(config, engine) {
22
+
23
+ config.addPlugin(GizmoRenderingPlugin);
24
+
25
+ config.addLoader(GameAssetType.Texture, new TextureAssetLoader());
26
+ }
27
+ }).then(main);
28
+
29
+ /**
30
+ *
31
+ * @param {Engine} engine
32
+ * @returns {Promise<void>}
33
+ */
34
+ async function main(engine) {
35
+ await EngineHarness.buildBasics({
36
+ engine,
37
+ focus: new Vector3(128, 0, 128),
38
+ distance: 30,
39
+ terrainResolution: 1,
40
+ terrainSize: new Vector2(128, 128),
41
+ enableWater: false
42
+ });
43
+
44
+ const ecd = engine.entityManager.dataset;
45
+ const terrain_entity = ecd.getAnyComponent(Terrain);
46
+ const terrain = terrain_entity.component;
47
+
48
+ terrain.samplerHeight.resize(256, 256);
49
+ await terrain.updateHeights();
50
+
51
+
52
+ terrain.layers.addLayer(TerrainLayer.from("data/textures/materials/terrain_township_set/512/Grass_1.png", 20, 20));
53
+ terrain.layers.addLayer(TerrainLayer.from("data/textures/materials/terrain_township_set/512/Ground_1.png", 20, 20));
54
+ terrain.layers.addLayer(TerrainLayer.from("data/textures/materials/RAYGEAS/Stylized Ground Textures/Sand_2/Sand_2_AlbedoSmoothness.png", 20, 20));
55
+ terrain.layers.buildTexture();
56
+
57
+
58
+ terrain.splat.resize(256, 256, terrain.layers.count())
59
+
60
+ await terrain.layers.loadTextureData(engine.assetManager);
61
+
62
+ terrain.splat.fillLayerWeights(0, 50);
63
+
64
+ terrain.splat.weightTexture.needsUpdate = true;
65
+ terrain.updateMaterial();
66
+
67
+ const editor_controls = enableEditor(engine, initializeEditor);
68
+
69
+ editor_controls.enable();
70
+
71
+ const camera_orientation_gizmo = new BlenderCameraOrientationGizmo();
72
+
73
+ camera_orientation_gizmo.css({
74
+ position: 'absolute',
75
+ top: 0,
76
+ right: 0,
77
+ pointerEvents: 'auto'
78
+ });
79
+
80
+
81
+ camera_orientation_gizmo.on.axisSelected.add((axis) => {
82
+ /**
83
+ *
84
+ * @type {TopDownCameraController}
85
+ */
86
+ const tdcc = editor_controls.editor.cameraEntity.getComponent(TopDownCameraController);
87
+
88
+ tdcc.pitch = 0;
89
+ tdcc.yaw = 0;
90
+ tdcc.roll = 0;
91
+
92
+ switch (axis) {
93
+ case 'x':
94
+ tdcc.yaw = Math.PI / 2;
95
+ break;
96
+ case '-x':
97
+ tdcc.yaw = -Math.PI / 2;
98
+ break;
99
+ case 'z':
100
+ tdcc.yaw = 0;
101
+ break;
102
+ case '-z':
103
+ tdcc.yaw = Math.PI;
104
+ break;
105
+ case 'y':
106
+ tdcc.pitch = Math.PI / 2;
107
+ break;
108
+ case '-y':
109
+ tdcc.pitch = -Math.PI / 2;
110
+ break;
111
+ }
112
+ });
113
+
114
+ engine.gameView.addChild(camera_orientation_gizmo);
115
+
116
+ engine.graphics.on.preRender.add(() => {
117
+ const camera_transform = editor_controls.editor.cameraEntity.getComponent(Transform);
118
+
119
+ if (camera_transform === null) {
120
+ return;
121
+ }
122
+
123
+ camera_orientation_gizmo.orientation = camera_transform.rotation;
124
+
125
+ camera_orientation_gizmo.update();
126
+ });
127
+
128
+ setTimeout(() => {
129
+ editor_controls.editor.selection.add(terrain_entity.entity);
130
+
131
+ // camera_orientation_gizmo.orientation =;
132
+ }, 100);
133
+
134
+ console.warn(terrain);
135
+ }
@@ -0,0 +1,50 @@
1
+ import View, {IViewSignals} from "../../../src/view/View";
2
+ import Quaternion from "../../../src/core/geom/Quaternion";
3
+ import Signal from "../../../src/core/events/signal/Signal";
4
+
5
+ interface ISignals extends IViewSignals {
6
+ readonly axisSelected: Signal<string>
7
+ }
8
+
9
+ interface IDirectionStyle {
10
+ near_fill?: string
11
+ near_stroke_width?: number
12
+ near_stroke_color?: string
13
+
14
+ far_fill?: string
15
+ far_stroke_width?: number
16
+ far_stroke_color?: string
17
+ }
18
+
19
+ interface IOptions {
20
+ size?: number,
21
+ padding?: number,
22
+ bubbleSizePrimary?: number,
23
+ bubbleSizeSecondary?: number,
24
+ lineWidth?: number,
25
+ fontSize?: string,
26
+ fontFamily?: string,
27
+ fontWeight?: string,
28
+ fontColor?: string,
29
+ fontYAdjust?: number,
30
+ selectionFontColor?: string,
31
+ axisStyles?: {
32
+ px?: IDirectionStyle,
33
+ py?: IDirectionStyle,
34
+ pz?: IDirectionStyle,
35
+
36
+ nx?: IDirectionStyle,
37
+ ny?: IDirectionStyle,
38
+ nz?: IDirectionStyle,
39
+ }
40
+ }
41
+
42
+ export class BlenderCameraOrientationGizmo extends View {
43
+ constructor(options?: IOptions)
44
+
45
+ on: ISignals
46
+
47
+ orientation: Quaternion | null
48
+
49
+ update(): void
50
+ }