A cinematic teleportation system for Decentraland SDK7 scenes with animated ripple effects and smooth camera transitions.
- Animated Teleporter Pads: Multi-layered planes with ripple animation effects
- Cinematic Camera Transitions: Smooth camera movement from teleporter to destination (DCL 2.0 Desktop Client only)
- Customizable Textures: Support for custom teleporter pad and logo textures
- Text Labels: Floating text labels above teleporters with billboard effect
- Collision Detection: Automatic teleportation when players step on the pad
-
Clone this repository into your Decentraland project
-
Copy the teleporter system files to your
src/directory:src/teleporter.tssrc/components.ts(add the Teleporter components)
-
Install dependencies:
npm installImport the teleporter system in your main scene file:
import { createTeleporter, teleporterSystem, teleporterRippleSystem } from './teleporter'
export function main() {
// Add required systems
engine.addSystem(teleporterSystem)
engine.addSystem(teleporterRippleSystem)
// Create a teleporter
createTeleporter(
{ x: 4, y: 0.5, z: 4 }, // Teleporter position
{ x: 4, y: 0.1, z: 24 }, // Destination position
'images/teleporter-pad.png', // Teleporter texture
'images/logo.png', // Logo texture
'Games' // Label text
)
}createTeleporter(
position: { x: number, y: number, z: number },
destination: { x: number, y: number, z: number },
textureSrc?: string, // Default: 'images/teleporter-pad.png'
logoTextureSrc?: string, // Default: 'images/Commodore Logo.png'
labelText?: string // Default: 'Teleporter'
)- Main Plane: Collision-enabled plane with teleporter texture
- Ripple Layers: 4 animated child planes with transparency effects
- Logo Overlay: Independent logo plane positioned above the pad
- Billboard Text: Always faces the player (X-axis rotation)
- Position: 2 meters above the teleporter pad
- Styling: White text with black outline
- Ripple Effect: Sine wave animation across layers
- Phase Offset: 0.25 phase difference between layers
- Duration: 1 second animation cycle
- DCL 2.0 Desktop Client: Virtual cameras only work in the desktop client
- Local Testing: Camera transitions disabled for local development
- Start Camera: Positioned above teleporter, looking towards destination
- Transition: 3-second smooth camera movement to destination
- Player Teleport: Occurs when camera reaches destination
- Reset: Returns to player camera after 1 second
src/
├── teleporter.ts # Main teleporter system
├── components.ts # ECS components (Teleporter, TeleporterRipple)
├── index.ts # Scene entry point
└── ui.tsx # Optional UI with test camera button
images/
├── teleporter-pad.png # Main teleporter texture
└── logo.png # Logo overlay texture
npm run start- Basic teleportation works
- Camera transitions disabled
- Ripple animations functional
npm run build
npm run deploy- Full camera transitions enabled
- Requires DCL 2.0 Desktop Client for camera effects
Use the included UI test button to verify virtual camera functionality:
import { setupUi } from './ui'
// Enable UI for camera testing
setupUi()- Teleporter Pad: Supports transparency (PNG recommended)
- Logo: Any image format, positioned independently
- Size: Textures are scaled to fit 2x2 unit planes
Modify animation parameters in teleporterRippleSystem():
const animationDuration = 1.0 // Animation cycle time
const phaseOffset = 0.25 // Phase difference between layersAdjust camera positioning in teleporterSystem():
position: Vector3.create(teleporterPos.x, teleporterPos.y + 3, teleporterPos.z)- Ensure you're testing in DCL 2.0 Desktop Client
- Check console logs for virtual camera creation messages
- Verify scene permissions in
scene.json
- Check player collision detection range (default: 1.5 units X/Z, 3 units Y)
- Verify teleporter position is accessible to players
- Check cooldown timer (prevents rapid teleporting)
- Ensure
teleporterRippleSystemis added to engine - Check material transparency settings
- Verify ripple components are being created
- Fork the repository
- Create a feature branch
- Make your changes
- Test in both local and deployed environments
- Submit a pull request
MIT License - feel free to use in your Decentraland scenes!
Built for Decentraland SDK7 using Entity-Component-System architecture.
