diff --git a/packages/editor/src/components/prefabs/PrefabEditors.tsx b/packages/editor/src/components/prefabs/PrefabEditors.tsx index c3c6a9a2da..0e0a1f597b 100644 --- a/packages/editor/src/components/prefabs/PrefabEditors.tsx +++ b/packages/editor/src/components/prefabs/PrefabEditors.tsx @@ -20,16 +20,96 @@ Ethereal Engine. All Rights Reserved. import config from '@etherealengine/common/src/config' import { defineState } from '@etherealengine/hyperflux' -export const PrefabShelfCategories = defineState({ - name: 'ee.editor.PrefabShelfCategories', - initial: () => { - return { - //hardcode to test replace with parseStorageProviderURLs - 'Point Light Prefab': `${config.client.fileServer}/projects/default-project/assets/pointLight.prefab.gltf`, - 'Geometry Prefab': `${config.client.fileServer}/projects/default-project/assets/geo.prefab.gltf`, - 'Empty Prefab': 'empty' +export type PrefabShelfItem = { + name: string + url: string + category: string + detail?: string +} - //will continue to add more prefabs - } as Record - } +export const PrefabShelfState = defineState({ + name: 'ee.editor.PrefabShelfItem', + initial: () => + [ + { + name: '3D Model', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/3d-model.prefab.gltf`, + category: 'Geo', + detail: 'Blank 3D model ready for your own assets' + }, + { + name: 'Primitive Geometry', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/geo.prefab.gltf`, + category: 'Geo' + }, + { + name: 'Point Light', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/point-light.prefab.gltf`, + category: 'Lighting' + }, + { + name: 'Spot Light', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/spot-light.prefab.gltf`, + category: 'Lighting' + }, + { + name: 'Directional Light', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/directional-light.prefab.gltf`, + category: 'Lighting' + }, + { + name: 'Ambient Light', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/ambient-light.prefab.gltf`, + category: 'Lighting' + }, + { + name: 'Hemisphere Light', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/hemisphere-light.prefab.gltf`, + category: 'Lighting' + }, + { + name: 'Box Collider', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/box-collider.prefab.gltf`, + category: 'Collider', + detail: 'Simple box collider' + }, + { + name: 'Sphere Collider', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/sphere-collider.prefab.gltf`, + category: 'Collider', + detail: 'Simple sphere collider' + }, + { + name: 'Cylinder Collider', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/cylinder-collider.prefab.gltf`, + category: 'Collider', + detail: 'Simple cylinder collider' + }, + { + name: 'Mesh Collider', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/mesh-collider.prefab.gltf`, + category: 'Collider', + detail: 'Simple mesh collider, drag and drop your mesh' + }, + { + name: 'Text', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/text.prefab.gltf`, + category: 'Text' + }, + { + name: 'Skybox', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/skybox.prefab.gltf`, + category: 'Lookdev' + }, + { + name: 'Postprocessing', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/postprocessing.prefab.gltf`, + category: 'Lookdev' + }, + { + name: 'Fog', + url: `${config.client.fileServer}/projects/default-project/assets/prefabs/fog.prefab.gltf`, + category: 'Lookdev' + } + ] as PrefabShelfItem[] }) diff --git a/packages/editor/src/components/prefabs/PrefabList.tsx b/packages/editor/src/components/prefabs/PrefabList.tsx index a8f1617219..669555166c 100644 --- a/packages/editor/src/components/prefabs/PrefabList.tsx +++ b/packages/editor/src/components/prefabs/PrefabList.tsx @@ -18,40 +18,29 @@ All portions of the code written by the Ethereal Engine team are Copyright © 20 Ethereal Engine. All Rights Reserved. */ -import PlaceHolderIcon from '@mui/icons-material/GroupAddOutlined' -import { List, ListItemButton, ListItemIcon, ListItemText } from '@mui/material' -import { startCase } from 'lodash' -import React, { useRef } from 'react' +import { Collapse, List, ListItemButton, ListItemIcon, ListItemText } from '@mui/material' +import React, { useEffect, useRef } from 'react' import { useTranslation } from 'react-i18next' import InputText from '@etherealengine/client-core/src/common/components/InputText' -import { ComponentJsonType } from '@etherealengine/engine/src/scene/types/SceneTypes' import { getMutableState, getState, useHookstate } from '@etherealengine/hyperflux' import Typography from '@etherealengine/ui/src/primitives/mui/Typography' -import { addMediaNode } from '../../functions/addMediaNode' -import { ComponentEditorsState } from '../../functions/ComponentEditors' +import Icon from '@etherealengine/ui/src/primitives/mui/Icon' import { EditorControlFunctions } from '../../functions/EditorControlFunctions' +import { addMediaNode } from '../../functions/addMediaNode' import { usePopoverContextClose } from '../element/PopoverContext' -import { PrefabShelfCategories } from './PrefabEditors' +import { PrefabShelfItem, PrefabShelfState } from './PrefabEditors' -const PrefabListItem = ({ item }: { item: string }) => { +const PrefabListItem = ({ item }: { item: PrefabShelfItem }) => { const { t } = useTranslation() - const Icon = getState(ComponentEditorsState)[item]?.iconComponent ?? PlaceHolderIcon const handleClosePopover = usePopoverContextClose() return ( { - const PrefabNameShelfCategories = getState(PrefabShelfCategories) - const componentJsons: ComponentJsonType[] = [] - const url = PrefabNameShelfCategories[item] - // PrefabNameShelfCategories[item].forEach((component) => { - // componentJsons.push({ name: component.jsonID as string }) - // }) - //EditorControlFunctions.createObjectFromSceneElement(componentJsons) - + const url = item.url //add prefab gltfs in the scene via add media node if (url === 'empty') { EditorControlFunctions.createObjectFromSceneElement() @@ -63,60 +52,86 @@ const PrefabListItem = ({ item }: { item: string }) => { handleClosePopover() }} > - - - + - {startCase(item.replace('-', ' ').toLowerCase())} + {item.name} } secondary={ - {t(`editor:layout.assetGrid.component-detail.${item}`)} + {item.detail ?? + t(`editor:layout.assetGrid.component-detail.${item.name.toLowerCase().replaceAll(/\s+/g, '-')}`)} } /> ) } -const ScenePrefabListItem = ({ categoryItems }: { categoryItems: string[]; isCollapsed: boolean }) => { +const ScenePrefabListItem = ({ + categoryTitle, + categoryItems, + isCollapsed +}: { + categoryTitle: string + categoryItems: PrefabShelfItem[] + isCollapsed: boolean +}) => { + const open = useHookstate(categoryTitle === 'Empty') return ( <> - - {categoryItems.map((item) => ( - - ))} - + open.set((prev) => !prev)} + style={{ + backgroundColor: 'var(--dockBackground)', + cursor: 'pointer', + color: 'var(--textColor)', + display: 'flex', + justifyContent: 'space-between', + width: '100%' + }} + > + {categoryTitle} + + + + + {categoryItems.map((item) => ( + + ))} + + ) } const usePrefabShelfCategories = (search: string) => { - useHookstate(getMutableState(PrefabShelfCategories)).value + useHookstate(getMutableState(PrefabShelfState)).value if (!search) { - return Object.entries(getState(PrefabShelfCategories)) + return getState(PrefabShelfState) } const searchRegExp = new RegExp(search, 'gi') - return Object.entries(getState(PrefabShelfCategories)) - .map(([category, items]) => { - const filteredcategory = category.match(searchRegExp)?.length ? category : '' - return [filteredcategory, items] as [string, string] - }) - .filter(([_, items]) => !!items.length) + return getState(PrefabShelfState).filter(({ name }) => !!name.match(searchRegExp)?.length) } export function PrefabList() { const { t } = useTranslation() const search = useHookstate({ local: '', query: '' }) const searchTimeout = useRef | null>(null) - const shelves = usePrefabShelfCategories(search.query.value) + const validItems = usePrefabShelfCategories(search.query.value) + const inputReference = useRef(null) + + const shelves: Record = {} + for (const item of validItems) { + shelves[item.category] ??= [] + shelves[item.category].push(item) + } const shelveslist: string[] = [] - shelves.map(([category, items]) => { + Object.entries(shelves).map(([category, items]) => { shelveslist.push(category) }) @@ -128,9 +143,13 @@ export function PrefabList() { }, 50) } + useEffect(() => { + inputReference.current?.focus() + }, []) + return ( @@ -141,11 +160,15 @@ export function PrefabList() { value={search.local.value} sx={{ mt: 1 }} onChange={(e) => onSearch(e.target.value)} + inputRef={inputReference} /> } > - + + {Object.entries(shelves).map(([category, items]) => ( + + ))} ) } diff --git a/packages/projects/default-project/assets/prefabs/3d-model.prefab.gltf b/packages/projects/default-project/assets/prefabs/3d-model.prefab.gltf new file mode 100644 index 0000000000..448dc10f0e --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/3d-model.prefab.gltf @@ -0,0 +1,70 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "3D Model", + "extensions": { + "EE_uuid": "9a88d4b8-1605-4ecf-b0a2-b083d0231c4f", + "EE_visible": true, + "EE_model": { + "src": "", + "cameraOcclusion": true, + "convertToVRM": false + }, + "EE_input": { + "inputSinks": [ + "9a88d4b8-1605-4ecf-b0a2-b083d0231c4f" + ], + "activationDistance": 2 + }, + "EE_shadow": { + "cast": true, + "receive": true + }, + "EE_loop_animation": { + "activeClipIndex": -1, + "animationPack": "", + "paused": false, + "time": 0, + "timeScale": 1, + "blendMode": 2500, + "loop": 2201, + "clampWhenFinished": false, + "zeroSlopeAtStart": true, + "zeroSlopeAtEnd": true, + "weight": 1 + }, + "EE_envmap": { + "type": "Skybox", + "envMapTextureType": "Equirectangular", + "envMapSourceColor": 4095, + "envMapSourceURL": "", + "envMapSourceEntityUUID": "", + "envMapIntensity": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_model", + "EE_input", + "EE_shadow", + "EE_loop_animation", + "EE_envmap", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/ambient-light.prefab.gltf b/packages/projects/default-project/assets/prefabs/ambient-light.prefab.gltf new file mode 100644 index 0000000000..cedad63c2d --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/ambient-light.prefab.gltf @@ -0,0 +1,34 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Ambient Light", + "extensions": { + "EE_uuid": "40a996ad-7d64-43c1-a5cb-6be9ec150ef3", + "EE_visible": true, + "EE_ambient_light": { + "color": 16777215, + "intensity": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_ambient_light", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/box-collider.prefab.gltf b/packages/projects/default-project/assets/prefabs/box-collider.prefab.gltf new file mode 100644 index 0000000000..a79cdc53f7 --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/box-collider.prefab.gltf @@ -0,0 +1,43 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Box Collider", + "extensions": { + "EE_uuid": "3b2ca4e3-7640-4d50-a665-5f14388a2868", + "EE_visible": true, + "EE_collider": { + "shape": "box", + "mass": 1, + "massCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "friction": 0.5, + "restitution": 0.5, + "collisionLayer": 1, + "collisionMask": 7 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_collider", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/cylinder-collider.prefab.gltf b/packages/projects/default-project/assets/prefabs/cylinder-collider.prefab.gltf new file mode 100644 index 0000000000..7de8b4c370 --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/cylinder-collider.prefab.gltf @@ -0,0 +1,43 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Cylinder Collider", + "extensions": { + "EE_uuid": "0649b0d9-b7eb-4562-b92e-10ab810d9516", + "EE_visible": true, + "EE_collider": { + "shape": "cylinder", + "mass": 1, + "massCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "friction": 0.5, + "restitution": 0.5, + "collisionLayer": 1, + "collisionMask": 7 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_collider", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/directional-light.prefab.gltf b/packages/projects/default-project/assets/prefabs/directional-light.prefab.gltf new file mode 100644 index 0000000000..5338c6c65f --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/directional-light.prefab.gltf @@ -0,0 +1,38 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Directional Light", + "extensions": { + "EE_uuid": "e05a3e9b-755b-47b7-b79c-a148a1e21b77", + "EE_visible": true, + "EE_directional_light": { + "color": 16777215, + "intensity": 1, + "cameraFar": 200, + "castShadow": false, + "shadowBias": -0.00001, + "shadowRadius": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_directional_light", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/fog.prefab.gltf b/packages/projects/default-project/assets/prefabs/fog.prefab.gltf new file mode 100644 index 0000000000..196816a12c --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/fog.prefab.gltf @@ -0,0 +1,39 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Fog", + "extensions": { + "EE_uuid": "8703ac9c-5f42-45ae-a23f-5bcd6a3e0795", + "EE_visible": true, + "EE_fog": { + "type": "linear", + "color": "#FFFFFF", + "density": 0.005, + "near": 1, + "far": 1000, + "timeScale": 1, + "height": 0.05 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_fog", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/geo.prefab.gltf b/packages/projects/default-project/assets/prefabs/geo.prefab.gltf similarity index 95% rename from packages/projects/default-project/assets/geo.prefab.gltf rename to packages/projects/default-project/assets/prefabs/geo.prefab.gltf index 984dd3207e..a7cb06c53f 100644 --- a/packages/projects/default-project/assets/geo.prefab.gltf +++ b/packages/projects/default-project/assets/prefabs/geo.prefab.gltf @@ -14,7 +14,7 @@ "scene": 0, "nodes": [ { - "name": "New Object", + "name": "Primitive Geometry", "extensions": { "EE_uuid": "852336f7-89fd-48db-a2fa-98443914e4ca", "EE_visible": true, diff --git a/packages/projects/default-project/assets/prefabs/hemisphere-light.prefab.gltf b/packages/projects/default-project/assets/prefabs/hemisphere-light.prefab.gltf new file mode 100644 index 0000000000..e20fcb423f --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/hemisphere-light.prefab.gltf @@ -0,0 +1,35 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Hemisphere Light", + "extensions": { + "EE_uuid": "ec27fd9e-6ab9-46dd-a49e-9c0edff54cd4", + "EE_visible": true, + "EE_hemisphere_light": { + "skyColor": 16777215, + "groundColor": 16777215, + "intensity": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_hemisphere_light", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/mesh-collider.prefab.gltf b/packages/projects/default-project/assets/prefabs/mesh-collider.prefab.gltf new file mode 100644 index 0000000000..b5aab496bc --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/mesh-collider.prefab.gltf @@ -0,0 +1,56 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Mesh Collider", + "extensions": { + "EE_uuid": "a5924904-1fec-418f-90f1-821e4b17faa5", + "EE_visible": true, + "EE_collider": { + "shape": "mesh", + "mass": 1, + "massCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "friction": 0.5, + "restitution": 0.5, + "collisionLayer": 1, + "collisionMask": 7 + }, + "EE_model": { + "src": "", + "cameraOcclusion": true, + "convertToVRM": false + }, + "EE_input": { + "inputSinks": [ + "a5924904-1fec-418f-90f1-821e4b17faa5" + ], + "activationDistance": 2 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_collider", + "EE_model", + "EE_input", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/pointLight.prefab.gltf b/packages/projects/default-project/assets/prefabs/point-light.prefab.gltf similarity index 95% rename from packages/projects/default-project/assets/pointLight.prefab.gltf rename to packages/projects/default-project/assets/prefabs/point-light.prefab.gltf index 3dd90fbb20..33148038ce 100644 --- a/packages/projects/default-project/assets/pointLight.prefab.gltf +++ b/packages/projects/default-project/assets/prefabs/point-light.prefab.gltf @@ -13,7 +13,7 @@ "scene": 0, "nodes": [ { - "name": "EE_transform", + "name": "Point Light", "extensions": { "EE_uuid": "45a35b2e-0e35-46e4-993a-bcf6831c4fb1", "EE_visible": true, diff --git a/packages/projects/default-project/assets/prefabs/postprocessing.prefab.gltf b/packages/projects/default-project/assets/prefabs/postprocessing.prefab.gltf new file mode 100644 index 0000000000..78df36585e --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/postprocessing.prefab.gltf @@ -0,0 +1,184 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Postprocessing", + "extensions": { + "EE_uuid": "10eb1bb2-5cf2-4b4e-abab-3132b3a995fa", + "EE_visible": true, + "EE_postprocessing": { + "effects": { + "SSREffect": { + "isActive": false, + "distance": 10, + "thickness": 10, + "denoiseIterations": 1, + "denoiseKernel": 2, + "denoiseDiffuse": 10, + "denoiseSpecular": 10, + "radius": 3, + "phi": 0.5, + "lumaPhi": 5, + "depthPhi": 2, + "normalPhi": 50, + "roughnessPhi": 50, + "specularPhi": 50, + "envBlur": 0.5, + "importanceSampling": true, + "steps": 20, + "refineSteps": 5, + "resolutionScale": 1, + "missedRays": false + }, + "SSGIEffect": { + "isActive": false, + "distance": 10, + "thickness": 10, + "denoiseIterations": 1, + "denoiseKernel": 2, + "denoiseDiffuse": 10, + "denoiseSpecular": 10, + "radius": 3, + "phi": 0.5, + "lumaPhi": 5, + "depthPhi": 2, + "normalPhi": 50, + "roughnessPhi": 50, + "specularPhi": 50, + "envBlur": 0.5, + "importanceSampling": true, + "steps": 20, + "refineSteps": 5, + "resolutionScale": 1, + "missedRays": false + }, + "SSAOEffect": { + "isActive": false, + "blendFunction": 21, + "distanceScaling": true, + "depthAwareUpsampling": true, + "samples": 9, + "rings": 7, + "distanceThreshold": 0.125, + "distanceFalloff": 0.02, + "rangeThreshold": 0.0005, + "rangeFalloff": 0.001, + "minRadiusScale": 0.1, + "luminanceInfluence": 0.7, + "bias": 0.025, + "radius": 0.1825, + "intensity": 1, + "fade": 0.01, + "resolutionScale": 1, + "resolutionX": -1, + "resolutionY": -1, + "width": -1, + "height": -1, + "kernelSize": 1, + "blur": true + }, + "DepthOfFieldEffect": { + "isActive": false, + "blendFunction": 23, + "focusDistance": 0.1, + "focalLength": 0.1, + "focusRange": 0.1, + "bokehScale": 1, + "resolutionScale": 1, + "resolutionX": -1, + "resolutionY": -1 + }, + "BloomEffect": { + "isActive": true, + "blendFunction": 28, + "kernelSize": 3, + "luminanceThreshold": 0.9, + "luminanceSmoothing": 0.025, + "mipmapBlur": false, + "intensity": 1, + "radius": 0.85, + "levels": 8 + }, + "ToneMappingEffect": { + "isActive": false, + "blendFunction": 23, + "adaptive": false, + "mode": 5, + "resolution": 256, + "maxLuminance": 4, + "whitePoint": 4, + "middleGrey": 0.6, + "minLuminance": 0.01, + "averageLuminance": 1, + "adaptationRate": 1 + }, + "BrightnessContrastEffect": { + "isActive": false, + "blendFunction": 23, + "brightness": 0, + "contrast": 0 + }, + "HueSaturationEffect": { + "isActive": false, + "blendFunction": 23, + "hue": 0, + "saturation": 0 + }, + "ColorDepthEffect": { + "isActive": false, + "blendFunction": 23, + "bits": 16 + }, + "LinearTosRGBEffect": { + "isActive": false + }, + "TRAAEffect": { + "isActive": false, + "blend": 0.8, + "constantBlend": true, + "dilation": true, + "blockySampling": false, + "logTransform": false, + "depthDistance": 10, + "worldDistance": 5, + "neighborhoodClamping": true + }, + "MotionBlurEffect": { + "isActive": false, + "intensity": 1, + "jitter": 1, + "samples": 16 + }, + "VignetteEffect": { + "isActive": false, + "blendFunction": 23, + "technique": 0, + "eskil": false, + "offset": 0.5, + "darkness": 0.5 + } + }, + "enabled": true + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_postprocessing", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/skybox.prefab.gltf b/packages/projects/default-project/assets/prefabs/skybox.prefab.gltf new file mode 100644 index 0000000000..de80f852c8 --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/skybox.prefab.gltf @@ -0,0 +1,45 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Skybox", + "extensions": { + "EE_uuid": "48df21aa-aea3-4105-a987-2a7f0adf4bb3", + "EE_visible": true, + "EE_skybox": { + "backgroundColor": 0, + "equirectangularPath": "", + "cubemapPath": "__$project$__/default-project/assets/skyboxsun25deg/", + "backgroundType": 1, + "skyboxProps": { + "turbidity": 10, + "rayleigh": 1, + "luminance": 1, + "mieCoefficient": 0.004999999999999893, + "mieDirectionalG": 0.99, + "inclination": 0.10471975511965978, + "azimuth": 0.16666666666666666 + } + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_skybox", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/sphere-collider.prefab.gltf b/packages/projects/default-project/assets/prefabs/sphere-collider.prefab.gltf new file mode 100644 index 0000000000..5fdcdf89fe --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/sphere-collider.prefab.gltf @@ -0,0 +1,43 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Sphere Collider", + "extensions": { + "EE_uuid": "5e0d2a3a-1ed0-4076-83e6-ceea0f15cdfd", + "EE_visible": true, + "EE_collider": { + "shape": "sphere", + "mass": 1, + "massCenter": { + "x": 0, + "y": 0, + "z": 0 + }, + "friction": 0.5, + "restitution": 0.5, + "collisionLayer": 1, + "collisionMask": 7 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_collider", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/spot-light.prefab.gltf b/packages/projects/default-project/assets/prefabs/spot-light.prefab.gltf new file mode 100644 index 0000000000..37de8f410d --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/spot-light.prefab.gltf @@ -0,0 +1,41 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Spot Light", + "extensions": { + "EE_uuid": "f2495904-bfe4-4777-ba0b-80aaee34e46b", + "EE_visible": true, + "EE_spot_light": { + "color": 16777215, + "intensity": 10, + "range": 0, + "decay": 2, + "angle": 1, + "penumbra": 1, + "castShadow": false, + "shadowBias": 0.00001, + "shadowRadius": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_spot_light", + "EE_ecs" + ] +} \ No newline at end of file diff --git a/packages/projects/default-project/assets/prefabs/text.prefab.gltf b/packages/projects/default-project/assets/prefabs/text.prefab.gltf new file mode 100644 index 0000000000..64d0a18494 --- /dev/null +++ b/packages/projects/default-project/assets/prefabs/text.prefab.gltf @@ -0,0 +1,76 @@ +{ + "asset": { + "version": "2.0", + "generator": "THREE.GLTFExporter" + }, + "scenes": [ + { + "name": "New Object", + "nodes": [ + 0 + ] + } + ], + "scene": 0, + "nodes": [ + { + "name": "Text", + "extensions": { + "EE_uuid": "5a2c8504-899a-44e6-a103-40e0ec7117ab", + "EE_visible": true, + "EE_text_spatial": { + "text": "Cat ipsum dolor sit amet, munch, munch, chomp, chomp go crazy with excitement when plates are clanked together signalling the arrival of cat food lounge in doorway. Rub face on everything i like to spend my days sleeping and eating fishes that my human fished for me we live on a luxurious yacht, sailing proudly under the sun, i like to walk on the deck, watching the horizon, dreaming of a good bowl of milk yet ooooh feather moving feather! for rub my belly hiss. I see a bird i stare at it i meow at it i do a wiggle come here birdy kick up litter but ignore the squirrels, you'll never catch them anyway meow in empty rooms i like big cats and i can not lie. At four in the morning wake up owner meeeeeeooww scratch at legs and beg for food then cry and yowl until they wake up at two pm jump on window and sleep while observing the bootyful cat next door that u really like but who already has a boyfriend end up making babies with her and let her move in scream at teh bath so leave hair on owner's clothes. If human is on laptop sit on the keyboard haha you hold me hooman i scratch, cough furball into food bowl then scratch owner for a new one make muffins, so kick up litter let me in let me out let me in let me out let me in let me out who broke this door anyway . See owner, run in terror cats are cute show belly and steal mom's crouton while she is in the bathroom so skid on floor, crash into wall .", + "textOpacity": 100, + "textWidth": null, + "textIndent": 0, + "textAlign": "justify", + "textWrap": true, + "textWrapKind": "normal", + "textAnchor": { + "x": 0, + "y": 0 + }, + "textDepthOffset": 0, + "textCurveRadius": 0, + "lineHeight": "normal", + "letterSpacing": 0, + "textDirection": "auto", + "font": null, + "fontSize": 0.2, + "fontColor": 16777215, + "fontMaterial": 0, + "outlineOpacity": 0, + "outlineWidth": 0, + "outlineBlur": 0, + "outlineOffset": { + "x": 0, + "y": 0 + }, + "outlineColor": 0, + "strokeOpacity": 0, + "strokeWidth": 0, + "strokeColor": 4473924, + "textOrientation": "+x+y", + "clipActive": false, + "clipRectMin": { + "x": -1024, + "y": -1024 + }, + "clipRectMax": { + "x": 1024, + "y": 1024 + }, + "gpuAccelerated": true, + "glyphResolution": 6, + "glyphDetail": 1 + } + } + } + ], + "extensionsUsed": [ + "EE_uuid", + "EE_visible", + "EE_text_spatial", + "EE_ecs" + ] +} \ No newline at end of file