@tomorrowevening/hermes 0.0.1 → 0.0.3

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 (130) hide show
  1. package/README.md +7 -0
  2. package/dist/hermes.js +2530 -718
  3. package/dist/hermes.umd.cjs +88 -11
  4. package/dist/images/android-chrome-192x192.png +0 -0
  5. package/dist/images/android-chrome-512x512.png +0 -0
  6. package/dist/images/apple-touch-icon.png +0 -0
  7. package/dist/images/favicon-16x16.png +0 -0
  8. package/dist/images/favicon-32x32.png +0 -0
  9. package/dist/images/favicon.ico +0 -0
  10. package/dist/images/milkyWay/dark-s_nx.jpg +0 -0
  11. package/dist/images/milkyWay/dark-s_ny.jpg +0 -0
  12. package/dist/images/milkyWay/dark-s_nz.jpg +0 -0
  13. package/dist/images/milkyWay/dark-s_px.jpg +0 -0
  14. package/dist/images/milkyWay/dark-s_py.jpg +0 -0
  15. package/dist/images/milkyWay/dark-s_pz.jpg +0 -0
  16. package/dist/images/site.webmanifest +1 -0
  17. package/dist/images/uv_grid_opengl.jpg +0 -0
  18. package/dist/index-0a798fe4.js +6862 -0
  19. package/dist/index-7bad599d.css +1 -0
  20. package/dist/index.html +18 -0
  21. package/dist/models/Flair.fbx +0 -0
  22. package/dist/models/Thriller2.fbx +0 -0
  23. package/dist/models/Thriller4.fbx +0 -0
  24. package/dist/style.css +1 -1
  25. package/package.json +9 -4
  26. package/src/core/Application.ts +28 -36
  27. package/src/core/RemoteController.ts +148 -98
  28. package/src/core/remote/BaseRemote.ts +3 -3
  29. package/src/core/remote/RemoteComponents.ts +5 -8
  30. package/src/core/remote/RemoteTheatre.ts +56 -54
  31. package/src/core/remote/RemoteThree.ts +77 -0
  32. package/src/core/remote/RemoteTweakpane.ts +71 -78
  33. package/src/core/types.ts +14 -4
  34. package/src/editor/Editor.tsx +8 -6
  35. package/src/editor/components/Draggable.tsx +20 -20
  36. package/src/editor/components/DraggableItem.tsx +6 -6
  37. package/src/editor/components/Dropdown.tsx +22 -14
  38. package/src/editor/components/DropdownItem.tsx +19 -19
  39. package/src/editor/components/NavButton.tsx +1 -1
  40. package/src/editor/components/content.ts +2 -0
  41. package/src/editor/components/icons/CloseIcon.tsx +1 -1
  42. package/src/editor/components/icons/DragIcon.tsx +1 -1
  43. package/src/editor/global.ts +9 -4
  44. package/src/editor/sceneHierarchy/Accordion.tsx +40 -0
  45. package/src/editor/sceneHierarchy/ChildObject.tsx +17 -17
  46. package/src/editor/sceneHierarchy/ContainerObject.tsx +7 -8
  47. package/src/editor/sceneHierarchy/SceneHierarchy.tsx +52 -49
  48. package/src/editor/sceneHierarchy/ToggleBtn.tsx +26 -0
  49. package/src/editor/sceneHierarchy/inspector/Inspector.tsx +82 -0
  50. package/src/editor/sceneHierarchy/inspector/InspectorField.tsx +178 -0
  51. package/src/editor/sceneHierarchy/inspector/InspectorGroup.tsx +55 -0
  52. package/src/editor/sceneHierarchy/inspector/MultiView/CameraWindow.tsx +61 -0
  53. package/src/editor/sceneHierarchy/inspector/MultiView/InfiniteGridHelper.ts +24 -0
  54. package/src/editor/sceneHierarchy/inspector/MultiView/InfiniteGridMaterial.ts +127 -0
  55. package/src/editor/sceneHierarchy/inspector/MultiView/MultiView.scss +93 -0
  56. package/src/editor/sceneHierarchy/inspector/MultiView/MultiView.tsx +450 -0
  57. package/src/editor/sceneHierarchy/inspector/SceneInspector.tsx +72 -0
  58. package/src/editor/sceneHierarchy/inspector/inspector.scss +150 -0
  59. package/src/editor/sceneHierarchy/inspector/utils/InspectCamera.tsx +75 -0
  60. package/src/editor/sceneHierarchy/inspector/utils/InspectLight.tsx +62 -0
  61. package/src/editor/sceneHierarchy/inspector/utils/InspectMaterial.tsx +340 -0
  62. package/src/editor/sceneHierarchy/inspector/utils/InspectTransform.tsx +124 -0
  63. package/src/editor/sceneHierarchy/types.ts +116 -5
  64. package/src/editor/sceneHierarchy/utils.ts +207 -11
  65. package/src/editor/scss/_debug.scss +9 -19
  66. package/src/editor/scss/_dropdown.scss +1 -0
  67. package/src/editor/scss/_sceneHierarchy.scss +148 -48
  68. package/src/editor/scss/index.scss +13 -6
  69. package/src/editor/utils.ts +42 -5
  70. package/src/example/CustomEditor.tsx +40 -0
  71. package/src/example/components/App.tsx +164 -0
  72. package/src/example/constants.ts +40 -9
  73. package/src/example/main.tsx +5 -45
  74. package/src/example/three/CustomMaterial.ts +58 -0
  75. package/src/example/three/ExampleScene.ts +176 -0
  76. package/src/example/three/FBXAnimation.ts +39 -0
  77. package/src/index.ts +22 -0
  78. package/types/core/Application.d.ts +7 -13
  79. package/types/core/remote/RemoteComponents.d.ts +0 -2
  80. package/types/core/remote/RemoteThree.d.ts +12 -0
  81. package/types/core/remote/RemoteTweakpane.d.ts +3 -3
  82. package/types/core/types.d.ts +4 -3
  83. package/types/editor/Editor.d.ts +2 -1
  84. package/types/editor/components/content.d.ts +2 -0
  85. package/types/editor/global.d.ts +7 -2
  86. package/types/editor/sceneHierarchy/Accordion.d.ts +10 -0
  87. package/types/editor/sceneHierarchy/SceneHierarchy.d.ts +5 -5
  88. package/types/editor/sceneHierarchy/ToggleBtn.d.ts +7 -0
  89. package/types/editor/sceneHierarchy/inspector/Inspector.d.ts +3 -0
  90. package/types/editor/sceneHierarchy/inspector/InspectorField.d.ts +13 -0
  91. package/types/editor/sceneHierarchy/inspector/InspectorGroup.d.ts +7 -0
  92. package/types/editor/sceneHierarchy/inspector/MultiView/CameraWindow.d.ts +16 -0
  93. package/types/editor/sceneHierarchy/inspector/MultiView/InfiniteGridHelper.d.ts +7 -0
  94. package/types/editor/sceneHierarchy/inspector/MultiView/InfiniteGridMaterial.d.ts +13 -0
  95. package/types/editor/sceneHierarchy/inspector/MultiView/MultiView.d.ts +11 -0
  96. package/types/editor/sceneHierarchy/inspector/SceneInspector.d.ts +7 -0
  97. package/types/editor/sceneHierarchy/inspector/utils/InspectCamera.d.ts +3 -0
  98. package/types/editor/sceneHierarchy/inspector/utils/InspectLight.d.ts +3 -0
  99. package/types/editor/sceneHierarchy/inspector/utils/InspectMaterial.d.ts +8 -0
  100. package/types/editor/sceneHierarchy/inspector/utils/InspectTransform.d.ts +3 -0
  101. package/types/editor/sceneHierarchy/types.d.ts +98 -7
  102. package/types/editor/sceneHierarchy/utils.d.ts +7 -1
  103. package/types/editor/utils.d.ts +3 -0
  104. package/types/example/CustomEditor.d.ts +1 -0
  105. package/types/example/constants.d.ts +15 -3
  106. package/types/example/three/CustomMaterial.d.ts +5 -0
  107. package/types/example/three/ExampleScene.d.ts +18 -0
  108. package/types/example/three/FBXAnimation.d.ts +6 -0
  109. package/types/{library.d.ts → index.d.ts} +5 -0
  110. package/src/example/App.tsx +0 -88
  111. package/src/library.ts +0 -16
  112. package/types/core/remote/RemoteDebug.d.ts +0 -23
  113. package/types/debug/Editor.d.ts +0 -8
  114. package/types/debug/components/Draggable.d.ts +0 -2
  115. package/types/debug/components/DraggableItem.d.ts +0 -2
  116. package/types/debug/components/Dropdown.d.ts +0 -2
  117. package/types/debug/components/DropdownItem.d.ts +0 -2
  118. package/types/debug/components/NavButton.d.ts +0 -5
  119. package/types/debug/components/icons/CloseIcon.d.ts +0 -2
  120. package/types/debug/components/icons/DragIcon.d.ts +0 -2
  121. package/types/debug/components/types.d.ts +0 -31
  122. package/types/debug/global.d.ts +0 -9
  123. package/types/debug/sceneHierarchy/ChildObject.d.ts +0 -2
  124. package/types/debug/sceneHierarchy/ContainerObject.d.ts +0 -2
  125. package/types/debug/sceneHierarchy/SceneHierarchy.d.ts +0 -13
  126. package/types/debug/sceneHierarchy/types.d.ts +0 -8
  127. package/types/debug/sceneHierarchy/utils.d.ts +0 -2
  128. package/types/debug/utils.d.ts +0 -4
  129. /package/src/example/{App.css → components/App.css} +0 -0
  130. /package/types/example/{App.d.ts → components/App.d.ts} +0 -0
@@ -1,8 +1,99 @@
1
- import { Object3D } from 'three';
2
- export type ChildObjectProps = {
1
+ import RemoteThree from '@/core/remote/RemoteThree';
2
+ import { Color, Object3D } from 'three';
3
+ export interface CoreComponentProps {
4
+ class?: string;
5
+ three: RemoteThree;
6
+ }
7
+ export interface ChildObjectProps extends CoreComponentProps {
3
8
  child: Object3D;
4
- };
5
- export type SceneHierarchyState = {
6
- open: boolean;
7
- scene: Object3D | null;
8
- };
9
+ three: RemoteThree;
10
+ }
11
+ export interface SceneHierarchyState {
12
+ scene?: Object3D;
13
+ three: RemoteThree;
14
+ }
15
+ export interface MinimumObject {
16
+ name: string;
17
+ uuid: string;
18
+ type: string;
19
+ children: MinimumObject[];
20
+ }
21
+ export interface RemoteMaterial {
22
+ blending: number;
23
+ blendSrc: number;
24
+ blendDst: number;
25
+ blendEquation: number;
26
+ blendColor: Color;
27
+ blendAlpha: number;
28
+ depthFunc: number;
29
+ depthTest: boolean;
30
+ depthWrite: boolean;
31
+ stencilWriteMask: number;
32
+ stencilFunc: number;
33
+ stencilRef: number;
34
+ stencilFuncMask: number;
35
+ stencilFail: number;
36
+ stencilZFail: number;
37
+ stencilZPass: number;
38
+ stencilWrite: boolean;
39
+ clipIntersection: boolean;
40
+ polygonOffset: boolean;
41
+ polygonOffsetFactor: number;
42
+ polygonOffsetUnits: number;
43
+ dithering: boolean;
44
+ name: string;
45
+ opacity: number;
46
+ premultipliedAlpha: boolean;
47
+ side: number;
48
+ toneMapped: boolean;
49
+ transparent: boolean;
50
+ type: string;
51
+ uuid: string;
52
+ vertexColors: boolean;
53
+ defines: any;
54
+ extensions: any;
55
+ uniforms: any;
56
+ color?: Color;
57
+ attenuationColor?: Color;
58
+ sheenColor?: Color;
59
+ specularColor?: Color;
60
+ }
61
+ export interface PerspectiveCameraInfo {
62
+ fov: number;
63
+ zoom: number;
64
+ near: number;
65
+ far: number;
66
+ focus: number;
67
+ aspect: number;
68
+ filmGauge: number;
69
+ filmOffset: number;
70
+ }
71
+ export interface OrthographicCameraInfo {
72
+ zoom: number;
73
+ near: number;
74
+ far: number;
75
+ left: number;
76
+ right: number;
77
+ top: number;
78
+ bottom: number;
79
+ }
80
+ export interface LightInfo {
81
+ color: Color;
82
+ intensity: number;
83
+ decay?: number;
84
+ distance?: number;
85
+ angle?: number;
86
+ penumbra?: number;
87
+ groundColor?: Color;
88
+ }
89
+ export interface RemoteObject {
90
+ name: string;
91
+ uuid: string;
92
+ type: string;
93
+ visible: boolean;
94
+ matrix: number[];
95
+ material?: RemoteMaterial | RemoteMaterial[];
96
+ perspectiveCameraInfo?: PerspectiveCameraInfo;
97
+ orthographicCameraInfo?: OrthographicCameraInfo;
98
+ lightInfo?: LightInfo;
99
+ }
@@ -1,2 +1,8 @@
1
- import { Object3D } from 'three';
1
+ import { Object3D, Texture } from 'three';
2
+ import { MinimumObject, RemoteObject } from './types';
2
3
  export declare function determineIcon(obj: Object3D): string;
4
+ export declare function stripScene(obj: Object3D): MinimumObject;
5
+ export declare function convertImageToBase64(imgElement: HTMLImageElement): string;
6
+ export declare function stripObject(obj: Object3D): RemoteObject;
7
+ export declare function setItemProps(child: any, key: string, value: any): void;
8
+ export declare function textureFromSrc(imgSource: string): Promise<Texture>;
@@ -1,4 +1,7 @@
1
+ import { Object3D } from "three";
1
2
  export declare function clamp(min: number, max: number, value: number): number;
2
3
  export declare function distance(x: number, y: number): number;
3
4
  export declare function randomID(): string;
4
5
  export declare function isColor(obj: any): boolean;
6
+ export declare function colorToHex(obj: any): string;
7
+ export declare const hierarchyUUID: (object: Object3D) => void;
@@ -0,0 +1 @@
1
+ export default function CustomEditor(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,15 @@
1
- import Application from '../core/Application';
2
- export declare const IS_DEV: boolean;
3
- export declare const app: Application;
1
+ import Application from '@/core/Application';
2
+ import RemoteComponents from '@/core/remote/RemoteComponents';
3
+ import RemoteTheatre from '@/core/remote/RemoteTheatre';
4
+ import RemoteThree from '@/core/remote/RemoteThree';
5
+ import RemoteTweakpane from '@/core/remote/RemoteTweakpane';
6
+ export declare const IS_DEV = true;
7
+ declare class CustomApp extends Application {
8
+ constructor(name: string, debugEnabled: boolean, editorHashtag: string);
9
+ get debug(): RemoteTweakpane;
10
+ get debugComponents(): RemoteComponents;
11
+ get theatre(): RemoteTheatre;
12
+ get three(): RemoteThree;
13
+ }
14
+ export declare const app: CustomApp;
15
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ShaderMaterial } from "three";
2
+ export default class CustomMaterial extends ShaderMaterial {
3
+ constructor();
4
+ update(delta: number): void;
5
+ }
@@ -0,0 +1,18 @@
1
+ import { CubeTexture, PerspectiveCamera, Scene } from 'three';
2
+ import FBXAnimation from './FBXAnimation';
3
+ export default class ExampleScene extends Scene {
4
+ camera: PerspectiveCamera;
5
+ envMap: CubeTexture;
6
+ dance0: FBXAnimation;
7
+ dance1: FBXAnimation;
8
+ dance2: FBXAnimation;
9
+ private customMat;
10
+ private lastUpdate;
11
+ constructor();
12
+ private createCameras;
13
+ private createLights;
14
+ private createWorld;
15
+ private createTestMaterials;
16
+ resize(width: number, height: number): void;
17
+ update(): void;
18
+ }
@@ -0,0 +1,6 @@
1
+ import { AnimationMixer, Object3D } from "three";
2
+ export default class FBXAnimation extends Object3D {
3
+ mixer?: AnimationMixer;
4
+ constructor(source: string);
5
+ update(delta: number): void;
6
+ }
@@ -3,6 +3,7 @@ export { debugDispatcher, ToolEvents } from './editor/global';
3
3
  export { default as BaseRemote } from './core/remote/BaseRemote';
4
4
  export { default as RemoteComponents } from './core/remote/RemoteComponents';
5
5
  export { default as RemoteTheatre } from './core/remote/RemoteTheatre';
6
+ export { default as RemoteThree } from './core/remote/RemoteThree';
6
7
  export { default as RemoteTweakpane } from './core/remote/RemoteTweakpane';
7
8
  export { default as NavButton } from './editor/components/NavButton';
8
9
  export { default as DraggableItem } from './editor/components/DraggableItem';
@@ -11,4 +12,8 @@ export { default as DropdownItem } from './editor/components/DropdownItem';
11
12
  export { default as Dropdown } from './editor/components/Dropdown';
12
13
  export { default as RemoteController } from './core/RemoteController';
13
14
  export { default as SceneHierarchy } from './editor/sceneHierarchy/SceneHierarchy';
15
+ export { default as Inspector } from './editor/sceneHierarchy/inspector/Inspector';
16
+ export { default as SceneInspector } from './editor/sceneHierarchy/inspector/SceneInspector';
17
+ export { default as MultiView } from './editor/sceneHierarchy/inspector/MultiView/MultiView';
18
+ export { default as InfiniteGridHelper } from './editor/sceneHierarchy/inspector/MultiView/InfiniteGridHelper';
14
19
  export { default as Editor } from './editor/Editor';
@@ -1,88 +0,0 @@
1
- // Libs
2
- import { CSSProperties, useEffect, useRef } from 'react'
3
- import { types } from '@theatre/core'
4
- // Models
5
- import { app } from './constants'
6
- // Components
7
- import './App.css'
8
- import { debugDispatcher, ToolEvents } from '../editor/global'
9
-
10
- const elementStyle: CSSProperties = {
11
- background: '#FF0000',
12
- width: '100px',
13
- height: '100px',
14
- position: 'absolute',
15
- }
16
-
17
- function App() {
18
- const elementRef = useRef<HTMLDivElement>(null!)
19
- app.theatre?.sheet('App')
20
-
21
- useEffect(() => {
22
- const container = elementRef.current!
23
- container.style.visibility = app.editor ? 'hidden' : 'inherit'
24
-
25
- // GUI Example
26
- const testFolder = app.debug?.addFolder('Test')
27
-
28
- app.debug?.button('Test Button', () => {
29
- console.log('Test button works!')
30
- }, testFolder)
31
-
32
- const test = { opacity: 1, rotation: 0 }
33
- app.debug?.bind(test, 'opacity', {
34
- min: 0,
35
- max: 1,
36
- onChange: (value: number) => {
37
- container.style.opacity = value.toFixed(2)
38
- }
39
- }, testFolder)
40
-
41
- app.debug?.bind(test, 'rotation', {
42
- min: 0,
43
- max: 360,
44
- onChange: (value: number) => {
45
- container.style.transform = `rotate(${value}deg)`
46
- }
47
- }, testFolder)
48
-
49
- // Theatre Example
50
- const sheetObj = app.theatre?.sheetObject(
51
- 'App',
52
- 'Box',
53
- {
54
- x: types.number(100, {range: [0, window.innerWidth]}),
55
- y: types.number(100, {range: [0, window.innerHeight]}),
56
- },
57
- (values: any) => {
58
- container.style.left = `${values.x}px`
59
- container.style.top = `${values.y}px`
60
- },
61
- )
62
- return () => {
63
- if (sheetObj !== undefined) app.theatre?.unsubscribe(sheetObj)
64
- app.dispose()
65
- }
66
- }, [])
67
-
68
- useEffect(() => {
69
- const selectDropdown = (evt: any) => {
70
- console.log(`Dropdown: ${evt.value.dropdown}, value: ${evt.value.value}`)
71
- }
72
- const draglistUpdate = (evt: any) => {
73
- console.log(`Dragged list updated: ${evt.value.dropdown}, value: ${evt.value.value.join(', ')}`)
74
- }
75
- debugDispatcher.addEventListener(ToolEvents.SELECT_DROPDOWN, selectDropdown)
76
- debugDispatcher.addEventListener(ToolEvents.DRAG_UPDATE, draglistUpdate)
77
- return () => {
78
- debugDispatcher.removeEventListener(ToolEvents.SELECT_DROPDOWN, selectDropdown)
79
- debugDispatcher.removeEventListener(ToolEvents.DRAG_UPDATE, draglistUpdate)
80
- }
81
- }, [])
82
-
83
- return (
84
- <div id='box' ref={elementRef} />
85
- )
86
- }
87
-
88
- export default App
package/src/library.ts DELETED
@@ -1,16 +0,0 @@
1
- // Core
2
- export { default as Application } from './core/Application'
3
- export { debugDispatcher, ToolEvents } from './editor/global'
4
- export { default as BaseRemote } from './core/remote/BaseRemote'
5
- export { default as RemoteComponents } from './core/remote/RemoteComponents'
6
- export { default as RemoteTheatre } from './core/remote/RemoteTheatre'
7
- export { default as RemoteTweakpane } from './core/remote/RemoteTweakpane'
8
- // Components
9
- export { default as NavButton } from './editor/components/NavButton'
10
- export { default as DraggableItem } from './editor/components/DraggableItem'
11
- export { default as Draggable } from './editor/components/Draggable'
12
- export { default as DropdownItem } from './editor/components/DropdownItem'
13
- export { default as Dropdown } from './editor/components/Dropdown'
14
- export { default as RemoteController } from './core/RemoteController'
15
- export { default as SceneHierarchy } from './editor/sceneHierarchy/SceneHierarchy'
16
- export { default as Editor } from './editor/Editor'
@@ -1,23 +0,0 @@
1
- import { Pane } from 'tweakpane';
2
- import Application from '../Application';
3
- import BaseRemote from './BaseRemote';
4
- import type { DataUpdateCallback, VoidCallback } from '../types';
5
- export default class RemoteDebug extends BaseRemote {
6
- appTab: any;
7
- systemTab: any;
8
- utilsTab: any;
9
- bindCBs: Map<string, DataUpdateCallback>;
10
- buttonCBs: Map<string, VoidCallback>;
11
- protected pane?: Pane | undefined;
12
- protected appCallbacks: number;
13
- protected editorCallbacks: number;
14
- constructor(app: Application);
15
- protected createGUI(): void;
16
- dispose(): void;
17
- addFolder(name: string, params?: any, parent?: any): any;
18
- get bindID(): string;
19
- bind(obj: any, name: string, params: any, parent?: any): void;
20
- triggerBind(id: string, data: any): void;
21
- button(name: string, callback: VoidCallback, parent?: any): void;
22
- triggerButton(id: string): void;
23
- }
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import './scss/index.scss';
3
- type EditorProps = {
4
- components?: JSX.Element | JSX.Element[];
5
- children?: JSX.Element | JSX.Element[];
6
- };
7
- export default function Editor(props: EditorProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,2 +0,0 @@
1
- import { DraggableProps } from './types';
2
- export default function Draggable(props: DraggableProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { DraggableItemProps } from './types';
2
- export default function DraggableItem(props: DraggableItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { DropdownProps } from './types';
2
- export default function Dropdown(props: DropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { DropdownItemProps } from './types';
2
- export default function DropdownItem(props: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- type NavButtonProps = {
2
- title: string;
3
- };
4
- export default function NavButton(props: NavButtonProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,2 +0,0 @@
1
- declare const _default: import("react/jsx-runtime").JSX.Element;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("react/jsx-runtime").JSX.Element;
2
- export default _default;
@@ -1,31 +0,0 @@
1
- export type DropdownType = 'option' | 'dropdown' | 'draggable';
2
- export interface DropdownOption {
3
- title: string;
4
- value: any | Array<DropdownOption>;
5
- type: DropdownType;
6
- onSelect?: (value: any) => void;
7
- selectable?: boolean;
8
- onDragComplete?: (options: Array<string>) => void;
9
- }
10
- export interface DropdownProps {
11
- title: string;
12
- options: Array<DropdownOption>;
13
- onSelect?: (value: any) => void;
14
- subdropdown?: boolean;
15
- }
16
- export interface DropdownItemProps {
17
- option: DropdownOption;
18
- onSelect?: (value: any) => void;
19
- onDragComplete?: (options: Array<string>) => void;
20
- }
21
- export interface DraggableItemProps {
22
- index: number;
23
- title: string;
24
- onDelete: (index: number) => void;
25
- }
26
- export interface DraggableProps {
27
- title: string;
28
- options: Array<string>;
29
- onDragComplete: (options: Array<string>) => void;
30
- subdropdown?: boolean;
31
- }
@@ -1,9 +0,0 @@
1
- import { EventDispatcher } from 'three';
2
- export declare const debugDispatcher: EventDispatcher<import("three").Event>;
3
- export declare const ToolEvents: {
4
- SELECT_DROPDOWN: string;
5
- DRAG_UPDATE: string;
6
- INSPECT_ITEM: string;
7
- REFRESH_SCENE: string;
8
- SET_SCENE: string;
9
- };
@@ -1,2 +0,0 @@
1
- import { ChildObjectProps } from './types';
2
- export default function ChildObject(props: ChildObjectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { ChildObjectProps } from './types';
2
- export default function ContainerObject(props: ChildObjectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { Component, ReactNode } from 'react';
2
- import '../scss/_sceneHierarchy.scss';
3
- import { SceneHierarchyState } from './types';
4
- export default class SceneHierarchy extends Component {
5
- constructor(props: object | SceneHierarchyState);
6
- componentWillUnmount(): void;
7
- render(): ReactNode;
8
- private onUpdate;
9
- private toggleOpen;
10
- private onRefresh;
11
- private onSetScene;
12
- get componentState(): SceneHierarchyState;
13
- }
@@ -1,8 +0,0 @@
1
- import { Object3D } from 'three';
2
- export type ChildObjectProps = {
3
- child: Object3D;
4
- };
5
- export type SceneHierarchyState = {
6
- open: boolean;
7
- scene: Object3D | null;
8
- };
@@ -1,2 +0,0 @@
1
- import { Object3D } from 'three';
2
- export declare function determineIcon(obj: Object3D): string;
@@ -1,4 +0,0 @@
1
- export declare function clamp(min: number, max: number, value: number): number;
2
- export declare function distance(x: number, y: number): number;
3
- export declare function randomID(): string;
4
- export declare function isColor(obj: any): boolean;
File without changes
File without changes