[go: up one dir, main page]

CN116204170A - Visual programming method and device and electronic equipment - Google Patents

Visual programming method and device and electronic equipment Download PDF

Info

Publication number
CN116204170A
CN116204170A CN202310078884.1A CN202310078884A CN116204170A CN 116204170 A CN116204170 A CN 116204170A CN 202310078884 A CN202310078884 A CN 202310078884A CN 116204170 A CN116204170 A CN 116204170A
Authority
CN
China
Prior art keywords
tracking target
building block
area
window area
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310078884.1A
Other languages
Chinese (zh)
Inventor
曲健波
薛天铎
渠鹏
孙正昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xintang Sichuang Education Technology Co Ltd
Original Assignee
Beijing Xintang Sichuang Education Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xintang Sichuang Education Technology Co Ltd filed Critical Beijing Xintang Sichuang Education Technology Co Ltd
Priority to CN202310078884.1A priority Critical patent/CN116204170A/en
Publication of CN116204170A publication Critical patent/CN116204170A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本公开提供一种可视化编程方法及装置和电子设备,所述方法包括:响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,视窗区域用于展示虚拟场景中与第一追踪目标的位置对应的局部区域;基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。本公开提供的方法可以在开始运行第一追踪目标对应的运动积木块时,以第一追踪目标为追踪目标,在第一追踪目标的移动过程中,在视窗区域动态展示虚拟场景中与第一追踪目标的位置对应的局部区域,解决了现有技术中视窗区域不具备可延展性的技术问题,使得视窗区域内的场景画面丰富多变,更具灵动性,从而提升用户的视觉体验。

Figure 202310078884

The present disclosure provides a visual programming method and device and electronic equipment, the method comprising: in response to the selection operation of the moving building block, adding a moving building block corresponding to the first tracking target displayed in the window area in the visual programming area, The window area is used to display the local area corresponding to the position of the first tracking target in the virtual scene; based on the movement parameters of the first tracking target defined by the moving building block, the rendering parameters of the local area when running the moving building block are determined. The method provided by the present disclosure can use the first tracking target as the tracking target when starting to run the motion building block corresponding to the first tracking target, and dynamically display the virtual scene in the window area with the first tracking target during the movement process. Tracking the local area corresponding to the position of the target solves the technical problem that the window area does not have scalability in the prior art, making the scenes in the window area richer and more flexible, thereby improving the user's visual experience.

Figure 202310078884

Description

一种可视化编程方法及装置和电子设备A visual programming method and device and electronic equipment

技术领域technical field

本公开涉及计算机技术领域,尤其涉及一种可视化编程方法及装置和电子设备。The present disclosure relates to the technical field of computers, in particular to a visual programming method and device and electronic equipment.

背景技术Background technique

可视化编程工具可以将代码形式文本编程语言转换成易于理解的图形编程语言,用户通过阅读一系列图形内容来理解其表达的功能含义。The visual programming tool can convert the code-form text programming language into an easy-to-understand graphical programming language, and users can understand the functional meaning expressed by reading a series of graphical content.

相关技术中,可视化编程工具的视窗区域展示的场景画面可以通过素材选择、编辑、组合等方式进行编辑,实现可视化编程工具的视窗区域展示的场景画面多样化和丰富化。In the related art, the scene picture displayed in the window area of the visual programming tool can be edited by means of material selection, editing, combination, etc., so as to realize the diversification and enrichment of the scene picture displayed in the window area of the visual programming tool.

发明内容Contents of the invention

根据本公开的一方面,提供了一种可视化编程方法,所述方法包括:According to an aspect of the present disclosure, a visual programming method is provided, the method comprising:

响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,视窗区域用于展示虚拟场景中与第一追踪目标的位置对应的局部区域;In response to the selection operation of the motion building block, a motion building block corresponding to the first tracking target displayed in the window area is added in the visual programming area, and the window area is used to display the local area corresponding to the position of the first tracking target in the virtual scene ;

基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。Based on the moving parameters of the first tracking target defined by the moving building blocks, the rendering parameters of the local area when the moving building blocks are running are determined.

根据本公开的另一方面,提供了一种可视化编程装置,所述装置包括:According to another aspect of the present disclosure, a visual programming device is provided, the device comprising:

增加模块,用于响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,视窗区域用于展示虚拟场景中与第一追踪目标的位置对应的局部区域;The adding module is used to respond to the selection operation of the moving building block, and increase the moving building block corresponding to the first tracking target displayed in the window area in the visual programming area, and the window area is used to display the relationship between the first tracking target and the first tracking target in the virtual scene. The local area corresponding to the position;

确定模块,用于基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。The determining module is configured to determine the rendering parameters of the local area when the moving building blocks are running based on the movement parameters of the first tracking target defined by the moving building blocks.

根据本公开的另一方面,提供了一种电子设备,包括:According to another aspect of the present disclosure, an electronic device is provided, including:

处理器;以及,Processor; and,

存储程序的存储器;memory for storing programs;

其中,程序包括指令,指令在由处理器执行时使处理器执行根据本公开示例性实施例所述的方法。Wherein, the program includes instructions which, when executed by the processor, cause the processor to perform the method according to the exemplary embodiments of the present disclosure.

根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行根据本公开示例性实施例所述的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to the exemplary embodiments of the present disclosure.

本公开示例性实施例中提供的一个或多个技术方案,可以响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,此时,视窗区域可以展示虚拟场景中与第一追踪目标的位置对应的局部区域。然后,可以基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。可见,本公开示例性实施例的方法可以利用第一追踪目标的移动参数确定虚拟场景在视窗区域展示的局部区域的渲染参数,当开始运行第一追踪目标对应的运动积木块时,可以以第一追踪目标为追踪目标,在第一追踪目标的移动过程中,在视窗区域动态展示虚拟场景中与第一追踪目标的位置对应的局部区域,解决了现有技术中视窗区域不具备可延展性的技术问题,使得视窗区域内的场景画面丰富多变,更具灵动性,从而提升用户的视觉体验。One or more technical solutions provided in the exemplary embodiments of the present disclosure can respond to the selection operation of the motion building block, and add the motion building block corresponding to the first tracking target displayed in the window area in the visual programming area, at this time , the window area may display a local area in the virtual scene corresponding to the position of the first tracking target. Then, based on the movement parameters of the first tracking target defined by the motion building block, the rendering parameters of the local area when the motion building block is running can be determined. It can be seen that the method of the exemplary embodiment of the present disclosure can use the movement parameters of the first tracking target to determine the rendering parameters of the local area displayed in the virtual scene in the window area. The first tracking target is the tracking target. During the movement of the first tracking target, the local area corresponding to the position of the first tracking target in the virtual scene is dynamically displayed in the window area, which solves the problem that the window area does not have scalability in the prior art. The technical problems in the window area make the scenes in the window area more varied and more flexible, thereby improving the user's visual experience.

附图说明Description of drawings

在下面结合附图对于示例性实施例的描述中,本公开的更多细节、特征和优点被公开,在附图中:Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments with reference to the accompanying drawings in which:

图1示出了实现本公开示例性实施例方法的图形编辑器的示例性界面示意图;FIG. 1 shows an exemplary interface schematic diagram of a graphical editor implementing a method in an exemplary embodiment of the present disclosure;

图2示出了本公开示例性实施例的可视化编程方法的流程图;FIG. 2 shows a flowchart of a visual programming method according to an exemplary embodiment of the present disclosure;

图3A示出了本公开示例性实施例的一种可视化编程界面的示意图;FIG. 3A shows a schematic diagram of a visual programming interface of an exemplary embodiment of the present disclosure;

图3B示出了本公开示例性实施例的另一种可视化编程界面的示意图;FIG. 3B shows a schematic diagram of another visual programming interface of an exemplary embodiment of the present disclosure;

图4示出了本公开示例性实施例的确定局部区域的渲染参数的流程图;Fig. 4 shows a flow chart of determining rendering parameters of a local area according to an exemplary embodiment of the present disclosure;

图5示出了本公开示例性实施例的一种虚拟场景的示意图;Fig. 5 shows a schematic diagram of a virtual scene according to an exemplary embodiment of the present disclosure;

图6A~图6B示出了本公开示例性实施例的基于相机视野参数控制局部区域的过程示意图;6A to 6B show a schematic diagram of the process of controlling a local area based on camera field of view parameters in an exemplary embodiment of the present disclosure;

图7A~图7B示出了本公开示例性实施例的第二追踪目标的第一种追踪过程示意图;7A to 7B are schematic diagrams of a first tracking process of a second tracking target according to an exemplary embodiment of the present disclosure;

图8A~图8C示出了本公开示例性实施例的第二追踪目标的第二种追踪过程示意图;8A to 8C are schematic diagrams of a second tracking process of a second tracking target according to an exemplary embodiment of the present disclosure;

图9示出了本公开示例性实施例的可视化编程装置的模块示意性框图;Fig. 9 shows a schematic block diagram of modules of a visual programming device according to an exemplary embodiment of the present disclosure;

图10示出了本公开示例性实施例的芯片的示意性框图;FIG. 10 shows a schematic block diagram of a chip of an exemplary embodiment of the present disclosure;

图11示出了能够用于实现本公开的实施例的示例性电子设备的结构框图。FIG. 11 shows a structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.

应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this respect.

本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below. It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.

需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".

本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.

在介绍本公开实施例之前首先对本公开实施例中涉及到的相关名词作如下释义:Before introducing the embodiments of the present disclosure, the relevant nouns involved in the embodiments of the present disclosure are defined as follows:

可视化编程工具是指将代码形式文本编程语言转换成易于理解的图形编程语言,用户通过阅读一系列图形内容来理解其表达的功能含义,利用图形编辑语言进行编程的工具。A visual programming tool refers to a tool that converts a text programming language in code form into an easy-to-understand graphical programming language. Users can understand the functional meaning expressed by reading a series of graphic content, and use a graphical editing language for programming.

积木块(Blockly)是指用于图形化编程的积木块。技术人员通过将常用的程序语言配置到具有实体图形的积木块中,从而能够让用户根据积木块的形状以及积木块所指示的逻辑语言进行排列和组合,用户在排列和组合各积木块的同时,能够将积木块的程序语言进行关联,从而实现程序构建。Blockly refers to building blocks used for graphical programming. By configuring commonly used programming languages into building blocks with physical graphics, technicians can allow users to arrange and combine according to the shape of the building blocks and the logic language indicated by the building blocks. Users can arrange and combine the building blocks at the same time , can associate the programming language of the building blocks, so as to realize the program construction.

抽象语法树(Abstract Syntax Tree,AST),或简称语法树(Syntax tree),是源代码语法结构的一种抽象表示。它以树状的形式表现编程语言的语法结构,树上的每个节点都表示源代码中的一种结构。Abstract Syntax Tree (AST), or Syntax tree for short, is an abstract representation of the grammatical structure of source code. It represents the grammatical structure of the programming language in the form of a tree, and each node on the tree represents a structure in the source code.

Game Engine是一款基于Javascript,用于web动画渲染的动画引擎,可扩展到各平台的可移植轻量的游戏引擎。Game Engine is a Javascript-based animation engine for web animation rendering. It is a portable and lightweight game engine that can be extended to various platforms.

相关技术中,在图形化编程课堂中,在使用图形化编程工具(如Scratch等)进行图形化编程的教学时,用户可以选择想要的场景画面模板,然后在视窗区域内展示相应的场景画面,场景画面模板可以在素材库中直接选择,也可以从本地存储中上传,还可以即时绘制。但不管是哪种场景画面模板,只要场景画面模板确定后,在视窗区域内展示的场景画面的尺寸参数就随之确定,该场景画面的尺寸参数不能修改,且该场景画面的尺寸参数定义的区域被完全涵盖在视窗区域内。当程序编辑完成后,该程序展现在前端页面的动画在运行过程中,视窗区域内展示的场景画面始终固定,场景画面在视窗区域的显示比例不能缩放,场景画面的尺寸参数也不能调整。In related technologies, in a graphical programming class, when using a graphical programming tool (such as Scratch, etc.) to teach graphical programming, the user can select a desired scene picture template, and then display the corresponding scene picture in the window area , the scene picture template can be directly selected in the material library, or uploaded from the local storage, and can be drawn in real time. But no matter what kind of scene picture template, as long as the scene picture template is determined, the size parameters of the scene picture displayed in the window area will be determined accordingly, the size parameters of the scene picture cannot be modified, and the size parameters of the scene picture defined by The area is completely covered by the viewport area. After the program is edited, the animation displayed on the front-end page of the program is running, the scene picture displayed in the window area is always fixed, the display ratio of the scene picture in the window area cannot be zoomed, and the size parameters of the scene picture cannot be adjusted.

另外,虽然现有图形化编程工具也可以通过积木编程实现将场景画面布置在视窗区域之外的隐藏区域,从而实现场景画面在视窗区域之外的延展,而这种场景画面的实现需要复杂的积木逻辑,因此,对用户自身的图形化编程能力具有极高的要求。In addition, although the existing graphical programming tools can also implement building block programming to arrange the scene picture in the hidden area outside the window area, so as to realize the extension of the scene picture outside the window area, but the realization of this scene picture requires complex Building block logic, therefore, has extremely high requirements on the user's own graphical programming ability.

针对上述问题,本公开示例性实施例提供一种可视化编程方法,可以解决了现有技术中视窗区域不具备可延展性的技术问题,使得视窗区域内的场景画面丰富多变,更具灵动性,从而提升用户的视觉体验。应理解,本公开示例性实施例的方法可以由电子设备执行,也可以由应用于电子设备的芯片执行。该方法可以应用于电子设备的可视化编程客户端,也可以应用于电子设备的浏览器网页打开的可视化编程网页。In view of the above problems, the exemplary embodiments of the present disclosure provide a visual programming method, which can solve the technical problem that the window area does not have scalability in the prior art, and make the scene pictures in the window area rich and changeable and more flexible. , thereby enhancing the user's visual experience. It should be understood that the methods in the exemplary embodiments of the present disclosure may be executed by an electronic device, and may also be executed by a chip applied to the electronic device. The method can be applied to the visual programming client of the electronic device, and can also be applied to the visual programming webpage opened by the browser webpage of the electronic device.

示例性的,本公开示例性实施例的电子设备可以是具有显示功能的电子设备执行,电子设备可以为手机、平板电脑、可穿戴设备、车载设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、PDA以及基于增强现实(augmented reality,AR)和/或虚拟现实(virtual reality,VR)技术的可穿戴设备等终端。Exemplarily, the electronic device in the exemplary embodiment of the present disclosure may be executed by an electronic device having a display function, and the electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer (UMPC), netbook, PDA, and wearable devices based on augmented reality (augmented reality, AR) and/or virtual reality (virtual reality, VR) technologies.

示例性的,当电子设备为可穿戴设备时,该可穿戴设备还可以是应用穿戴技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,如智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。Exemplarily, when the electronic device is a wearable device, the wearable device can also be a general term for intelligently designing daily wear and developing wearable devices by applying wearable technology, such as glasses, gloves, watches, clothing and shoes wait. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction. Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to be used in conjunction with other devices such as smart phones , such as various smart bracelets and smart jewelry for physical sign monitoring.

本公开示例性实施例的方法可以通过图形编辑器实现,本公开示例性实施例的图形编辑器按照功能划分,可以包括视窗编辑和运行区域、角色属性配置区域和积木编辑运行区,这三个区域可以位于同一界面内,也可以位于不同界面内,例如:可以通过选项卡的方式隐藏其中一个或两个区域,也可以通过链接的方式在其他网页展示其中一个或两个区域。The method in the exemplary embodiment of the present disclosure can be realized by a graphical editor. The graphical editor in the exemplary embodiment of the present disclosure can be divided according to functions, and can include a window editing and running area, a role attribute configuration area, and a building block editing running area. These three Areas can be located in the same interface or in different interfaces. For example, one or two areas can be hidden through tabs, or one or two areas can be displayed on other web pages through links.

图1示出了实现本公开示例性实施例方法的图形编辑器的示例性界面示意图。如图1所示,本公开示例性实施例的积木编辑器100具有积木编辑界面和地图编辑界面,积木编辑界面和地图编辑界面可以通过选项卡的方式切换。例如:当点击积木编辑选项卡101时,可以进入积木编辑界面,当点击地图编辑选项卡102时,可以进入积木编辑界面。Fig. 1 shows an exemplary interface diagram of a graphics editor implementing the method of the exemplary embodiment of the present disclosure. As shown in FIG. 1 , a building block editor 100 in an exemplary embodiment of the present disclosure has a building block editing interface and a map editing interface, and the building block editing interface and the map editing interface can be switched through tabs. For example: when the building block editing tab 101 is clicked, the building block editing interface can be entered; when the map editing tab 102 is clicked, the building block editing interface can be entered.

示例性的,积木编辑界面用于通过积木编程的方式实现可视化编程,该积木编辑界面可以包括舞台编辑与运行组件1011、角色属性配置组件1012和积木编程组件1013。Exemplarily, the building block editing interface is used to implement visual programming through building block programming, and the building block editing interface may include a stage editing and running component 1011 , a character attribute configuration component 1012 and a building block programming component 1013 .

如图1所示,上述舞台编辑与运行组件1011包括地图编辑组件1011a以及视窗1011b,在运行编程积木块时,可以在视窗1011b播放基于编程积木块的渲染内容,地图编辑组件1011a可以位于视窗1011b的周围,用以对视窗内的场景(或舞台)进行编辑,实现虚拟场景的快速搭建。地图编辑界面也可以实现虚拟场景的快速搭建,其不仅可以提供与积木编程组件相同的快速搭建功能。As shown in Figure 1, the stage editing and running component 1011 includes a map editing component 1011a and a window 1011b. When running a programming building block, the rendering content based on the programming building block can be played in the window 1011b, and the map editing component 1011a can be located in the window 1011b. It is used to edit the scene (or stage) in the window to realize the rapid construction of the virtual scene. The map editing interface can also realize the rapid construction of virtual scenes, which can not only provide the same rapid construction functions as building block programming components.

上述角色属性配置组件1012可以在视窗内添加所需的角色、背景等,还可以支持对角色进行多动作配置,每个动作可以包括一帧图片,也可以包括多帧图片构成的动画,也可以通过角色属性配置组件1012调整背景、角色的名称、可见状态、缩放比例、位置坐标、旋转角度和造型创作编辑等。The above-mentioned character attribute configuration component 1012 can add the required character, background, etc. in the window, and can also support multi-action configuration for the character. Each action can include one frame of pictures, or an animation composed of multiple frames of pictures, or Through the character attribute configuration component 1012, adjust the background, character name, visible state, zoom ratio, position coordinates, rotation angle, shape creation and editing, etc.

上述积木编程组件1013可以在选定某一角色的情况下,为该角色添加对应的各种类型的积木块,从而达到对该角色进行积木编程的目标,积木块的类型可以包含事件、控制、动作、外观、声音、侦测、运算、变量和函数。视窗可以展示虚拟场景(或者舞台),并可以运行积木编程组件所编写的程序的抽象语法树,以展抽象语法树对应的渲染内容。The above-mentioned building block programming component 1013 can add various types of corresponding building blocks to the character when a character is selected, so as to achieve the goal of building block programming for the character. The types of building blocks can include events, control, Actions, Appearances, Sounds, Detection, Operations, Variables and Functions. The window can display a virtual scene (or stage), and can run the abstract syntax tree of the program written by the building block programming component, so as to display the rendering content corresponding to the abstract syntax tree.

图2示出了本公开示例性实施例的可视化编程方法的流程图。如图2所示,本公开示例性实施例的可视化编程方法可以包括:FIG. 2 shows a flowchart of a visual programming method according to an exemplary embodiment of the present disclosure. As shown in FIG. 2, the visual programming method of the exemplary embodiment of the present disclosure may include:

步骤201:响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,视窗区域用于展示虚拟场景中与第一追踪目标的位置对应的局部区域。Step 201: In response to the selection operation of the motion building block, add a motion building block corresponding to the first tracking target displayed in the window area in the visual programming area, and the window area is used to display the position corresponding to the first tracking target in the virtual scene local area.

图3A示出了本公开示例性实施例的一种可视化编程界面的示意图。如图3A所示,在可视化编程界面中,视窗区域301可以展示程序执行结果,程序执行结果主要以声音、图形和动画等多媒体形式输出,如动画、游戏等。在可视化编程过程中,通常会为视窗区域301内展示虚拟场景。FIG. 3A shows a schematic diagram of a visual programming interface of an exemplary embodiment of the present disclosure. As shown in FIG. 3A, in the visual programming interface, the window area 301 can display program execution results, and the program execution results are mainly output in multimedia forms such as sound, graphics and animation, such as animation and games. During the visual programming process, a virtual scene is usually displayed in the window area 301 .

例如:可以基于从添加组件302中选择图像作为虚拟场景,背景图像的来源可以是素材库,也可以是本地存储,还可以即时绘制,还可以是随机给定虚拟场景。当背景图像确定后,基于该背景图像上的场景画面生成用于展示在视窗区域301中的虚拟场景。For example: it may be based on selecting an image from the adding component 302 as a virtual scene, the source of the background image may be a material library, local storage, real-time drawing, or a randomly given virtual scene. After the background image is determined, a virtual scene for displaying in the window area 301 is generated based on the scene picture on the background image.

上述虚拟场景的尺寸参数可以自定义。用户可以根据实际需要调整虚拟场景的尺寸参数,该尺寸参数可以是宽度和高度。如图3A所示,在宽高组件303中输入虚拟场景的高度为3000、宽度为2000,可以实现通过虚拟场景的尺寸参数定义的虚拟世界的尺寸参数,在视窗区域中引入“大世界”的概念,以使视窗区域可以展示“大世界”中与视窗区域的尺寸参数匹配的局部区域的场景画面。The size parameters of the above virtual scene can be customized. The user can adjust the size parameters of the virtual scene according to actual needs, and the size parameters can be width and height. As shown in Fig. 3A, inputting the height of the virtual scene in the width and height component 303 as 3000 and the width as 2000 can realize the size parameters of the virtual world defined by the size parameters of the virtual scene, and introduce the "big world" in the window area Concept, so that the window area can display the scene picture of the local area in the "big world" that matches the size parameters of the window area.

上述第一追踪目标可以是视窗区域的相机镜头的追踪目标,其可以是视窗区域中展示的虚拟角色中的一个,虚拟角色可以是人物、也可以是动物、还可以是其它配置有移动功能的精灵等。虚拟角色的来源均可以是素材库,也可以是本地存储,还可以即时绘制。图3B示出了本公开示例性实施例的另一种可视化编程界面的示意图。如图3B所示,本公开示例性实施例的方法可以通过添加组件302在视窗区域中添加第一虚拟角色304和第二虚拟角色305。若将第一虚拟角色304作为第一追踪目标,则在视窗区域展示虚拟场景中与第一虚拟角色304的位置对应的局部区域。The above-mentioned first tracking target can be the tracking target of the camera lens in the window area, which can be one of the virtual characters displayed in the window area, and the virtual character can be a person, an animal, or other objects equipped with a moving function. elves and more. The source of the avatar can be the material library, local storage, or real-time drawing. FIG. 3B shows a schematic diagram of another visual programming interface of an exemplary embodiment of the present disclosure. As shown in FIG. 3B , the method of the exemplary embodiment of the present disclosure may add a first virtual character 304 and a second virtual character 305 in a window area through an adding component 302 . If the first virtual character 304 is used as the first tracking target, a local area corresponding to the position of the first virtual character 304 in the virtual scene is displayed in the window area.

上述运动积木块可以用于定义第一追踪目标的移动参数,如图3B所示,本公开示例性实施例的方法可以从积木块类型为“动作”的积木块中选择合适的运动积木块模板,在可视化编辑区域306中增加与第一虚拟角色304对应的运动积木块,然后对运动积木块定义的移动参数进行设计,从而编辑第一虚拟角色304的动作。运动积木块定义的移动参数可以包括移动参数可以包括移动方式,移动距离、移动方向甚至移动速度等。The above-mentioned motion building blocks can be used to define the movement parameters of the first tracking target, as shown in FIG. 3B , the method of the exemplary embodiment of the present disclosure can select an appropriate motion building block template from the building blocks whose type is "action". , add a motion block corresponding to the first virtual character 304 in the visual editing area 306 , and then design the movement parameters defined by the motion block, so as to edit the motion of the first virtual character 304 . The moving parameters defined by the motion building blocks may include moving methods, moving distances, moving directions, and even moving speeds.

示例性的,上述移动方式可以包括移动操作、坐标操作、滑行操作、属性操作等中的一种或多种,但不仅限于此。移动方向可以是任意方向的移动方向,移动距离可以通过移动步数设定,移动速度也可以以单位时间的移动步数进行设定。Exemplarily, the above moving manner may include one or more of moving operation, coordinate operation, sliding operation, attribute operation, etc., but not limited thereto. The moving direction can be in any direction, the moving distance can be set by the number of moving steps, and the moving speed can also be set by the number of moving steps per unit time.

举例来说,移动操作可以包括移动(10)步、跳跃(10)步、移动到(X,Y)、移动到(随机位置)等中的一种(括号中的具体参数可以根据实际情况进行编辑);坐标操作可以包括将X或Y坐标增加(10)、将X或Y坐标设为(10)中的一种;滑行操作可以包括向(左)平行滑动(10)、在(1)秒内滑行到(随机位置)、在(1)秒内滑行到(X,Y)等中的一种;属性操作可以包括设置速度为(1)等中的一种。For example, the movement operation can include one of moving (10) steps, jumping (10) steps, moving to (X, Y), moving to (random position), etc. (the specific parameters in brackets can be determined according to the actual situation edit); the coordinate operation may include increasing the X or Y coordinate (10), setting the X or Y coordinate to (10); the sliding operation may include (left) parallel sliding (10), in (1) One of sliding to (random position) within seconds, sliding to (X, Y) within (1) seconds, etc.; attribute operations can include setting speed to one of (1) and so on.

步骤202:基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。Step 202: Based on the movement parameters of the first tracking target defined by the movement building blocks, determine the rendering parameters of the local area when the movement building blocks are running.

当第一追踪目标对应的运动积木块开始运行时,第一追踪目标基于运动积木块定义的移动参数在视窗区域内开始运动,第一追踪目标在虚拟场景内的位置参数也随之改变。而由于虚拟场景在视窗区域内展示的局部区域与第一追踪目标在虚拟场景内的位置参数相关,因此,当第一追踪目标在虚拟场景内的位置参数改变时,虚拟场景在视窗区域内展示的局部区域也会改变,该局部区域的渲染参数发生变化。基于此,本公开示例性实施例可以在开始运行第一追踪目标对应的运动积木块时,基于该运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数,并基于该局部区域的渲染参数在视窗区域动态展示虚拟场景中与第一追踪目标的位置对应的局部区域。When the motion building block corresponding to the first tracking target starts to run, the first tracking target starts to move in the window area based on the movement parameters defined by the motion building block, and the position parameter of the first tracking target in the virtual scene also changes accordingly. And because the partial area displayed in the virtual scene in the window area is related to the position parameter of the first tracking target in the virtual scene, therefore, when the position parameter of the first tracking target in the virtual scene changes, the virtual scene is displayed in the window area The local area of will also change, and the rendering parameters of the local area will change. Based on this, the exemplary embodiment of the present disclosure can determine the rendering parameters of the local area when running the motion building block based on the movement parameters of the first tracking target defined by the motion building block when starting to run the motion building block corresponding to the first tracking target , and dynamically display the local area corresponding to the position of the first tracking target in the virtual scene in the window area based on the rendering parameters of the local area.

示例性的,上述局部区域的渲染参数至少可以包括局部区域在虚拟场景的坐标位置。也就是说,局部区域在虚拟场景世界坐标系中的位置坐标,通过该位置坐标不仅可以定义出局部区域的位置,还可以定义出局部区域的形状和尺寸。Exemplarily, the above rendering parameters of the local area may at least include the coordinate position of the local area in the virtual scene. That is to say, the position coordinates of the local area in the world coordinate system of the virtual scene, through which not only the position of the local area can be defined, but also the shape and size of the local area can be defined.

可见,本公开示例性实施例的方法可以利用第一追踪目标的移动参数确定虚拟场景在视窗区域展示的局部区域的渲染参数,当开始运行第一追踪目标对应的运动积木块时,可以以第一追踪目标为追踪目标,在第一追踪目标的移动过程中,在视窗区域动态展示虚拟场景中与第一追踪目标的位置对应的局部区域,解决了现有技术中视窗区域不具备可延展性的技术问题,使得视窗区域内的场景画面丰富多变,更具灵动性,从而提升用户的视觉体验。It can be seen that the method of the exemplary embodiment of the present disclosure can use the movement parameters of the first tracking target to determine the rendering parameters of the local area displayed in the virtual scene in the window area. The first tracking target is the tracking target. During the movement of the first tracking target, the local area corresponding to the position of the first tracking target in the virtual scene is dynamically displayed in the window area, which solves the problem that the window area does not have scalability in the prior art. The technical problems in the window area make the scenes in the window area more varied and more flexible, thereby improving the user's visual experience.

在实际应用中,上述虚拟场景的尺寸参数定义的区域覆盖视窗区域的尺寸参数定义的区域,其覆盖方向可以是在某个或多个方向上的覆盖,也可以是任意方向上的覆盖。In practical applications, the area defined by the size parameters of the above virtual scene covers the area defined by the size parameters of the window area, and the covering direction can be coverage in one or more directions, or coverage in any direction.

示例性的,虚拟场景的尺寸参数定义的区域为虚拟场景区域,视窗区域的尺寸参数定义的区域为视窗区域,虚拟场景区域在至少一个方向的尺寸大于或等于视窗区域在对应方向上的尺寸。Exemplarily, the area defined by the size parameter of the virtual scene is the virtual scene area, the area defined by the size parameter of the window area is the window area, and the size of the virtual scene area in at least one direction is greater than or equal to the size of the window area in the corresponding direction.

上述虚拟场景可以是第一追踪目标所在的“大世界”,视窗区域可以展示“大世界”中与视窗区域的尺寸参数匹配的局部区域的场景画面。当以第一追踪目标为追踪目标时,视窗区域可以用于展示虚拟场景中与第一追踪目标的位置对应的局部区域。当第一追踪目标的在虚拟场景中的位置发生变化时,虚拟场景在视窗区域展示的局部区域的场景画面也会随之改变。The above-mentioned virtual scene may be the "big world" where the first tracking target is located, and the window area may display the scene picture of a local area in the "big world" that matches the size parameter of the window area. When the first tracking target is used as the tracking target, the window area may be used to display a local area in the virtual scene corresponding to the position of the first tracking target. When the position of the first tracking target in the virtual scene changes, the scene picture of the local area displayed in the window area of the virtual scene will also change accordingly.

上述至少一个方向可以是沿视窗区域的宽度方向,也可以是沿视窗区域的高度方向,还可以是沿视窗区域的宽度方向和高度方向。举例来说,若虚拟场景区域在沿视窗区域的宽度方向的尺寸大于或等于视窗区域在宽度方向上的尺寸的情况下,虚拟场景区域在沿视窗区域的高度方向的尺寸可以大于或等于视窗区域在高度方向上的尺寸,也可以小于视窗区域在高度方向上的尺寸。The above at least one direction may be along the width direction of the window area, may also be along the height direction of the window area, and may also be along the width direction and the height direction of the window area. For example, if the size of the virtual scene area along the width direction of the window area is greater than or equal to the size of the window area in the width direction, the size of the virtual scene area along the height direction of the window area can be greater than or equal to the size of the window area The dimension in the height direction may also be smaller than the dimension in the height direction of the window area.

当第一追踪目标在沿视窗区域的宽度方向上移动时,若虚拟场景区域在沿视窗区域的高度方向的尺寸大于或等于视窗区域在高度方向上的尺寸,局部区域的场景画面在沿视窗区域的宽度方向和高度方向上均可以铺满整个视窗区域;若虚拟场景区域在沿视窗区域的高度方向的尺寸小于视窗区域在高度方向上的尺寸,局部区域的场景画面在沿视窗区域的宽度方向上可以铺满整个视窗区域、沿视窗区域的高度方向上覆盖部分视窗区域。视窗区域中沿高度方向上没有被局部区域覆盖的空白区域作留白处理,第一追踪目标只能在被局部区域覆盖的视窗区域中移动。因此,本公开示例性实施例中虚拟场景区域在至少一个方向的尺寸大于或等于视窗区域在对应方向上的尺寸,可以使得当第一追踪目标在对应方向上移动时,虚拟场景在视窗区域展示的局部区域的场景画面可以在该方向上延伸。When the first tracking target moves along the width direction of the window area, if the size of the virtual scene area in the height direction of the window area is greater than or equal to the size of the window area in the height direction, the scene picture of the local area is in the direction of the window area. Both the width direction and the height direction of the virtual scene area can cover the entire window area; if the size of the virtual scene area in the height direction of the window area is smaller than the size of the window area in the height direction, the scene picture in the local area is in the width direction of the window area. The top can cover the entire window area, and cover part of the window area along the height direction of the window area. The blank area in the height direction that is not covered by the local area in the window area is left blank, and the first tracking target can only move in the window area covered by the local area. Therefore, in the exemplary embodiment of the present disclosure, the size of the virtual scene area in at least one direction is greater than or equal to the size of the window area in the corresponding direction, so that when the first tracking target moves in the corresponding direction, the virtual scene is displayed in the window area The scene picture of the local area of can extend in this direction.

可见,本公开示例性实施例的方法在视窗区域中引入“大世界”的概念,打破了现有技术中视窗区域始终展示固定场景画面的传统思想,使得视窗区域展示效果具有多样化,实现了视窗区域的可扩展性。It can be seen that the method of the exemplary embodiment of the present disclosure introduces the concept of "big world" into the window area, which breaks the traditional idea of always displaying fixed scene images in the window area in the prior art, makes the display effect of the window area diverse, and realizes Scalability of the viewport area.

在一种可选的方式中,图4示出了本公开示例性实施例的确定局部区域的渲染参数的流程图。如图4所示,本公开示例性实施例的方法还可以包括:In an optional manner, FIG. 4 shows a flowchart of determining rendering parameters of a local area in an exemplary embodiment of the present disclosure. As shown in Figure 4, the method of the exemplary embodiment of the present disclosure may also include:

步骤401:响应于对第一追踪目标的选择操作,在视窗区域的第一目标位置展示第一追踪目标。Step 401: Display the first tracking target at the first target position in the window area in response to a selection operation on the first tracking target.

应理解,上述第一追踪目标为视窗区域的相机镜头的追踪目标,上述选择操作可以是第一追踪目标的选择操作,第一追踪目标在视窗区域的位置为第一目标位置,第一追踪目标在视窗区域的第一目标位置随第一追踪目标在视窗区域的位置变化而变化。如图3B所示,可以从相机镜头组件307下拉栏中,将相机镜头的追踪目标选择为第一虚拟角色304,第一虚拟角色304在视窗区域的位置为第一目标位置,第一目标位置随第一虚拟角色304的移动而改变。当需要切换相机镜头的追踪目标时,也可以在相机镜头组件307下拉栏中将相机镜头的追踪目标从第一虚拟角色304切换为第二虚拟角色305,然后以第二虚拟角色305为相机镜头的追踪目标,在视窗区域展示与第二虚拟角色305的位置对应的局部区域。It should be understood that the above-mentioned first tracking target is the tracking target of the camera lens in the window area, the above-mentioned selection operation may be the selection operation of the first tracking target, the position of the first tracking target in the window area is the first target position, and the first tracking target The position of the first target in the window area changes as the position of the first tracking target in the window area changes. As shown in FIG. 3B , the tracking target of the camera lens can be selected as the first virtual character 304 from the drop-down list of the camera lens component 307, the position of the first virtual character 304 in the window area is the first target position, and the first target position Changes with the movement of the first avatar 304 . When it is necessary to switch the tracking target of the camera lens, it is also possible to switch the tracking target of the camera lens from the first avatar 304 to the second avatar 305 in the drop-down column of the camera lens component 307, and then use the second avatar 305 as the camera lens The tracking target of , and the local area corresponding to the position of the second avatar 305 is displayed in the window area.

示例性的,上述选择操作可以包括对相机镜头积木块的选择操作,相机镜头积木块可以用于定义相机镜头的追踪目标。基于此,本公开示例性实施例的方法可以包括:在可视化编程区域增加与相机镜头对应的相机镜头积木块;基于相机镜头积木块定义的相机镜头的追踪目标,确定相机镜头的追踪目标。Exemplarily, the above selection operation may include a selection operation on a camera lens building block, and the camera lens building block may be used to define a tracking target of the camera lens. Based on this, the method of the exemplary embodiment of the present disclosure may include: adding a camera lens building block corresponding to the camera lens in the visual programming area; determining the camera lens tracking target based on the camera lens tracking target defined by the camera lens building block.

本公开示例性实施例可以响应于对相机镜头积木块的选择操作,在可视化编程区域增加与相机镜头对应的相机镜头积木块,在相机镜头积木块中输入相机镜头的追踪目标,实现相机镜头的追踪目标的定义。具体可以参考步骤201中运动积木块定义的第一追踪目标的移动参数的设置方式,此处不再赘述。然后将输入至相机镜头积木块中的相机镜头的追踪目标作为相机镜头的追踪目标。当视窗区域展示的虚拟角色为至少两个时,若需要切换相机镜头的追踪目标,可以在可视化编辑区域的相机镜头积木块中修改其定义相机镜头的追踪目标。The exemplary embodiment of the present disclosure can respond to the selection operation of the camera lens building block, add a camera lens building block corresponding to the camera lens in the visual programming area, input the tracking target of the camera lens in the camera lens building block, and realize the camera lens. Definition of tracking targets. For details, reference may be made to the setting method of the movement parameters of the first tracking target defined by the movement building block in step 201 , which will not be repeated here. Then use the tracking target of the camera lens input into the camera lens building block as the tracking target of the camera lens. When there are at least two avatars displayed in the window area, if you need to switch the tracking target of the camera lens, you can modify it to define the tracking target of the camera lens in the camera lens building block in the visual editing area.

需要说明的是,当相机镜头积木块定义的相机镜头的追踪目标与如图3B所示的相机镜头组件307展示的相机镜头的追踪目标始终保持一致,当相机镜头积木块定义的相机镜头的追踪目标切换时,相机镜头组件展示的相机镜头的追踪目标自动切换至对应的追踪目标。It should be noted that when the tracking target of the camera lens defined by the camera lens building block is always consistent with the tracking target of the camera lens shown in the camera lens component 307 shown in FIG. 3B , when the tracking target of the camera lens defined by the camera lens building block When the target is switched, the tracking target of the camera lens displayed by the camera lens assembly is automatically switched to the corresponding tracking target.

可见,本公开示例性实施例通过对视窗区域的相机镜头的追踪目标的设置,可以确保第一追踪目标始终展示在视窗区域内的第一目标位置。It can be seen that the exemplary embodiment of the present disclosure can ensure that the first tracking target is always displayed at the first target position in the window area by setting the tracking target of the camera lens in the window area.

步骤402:响应于对虚拟场景的场景控制操作,确定虚拟场景的展示参数。场景控制操作至少可以包括:对虚拟场景的展示参数的输入操作。Step 402: Determine display parameters of the virtual scene in response to scene control operations on the virtual scene. The scene control operation may at least include: an operation of inputting display parameters of the virtual scene.

例如:虚拟场景的展示参数包括虚拟场景的尺寸参数时,场景控制操作包括:尺寸调整操作。虚拟场景的尺寸参数参考前文,此处不再赘述。如图3B所示,虚拟场景的尺寸参数的输入操作可以在宽高组件303中进行。For example, when the display parameters of the virtual scene include the size parameters of the virtual scene, the scene control operation includes: a size adjustment operation. For the size parameters of the virtual scene, refer to the previous section, and will not repeat them here. As shown in FIG. 3B , the input operation of the size parameter of the virtual scene can be performed in the width and height component 303 .

又例如:虚拟场景的展示参数还包括虚拟场景的场景展示形式时,场景控制操作包括:场景展示形式设置操作。场景展示形式可以包括适应、平铺、填充中的一种。如图3B所示,虚拟场景的场景展示形式设置操作可以在形式设置组件308中进行。当场景展示形式不同时,基于背景图像生成的虚拟场景不同,其在视窗区域中展示的局部区域的场景画面也不不同。因此,本公开示例性实施例的方法可以通过对虚拟场景的场景展示形式的设置实现虚拟场景的展示效果多样化。For another example: when the display parameters of the virtual scene also include the scene display form of the virtual scene, the scene control operation includes: setting the scene display form. The scene presentation form may include one of adaptation, tiling, and filling. As shown in FIG. 3B , the scene presentation form setting operation of the virtual scene can be performed in the form setting component 308 . When the display form of the scene is different, the virtual scene generated based on the background image is different, and the scene picture of the local area displayed in the window area is also different. Therefore, the method of the exemplary embodiment of the present disclosure can realize the diversification of the display effect of the virtual scene by setting the scene display form of the virtual scene.

步骤403:基于虚拟场景的展示参数和第一目标位置在视窗区域的位置参数确定局部区域的渲染参数。Step 403: Determine the rendering parameters of the local area based on the display parameters of the virtual scene and the position parameters of the first target position in the window area.

无论是虚拟场景的尺寸参数,还是虚拟场景的场景展示形式,一旦发生改变,第一目标位置在虚拟场景的位置参数也会改变。下面进行举例说明。Whether it is the size parameter of the virtual scene or the scene display form of the virtual scene, once it changes, the position parameter of the first target position in the virtual scene will also change. An example is given below.

图5示出了本公开示例性实施例的一种虚拟场景的示意图。如图5所示,假设对虚拟场景的场景控制操作前后第一追踪目标相对于视窗区域的相对位置保持恒定,在对虚拟场景的场景控制操作前,虚拟场景在视窗区域展示的局部区域为第一局部区域501,第一追踪目标在视窗区域的第一目标位置为虚拟场景的A位置;在对虚拟场景的场景控制操作后,虚拟场景在视窗区域展示的局部区域为第二局部区域502,第一追踪目标在视窗区域的第一目标位置为虚拟场景的B位置。从图5中可以看出,对虚拟场景的场景控制操作前后,第一目标位置从虚拟场景的A位置移动至虚拟场景的B位置,第一目标位置在视窗区域的位置可以基于其在视窗区域的位置参数(如坐标位置(x,y))确定,视窗区域展示的场景画面也从第一局部区域501的场景画面跟随第一目标位置移动至第二局部区域502。Fig. 5 shows a schematic diagram of a virtual scene according to an exemplary embodiment of the present disclosure. As shown in Figure 5, assuming that the relative position of the first tracking target relative to the window area remains constant before and after the scene control operation on the virtual scene, before the scene control operation on the virtual scene, the local area displayed in the virtual scene in the window area is the first A local area 501, the first target position of the first tracking target in the window area is the A position of the virtual scene; after the scene control operation on the virtual scene, the local area displayed in the virtual scene in the window area is the second local area 502, The first target position of the first tracking target in the window area is the position B of the virtual scene. As can be seen from Figure 5, before and after the scene control operation on the virtual scene, the first target position moves from the position A of the virtual scene to the position B of the virtual scene, and the position of the first target position in the window area can be based on its position in the window area The position parameters (such as coordinate position (x, y)) are determined, and the scene picture displayed in the window area also moves from the scene picture of the first partial area 501 to the second partial area 502 following the first target position.

可见,本公开示例性实施例的方法可以基于虚拟场景的展示参数和第一目标位置在视窗区域的位置参数,确定虚拟场景在视窗区域展示的与第一追踪目标对应的局部区域的渲染参数,从而通过对虚拟场景的场景控制操作实现视窗区域展示背景效果多样化。It can be seen that the method of the exemplary embodiment of the present disclosure can determine the rendering parameters of the local area corresponding to the first tracking target displayed in the virtual scene in the window area based on the display parameters of the virtual scene and the position parameters of the first target position in the window area, Thereby, through the scene control operation on the virtual scene, the variety of display background effects in the window area can be realized.

在一种可选的方式中,局部区域的尺寸参数与视窗区域的相机镜头的相机视野参数相关,本公开示例性实施例的方法还可以包括:响应于对于相机视野参数的控制操作,基于第一目标位置在视窗区域的位置参数确定与相机视野参数匹配的局部区域的渲染参数。In an optional manner, the size parameter of the local area is related to the camera field of view parameter of the camera lens in the window area, and the method in the exemplary embodiment of the present disclosure may further include: responding to the control operation on the camera field of view parameter, based on the first A position parameter of the target position in the window area determines a rendering parameter of the local area matched with the camera field of view parameter.

上述相机视野参数可以用于调节视窗区域的相机镜头的覆盖范围,也就是虚拟场景在视窗区域展示的局部区域的拍摄范围,其可以通过相机缩放系数表示。如图3B所示,可以通过相机缩放组件309调节相机缩放系数实现局部区域的放大或缩小。如可以按“-”或“+”缩小或增大相机缩放系数,也可以直接输入相机缩放系数,还可以滑动鼠标滚轮调节相机缩放系数。The above-mentioned camera field of view parameters can be used to adjust the coverage of the camera lens in the window area, that is, the shooting range of the local area displayed in the virtual scene in the window area, which can be represented by the camera zoom factor. As shown in FIG. 3B , the zoom factor of the camera can be adjusted through the camera zoom component 309 to realize zooming in or zooming out of the local area. For example, you can press "-" or "+" to reduce or increase the camera zoom factor, or you can directly input the camera zoom factor, and you can also slide the mouse wheel to adjust the camera zoom factor.

图6A~图6B示出了本公开示例性实施例的基于相机视野参数控制局部区域的过程示意图。如图6A所示,第三局部区域610为调节相机视野参数前虚拟场景在视窗区域展示的与A位置处第一追踪目标对应的局部区域;如图6B所示,第四局部区域620为放大相机视野参数后虚拟场景在视窗区域展示的与A位置处第一追踪目标对应的局部区域。对比可以看出,以虚拟场景的尺寸参数作为参考,第四局部区域620的尺寸参数定义的区域相对于第三局部区域610的尺寸参数定义的区域较小,而由于视窗区域的尺寸参数不变,第四局部区域620在视窗区域展示与A位置处第一追踪目标对应的的场景画面放大。因此,局部区域的渲染参数与窗区域的相机镜头的相机视野参数有关。6A to 6B show a schematic diagram of a process of controlling a local area based on a camera field of view parameter according to an exemplary embodiment of the present disclosure. As shown in Figure 6A, the third local area 610 is the local area corresponding to the first tracking target at position A displayed in the virtual scene in the window area before adjusting the camera field of view parameters; as shown in Figure 6B, the fourth partial area 620 is the enlarged The local area corresponding to the first tracking target at position A displayed in the virtual scene in the window area after the camera field of view parameters. From the comparison, it can be seen that, taking the size parameter of the virtual scene as a reference, the area defined by the size parameter of the fourth partial area 620 is smaller than the area defined by the size parameter of the third partial area 610, and since the size parameter of the window area remains unchanged , the fourth partial area 620 displays the zoomed-in scene picture corresponding to the first tracking target at position A in the window area. Therefore, the rendering parameters of the local area are related to the camera view parameters of the camera lens in the window area.

基于此,本公开示例性实施例的方法可以响应于对于相机视野参数的控制操作,基于第一目标位置在视窗区域的位置参数确定与相机视野参数匹配的局部区域的渲染参数,从而通过对相机视野参数的控制操作实现视窗区域展示背景效果多样化。Based on this, the method in the exemplary embodiment of the present disclosure may respond to the control operation on the camera field of view parameter, based on the position parameter of the first target position in the window area to determine the rendering parameters of the local area that matches the camera field of view parameter, so as to pass the camera The control operation of the field of view parameter realizes the diversification of the background effect displayed in the window area.

在一种可选的方式中,本公开示例性实施例中的场景控制操作可以包括对第一控制积木块的选择操作,第一控制积木块可以用于定义虚拟场景的展示参数。基于此,步骤402中的确定虚拟场景的展示参数,可以包括:In an optional manner, the scene control operation in the exemplary embodiment of the present disclosure may include a selection operation on a first control building block, and the first control building block may be used to define display parameters of a virtual scene. Based on this, determining the presentation parameters of the virtual scene in step 402 may include:

在可视化编程区域增加与虚拟场景对应的第一控制积木块;基于第一控制积木块定义的虚拟场景的展示参数,确定运行第一控制积木块时虚拟场景的展示参数。Add a first control building block corresponding to the virtual scene in the visual programming area; based on the display parameters of the virtual scene defined by the first control building block, determine the display parameters of the virtual scene when the first control building block is running.

本公开示例性实施例可以响应于对第一控制积木块的选择操作,在可视化编程区域增加与虚拟场景对应的第一控制积木块,在第一控制积木块输入虚拟场景的展示参数,实现虚拟场景的展示参数的定义。具体可以参考步骤201中运动积木块定义的第一追踪目标的移动参数的设置方式,此处不再赘述。然后将输入至第一控制积木块中的虚拟场景的展示参数作为运行第一控制积木块时虚拟场景的展示参数。The exemplary embodiment of the present disclosure can respond to the selection operation of the first control building block, add the first control building block corresponding to the virtual scene in the visual programming area, input the display parameters of the virtual scene in the first control building block, and realize the virtual The definition of display parameters of the scene. For details, reference may be made to the setting method of the movement parameters of the first tracking target defined by the movement building block in step 201 , which will not be repeated here. Then, the display parameters of the virtual scene input into the first control building block are used as the display parameters of the virtual scene when the first control building block is running.

在一种可选的方式中,本公开示例性实施例中的基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数,可以包括:In an optional manner, in an exemplary embodiment of the present disclosure, based on the movement parameters of the first tracking target defined by the motion building blocks, determining the rendering parameters of the local area when the motion building blocks are running may include:

基于运动积木块定义的第一追踪目标的移动参数,控制视窗区域的相机镜头的移动参数;基于相机镜头的移动参数和第一追踪目标在视窗区域的第一目标位置的位置参数,确定运行运动积木块时局部区域的渲染参数。Based on the movement parameters of the first tracking target defined by the motion building blocks, control the movement parameters of the camera lens in the window area; based on the movement parameters of the camera lens and the position parameters of the first tracking target in the first target position of the window area, determine the running motion The rendering parameters of the local area when building blocks.

上述第一追踪目标的移动参数至少可以包括:第一追踪目标的移动方向参数;上述相机镜头的移动参数至少可以包括:相机镜头的移动方向参数。第一追踪目标的移动方向参数可以用于指示第一追踪目标的移动方向,相机镜头的移动方向参数可以用于指示相机镜头的移动方向。本公开示例性实施例的方法可以基于运动积木块定义的第一追踪目标的移动方向参数,控制视窗区域的相机镜头的移动方向参数,可以确保第一追踪目标在移动过程中,相机镜头的移动方向与第一追踪目标的移动方向一致,并基于相机镜头的移动方向参数和第一追踪目标在视窗区域的第一目标位置的位置参数,确定运行运动积木块时局部区域的渲染参数,使得虚拟场景在视窗区域展示的局部区域的场景画面始终跟随第一追踪目标,从而实现了视窗区域的可延展性。The movement parameter of the first tracking target may at least include: a moving direction parameter of the first tracking target; the moving parameter of the camera lens may at least include: a moving direction parameter of the camera lens. The moving direction parameter of the first tracking target may be used to indicate the moving direction of the first tracking target, and the moving direction parameter of the camera lens may be used to indicate the moving direction of the camera lens. The method of the exemplary embodiment of the present disclosure can control the movement direction parameter of the camera lens in the window area based on the movement direction parameter of the first tracking target defined by the motion building block, which can ensure that the movement of the camera lens is guaranteed during the movement of the first tracking target. The direction is consistent with the moving direction of the first tracking target, and based on the moving direction parameter of the camera lens and the position parameter of the first target position of the first tracking target in the window area, determine the rendering parameters of the local area when running the moving building block, so that the virtual The scene picture of the partial area displayed in the window area always follows the first tracking target, thereby realizing the extensibility of the window area.

上述第一追踪目标的移动参数还可以包括第一追踪目标的移动速度参数;上述相机镜头的移动参数还可以包括:相机镜头的移动速度参数。第一追踪目标的移动速度参数可以用于指示第一追踪目标的移动速度,相机镜头的移动速度参数可以用于指示相机镜头的移动速度。上述相机镜头的移动速度与第一追踪目标的移动速度匹配,也就是说,相机镜头的移动速度与第一追踪目标的移动速度可以相同,也可以不同。当相机镜头的移动速度与第一追踪目标的移动速度不同时,相机镜头的移动速度能够确保相机镜头始终可以捕捉到第一追踪目标,第一追踪目标的移动过程中始终展示视窗区域内。The movement parameter of the first tracking target may further include a movement speed parameter of the first tracking target; the movement parameter of the camera lens may further include: a movement speed parameter of the camera lens. The moving speed parameter of the first tracking target may be used to indicate the moving speed of the first tracking target, and the moving speed parameter of the camera lens may be used to indicate the moving speed of the camera lens. The moving speed of the above-mentioned camera lens matches the moving speed of the first tracking target, that is to say, the moving speed of the camera lens and the moving speed of the first tracking target may be the same or different. When the moving speed of the camera lens is different from that of the first tracking target, the moving speed of the camera lens can ensure that the camera lens can always capture the first tracking target, and the moving process of the first tracking target is always displayed in the window area.

本公开示例性实施例的方法可以基于运动积木块定义的第一追踪目标的移动速度参数,控制视窗区域的相机镜头的移动速度参数,可以确保第一追踪目标在移动过程中,相机镜头的移动速度与第一追踪目标的移动速度匹配,并基于相机镜头的移动速度参数和第一追踪目标在视窗区域的第一目标位置的位置参数,确定运行运动积木块时局部区域的渲染参数,使得虚拟场景在视窗区域展示的局部区域的场景画面始终跟随第一追踪目标,从而实现了视窗区域的可延展性。The method of the exemplary embodiment of the present disclosure can control the movement speed parameter of the camera lens in the window area based on the movement speed parameter of the first tracking target defined by the motion building block, which can ensure that the movement of the camera lens is guaranteed during the movement of the first tracking target. The speed matches the moving speed of the first tracking target, and based on the moving speed parameter of the camera lens and the position parameter of the first target position of the first tracking target in the window area, determine the rendering parameters of the local area when running the moving building block, so that the virtual The scene picture of the local area displayed in the window area always follows the first tracking target, thereby realizing the extensibility of the window area.

在一种可选的方式中,本公开示例性实施例的方法还可以包括:响应于对第二追踪目标的选择操作,在视窗区域的第二目标位置展示第二追踪目标。In an optional manner, the method in the exemplary embodiment of the present disclosure may further include: displaying the second tracking target at the second target position in the window area in response to a selection operation on the second tracking target.

上述第二追踪目标可以是场景道具,场景道具可以是分数统计组件、也可以是装饰道具等。场景道具的来源均可以是素材库,也可以是本地存储,还可以即时绘制。场景道具可以通过如图3A所示的添加组件302添加至视窗区域中,第二追踪目标在视窗区域的位置为第二目标位置。图7A~图7B示出了本公开示例性实施例的第二追踪目标的第一种追踪过程示意图。如图7A所示,若本公开示例性实施例的程序执行结果为计分类游戏,可以通过添加组件302在视窗区域的第二目标位置添加第二追踪目标(SCERE 00),该第二追踪目标可以用于游戏运行过程中的分数统计。The above-mentioned second tracking target may be a scene prop, and the scene prop may be a score statistics component, or a decorative prop, etc. The source of scene props can be the material library, local storage, or real-time drawing. The scene prop can be added to the window area through the adding component 302 shown in FIG. 3A , and the position of the second tracking target in the window area is the second target position. 7A to 7B are schematic diagrams of a first tracking process of a second tracking target according to an exemplary embodiment of the present disclosure. As shown in FIG. 7A, if the program execution result of the exemplary embodiment of the present disclosure is a scoring game, a second tracking target (SCERE 00) can be added at the second target position of the window area through the adding component 302. The second tracking target It can be used for score statistics during the running of the game.

基于此,本公开示例性实施例的方法还可以包括:响应于对第二控制积木块的选择操作,在可视化编程区域增加与第二追踪目标对应的第二控制积木块。第二控制积木块可以用于定义第二追踪目标的目标类型。第二追踪目标的目标类型可以为视窗目标,也可以为场景目标。具体可以参考步骤201中运动积木块定义的第一追踪目标的移动参数的设置方式设置第二追踪目标的目标类型,此处不再赘述。Based on this, the method of the exemplary embodiment of the present disclosure may further include: in response to a selection operation on the second control building block, adding a second control building block corresponding to the second tracking target in the visual programming area. The second control block can be used to define the target type of the second tracking target. The target type of the second tracking target may be a window target or a scene target. Specifically, the target type of the second tracking target can be set with reference to the setting method of the movement parameter of the first tracking target defined by the motion building block in step 201 , which will not be repeated here.

当运行第一追踪目标对应的运动积木块时,视窗区域的相机镜头的追踪目标除作为主追踪目标的第一追踪目标之外,还可以追踪作为次追踪目标的第二追踪目标。When running the motion building block corresponding to the first tracking target, the tracking target of the camera lens in the window area can track the second tracking target as the secondary tracking target in addition to the first tracking target as the main tracking target.

示例性的,本公开示例性实施例的方法还可以包括:若第二控制积木块用于定义的第二追踪目标的目标类型为视窗目标,运行运动积木块时,基于第二追踪目标与视窗区域的相对位置参数,更新第二追踪目标的第二目标位置在虚拟场景的位置参数,更新第二目标位置在虚拟场景的位置参数前后第二追踪目标与视窗区域的相对位置保持恒定。应理解,第二追踪目标与视窗区域的相对位置参数可以基于第二追踪目标在视窗区域的位置参数与视窗区域的几何中心的位置参数的相对位置确定。Exemplarily, the method of the exemplary embodiment of the present disclosure may further include: if the target type of the second tracking target defined by the second control building block is a window target, when running the motion building block, based on the second tracking target and the window The relative position parameter of the area, update the position parameter of the second target position of the second tracking target in the virtual scene, update the position parameter of the second target position before and after the position parameter of the virtual scene, and keep the relative position of the second tracking target and the window area constant. It should be understood that the relative position parameter of the second tracking target and the window area may be determined based on the relative position of the position parameter of the second tracking target in the window area and the position parameter of the geometric center of the window area.

如图7A所示,当第二控制积木块定义的第二追踪目标的目标类型为视窗目标时,在运行第一追踪目标701对应的运动积木块时,第一追踪目标701移动至如图7B所示的视窗区域的第一目标位置,从图7B中可以看出,该第一目标位置在虚拟场景的位置相对于图7A已经发生改变,该第二目标位置在虚拟场景的位置相对于图7A也已经发生改变,而第二追踪目标702(第二目标位置)在视窗区域的位置保持不变,也就是说,第二目标位置在虚拟场景的位置参数前后第二追踪目标702与视窗区域的相对位置保持恒定。在上述过程中,用户可以通过第二追踪目标的展示信息实时获知当前得分。As shown in FIG. 7A, when the target type of the second tracking target defined by the second control building block is a window target, when running the motion building block corresponding to the first tracking target 701, the first tracking target 701 moves to the position shown in FIG. 7B The first target position of the shown window area can be seen from FIG. 7B, the position of the first target position in the virtual scene has changed relative to that in FIG. 7A has also changed, and the position of the second tracking target 702 (second target position) in the window area remains unchanged, that is to say, the second target position is before and after the position parameters of the virtual scene. The second tracking target 702 and the window area relative position remains constant. During the above process, the user can know the current score in real time through the display information of the second tracking target.

可见,本公开示例性实施例可以通过将第二控制积木块定义的第二追踪目标的目标类型设置为视窗目标,使得在运行第一追踪目标对应的运行积木块时,第一追踪目标和第二追踪目标同时展示在视窗区域内,通过第二追踪目标丰富视窗区域的场景画面,满足用户相应的需求,从而提升用户体验。It can be seen that the exemplary embodiment of the present disclosure can set the target type of the second tracking target defined by the second control building block as a window target, so that when running the running block corresponding to the first tracking target, the first tracking target and the second tracking target The second tracking target is displayed in the window area at the same time, and the scene picture in the window area is enriched by the second tracking target to meet the corresponding needs of the user, thereby improving the user experience.

示例性的,本公开示例性实施例的方法还可以包括:若第二控制积木块用于定义的第二追踪目标的目标类型为场景目标,运行运动积木块时,基于第一追踪目标的移动参数和第二追踪目标的第二目标位置,更新第二目标位置在视窗区域的位置参数。Exemplarily, the method of the exemplary embodiment of the present disclosure may further include: if the target type of the second tracking target defined by the second control building block is a scene target, when running the motion building block, based on the movement of the first tracking target parameter and the second target position of the second tracking target, and update the position parameter of the second target position in the window area.

图8A~图8C示出了本公开示例性实施例的第二追踪目标的第二种追踪过程示意图。如图8A所示,当第二控制积木块定义的第二追踪目标的目标类型为场景目标时,在运行第一追踪目标801对应的运动积木块时,第一追踪目标801依次移动至如图8B、图8C所示的视窗区域的第一目标位置,从这个过程中可以看出,随着第一目标位置在虚拟场景的位置改变,第二目标位置在视窗区域的位置参数持续左移,直至第二追踪目标802逐渐消失在在视窗区域。8A to 8C are schematic diagrams of a second tracking process of a second tracking target according to an exemplary embodiment of the present disclosure. As shown in FIG. 8A, when the target type of the second tracking target defined by the second control building block is a scene target, when running the motion building block corresponding to the first tracking target 801, the first tracking target 801 moves to 8B, the first target position in the window area shown in Figure 8C, it can be seen from this process that as the position of the first target position in the virtual scene changes, the position parameter of the second target position in the window area continues to move to the left, Until the second tracking target 802 gradually disappears in the window area.

可见,本公开示例性实施例可以通过将第二控制积木块定义的第二追踪目标的目标类型设置为场景目标,使得在运行第一追踪目标对应的运行积木块时,第二追踪目标从视窗区域逐渐消失。因此,本公开示例性实施例可以通过第二追踪目标在第一追踪目标对应的运行积木块刚开始运行时丰富视窗区域的场景画面,吸引用户的注意力,并在运行积木块运行一段时间后消失在视窗区域,保证视窗区域的场景画面的清爽,从而提升用户体验。It can be seen that the exemplary embodiment of the present disclosure can set the target type of the second tracking target defined by the second control building block as a scene target, so that when the running block corresponding to the first tracking target is run, the second tracking target will start from the window The area gradually disappears. Therefore, the exemplary embodiment of the present disclosure can use the second tracking target to enrich the scene picture in the window area when the running building block corresponding to the first tracking target starts to run, attracting the user's attention, and after running the running building block for a period of time Disappears in the window area to ensure the refreshment of the scene in the window area, thereby improving the user experience.

本公开示例性实施例中提供的一个或多个技术方案,可以响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,此时,视窗区域可以展示虚拟场景中与第一追踪目标的位置对应的局部区域。然后,可以基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。可见,本公开示例性实施例的方法可以利用第一追踪目标的移动参数确定虚拟场景在视窗区域展示的局部区域的渲染参数,当开始运行第一追踪目标对应的运动积木块时,可以以第一追踪目标为追踪目标,在第一追踪目标的移动过程中,在视窗区域动态展示虚拟场景中与第一追踪目标的位置对应的局部区域,解决了现有技术中视窗区域不具备可延展性的技术问题,使得视窗区域内的场景画面丰富多变,更具灵动性,从而提升用户的视觉体验。One or more technical solutions provided in the exemplary embodiments of the present disclosure can respond to the selection operation of the motion building block, and add the motion building block corresponding to the first tracking target displayed in the window area in the visual programming area, at this time , the window area may display a local area in the virtual scene corresponding to the position of the first tracking target. Then, based on the movement parameters of the first tracking target defined by the motion building block, the rendering parameters of the local area when the motion building block is running can be determined. It can be seen that the method of the exemplary embodiment of the present disclosure can use the movement parameters of the first tracking target to determine the rendering parameters of the local area displayed in the virtual scene in the window area. The first tracking target is the tracking target. During the movement of the first tracking target, the local area corresponding to the position of the first tracking target in the virtual scene is dynamically displayed in the window area, which solves the problem that the window area does not have scalability in the prior art. The technical problems in the window area make the scenes in the window area more varied and more flexible, thereby improving the user's visual experience.

上述主要对本公开实施例提供的方案进行了介绍。可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本公开能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present disclosure. It can be understood that, in order to realize the above functions, the electronic device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.

本公开实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本公开实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiments of the present disclosure may divide the electronic device into functional units according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiments of the present disclosure is schematic, and is only a logical function division, and there may be another division manner in actual implementation.

在采用对应各个功能划分各个功能模块的情况下,本公开示例性实施例提供一种可视化编程装置,该可视化编程装置可以为电子设备或应用于电子设备的芯片。图9示出了本公开示例性实施例的可视化编程装置的模块示意性框图。如图9所示,所述装置900包括:In the case of dividing each functional module corresponding to each function, an exemplary embodiment of the present disclosure provides a visual programming device, and the visual programming device may be an electronic device or a chip applied to the electronic device. Fig. 9 shows a schematic block diagram of modules of a visual programming device according to an exemplary embodiment of the present disclosure. As shown in Figure 9, the device 900 includes:

增加模块901,用于响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,视窗区域用于展示虚拟场景中与第一追踪目标的位置对应的局部区域;The adding module 901 is used to respond to the selection operation of the moving building block, and add the moving building block corresponding to the first tracking target displayed in the window area in the visual programming area, and the window area is used to display the first tracking target in the virtual scene The local area corresponding to the location of ;

确定模块902,用于基于运动积木块定义的第一追踪目标的移动参数,确定运行运动积木块时局部区域的渲染参数。The determination module 902 is configured to determine the rendering parameters of the local area when the motion building blocks are running based on the movement parameters of the first tracking target defined by the motion building blocks.

作为一种可能的实现方式,虚拟场景的尺寸参数定义的区域为虚拟场景区域,视窗区域的尺寸参数定义的区域为视窗区域,虚拟场景区域在至少一个方向的尺寸大于或等述视窗区域在对应方向上的尺寸。As a possible implementation, the area defined by the size parameter of the virtual scene is the virtual scene area, the area defined by the size parameter of the window area is the window area, and the size of the virtual scene area in at least one direction is larger than or equal to that of the window area in the corresponding Dimensions in the direction.

作为一种可能的实现方式,所述装置900还包括:展示模块903,用于响应于对第一追踪目标的选择操作,在视窗区域的第一目标位置展示第一追踪目标;As a possible implementation manner, the apparatus 900 further includes: a display module 903, configured to display the first tracking target at the first target position in the window area in response to a selection operation on the first tracking target;

确定模块902还用于响应于对虚拟场景的场景控制操作,确定虚拟场景的展示参数,虚拟场景的展示参数至少包括虚拟场景的尺寸参数;The determining module 902 is further configured to determine display parameters of the virtual scene in response to scene control operations on the virtual scene, where the display parameters of the virtual scene at least include size parameters of the virtual scene;

确定模块902还用于基于虚拟场景的展示参数和第一目标位置在视窗区域的位置参数确定局部区域的渲染参数。The determination module 902 is further configured to determine the rendering parameters of the local area based on the presentation parameters of the virtual scene and the position parameters of the first target position in the window area.

作为一种可能的实现方式,局部区域的尺寸参数与视窗区域的相机镜头的相机视野参数相关,确定模块902还用于响应于对于相机视野参数的控制操作,基于第一目标位置在视窗区域的位置参数确定与相机视野参数匹配的局部区域的渲染参数。As a possible implementation, the size parameter of the local area is related to the camera field of view parameter of the camera lens in the window area, and the determining module 902 is further configured to respond to the control operation on the camera field of view parameter, based on the first target position in the window area The location parameter determines the rendering parameters for the local area that matches the camera field of view parameter.

作为一种可能的实现方式,场景控制操作至少包括:尺寸调整操作;场景控制操作还包括:场景展示形式设置操作。As a possible implementation manner, the scene control operation includes at least: a size adjustment operation; the scene control operation further includes: a scene display form setting operation.

作为一种可能的实现方式,场景控制操作包括对虚拟场景的展示参数的输入操作;As a possible implementation, the scene control operation includes inputting display parameters of the virtual scene;

场景控制操作包括对第一控制积木块的选择操作,增加模块901还用于在可视化编程区域增加与所述虚拟场景对应的第一控制积木块;The scene control operation includes the selection operation of the first control building block, and the adding module 901 is also used to add the first control building block corresponding to the virtual scene in the visual programming area;

确定模块902还用于基于第一控制积木块定义的虚拟场景的展示参数,确定运行第一控制积木块时虚拟场景的展示参数。The determination module 902 is further configured to determine the display parameters of the virtual scene when the first control building block is running based on the display parameters of the virtual scene defined by the first control building block.

作为一种可能的实现方式,增加模块901还用于响应于对第二控制积木块的选择操作,在可视化编程区域增加与第二追踪目标对应的第二控制积木块,第二控制积木块用于定义第二追踪目标的目标类型;As a possible implementation, the adding module 901 is also configured to add a second control building block corresponding to the second tracking target in the visual programming area in response to the selection operation of the second control building block, and the second control building block is used for Used to define the target type of the second tracking target;

确定模块902还用于若第二控制积木块用于定义的第二追踪目标的目标类型为视窗目标,运行运动积木块时,基于第二追踪目标与视窗区域的相对位置参数,更新第二追踪目标的第二目标位置在虚拟场景的位置参数,更新第二目标位置在虚拟场景的位置参数前后第二追踪目标与视窗区域的相对位置保持恒定。The determination module 902 is also used to update the second tracking target based on the relative position parameters between the second tracking target and the window area when the target type of the second tracking target defined by the second control building block is a window target when running the motion building block. The second target position of the target is in the position parameter of the virtual scene, and the relative position of the second tracking target and the window area is kept constant before and after updating the second target position in the position parameter of the virtual scene.

作为一种可能的实现方式,确定模块902还用于若第二控制积木块用于定义的第二追踪目标的目标类型为场景目标,运行运动积木块时,基于第一追踪目标的移动参数和第二追踪目标的第二目标位置,更新第二目标位置在视窗区域的位置参数。As a possible implementation, the determining module 902 is also configured to: if the target type of the second tracking target defined by the second control building block is a scene target, when running the motion building block, based on the movement parameters of the first tracking target and For the second target position of the second tracking target, update the position parameter of the second target position in the window area.

作为一种可能的实现方式,确定模块902还用于基于运动积木块定义的第一追踪目标的移动参数,控制视窗区域的相机镜头的移动参数;As a possible implementation, the determining module 902 is further configured to control the movement parameters of the camera lens in the window area based on the movement parameters of the first tracking target defined by the movement building blocks;

确定模块902还用于基于相机镜头的移动参数和所述第一追踪目标在视窗区域的第一目标位置的位置参数,确定运行运动积木块时所述局部区域的渲染参数。The determination module 902 is further configured to determine the rendering parameters of the local area when running the moving building blocks based on the movement parameters of the camera lens and the position parameters of the first target position of the first tracking target in the window area.

作为一种可能的实现方式,第一追踪目标的移动参数至少包括:第一追踪目标的移动方向参数,相机镜头的移动参数至少包括:相机镜头的移动方向参数;As a possible implementation manner, the moving parameters of the first tracking target at least include: a moving direction parameter of the first tracking target, and the moving parameters of the camera lens at least include: a moving direction parameter of the camera lens;

第一追踪目标的移动参数还包:括第一追踪目标的移动速度参数,相机镜头的移动参数还包括:所述相机镜头的移动速度参数。The moving parameter of the first tracking target further includes: a moving speed parameter of the first tracking target, and the moving parameter of the camera lens further includes: a moving speed parameter of the camera lens.

图10示出了本公开示例性实施例的芯片的示意性框图。如图10所示,该芯片1000包括一个或两个以上(包括两个)处理器1001和通信接口1002。通信接口1002可以支持服务器执行上述方法中的数据收发步骤,处理器1001可以支持服务器执行上述方法中的数据处理步骤。FIG. 10 shows a schematic block diagram of a chip of an exemplary embodiment of the present disclosure. As shown in FIG. 10 , the chip 1000 includes one or more than two (including two) processors 1001 and a communication interface 1002 . The communication interface 1002 may support the server to execute the data transceiving step in the above method, and the processor 1001 may support the server to execute the data processing step in the above method.

可选的,如图10所示,该芯片1000还包括存储器1003,存储器1003可以包括只读存储器和随机存取存储器,并向处理器提供操作指令和数据。存储器的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。Optionally, as shown in FIG. 10 , the chip 1000 further includes a memory 1003. The memory 1003 may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. Part of the memory may also include non-volatile random access memory (non-volatile random access memory, NVRAM).

在一些实施方式中,如图10所示,处理器1001通过调用存储器存储的操作指令(该操作指令可存储在操作系统中),执行相应的操作。处理器1001控制终端设备中任一个的处理操作,处理器还可以称为中央处理单元(central processing unit,CPU)。存储器1003可以包括只读存储器和随机存取存储器,并向处理器1001提供指令和数据。存储器1003的一部分还可以包括NVRAM。例如应用中存储器、通信接口以及存储器通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图10中将各种总线都标为总线系统1004。In some implementations, as shown in FIG. 10 , the processor 1001 executes corresponding operations by calling an operation instruction stored in a memory (the operation instruction may be stored in an operating system). The processor 1001 controls processing operations of any one of the terminal devices, and the processor may also be referred to as a central processing unit (central processing unit, CPU). The memory 1003 may include read-only memory and random-access memory, and provides instructions and data to the processor 1001 . A portion of memory 1003 may also include NVRAM. For example, in the application, the memory, the communication interface, and the memory are coupled together through a bus system, where the bus system may include not only a data bus, but also a power bus, a control bus, and a status signal bus. However, the various buses are labeled as bus system 1004 in FIG. 10 for clarity of illustration.

上述本公开实施例揭示的方法可以应用于处理器中,或者由处理器实现。处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processing,DSP)、ASIC、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本公开实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present disclosure may be applied to or implemented by a processor. A processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.

本公开示例性实施例还提供一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器。所述存储器存储有能够被所述至少一个处理器执行的计算机程序,所述计算机程序在被所述至少一个处理器执行时用于使所述电子设备执行根据本公开实施例的方法。Exemplary embodiments of the present disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, and when executed by the at least one processor, the computer program is used to cause the electronic device to execute the method according to the embodiment of the present disclosure.

本公开示例性实施例还提供一种存储有计算机程序的非瞬时计算机可读存储介质,其中,所述计算机程序在被计算机的处理器执行时用于使所述计算机执行根据本公开实施例的方法。Exemplary embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor of a computer, the computer is used to cause the computer to execute the method.

本公开示例性实施例还提供一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被计算机的处理器执行时用于使所述计算机执行根据本公开实施例的方法。Exemplary embodiments of the present disclosure also provide a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method according to the embodiments of the present disclosure.

参考图11,现将描述可以作为本公开的服务器或客户端的电子设备1100的结构框图,其是可以应用于本公开的各方面的硬件设备的示例。电子设备旨在表示各种形式的数字电子的计算机设备,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。Referring to FIG. 11 , a structural block diagram of an electronic device 1100 that can serve as a server or a client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure, will now be described. Electronic device is intended to mean various forms of digital electronic computing equipment, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.

如图11所示,电子设备1100包括计算单元1101,其可以根据存储在只读存储器(ROM)1102中的计算机程序或者从存储单元1108加载到随机访问存储器(RAM)1103中的计算机程序,来执行各种适当的动作和处理。在RAM 1103中,还可存储设备1100操作所需的各种程序和数据。计算单元1101、ROM 1102以及RAM 1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。As shown in FIG. 11 , an electronic device 1100 includes a computing unit 1101, which can perform calculations according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. Various appropriate actions and processes are performed. In the RAM 1103, various programs and data necessary for the operation of the device 1100 can also be stored. The computing unit 1101 , ROM 1102 , and RAM 1103 are connected to each other through a bus 1104 . An input/output (I/O) interface 1105 is also connected to the bus 1104 .

电子设备1100中的多个部件连接至I/O接口1105,包括:输入单元1106、输出单元1107、存储单元1108以及通信单元1109。输入单元1106可以是能向电子设备1100输入信息的任何类型的设备,输入单元1106可以接收输入的数字或字符信息,以及产生与电子设备的用户设置和/或功能控制有关的键信号输入。输出单元1107可以是能呈现信息的任何类型的设备,并且可以包括但不限于显示器、扬声器、视频/音频输出终端、振动器和/或打印机。存储单元1108可以包括但不限于磁盘、光盘。通信单元1109允许电子设备1100通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据,并且可以包括但不限于调制解调器、网卡、红外通信设备、无线通信收发机和/或芯片组,例如蓝牙TM设备、WiFi设备、WiMax设备、蜂窝通信设备和/或类似物。Multiple components in the electronic device 1100 are connected to the I/O interface 1105 , including: an input unit 1106 , an output unit 1107 , a storage unit 1108 and a communication unit 1109 . The input unit 1106 can be any type of device capable of inputting information to the electronic device 1100. The input unit 1106 can receive input digital or character information, and generate key signal input related to user settings and/or function control of the electronic device. The output unit 1107 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 1108 may include, but is not limited to, a magnetic disk and an optical disk. The communication unit 1109 allows the electronic device 1100 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks, and may include but not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and/or a chip Groups, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.

如图11所示,计算单元1101可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元1101的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元1101执行上文所描述的各个方法和处理。例如,在一些实施例中,本公开示例性实施例的方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元1108。在一些实施例中,计算机程序的部分或者全部可以经由ROM 1102和/或通信单元1109而被载入和/或安装到电子设备1100上。在一些实施例中,计算单元1101可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行方法。As shown in FIG. 11 , the computing unit 1101 may be various general-purpose and/or special-purpose processing components with processing and computing capabilities. Some examples of computing units 1101 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 executes the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of the present disclosure may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1108 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 1100 via the ROM 1102 and/or the communication unit 1109 . In some embodiments, the computing unit 1101 may be configured to execute the method in any other suitable manner (eg, by means of firmware).

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

如本公开使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or means for providing machine instructions and/or data to a programmable processor (eg, magnetic disk, optical disk, memory, programmable logic device (PLD)), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本公开实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、终端、用户设备或者其它可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序或指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,例如,软盘、硬盘、磁带;也可以是光介质,例如,数字视频光盘(digital video disc,DVD);还可以是半导体介质,例如,固态硬盘(solid state drive,SSD)。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer programs or instructions. When the computer program or instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present disclosure are executed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a terminal, user equipment or other programmable devices. The computer program or instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be downloaded from a website, computer, A server or data center transmits to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrating one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disc (digital video disc, DVD); it may also be a semiconductor medium, such as a solid state drive (solid state drive). , SSD).

尽管结合具体特征及其实施例对本公开进行了描述,显而易见的,在不脱离本公开的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本公开的示例性说明,且视为已覆盖本公开范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本公开进行各种改动和变型而不脱离本公开的精神和范围。这样,倘若本公开的这些修改和变型属于本公开权利要求及其等同技术的范围之内,则本公开也意图包括这些改动和变型在内。Although the present disclosure has been described in conjunction with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, the specification and drawings are merely illustrative of the disclosure as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and equivalent technologies thereof, the present disclosure also intends to include these modifications and variations.

Claims (13)

1.一种可视化编程方法,其特征在于,所述方法包括:1. A visual programming method, characterized in that the method comprises: 响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,所述视窗区域用于展示虚拟场景中与所述第一追踪目标的位置对应的局部区域;In response to the selection operation of the motion building block, a motion building block corresponding to the first tracking target displayed in the window area is added in the visual programming area, and the window area is used to display the position of the first tracking target in the virtual scene the corresponding local area; 基于所述运动积木块定义的所述第一追踪目标的移动参数,确定运行所述运动积木块时所述局部区域的渲染参数。Based on the movement parameters of the first tracking target defined by the motion building blocks, the rendering parameters of the local area when the motion building blocks are running are determined. 2.根据权利要求1所述的方法,其特征在于,所述虚拟场景的尺寸参数定义的区域为虚拟场景区域,所述视窗区域的尺寸参数定义的区域为视窗区域,所述虚拟场景区域在至少一个方向的尺寸大于或等于所述视窗区域在对应方向上的尺寸。2. The method according to claim 1, wherein the area defined by the size parameter of the virtual scene is a virtual scene area, and the area defined by the size parameter of the window area is a window area, and the virtual scene area is in The size of at least one direction is greater than or equal to the size of the window area in the corresponding direction. 3.根据权利要求1所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1, wherein the method further comprises: 响应于对所述第一追踪目标的选择操作,在所述视窗区域的第一目标位置展示所述第一追踪目标;displaying the first tracking target at a first target position in the window area in response to a selection operation on the first tracking target; 响应于对所述虚拟场景的场景控制操作,确定所述虚拟场景的展示参数,所述虚拟场景的展示参数至少包括虚拟场景的尺寸参数;In response to a scene control operation on the virtual scene, determine display parameters of the virtual scene, where the display parameters of the virtual scene include at least a size parameter of the virtual scene; 基于所述虚拟场景的展示参数和所述第一目标位置在所述视窗区域的位置参数确定所述局部区域的渲染参数。The rendering parameter of the local area is determined based on the display parameter of the virtual scene and the position parameter of the first target position in the window area. 4.根据权利要求3所述的方法,其特征在于,所述局部区域的尺寸参数与所述视窗区域的相机镜头的相机视野参数相关,所述方法还包括:4. The method according to claim 3, wherein the size parameter of the local area is related to the camera field of view parameter of the camera lens in the window area, and the method further comprises: 响应于对于所述相机视野参数的控制操作,基于所述第一目标位置在所述视窗区域的位置参数确定与所述相机视野参数匹配的所述局部区域的渲染参数。In response to a control operation on the camera field of view parameter, determine a rendering parameter of the local area that matches the camera field of view parameter based on a position parameter of the first target position in the window area. 5.根据权利要求3所述的方法,其特征在于,所述场景控制操作至少包括:尺寸调整操作;5. The method according to claim 3, wherein the scene control operation at least comprises: a size adjustment operation; 所述场景控制操作还包括:场景展示形式设置操作。The scene control operation also includes: a scene display form setting operation. 6.根据权利要求3所述的方法,其特征在于,所述场景控制操作包括对所述虚拟场景的展示参数的输入操作;或,6. The method according to claim 3, wherein the scene control operation comprises an input operation of display parameters of the virtual scene; or, 所述场景控制操作包括对第一控制积木块的选择操作,所述确定所述虚拟场景的展示参数,包括:The scene control operation includes the selection operation of the first control building block, and the determination of the display parameters of the virtual scene includes: 在可视化编程区域增加与所述虚拟场景对应的第一控制积木块;Adding a first control building block corresponding to the virtual scene in the visual programming area; 基于所述第一控制积木块定义的所述虚拟场景的展示参数,确定运行所述第一控制积木块时所述虚拟场景的展示参数。Based on the display parameters of the virtual scene defined by the first control building block, determine the display parameters of the virtual scene when the first control building block is running. 7.根据权利要求1所述的方法,其特征在于,所述方法还包括:7. The method according to claim 1, further comprising: 响应于对第二控制积木块的选择操作,在所述可视化编程区域增加与第二追踪目标对应的第二控制积木块,所述第二控制积木块用于定义所述第二追踪目标的目标类型;In response to the selection operation of the second control building block, a second control building block corresponding to the second tracking target is added in the visual programming area, and the second control building block is used to define the target of the second tracking target type; 若所述第二控制积木块用于定义的所述第二追踪目标的目标类型为视窗目标,运行所述运动积木块时,基于所述第二追踪目标与所述视窗区域的相对位置参数,更新所述第二追踪目标的第二目标位置在所述虚拟场景的位置参数,更新所述第二目标位置在所述虚拟场景的位置参数前后所述第二追踪目标与所述视窗区域的相对位置保持恒定。If the target type of the second tracking target defined by the second control building block is a window target, when running the motion building block, based on the relative position parameters between the second tracking target and the window area, Updating the position parameter of the second target position of the second tracking target in the virtual scene, updating the relative position of the second target position to the window area before and after the position parameter of the virtual scene The position remains constant. 8.根据权利要求7所述的方法,其特征在于,所述方法还包括:8. The method according to claim 7, further comprising: 若所述第二控制积木块用于定义的所述第二追踪目标的目标类型为场景目标,运行所述运动积木块时,基于所述第一追踪目标的移动参数和所述第二追踪目标的第二目标位置,更新所述第二目标位置在所述视窗区域的位置参数。If the target type of the second tracking target defined by the second control building block is a scene target, when running the motion building block, based on the movement parameters of the first tracking target and the second tracking target the second target position, and update the position parameter of the second target position in the window area. 9.根据权利要求1~8任一项所述的方法,其特征在于,所述基于所述运动积木块定义的所述第一追踪目标的移动参数,确定运行所述运动积木块时所述局部区域的渲染参数,包括:9. The method according to any one of claims 1 to 8, characterized in that, the movement parameters of the first tracking target defined based on the motion building blocks are determined when the motion building blocks are run. Rendering parameters of the local area, including: 基于所述运动积木块定义的所述第一追踪目标的移动参数,控制所述视窗区域的相机镜头的移动参数;controlling the movement parameters of the camera lens in the window area based on the movement parameters of the first tracking target defined by the movement building block; 基于所述相机镜头的移动参数和所述第一追踪目标在所述视窗区域的第一目标位置的位置参数,确定运行所述运动积木块时所述局部区域的渲染参数。Based on the movement parameters of the camera lens and the position parameters of the first tracking target at the first target position in the window area, determine the rendering parameters of the local area when the motion building block is running. 10.根据权利要求1~8任一项所述的方法,其特征在于,所述第一追踪目标的移动参数至少包括:所述第一追踪目标的移动方向参数,所述相机镜头的移动参数至少包括:所述相机镜头的移动方向参数;10. The method according to any one of claims 1-8, wherein the movement parameters of the first tracking target at least include: a moving direction parameter of the first tracking target, a moving parameter of the camera lens At least include: a moving direction parameter of the camera lens; 所述第一追踪目标的移动参数还包括:所述第一追踪目标的移动速度参数,所述相机镜头的移动参数还包括:所述相机镜头的移动速度参数。The moving parameter of the first tracking target further includes: a moving speed parameter of the first tracking target, and the moving parameter of the camera lens further includes: a moving speed parameter of the camera lens. 11.一种可视化编程装置,其特征在于,所述装置包括:11. A visual programming device, characterized in that the device comprises: 增加模块,用于响应于对运动积木块的选择操作,在可视化编程区域增加与视窗区域所展示的第一追踪目标对应的运动积木块,所述视窗区域用于展示虚拟场景中与所述第一追踪目标的位置对应的局部区域;The adding module is used to respond to the selection operation of the moving building block, and add the moving building block corresponding to the first tracking target displayed in the window area in the visual programming area, and the window area is used to display the virtual scene corresponding to the first tracking target. a local area corresponding to the location of the tracking target; 确定模块,用于基于所述运动积木块定义的所述第一追踪目标的移动参数,确定运行所述运动积木块时所述局部区域的渲染参数。A determination module, configured to determine the rendering parameters of the local area when the motion building block is running based on the movement parameters of the first tracking target defined by the motion building block. 12.一种电子设备,其特征在于,包括:12. An electronic device, characterized in that it comprises: 处理器;以及,Processor; and, 存储程序的存储器;memory for storing programs; 其中,所述程序包括指令,所述指令在由所述处理器执行时使所述处理器执行根据权利要求1~10任一项所述的方法。Wherein, the program includes instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1-10. 13.一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行根据权利要求1~10中任一项所述的方法。13. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute the method according to any one of claims 1-10.
CN202310078884.1A 2023-01-17 2023-01-17 Visual programming method and device and electronic equipment Pending CN116204170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310078884.1A CN116204170A (en) 2023-01-17 2023-01-17 Visual programming method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310078884.1A CN116204170A (en) 2023-01-17 2023-01-17 Visual programming method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116204170A true CN116204170A (en) 2023-06-02

Family

ID=86508914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310078884.1A Pending CN116204170A (en) 2023-01-17 2023-01-17 Visual programming method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116204170A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118012317A (en) * 2024-01-03 2024-05-10 腾讯科技(深圳)有限公司 Programming tool scaling method and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3798775A1 (en) * 2019-09-26 2021-03-31 Rockwell Automation Technologies, Inc. Virtual design environment
CN115223423A (en) * 2022-04-22 2022-10-21 北京好奇星教育科技有限公司 Programming method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3798775A1 (en) * 2019-09-26 2021-03-31 Rockwell Automation Technologies, Inc. Virtual design environment
CN115223423A (en) * 2022-04-22 2022-10-21 北京好奇星教育科技有限公司 Programming method and device and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOHN PARK: "MakeCode Arcade Platformer Level Design", pages 1 - 41, Retrieved from the Internet <URL:https://learn.adafruit.com/makecode-arcade-platform-level/create-a-tilemap-level-in-makecode-arcade> *
荔枝: "Scratch 零基础魔法编程(七)"触碰"基础", Retrieved from the Internet <URL:https://www.douban.com/group/topic/126573053/?_i=4340444mp6jff0> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118012317A (en) * 2024-01-03 2024-05-10 腾讯科技(深圳)有限公司 Programming tool scaling method and related device

Similar Documents

Publication Publication Date Title
KR102590102B1 (en) Augmented reality-based display method, device, and storage medium
JP2023517917A (en) VIRTUAL SCENE DISPLAY METHOD, APPARATUS, DEVICE, AND COMPUTER PROGRAM
JP7008730B2 (en) Shadow generation for image content inserted into an image
US20170329503A1 (en) Editing animations using a virtual reality controller
US20190108688A1 (en) Automatic Rendering Of 3D Sound
CN115089964B (en) Method, device, storage medium and electronic device for rendering virtual fog model
CN105808116A (en) Screen capture method, screen capture device and mobile terminal
CN111862280A (en) Virtual character control method, system, medium and electronic device
CN107170047A (en) Update method, equipment and the virtual reality device of virtual reality scenario
KR20230052459A (en) Method and system for creating avatar content
WO2024239465A9 (en) Method and apparatus for switching sky light in game, and electronic device
CN116016986A (en) Rendering method and device for virtual human interaction video
CN116204170A (en) Visual programming method and device and electronic equipment
CN113763568A (en) Augmented reality display processing method, device, device and storage medium
EP4459561A1 (en) Special effect display method and apparatus, device, storage medium, and program product
CN116563503A (en) Display processing method, device, equipment and storage medium based on augmented reality
US20230267664A1 (en) Animation processing method and apparatus, electronic device and storage medium
CN109445573A (en) A kind of method and apparatus for avatar image interactive
CN116048492A (en) Virtual props building method, graphical programming method and device, electronic equipment
US20250123799A1 (en) Voice-Enabled Virtual Object Disambiguation and Controls in Artificial Reality
WO2024124805A9 (en) Interactive animation processing method and device, storage medium and electronic device
CN118632087A (en) Multimedia resource generation method, device, electronic device and storage medium
CN110891194B (en) Comment information display method, device, terminal and storage medium
KR102257442B1 (en) Augmented reality service providing method for providing user interaction and the system thereof
CN114820318A (en) Wallpaper display method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination