Package Exports
- rt-dcl-sdk-6
- rt-dcl-sdk-6/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rt-dcl-sdk-6) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SDK Library
A library for interacting with https://reward.tools via Decentraland SDK 6.
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 -B rt-dcl-sdk-6 dcldash zootoolsAdd this line at the start of your game.ts file, or any other TypeScript files that require it:
import * as RewardTools from 'rt-dcl-sdk-6';
Usage
POAP Booth
Spawn a POAP booth.
import { RTBooth } from "rt-dcl-sdk-6";
import { AlertSystem } from "zootools";
const alertSystem = new AlertSystem();
const dispenser = new RTBooth(
{
transformArgs: {
position: new Vector3(8, 0, 8),
},
baseParcel: `96,99`,
onAlert: (alert: string) => alertSystem.new(alert),
},
);
//POAP Drop
dispenser.setPOAPRewardId("rewardId");
//...or DCL Airdrop
dispenser.setDCLAirdropRewardId("rewardId");
engine.addEntity(dispenser.booth);Be sure to add the models and images folders to the root of your scene with the respective files in this repository
Copyright info
This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.