-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yuki Shimada
committed
Sep 15, 2024
1 parent
93add5d
commit cd1d409
Showing
37 changed files
with
128 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ICameraEntity } from '../../helpers/EntityHelper'; | ||
import { createGroupEntity } from '../SceneGraph/createGroupEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createCameraEntity(): ICameraEntity { | ||
const entity = createGroupEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.CameraComponentTID, | ||
entity | ||
) as ICameraEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './CameraComponent'; | ||
export * from './ICameraEntity'; | ||
export * from './createCameraEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/foundation/components/CameraController/createCameraControllerEntity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ICameraControllerEntity } from '../../helpers/EntityHelper'; | ||
import { createCameraEntity } from '../Camera/createCameraEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createCameraControllerEntity(): ICameraControllerEntity { | ||
const entity = createCameraEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.CameraControllerComponentTID, | ||
entity | ||
) as ICameraControllerEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './CameraControllerComponent'; | ||
export * from './ICameraControllerEntity'; | ||
export * from './createCameraControllerEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ILightEntity } from '../../helpers/EntityHelper'; | ||
import { createGroupEntity } from '../SceneGraph/createGroupEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createLightEntity(): ILightEntity { | ||
const entity = createGroupEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.LightComponentTID, | ||
entity | ||
) as ILightEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './ILightEntity'; | ||
export * from './LightComponent'; | ||
export * from './createLightEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/foundation/components/MeshRenderer/createMeshEntity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { IMeshEntity } from '../../helpers/EntityHelper'; | ||
import { createGroupEntity } from '../SceneGraph/createGroupEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createMeshEntity(): IMeshEntity { | ||
const entity = createGroupEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.MeshComponentTID, | ||
entity | ||
); | ||
const entityAddedComponent2 = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.MeshRendererComponentTID, | ||
entityAddedComponent | ||
) as IMeshEntity; | ||
return entityAddedComponent2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './IMeshRendererEntity'; | ||
export * from './MeshRendererComponent'; | ||
export * from './createMeshEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { IPhysicsEntity } from '../../helpers/EntityHelper'; | ||
import { createGroupEntity } from '../SceneGraph/createGroupEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createPhysicsEntity(): IPhysicsEntity { | ||
const entity = createGroupEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.PhysicsComponentTID, | ||
entity | ||
) as IPhysicsEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './IPhysicsEntity'; | ||
export * from './PhysicsComponent'; | ||
export * from './createPhysicsEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ISceneGraphEntity } from '../../helpers/EntityHelper'; | ||
import { createTransformEntity } from '../Transform/TransformComponent'; | ||
import { createTransformEntity } from '../Transform/createTransformEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
import { SceneGraphComponent } from './SceneGraphComponent'; | ||
|
||
export function createGroupEntity(): ISceneGraphEntity { | ||
const entity = createTransformEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.SceneGraphComponentTID, | ||
entity | ||
) as ISceneGraphEntity; | ||
// const entityAddedComponent = EntityRepository.addComponentToEntity( | ||
// SceneGraphComponent, | ||
// entity | ||
// ) as ISceneGraphEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/foundation/components/Skeletal/createSkeletalEntity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ISkeletalEntity } from '../../helpers/EntityHelper'; | ||
import { createGroupEntity } from '../SceneGraph/createGroupEntity'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createSkeletalEntity(): ISkeletalEntity { | ||
const entity = createGroupEntity(); | ||
const entityAddedComponent = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.SkeletalComponentTID, | ||
entity | ||
) as ISkeletalEntity; | ||
return entityAddedComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './AnimationRetarget'; | ||
export * from './ISkeletalEntity'; | ||
export * from './SkeletalComponent'; | ||
export * from './createSkeletalEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/foundation/components/Transform/createTransformEntity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { EntityRepository } from '../../core/EntityRepository'; | ||
import { ITransformEntity } from '../../helpers/EntityHelper'; | ||
import { WellKnownComponentTIDs } from '../WellKnownComponentTIDs'; | ||
|
||
export function createTransformEntity(): ITransformEntity { | ||
const entity = EntityRepository.createEntity(); | ||
const entity1 = EntityRepository.tryToAddComponentToEntityByTID( | ||
WellKnownComponentTIDs.TransformComponentTID, | ||
entity | ||
) as ITransformEntity; | ||
return entity1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './ITransformEntity'; | ||
export * from './TransformComponent'; | ||
export * from './createTransformEntity'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.