dcl-l2-frame
v1.0.0-20230505231753.commit-34f9e9f
Published
Decentraland libary for implementing a NFT Frame for L2 items, both 721 and 1155 standards.
Downloads
2
Maintainers
Readme
DCL L2 NFT Frame
This project allows you to integrate an NFT Frame with L2 nfts into decentraland.
Install
To use any of the helpers provided by this library:
Install it as an npm package. Run this command in your scene's project folder:
npm install dcl-l2-frame
npm i @dcl/l2-scene-utils eth-connect decentraland-transactions -B
Add this line at the start of your game.ts file, or any other TypeScript files that require it:
import { l2NFTFrame } from "dcl-l2-frame";
Usage
Basic Audius Player Integration
The L2 frame requires the following parameters:
ui
: boolean to add an on click event to the NFT Framenft type
: 721 or 1155 token standardcontract
: nft contract addresstokenId
: nft token idtransform
:TransformConstructorArgs for positioning in DCL worldcolor
:optional
Color4 parameter for the NFT Frame bg colorframe
:optional
PictureFrameStyle
to style the NFT Framelet nft = l2NFTFrame(true,721, "0x73b2798d287b41e69a1fc34179a1517153ac5a5b", "69", {position: new Vector3(8,2,8), scale: new Vector3(2,2,1)}, Color3.Blue(), PictureFrameStyle.Baroque_Ornament)
...
Copyright info
This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.