-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#railroad: Switch elf texture when they get a present (#154)
* #railroad: added blender plugin and re-exported scene * #railroad: Switch elf textures when they get a present * #railroad: addressed comments on PR * #railroad: small adjustments to PR fixes
- Loading branch information
Showing
9 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -13,6 +13,11 @@ const ELF_IMAGE_NAMES = [ | |
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
]; | ||
/** @type {Map<string, THREE.Texture>} */ | ||
|
@@ -157,8 +162,15 @@ function replaceElvesWithSprites(scene) { | |
|
||
sprite.material.rotation = (node.rotation.y); | ||
sprite.userData.isElf = true; | ||
sprite.userData.clickable = {type: 'elf'}; | ||
sprite.userData.assetUrl = assetUrl; | ||
node.add(sprite); | ||
}); | ||
} | ||
|
||
function getElfImage(assetUrl) { | ||
return elfImages.get(assetUrl); | ||
} | ||
|
||
app.Scene = Scene; | ||
app.getElfImage = getElfImage; |
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