Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
rename entity
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Jul 31, 2024
1 parent 7bcb0d1 commit b6997d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/examples/gltf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { InputComponent } from '@etherealengine/spatial/src/input/components/Inp
import { RendererState } from '@etherealengine/spatial/src/renderer/RendererState'
import { VisibleComponent } from '@etherealengine/spatial/src/renderer/components/VisibleComponent'
import { EntityTreeComponent } from '@etherealengine/spatial/src/transform/components/EntityTree'
import { Color, Vector3 } from 'three'
import { Color, Euler, Quaternion, Vector3 } from 'three'
export const metadata = {
title: 'GLTF',
description: ''
Expand Down Expand Up @@ -54,9 +54,9 @@ const GLTF = () => {
}

const entity = createEntity()
setComponent(entity, UUIDComponent, 'ambient light' as EntityUUID)
setComponent(entity, NameComponent, 'Ambient Light')
setComponent(entity, TransformComponent)
setComponent(entity, UUIDComponent, 'directional light' as EntityUUID)
setComponent(entity, NameComponent, 'Directional Light')
setComponent(entity, TransformComponent, { rotation: new Quaternion().setFromEuler(new Euler(2, 5, 3)) })
setComponent(entity, EntityTreeComponent, { parentEntity: getState(EngineState).originEntity })
setComponent(entity, VisibleComponent, true)
setComponent(entity, DirectionalLightComponent, { color: new Color('white'), intensity: 1 })
Expand Down

0 comments on commit b6997d4

Please sign in to comment.