Skip to content

Instantly share code, notes, and snippets.

@bryzettler
Created October 20, 2017 00:31
Show Gist options
  • Save bryzettler/43662b3cf2c2bf0570ecddf533ea2b7b to your computer and use it in GitHub Desktop.
Save bryzettler/43662b3cf2c2bf0570ecddf533ea2b7b to your computer and use it in GitHub Desktop.
const mergeProps = ({assets, playerItemAssets, items, player}, dispatchToProps, props) => ({
assets,
playerItemAssets,
items,
player,
...dispatchToProps,
missingItemAssets: memoMissingAssets(assets, playerItemAssets),
playerMesh: {
verts: selectPlayerAnim(playerItemAssets, player.skeleton, assets),
count: (selectPlayerAnim(playerItemAssets, player.skeleton, assets).length / 12),
},
view: mat4.lookAt(
[],
initialCameraState.eye,
initialCameraState.target,
initialCameraState.up
),
projection: mat4.perspective(
[],
Math.PI / 4,
props.width / props.height,
0.1,
1000.0
),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment