Skip to content

Commit

Permalink
mini-game-assets folder restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
dzsunyec committed Aug 7, 2024
1 parent 810a48f commit 8f86033
Show file tree
Hide file tree
Showing 41 changed files with 28 additions and 28 deletions.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed mini-game-models/environment.glb
Binary file not shown.
4 changes: 2 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const fs = require('fs')
const path = require('path')

const sourceDir = path.join(__dirname, '..', 'mini-game-models')
const destDir = path.join(process.cwd(), 'mini-game-models')
const sourceDir = path.join(__dirname, '..', 'mini-game-assets')
const destDir = path.join(process.cwd(), 'mini-game-assets')
const packageJson = require('../package.json')

console.log('running postinstall')
Expand Down
2 changes: 1 addition & 1 deletion src/environment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export function initEnvironment() {
position: Vector3.create(8, 0, 8),
rotation: Quaternion.fromEulerDegrees(0, 180, 0)
})
GltfContainer.create(environment, { src: 'mini-games-models/environment.glb' })
GltfContainer.create(environment, { src: 'mini-games-assets/models/environment.glb' })
}
4 changes: 2 additions & 2 deletions src/queueDisplay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ let waitingListEntity: Entity
let myPosEntity: Entity
let active = false
let currentScreen: number
const screensAtlas = 'mini-game-models/assets/scene/GameSigns.png'
const frameModel = 'mini-game-models/assets/scene/workstation_display.glb'
const screensAtlas = 'mini-game-assets/images/GameSigns.png'
const frameModel = 'mini-game-assets/models/workstation_display.glb'
let timer = 0
let timer2 = 0

Expand Down
4 changes: 2 additions & 2 deletions src/ui/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class InstructionsBoard {
height: number = 3.65
width: number = 6.3

constructor(transform: TransformTypeWithOptionals, width: number, height: number) {
constructor(transform: TransformTypeWithOptionals, width: number, height: number, texturePath:string) {

Check failure on line 16 in src/ui/instructions.ts

View workflow job for this annotation

GitHub Actions / build

Insert `·`
const { engine, Transform, MeshRenderer, Material } = getSDK()
this.width = width
this.height = height
Expand All @@ -23,7 +23,7 @@ export class InstructionsBoard {
this.textures = []
// TODO: this instructions should be passed as an argument.
// or keep this name and each scene MUST create that file with the following name.
this.textures.push('mini-game-models/images/instructions.png')
this.textures.push(texturePath)

this.board = engine.addEntity()
Transform.create(this.board, {
Expand Down
34 changes: 17 additions & 17 deletions src/ui/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,77 +32,77 @@ function getUVs(row: number, startBlock: number, width: number): number[] {
]
}
// SCOREBOARD
const scoreboardBackgroundLight = 'mini-game-models/assets/ui/scoreboard_bg.glb'
const scoreboardBackgroundDark = 'mini-game-models/assets/ui/scoreboard_bg_dark.glb'
const scoreboardBackgroundLight = 'mini-game-assets/models/ui/scoreboard_bg.glb'
const scoreboardBackgroundDark = 'mini-game-assets/models/ui/scoreboard_bg_dark.glb'

//BUTTONS
const squareBase = 'mini-game-models/assets/ui/button_base_square.glb'
const rectBase = 'mini-game-models/assets/ui/button_base_rectangle.glb'
const squareBase = 'mini-game-assets/models/ui/button_base_square.glb'
const rectBase = 'mini-game-assets/models/ui/button_base_rectangle.glb'

const SQUARE_GREEN: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_green.glb',
shape: 'mini-game-assets/models/ui/button_square_green.glb',
base: squareBase,
isRect: false
}
const SQUARE_RED: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_red.glb',
shape: 'mini-game-assets/models/ui/button_square_red.glb',
base: squareBase,
isRect: false
}
const SQUARE_YELLOW: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_yellow.glb',
shape: 'mini-game-assets/models/ui/button_square_yellow.glb',
base: squareBase,
isRect: false
}
const SQUARE_PURPLE: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_purple.glb',
shape: 'mini-game-assets/models/ui/button_square_purple.glb',
base: squareBase,
isRect: false
}
const SQUARE_WHITE: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_white.glb',
shape: 'mini-game-assets/models/ui/button_square_white.glb',
base: squareBase,
isRect: false
}
const SQUARE_BLACK: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_square_black.glb',
shape: 'mini-game-assets/models/ui/button_square_black.glb',
base: squareBase,
isRect: false
}

const RECT_GREEN: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_green.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_green.glb',
base: rectBase,
isRect: true
}
const RECT_RED: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_red.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_red.glb',
base: rectBase,
isRect: true
}
const RECT_YELLOW: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_yellow.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_yellow.glb',
base: rectBase,
isRect: true
}
const RECT_PURPLE: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_purple.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_purple.glb',
base: rectBase,
isRect: true
}
const RECT_WHITE: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_white.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_white.glb',
base: rectBase,
isRect: true
}
const RECT_BLACK: ButtonShapeData = {
shape: 'mini-game-models/assets/ui/button_rectangle_black.glb',
shape: 'mini-game-assets/models/ui/button_rectangle_black.glb',
base: rectBase,
isRect: true
}

//UI atlas
export const uiAtlas = 'mini-game-models/images/AtlasGames.png'
export const uiAtlas = 'mini-game-assets/images/AtlasGames.png'

//square icons
const checkmark: IconData = { uvs: getUVs(0, 0, 1), blockWidth: 1 }
Expand Down
8 changes: 4 additions & 4 deletions src/ui/winAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class WinAnimationHandler {
this.winAnimB = engine.addEntity()

GltfContainer.create(this.winAnimB, {
src: 'mini-game-models/assets/scene/winAnim.glb'
src: 'mini-game-assets/models/winAnim.glb'
})
VisibilityComponent.create(this.winAnimB, { visible: false })

Expand All @@ -43,7 +43,7 @@ export class WinAnimationHandler {
this.winAnimC = engine.addEntity()

GltfContainer.create(this.winAnimC, {
src: 'mini-game-models/assets/scene/winAnim.glb'
src: 'mini-game-assets/models/winAnim.glb'
})

Transform.create(this.winAnimC, {
Expand All @@ -57,7 +57,7 @@ export class WinAnimationHandler {
this.winAnimFollow = engine.addEntity()

GltfContainer.create(this.winAnimFollow, {
src: 'mini-game-models/assets/scene/winAnimFollow.glb'
src: 'mini-game-assets/models/winAnimFollow.glb'
})

Transform.create(this.winAnimFollow, {
Expand All @@ -72,7 +72,7 @@ export class WinAnimationHandler {
this.winAnimText = engine.addEntity()

GltfContainer.create(this.winAnimText, {
src: 'mini-game-models/assets/scene/winAnimText.glb'
src: 'mini-game-assets/models/winAnimText.glb'
})

Transform.create(this.winAnimText, {
Expand Down

0 comments on commit 8f86033

Please sign in to comment.