-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed workspace and added scene emotes test scene
- Loading branch information
Showing
13 changed files
with
128 additions
and
3 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
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,20 @@ | ||
.* | ||
bin/*.map | ||
package-lock.json | ||
yarn-lock.json | ||
build.json | ||
export | ||
tsconfig.json | ||
tslint.json | ||
node_modules | ||
*.ts | ||
*.tsx | ||
.vscode | ||
Dockerfile | ||
dist | ||
README.md | ||
*.blend | ||
*.fbx | ||
*.zip | ||
*.rar | ||
src |
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,10 @@ | ||
package-lock.json | ||
*.js | ||
node_modules | ||
bin/ | ||
.DS_Store | ||
**/.DS_Store | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.idea/ |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,29 @@ | ||
{ | ||
"name": "scene-emotes", | ||
"description": "Avatar custom animations from the scene", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@dcl-sdk/utils": "latest" | ||
}, | ||
"devDependencies": { | ||
"@dcl/sdk": "latest", | ||
"@dcl/js-runtime": "7.7.5" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0", | ||
"npm": ">=6.0.0" | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "none" | ||
}, | ||
"scripts": { | ||
"build": "sdk-commands build", | ||
"deploy": "sdk-commands deploy", | ||
"start": "sdk-commands start", | ||
"upgrade-sdk": "npm install --save-dev @dcl/sdk@latest", | ||
"upgrade-sdk:next": "npm install --save-dev @dcl/sdk@next" | ||
} | ||
} |
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,26 @@ | ||
{ | ||
"ecs7": true, | ||
"runtimeVersion": "7", | ||
"display": { | ||
"title": "scene-emotes", | ||
"description": "A simple scene to play avatar emote animations triggered by the scene", | ||
"navmapThumbnail": "images/scene-thumbnail.png", | ||
"favicon": "favicon_asset" | ||
}, | ||
"owner": "", | ||
"contact": { | ||
"name": "SDK", | ||
"email": "" | ||
}, | ||
"main": "bin/index.js", | ||
"tags": [], | ||
"scene": { | ||
"parcels": [ | ||
"80,-1" | ||
], | ||
"base": "80,-1" | ||
}, | ||
"spawnPoints": [], | ||
"featureToggles": {}, | ||
"name": "scene-emotes" | ||
} |
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,26 @@ | ||
import { Vector3 } from '@dcl/sdk/math' | ||
import { triggerEmote, triggerSceneEmote } from '~system/RestrictedActions' | ||
|
||
import * as utils from '@dcl-sdk/utils' | ||
import { engine, GltfContainer, Transform } from '@dcl/sdk/ecs' | ||
|
||
utils.addTestCube({ position: Vector3.create(8, 1, 5) }, () => { | ||
triggerEmote({ predefinedEmote: 'robot' }) | ||
}, "Trigger Avatar Emote") | ||
|
||
utils.addTestCube({ position: Vector3.create(8, 1, 8) }, () => { | ||
triggerSceneEmote({ src: 'animations/Crafting_Snowball.glb', loop: false }) | ||
}, "Trigger Scene Emote Craft Snowball") | ||
|
||
utils.addTestCube({ position: Vector3.create(8, 1, 12) }, () => { | ||
triggerSceneEmote({ src: 'animations/Snowball_Throw.glb', loop: false }) | ||
}, "Trigger Scene Emote Snowball Throw") | ||
|
||
|
||
let snowTree = engine.addEntity() | ||
|
||
GltfContainer.create(snowTree, { src: "models/SnowTree_01.glb" }) | ||
Transform.create(snowTree, { | ||
position: Vector3.create(12, 0, 10), | ||
scale: Vector3.create(1, 1, 1) | ||
}) |
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"strict": true | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx" | ||
], | ||
"extends": "@dcl/sdk/types/tsconfig.ecs7.json" | ||
} |