rt-dcl-sdk-6
v1.0.14
Published
reward.tools Decentraland SDK 6 Library
Downloads
64
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 zootools
Add 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.