JSPM

rt-dcl-sdk-6

1.0.14
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q20382F
  • License Apache-2.0

reward.tools Decentraland SDK 6 Library

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:

  1. Install it as an npm package. Run this command in your scene's project folder:

    npm install -B rt-dcl-sdk-6 dcldash zootools
  2. 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

This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.