diff --git a/components/content/simple-editor/ContainElement.vue b/components/content/simple-editor/ContainElement.vue new file mode 100644 index 0000000..aae601f --- /dev/null +++ b/components/content/simple-editor/ContainElement.vue @@ -0,0 +1,33 @@ + + + + diff --git a/components/content/simple-editor/CustomTresOrbitControls.vue b/components/content/simple-editor/CustomTresOrbitControls.vue new file mode 100644 index 0000000..8ac746b --- /dev/null +++ b/components/content/simple-editor/CustomTresOrbitControls.vue @@ -0,0 +1,35 @@ + + + diff --git a/components/content/simple-editor/SceneNodeBox.vue b/components/content/simple-editor/SceneNodeBox.vue new file mode 100644 index 0000000..2e25cb0 --- /dev/null +++ b/components/content/simple-editor/SceneNodeBox.vue @@ -0,0 +1,36 @@ + + + diff --git a/components/content/simple-editor/SceneNodeBoxProps.vue b/components/content/simple-editor/SceneNodeBoxProps.vue new file mode 100644 index 0000000..2b15380 --- /dev/null +++ b/components/content/simple-editor/SceneNodeBoxProps.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/SceneNodeCameraProps.vue b/components/content/simple-editor/SceneNodeCameraProps.vue new file mode 100644 index 0000000..7b988f9 --- /dev/null +++ b/components/content/simple-editor/SceneNodeCameraProps.vue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/SceneNodeCone.vue b/components/content/simple-editor/SceneNodeCone.vue new file mode 100644 index 0000000..7d38cc6 --- /dev/null +++ b/components/content/simple-editor/SceneNodeCone.vue @@ -0,0 +1,36 @@ + + + diff --git a/components/content/simple-editor/SceneNodeConeProps.vue b/components/content/simple-editor/SceneNodeConeProps.vue new file mode 100644 index 0000000..fdd1eed --- /dev/null +++ b/components/content/simple-editor/SceneNodeConeProps.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/SceneNodeProps.vue b/components/content/simple-editor/SceneNodeProps.vue new file mode 100644 index 0000000..cf71781 --- /dev/null +++ b/components/content/simple-editor/SceneNodeProps.vue @@ -0,0 +1,84 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/SceneNodeSphere.vue b/components/content/simple-editor/SceneNodeSphere.vue new file mode 100644 index 0000000..0177027 --- /dev/null +++ b/components/content/simple-editor/SceneNodeSphere.vue @@ -0,0 +1,36 @@ + + + diff --git a/components/content/simple-editor/SceneNodeSphereProps.vue b/components/content/simple-editor/SceneNodeSphereProps.vue new file mode 100644 index 0000000..cfd9c02 --- /dev/null +++ b/components/content/simple-editor/SceneNodeSphereProps.vue @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/SceneSettingsProps.vue b/components/content/simple-editor/SceneSettingsProps.vue new file mode 100644 index 0000000..93d8326 --- /dev/null +++ b/components/content/simple-editor/SceneSettingsProps.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/index.vue b/components/content/simple-editor/index.vue new file mode 100644 index 0000000..0642115 --- /dev/null +++ b/components/content/simple-editor/index.vue @@ -0,0 +1,440 @@ + + + \ No newline at end of file diff --git a/components/content/simple-editor/types.ts b/components/content/simple-editor/types.ts new file mode 100644 index 0000000..ba75f27 --- /dev/null +++ b/components/content/simple-editor/types.ts @@ -0,0 +1,43 @@ +export interface SceneSettings { + width: number + height: number +} + +export interface SceneNode { + id: string + type: 'camera' | 'box' | 'sphere' | 'cone' + position: [number, number, number] + rotation: [number, number, number] + scale: [number, number, number] +} + +export interface CameraSceneNode extends SceneNode { + type: 'camera' + properties: { + fov: number + } +} + +export interface BoxSceneNode extends SceneNode { + type: 'box' + properties: { + width: number + height: number + length: number + } +} + +export interface SphereSceneNode extends SceneNode { + type: 'sphere' + properties: { + radius: number + } +} + +export interface ConeSceneNode extends SceneNode { + type: 'cone' + properties: { + radius: number + height: number + } +} \ No newline at end of file diff --git a/content/authors/franciscohermida.md b/content/authors/franciscohermida.md new file mode 100644 index 0000000..7c24f7b --- /dev/null +++ b/content/authors/franciscohermida.md @@ -0,0 +1,7 @@ +--- +name: Francisco Hermida +slug: franciscohermida +twitter: chicohermida +github: franciscohermida +avatar: https://avatars.githubusercontent.com/u/483242?v=4 +--- diff --git a/content/experiments/simple-editor.md b/content/experiments/simple-editor.md new file mode 100644 index 0000000..0748694 --- /dev/null +++ b/content/experiments/simple-editor.md @@ -0,0 +1,12 @@ +--- +thumbnail: /simple-editor.png +title: Simple Editor +slug: simple-editor +author: franciscohermida +status: published +description: Simple starting point on how to structure an TresJS Editor +tags: ['controls'] +--- + +::simple-editor +:: \ No newline at end of file diff --git a/public/simple-editor.png b/public/simple-editor.png new file mode 100644 index 0000000..c6fa21c Binary files /dev/null and b/public/simple-editor.png differ