Error when try to play animation

Hi, I´m using PlayCanvas Standalone (without editor)…
I tried to play an animation but nothing ocurring, I think that the problem is how rootBone is assigned or someone has an idea?
When I tried the same in editor, its working fine, but for personal reasons I must use PlayCanvas Standalone.

I extract animations from a GLB asset.

This is the code:

var ChildLod0 = modelEntity.findByName('ChildLOD0');
ChildLod0.render.rootBone = modelEntity;

modelEntity.addComponent('anim', {
    activate: true

const animations =;
const animStateGraphData = {
    "layers": [
            "name": "Base",
            "states": [
                    "name": "START"
                    "name": "Idle",
                    "speed": 1.0,
                    "loop": true
            "transitions": [
                    "from": "START",
                    "to": "Idle",
                    "time": 0.0,
                    "priority": 0
    "parameters": {}

if (animations && animations.length > 0) {
    modelEntity.anim.assignAnimation('Base', 'Idle', animations[0]);
} else {
    console.error('No animations found in the GLB file.');

Using reference: api

Have you seen the examples here?

Thanks for reply, I could resolve issue whis this example

Update: After loadStateGraph I just add this code

  const characterStateLayer = modelEntity.anim.baseLayer;
  characterStateLayer.assignAnimation('Idle', animations[0]);