decentraland-scenes / Shark-animation

This simple scene shows how to add animations to a `GLTFComponent` and handle click events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shark animation

This simple scene shows how to add animations to a GLTFComponent and handle click events.

This scene shows you:

  • How to add 3D models
  • How to play animations from a 3D model
  • How to toggle animations on or off from a 3D model
  • How to handle click events on an entity

Try it out

Install the CLI

Download and install the Decentraland CLI by running the following command:

npm i -g decentraland

Previewing the scene

Download this example and navigate to its directory, then run:

$:  dcl start

Any dependencies are installed and then the CLI opens the scene in a new browser tab.

Scene Usage

Click on the shark to toggle the bite animation on and off. The swim animation should be always on.

Learn more about how to build your own scenes in our documentation site.

If something doesn’t work, please file an issue.

Copyright info

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

About

This simple scene shows how to add animations to a `GLTFComponent` and handle click events.

License:Apache License 2.0


Languages

Language:TypeScript 70.6%Language:Dockerfile 29.4%