Skip to content
This repository was archived by the owner on Jan 12, 2023. It is now read-only.

Commit 569d0cc

Browse files
author
Gary Rutland
committed
Updated to use library
1 parent dcfa0ff commit 569d0cc

5 files changed

Lines changed: 14 additions & 69 deletions

File tree

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
engine-strict=true
1+
engine-strict=true
2+
@lickdltd:registry=https://npm.pkg.github.com

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"yarn": "please use npm"
2323
},
2424
"dependencies": {
25-
"@dcl/ecs-scene-utils": "^1.7.5"
25+
"@lickdltd/chorus-dcl": "0.1.0"
2626
},
2727
"bundleDependencies": [
28-
"@dcl/ecs-scene-utils"
28+
"@lickdltd/chorus-dcl"
2929
]
3030
}

src/chorus.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/game.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
import { Chorus } from './chorus'
21
import { getUserData } from '@decentraland/Identity'
2+
import * as chorus from '@lickdltd/chorus-dcl'
33

44
void executeTask(async () => {
55
const chorusEntity = new Entity()
6-
const chorus = new Chorus(chorusEntity, '/genre/chill.mp3', 10000)
6+
const chorusPlayer = new chorus.Player(chorusEntity, '/lickd/test.mp3')
77
const me = await getUserData()
88

9+
await chorusPlayer.start()
10+
911
onEnterSceneObservable.add(async (player) => {
1012
if (player.userId === me?.userId) {
11-
await chorus.start()
13+
await chorusPlayer.start()
1214
}
1315
})
1416

1517
onLeaveSceneObservable.add(async (player) => {
1618
if (player.userId === me?.userId) {
17-
await chorus.stop()
19+
await chorusPlayer.stop()
1820
}
1921
})
2022

tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"paths": {
77
"@dcl/ecs-scene-utils": [
88
"node_modules/@dcl/ecs-scene-utils/dist/index.d.ts"
9+
],
10+
"@lickdltd/chorus-dcl": [
11+
"node_modules/@lickdltd/chorus-dcl/dist/index.d.ts",
12+
"../chorus-dcl/dist/index.d.ts"
913
]
1014
},
1115
"baseUrl": "."

0 commit comments

Comments
 (0)