Skip to content

C3D.create 创建的场景 外部怎么获取 子场景来做动画? #14

@FeSeason

Description

@FeSeason

var scene1 = C3D.create({
            type: 'sprite',
            position: [0,170,-s.fov],
            scale: [0.29198],
            children: [
                {
                    type: 'plane',
                    name: 'market',
                    size: [2192, 5134],
                    material: [
                        { image: this.bgData[0].url, repeat:'no-repeat' }
                    ]
                },
                {
                    type: 'sprite',
                    name: 'classes',
                    position: [-420,-1260],
                    children: [
                        {
                            type: 'plane',
                            name: 'leftWin',
                            position: [0,0],
                            size: [834, 797],
                            material: [
                                { image: this.bgData[2].url, repeat: 'no-repeat' }
                            ]
                        },
                        {
                            type: 'plane',
                            name: 'rightWin',
                            size: [835, 797],
                            position: [835,0],
                            material: [
                                { image: this.bgData[3].url, repeat: 'no-repeat' }
                            ]
                        },
                    ]
                },
                {
                    type: 'plane',
                    name: 'door',
                    size: [2192, 1114],
                    position: [0,-1410],
                    material: [
                        {image: this.bgData[4].url, repeat: 'no-repeat'}
                    ]
                }

            ]
        });

如果获取children 中 name 为 leftWin 的 plane?
补充:因为要取出来使用Tween做动画

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions