From 2c7f688e202f5e62694177e530e97cf8d527d70e Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Fri, 15 Aug 2025 16:49:17 +0800 Subject: [PATCH 1/7] =?UTF-8?q?[Graphics3D]=200702=E5=88=86=E6=94=AF?= =?UTF-8?q?=E9=9D=9E=E6=9C=AC=E9=98=B6=E6=AE=B5=E6=8E=A5=E5=8F=A3=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- api/@ohos.graphics.scene.d.ts | 1 - api/graphics3d/Scene.d.ts | 82 +++++++------ api/graphics3d/SceneNodes.d.ts | 1 - api/graphics3d/ScenePostProcessSettings.d.ts | 1 - api/graphics3d/SceneResources.d.ts | 1 - api/graphics3d/SceneTypes.d.ts | 120 +++++++++++++------ 6 files changed, 127 insertions(+), 79 deletions(-) diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index 46635a0c9e..bb398ee4e3 100644 --- a/api/@ohos.graphics.scene.d.ts +++ b/api/@ohos.graphics.scene.d.ts @@ -16,7 +16,6 @@ /** * @file Export 3D interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /** diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index 838408be3a..12bd2c26ae 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D scene related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ @@ -134,10 +133,10 @@ export interface RaycastParameters { rootNode?: Node; } -/** +/** * The render resource factory. RenderResourceFactory is used to create resources that can be shared * across Scences that share a RenderContext - * + * * @interface RenderResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -154,18 +153,18 @@ export interface RenderResourceFactory { createShader(params: SceneResourceParameters): Promise; /** - * Create a image. - * - * @param { SceneResourceParameters } params - the param of creating a image - * @returns { Promise } promise a image - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Create a image. + * + * @param { SceneResourceParameters } params - the param of creating a image + * @returns { Promise } promise a image + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ createImage(params: SceneResourceParameters): Promise; /** * Create a Mesh from an array of vertices. - * + * * @param { SceneResourceParameters } params - the param of creating a Mesh object * @param { GeometryDefinition } geometry - what sort of a geometric shape to create * @returns { Promise } promise a Mesh @@ -176,7 +175,7 @@ export interface RenderResourceFactory { /** * create a Sampler - * + * * @param { SceneResourceParameters } params - the param of create a sampler * @returns { Promise } - promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -186,7 +185,7 @@ export interface RenderResourceFactory { /** * Create a new scene from a Resource. - * + * * @param { ResourceStr } uri - the resource of creating a scene * @returns { Promise } promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -258,7 +257,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Create a geometry node. - * + * * @param { SceneNodeParameters } params - the param of creating a geometry * @param { MeshResource } mesh resource - The mesh data for the geometry * @returns { Promise } promise a geometry @@ -270,7 +269,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Define underlying scene component - * + * * @interface SceneComponent * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -278,7 +277,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { export interface SceneComponent { /** * Scene component name - * + * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -287,7 +286,7 @@ export interface SceneComponent { /** * Component properties - * + * * @type { Record } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D @@ -296,10 +295,10 @@ export interface SceneComponent { readonly property: Record; } -/** +/** * Render context defines the context for all rendering resources. Resources within the same render context * may be shared between scenes created within the same render context. - * + * * @interface RenderContext * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -307,7 +306,7 @@ export interface SceneComponent { export interface RenderContext { /** * Get resource factory. - * + * * @returns { RenderResourceFactory } -- RenderResourceFactory instance * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -316,7 +315,7 @@ export interface RenderContext { /** * Load external plugin - * + * * @param {string} name - Name of the plugin * @returns { Promise } - Promise a boolean to show if the plugin load is successful * @syscap SystemCapability.ArkUi.Graphics3D @@ -375,31 +374,40 @@ export declare class Scene { /** * The environment of the scene. * - * @type { Environment } + * @return { Environment } * @syscap SystemCapability.ArkUi.Graphics3D * @since 12 */ - environment: Environment; + get environment(): Environment; + + /** + * The environment of the scene. + * + * @param { Environment } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 12 + */ + set environment(value: Environment); /** * The animations of the scene. * - * @type { Animation[] } + * @return { Animation[] } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D * @since 12 */ - readonly animations: Animation[]; + get animations(): Animation[]; /** * The root node of the scene. * - * @type { Node | null } + * @return { Node | null } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D * @since 12 */ - readonly root: Node | null; + get root(): Node | null; /** * Get a node by path. @@ -451,7 +459,7 @@ export declare class Scene { * @param { Node | null } parent - The parent node or null for root * @returns { Node } The newly created node. * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since 18 */ importScene(name: string, scene: Scene, parent: Node | null): Node; @@ -467,7 +475,7 @@ export declare class Scene { /** * Create a new component. - * + * * @param { Node } node - The node the component is attached to * @param { string } name - The name of the component to load. Valid names are defined by each plugin. * @returns { Promise } - The newly added component. @@ -477,13 +485,13 @@ export declare class Scene { createComponent(node: Node, name: string): Promise; /** - * Get component by name. - * - * @param { Node } node - The node component is attached to. - * @param { string } name - name of the component - * @returns { SceneComponent | null } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Get component by name. + * + * @param { Node } node - The node component is attached to. + * @param { string } name - name of the component + * @returns { SceneComponent | null } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ getComponent(node: Node, name: string): SceneComponent | null; } diff --git a/api/graphics3d/SceneNodes.d.ts b/api/graphics3d/SceneNodes.d.ts index eb068d90e6..3e34a5bc0a 100644 --- a/api/graphics3d/SceneNodes.d.ts +++ b/api/graphics3d/SceneNodes.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D node related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ import { SceneResource, Mesh, Morpher } from './SceneResources'; diff --git a/api/graphics3d/ScenePostProcessSettings.d.ts b/api/graphics3d/ScenePostProcessSettings.d.ts index fc88f73eb9..5b26ced933 100644 --- a/api/graphics3d/ScenePostProcessSettings.d.ts +++ b/api/graphics3d/ScenePostProcessSettings.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D post process related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /** diff --git a/api/graphics3d/SceneResources.d.ts b/api/graphics3d/SceneResources.d.ts index c26828aa13..65a2246a9d 100644 --- a/api/graphics3d/SceneResources.d.ts +++ b/api/graphics3d/SceneResources.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D resource related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ diff --git a/api/graphics3d/SceneTypes.d.ts b/api/graphics3d/SceneTypes.d.ts index 81a38d97f6..da529fc14c 100644 --- a/api/graphics3d/SceneTypes.d.ts +++ b/api/graphics3d/SceneTypes.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D basic types * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /** @@ -291,7 +290,7 @@ export interface Rect { /** * Types of geometric shapes. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -299,7 +298,7 @@ export interface Rect { export enum GeometryType { /** * A custom geometric shape. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -307,7 +306,7 @@ export enum GeometryType { /** * A cube. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -315,7 +314,7 @@ export enum GeometryType { /** * A plane. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -332,14 +331,14 @@ export enum GeometryType { /** * Define a geometric shape for mesh creation. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ export declare abstract class GeometryDefinition { /** * Which geometry shape to interpret from this definition. - * + * * @type { GeometryType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D @@ -350,15 +349,15 @@ export declare abstract class GeometryDefinition { /** * How vertices in a sequence form triangles. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since 18 */ export enum PrimitiveTopology { /** * The vertices form a set of independent triangle. Vertices (0, 1, 2), (3, 4, 5), ... define separate triangles. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -366,7 +365,7 @@ export enum PrimitiveTopology { /** * The vertices form a triangle strip. Starting from the 3rd, each vertex defines a triangle with the previous two. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -375,7 +374,7 @@ export enum PrimitiveTopology { /** * An array of vertices and their data defining a custom geometric shape. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -383,7 +382,7 @@ export enum PrimitiveTopology { export declare class CustomGeometry extends GeometryDefinition { /** * How to form mesh triangles from the indexed vertices. - * + * * @type { ?PrimitiveTopology } * @default PrimitiveTopology.TRIANGLE_LIST * @syscap SystemCapability.ArkUi.Graphics3D @@ -393,25 +392,34 @@ export declare class CustomGeometry extends GeometryDefinition { /** * An array of vertices. - * - * @type { Vec3[] } + * + * @return { Vec3[] } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 18 + */ + get vertices(): Vec3[]; + + /** + * An array of vertices. + * + * @param { Vec3[] } value * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - vertices: Vec3[]; + set vertices(value: Vec3[]); /** * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. - * + * * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: * topology = PrimitiveTopology.TRIANGLE_LIST - * indices = [0, 1, 2, 2, 1, 3] + * indices = [0, 1, 2, 2, 1, 3] * resulting triangles: abc, cbd - * + * * topology = PrimitiveTopology.TRIANGLE_STRIP * indices = [0, 1, 2, 3] * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) - * + * * @type { ?int[] } * @default indices: [0, 1 ,2,..., vertices.size() - 1] * @syscap SystemCapability.ArkUi.Graphics3D @@ -421,7 +429,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. - * + * * @type { ?Vec3[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -430,7 +438,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] - * + * * @type { ?Vec2[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -439,7 +447,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * + * * @type { ?Color[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -449,7 +457,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Define a rectangular cuboid. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -457,17 +465,26 @@ export declare class CustomGeometry extends GeometryDefinition { export declare class CubeGeometry extends GeometryDefinition { /** * The width, height and depth of the cube. - * - * @type { Vec3 } + * + * @return { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - size: Vec3; + get size(): Vec3; + + /** + * The width, height and depth of the cube. + * + * @param { Vec3 } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 18 + */ + set size(value: Vec3); } /** * Define a plane. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -475,17 +492,26 @@ export declare class CubeGeometry extends GeometryDefinition { export declare class PlaneGeometry extends GeometryDefinition { /** * The width and length of the plane. - * - * @type { Vec2 } + * + * @return { Vec2 } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 18 + */ + get size(): Vec2; + + /** + * The width and length of the plane. + * + * @param { Vec2 } value * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - size: Vec2; + set size(value: Vec2); } /** * Define a sphere. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -493,21 +519,39 @@ export declare class PlaneGeometry extends GeometryDefinition { export declare class SphereGeometry extends GeometryDefinition { /** * The raduis of the sphere. - * - * @type { double } + * + * @return { double } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - radius: double; + get radius(): double; + + /** + * The raduis of the sphere. + * + * @param { double } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 18 + */ + set radius(value: double); /** * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. - * - * @type { int } + * + * @return { int } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 18 + */ + get segmentCount(): int; + + /** + * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. + * + * @param { int } value * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - segmentCount: int; + set segmentCount(value: int); } /** * 3D position information. -- Gitee From a68e0aa050612a9b5eeadeab2b90191cba417eda Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Fri, 15 Aug 2025 17:38:57 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BB=85=E5=AF=BC=E5=87=BA=E4=B8=80?= =?UTF-8?q?=E9=98=B6=E6=AE=B577=E4=B8=AA=E6=8E=A5=E5=8F=A3=E5=8F=8A?= =?UTF-8?q?=E5=85=B6=E4=BE=9D=E8=B5=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- api/@ohos.graphics.scene.d.ts | 36 ++++++++ api/graphics3d/Scene.d.ts | 66 ++++++++++----- api/graphics3d/SceneNodes.d.ts | 79 ++++++++++++------ api/graphics3d/ScenePostProcessSettings.d.ts | 27 ++++-- api/graphics3d/SceneResources.d.ts | 87 +++++++++++++------- api/graphics3d/SceneTypes.d.ts | 81 ++++++++++++------ 6 files changed, 266 insertions(+), 110 deletions(-) diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index bb398ee4e3..7f164ea157 100644 --- a/api/@ohos.graphics.scene.d.ts +++ b/api/@ohos.graphics.scene.d.ts @@ -24,6 +24,13 @@ * @since 12 */ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings } from './graphics3d/ScenePostProcessSettings'; +/** + * Export post processing settings + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { ToneMappingType, ToneMappingSettings, PostProcessSettings } from './graphics3d/ScenePostProcessSettings'; /** * Export scene types @@ -32,6 +39,13 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting */ export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, Scale3, GeometryType, GeometryDefinition, PrimitiveTopology, CustomGeometry, CubeGeometry, PlaneGeometry, SphereGeometry } from './graphics3d/SceneTypes'; +/** + * Export scene types + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3 } from './graphics3d/SceneTypes'; /** * Export scene resources @@ -42,6 +56,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, MeshResource, Morpher, Sampler, SamplerFilter, SamplerAddressMode } from './graphics3d/SceneResources'; +/** + * Export scene resources + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResource, Animation, EnvironmentBackgroundType, Environment } from './graphics3d/SceneResources'; /** * Export scene nodes @@ -50,6 +71,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade */ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera } from './graphics3d/SceneNodes'; +/** + * Export scene nodes + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { NodeType, Node, LightType, Light, DirectionalLight, Camera } from './graphics3d/SceneNodes'; /** * Export scene @@ -58,3 +86,11 @@ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotL */ export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RaycastResult, RaycastParameters, RenderParameters, RenderResourceFactory, SceneComponent, RenderContext } from './graphics3d/Scene'; +/** + * Export scene + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, + RenderResourceFactory } from './graphics3d/Scene'; diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index 12bd2c26ae..da42ae7463 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -20,17 +20,23 @@ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; +import { Animation, Environment, SceneResource } from './SceneResources'; +import { Camera, LightType, Light, Node, NodeType } from './SceneNodes'; +import { Position3, Color, Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ +/*** if arkts 1.1 */ import { Shader, MaterialType, Material, Animation, Environment, Image, MeshResource, Sampler, SceneResource } from './SceneResources'; import { Camera, LightType, Light, Node, NodeType, Geometry } from './SceneNodes'; import { Position3, Color, GeometryDefinition, Vec2, Vec3, Vec4 } from './SceneTypes'; +/*** endif */ /** * The scene resource parameters type. * * @typedef SceneResourceParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResourceParameters { /** @@ -38,7 +44,8 @@ export interface SceneResourceParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -57,7 +64,8 @@ export interface SceneResourceParameters { * * @typedef SceneNodeParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneNodeParameters { /** @@ -65,7 +73,8 @@ export interface SceneNodeParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -139,7 +148,8 @@ export interface RaycastParameters { * * @interface RenderResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RenderResourceFactory { /** @@ -200,7 +210,8 @@ export interface RenderResourceFactory { * @extends RenderResourceFactory * @interface SceneResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResourceFactory extends RenderResourceFactory { /** @@ -209,7 +220,8 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { SceneNodeParameters } params - the param of creating a camera * @returns { Promise } promise a camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createCamera(params: SceneNodeParameters): Promise; @@ -220,7 +232,8 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { LightType } lightType - the type of the light * @returns { Promise } promise a light * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createLight(params: SceneNodeParameters, lightType: LightType): Promise; @@ -329,7 +342,8 @@ export interface RenderContext { * * @interface RenderParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RenderParameters { /** @@ -338,7 +352,8 @@ export interface RenderParameters { * * @type { ?boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alwaysRender?: boolean; } @@ -347,7 +362,8 @@ export interface RenderParameters { * Defines the 3d scene. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare class Scene { /** @@ -367,7 +383,8 @@ export declare class Scene { * @returns { Promise } promise a scene * @static * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ static load(uri? : ResourceStr): Promise; @@ -376,7 +393,8 @@ export declare class Scene { * * @return { Environment } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ get environment(): Environment; @@ -385,7 +403,8 @@ export declare class Scene { * * @param { Environment } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ set environment(value: Environment); @@ -395,7 +414,8 @@ export declare class Scene { * @return { Animation[] } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ get animations(): Animation[]; @@ -416,24 +436,27 @@ export declare class Scene { * @param { NodeType } type - verify the type of node, if it does not match, return null * @returns { Node | null } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getNodeByPath(path: string, type?: NodeType): Node | null; - + /** * Get resource factory. * * @returns { SceneResourceFactory } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getResourceFactory(): SceneResourceFactory; - + /** * Release all native scene resources. All TS references will be undefined. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; @@ -469,7 +492,8 @@ export declare class Scene { * @param { RenderParameters } params - Rendering parameters * @returns { boolean } True if rendering was scheduled, false otherwise * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ renderFrame(params?: RenderParameters): boolean; diff --git a/api/graphics3d/SceneNodes.d.ts b/api/graphics3d/SceneNodes.d.ts index 3e34a5bc0a..53cbe005fd 100644 --- a/api/graphics3d/SceneNodes.d.ts +++ b/api/graphics3d/SceneNodes.d.ts @@ -18,10 +18,15 @@ * @kit ArkGraphics3D */ +/*** if arkts 1.2 */ +import { SceneResource } from './SceneResources'; +/*** endif */ +/*** if arkts 1.1 */ import { SceneResource, Mesh, Morpher } from './SceneResources'; +import { RaycastParameters, RaycastResult } from './Scene'; +/*** endif */ import { Position3, Quaternion, Scale3, Color, Vec2, Vec3 } from './SceneTypes'; import { PostProcessSettings } from './ScenePostProcessSettings'; -import { RaycastParameters, RaycastResult } from './Scene'; /** * Defines the layer mask of the node. @@ -57,14 +62,16 @@ export interface LayerMask { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum NodeType { /** * The node is an empty node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NODE = 1, @@ -72,7 +79,8 @@ export enum NodeType { * The node is a geometry node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ GEOMETRY = 2, @@ -80,7 +88,8 @@ export enum NodeType { * The node is a camera node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA = 3, @@ -88,7 +97,8 @@ export enum NodeType { * The node is a light node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT = 4 } @@ -163,7 +173,8 @@ export interface Container { * @extends SceneResource * @interface Node * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Node extends SceneResource { /** @@ -171,7 +182,8 @@ export interface Node extends SceneResource { * * @type { Position3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: Position3; @@ -180,7 +192,8 @@ export interface Node extends SceneResource { * * @type { Quaternion } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rotation: Quaternion; @@ -189,7 +202,8 @@ export interface Node extends SceneResource { * * @type { Scale3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: Scale3; @@ -198,7 +212,8 @@ export interface Node extends SceneResource { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ visible: boolean; @@ -208,7 +223,8 @@ export interface Node extends SceneResource { * @type { NodeType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly nodeType: NodeType; @@ -248,7 +264,8 @@ export interface Node extends SceneResource { * @param { string } path - the path of the node queried * @returns { Node | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNodeByPath(path: string): Node | null; @@ -298,14 +315,16 @@ export interface Geometry extends Node { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LightType { /** * Directional light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIRECTIONAL = 1, @@ -313,7 +332,8 @@ export enum LightType { * Spot light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPOT = 2, } @@ -324,7 +344,8 @@ export enum LightType { * @extends Node * @interface Light * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Light extends Node { /** @@ -342,7 +363,8 @@ export interface Light extends Node { * * @type { Color } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color: Color; @@ -351,7 +373,8 @@ export interface Light extends Node { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ intensity: double; @@ -360,7 +383,8 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadowEnabled: boolean; @@ -369,7 +393,8 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; } @@ -391,7 +416,8 @@ export interface SpotLight extends Light { * @extends Light * @interface DirectionalLight * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface DirectionalLight extends Light { } @@ -402,7 +428,8 @@ export interface DirectionalLight extends Light { * @extends Node * @interface Camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Camera extends Node { /** @@ -437,7 +464,8 @@ export interface Camera extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; @@ -446,7 +474,8 @@ export interface Camera extends Node { * * @type { PostProcessSettings | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ postProcess: PostProcessSettings | null; diff --git a/api/graphics3d/ScenePostProcessSettings.d.ts b/api/graphics3d/ScenePostProcessSettings.d.ts index 5b26ced933..75530416bd 100644 --- a/api/graphics3d/ScenePostProcessSettings.d.ts +++ b/api/graphics3d/ScenePostProcessSettings.d.ts @@ -23,14 +23,16 @@ * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ToneMappingType { /** * The tone mapping type is ACES. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACES = 0, @@ -38,7 +40,8 @@ export enum ToneMappingType { * The tone mapping type is ACES_2020. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACES_2020 = 1, @@ -46,7 +49,8 @@ export enum ToneMappingType { * The tone mapping type is FILMIC. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FILMIC = 2, } @@ -56,7 +60,8 @@ export enum ToneMappingType { * * @typedef ToneMappingSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ToneMappingSettings { /** @@ -64,7 +69,8 @@ export interface ToneMappingSettings { * * @type { ?ToneMappingType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ToneMappingType; @@ -73,7 +79,8 @@ export interface ToneMappingSettings { * * @type { ?double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ exposure?: double; } @@ -130,7 +137,8 @@ export interface BloomSettings { * * @typedef PostProcessSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface PostProcessSettings { /** @@ -138,7 +146,8 @@ export interface PostProcessSettings { * * @type { ?ToneMappingSettings } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ toneMapping?: ToneMappingSettings; diff --git a/api/graphics3d/SceneResources.d.ts b/api/graphics3d/SceneResources.d.ts index 65a2246a9d..83b8b53821 100644 --- a/api/graphics3d/SceneResources.d.ts +++ b/api/graphics3d/SceneResources.d.ts @@ -20,8 +20,11 @@ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; +import { Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ +/*** if arkts 1.1 */ import { Vec2, Vec3, Vec4, Aabb } from './SceneTypes'; +/*** endif */ import { Callback } from '../@ohos.base'; /** @@ -29,14 +32,16 @@ import { Callback } from '../@ohos.base'; * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SceneResourceType { /** * The resource is an Unknown. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -44,7 +49,8 @@ export enum SceneResourceType { * The resource is a Node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NODE = 1, @@ -52,7 +58,8 @@ export enum SceneResourceType { * The resource is an Environment. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ENVIRONMENT = 2, @@ -60,7 +67,8 @@ export enum SceneResourceType { * The resource is a Material. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MATERIAL = 3, @@ -68,7 +76,8 @@ export enum SceneResourceType { * The resource is a Mesh. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MESH = 4, @@ -76,7 +85,8 @@ export enum SceneResourceType { * The resource is an Animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ANIMATION = 5, @@ -84,7 +94,8 @@ export enum SceneResourceType { * The resource is a Shader. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHADER = 6, @@ -92,7 +103,8 @@ export enum SceneResourceType { * The resource is an Image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 7, @@ -100,7 +112,8 @@ export enum SceneResourceType { * The resource is a mesh resource * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MESH_RESOURCE = 8, } @@ -110,7 +123,8 @@ export enum SceneResourceType { * * @interface SceneResource * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResource { /** @@ -147,7 +161,8 @@ export interface SceneResource { * Release scene resource. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; } @@ -738,7 +753,8 @@ export interface MeshResource extends SceneResource { * @extends SceneResource * @interface Animation * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Animation extends SceneResource { /** @@ -776,7 +792,8 @@ export interface Animation extends SceneResource { * @type { boolean } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly running: boolean; @@ -786,7 +803,8 @@ export interface Animation extends SceneResource { * @type { double } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly progress: double; @@ -795,7 +813,8 @@ export interface Animation extends SceneResource { * * @param { Callback } callback - the callback invoked when animation finished * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinished(callback: Callback): void; @@ -820,7 +839,8 @@ export interface Animation extends SceneResource { * Restart the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restart(): void; @@ -837,7 +857,8 @@ export interface Animation extends SceneResource { * Start the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): void; @@ -845,7 +866,8 @@ export interface Animation extends SceneResource { * Stop the animation and seek the position to the beginning. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): void; @@ -862,14 +884,16 @@ export interface Animation extends SceneResource { * The enum of environment background type. * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum EnvironmentBackgroundType { /** * The background is none. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_NONE = 0, @@ -877,7 +901,8 @@ export enum EnvironmentBackgroundType { * The background is image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_IMAGE = 1, @@ -885,7 +910,8 @@ export enum EnvironmentBackgroundType { * The background is cubemap. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_CUBEMAP = 2, @@ -893,7 +919,8 @@ export enum EnvironmentBackgroundType { * The background is equirectangular. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_EQUIRECTANGULAR = 3, } @@ -904,7 +931,8 @@ export enum EnvironmentBackgroundType { * @extends SceneResource * @interface Environment * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Environment extends SceneResource { /** @@ -912,7 +940,8 @@ export interface Environment extends SceneResource { * * @type { EnvironmentBackgroundType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundType: EnvironmentBackgroundType; @@ -921,7 +950,8 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indirectDiffuseFactor: Vec4; @@ -930,7 +960,8 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indirectSpecularFactor: Vec4; diff --git a/api/graphics3d/SceneTypes.d.ts b/api/graphics3d/SceneTypes.d.ts index da529fc14c..114d27d876 100644 --- a/api/graphics3d/SceneTypes.d.ts +++ b/api/graphics3d/SceneTypes.d.ts @@ -23,7 +23,8 @@ * * @typedef Vec2 * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Vec2 { /** @@ -31,7 +32,8 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: double; @@ -40,7 +42,8 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: double; } @@ -50,7 +53,8 @@ export interface Vec2 { * * @typedef Vec3 * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Vec3 { /** @@ -58,7 +62,8 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: double; @@ -67,7 +72,8 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: double; @@ -76,7 +82,8 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: double; } @@ -86,7 +93,8 @@ export interface Vec3 { * * @typedef Vec4 * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Vec4 { /** @@ -94,7 +102,8 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: double; @@ -103,7 +112,8 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: double; @@ -112,7 +122,8 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: double; @@ -121,7 +132,8 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ w: double; } @@ -131,7 +143,8 @@ export interface Vec4 { * * @typedef Quaternion * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Quaternion { /** @@ -139,7 +152,8 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: double; @@ -148,7 +162,8 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: double; @@ -157,7 +172,8 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: double; @@ -166,7 +182,8 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ w: double; } @@ -203,7 +220,8 @@ export interface Aabb { * * @typedef Color * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Color { /** @@ -211,7 +229,8 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ r: double; @@ -220,7 +239,8 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ g: double; @@ -229,7 +249,8 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ b: double; @@ -238,7 +259,8 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ a: double; } @@ -248,7 +270,8 @@ export interface Color { * * @typedef Rect * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Rect { /** @@ -256,7 +279,8 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: double; @@ -265,7 +289,8 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: double; @@ -558,7 +583,8 @@ export declare class SphereGeometry extends GeometryDefinition { * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Position3 = Vec3; @@ -576,6 +602,7 @@ export type Rotation3 = Vec3; * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type Scale3 = Vec3; -- Gitee From c99a5dadf10e66d4ac905eddd698c8593dcfd6d8 Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Fri, 15 Aug 2025 17:46:58 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- api/graphics3d/Scene.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index da42ae7463..2b5b598ff7 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -387,7 +387,7 @@ export declare class Scene { * @arkts 1.1&1.2 */ static load(uri? : ResourceStr): Promise; - + /** * The environment of the scene. * @@ -407,7 +407,7 @@ export declare class Scene { * @arkts 1.1&1.2 */ set environment(value: Environment); - + /** * The animations of the scene. * @@ -418,7 +418,7 @@ export declare class Scene { * @arkts 1.1&1.2 */ get animations(): Animation[]; - + /** * The root node of the scene. * @@ -428,7 +428,7 @@ export declare class Scene { * @since 12 */ get root(): Node | null; - + /** * Get a node by path. * -- Gitee From 64fdb6d1fa37b354f0ce6b09010da1f1a501bd7d Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Aug 2025 10:13:29 +0800 Subject: [PATCH 4/7] =?UTF-8?q?Revert=20"[Graphics3D]=200702=E5=88=86?= =?UTF-8?q?=E6=94=AF=E9=9D=9E=E6=9C=AC=E9=98=B6=E6=AE=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=B8=8B=E7=BA=BF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2c7f688e202f5e62694177e530e97cf8d527d70e. Signed-off-by: shenshiyi2 --- api/@ohos.graphics.scene.d.ts | 37 +--- api/graphics3d/Scene.d.ts | 154 ++++++-------- api/graphics3d/SceneNodes.d.ts | 80 +++----- api/graphics3d/ScenePostProcessSettings.d.ts | 28 +-- api/graphics3d/SceneResources.d.ts | 88 +++----- api/graphics3d/SceneTypes.d.ts | 201 ++++++------------- 6 files changed, 192 insertions(+), 396 deletions(-) diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index 7f164ea157..46635a0c9e 100644 --- a/api/@ohos.graphics.scene.d.ts +++ b/api/@ohos.graphics.scene.d.ts @@ -16,6 +16,7 @@ /** * @file Export 3D interfaces * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ /** @@ -24,13 +25,6 @@ * @since 12 */ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings } from './graphics3d/ScenePostProcessSettings'; -/** - * Export post processing settings - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ -export { ToneMappingType, ToneMappingSettings, PostProcessSettings } from './graphics3d/ScenePostProcessSettings'; /** * Export scene types @@ -39,13 +33,6 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings } from './gra */ export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, Scale3, GeometryType, GeometryDefinition, PrimitiveTopology, CustomGeometry, CubeGeometry, PlaneGeometry, SphereGeometry } from './graphics3d/SceneTypes'; -/** - * Export scene types - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ -export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3 } from './graphics3d/SceneTypes'; /** * Export scene resources @@ -56,13 +43,6 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, MeshResource, Morpher, Sampler, SamplerFilter, SamplerAddressMode } from './graphics3d/SceneResources'; -/** - * Export scene resources - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ -export { SceneResource, Animation, EnvironmentBackgroundType, Environment } from './graphics3d/SceneResources'; /** * Export scene nodes @@ -71,13 +51,6 @@ export { SceneResource, Animation, EnvironmentBackgroundType, Environment } from */ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera } from './graphics3d/SceneNodes'; -/** - * Export scene nodes - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ -export { NodeType, Node, LightType, Light, DirectionalLight, Camera } from './graphics3d/SceneNodes'; /** * Export scene @@ -86,11 +59,3 @@ export { NodeType, Node, LightType, Light, DirectionalLight, Camera } from './gr */ export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RaycastResult, RaycastParameters, RenderParameters, RenderResourceFactory, SceneComponent, RenderContext } from './graphics3d/Scene'; -/** - * Export scene - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ -export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, - RenderResourceFactory } from './graphics3d/Scene'; diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index 2b5b598ff7..838408be3a 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -16,27 +16,22 @@ /** * @file Defines 3D scene related interfaces * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; -import { Animation, Environment, SceneResource } from './SceneResources'; -import { Camera, LightType, Light, Node, NodeType } from './SceneNodes'; -import { Position3, Color, Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ -/*** if arkts 1.1 */ import { Shader, MaterialType, Material, Animation, Environment, Image, MeshResource, Sampler, SceneResource } from './SceneResources'; import { Camera, LightType, Light, Node, NodeType, Geometry } from './SceneNodes'; import { Position3, Color, GeometryDefinition, Vec2, Vec3, Vec4 } from './SceneTypes'; -/*** endif */ /** * The scene resource parameters type. * * @typedef SceneResourceParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface SceneResourceParameters { /** @@ -44,8 +39,7 @@ export interface SceneResourceParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: string; @@ -64,8 +58,7 @@ export interface SceneResourceParameters { * * @typedef SceneNodeParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface SceneNodeParameters { /** @@ -73,8 +66,7 @@ export interface SceneNodeParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: string; @@ -142,14 +134,13 @@ export interface RaycastParameters { rootNode?: Node; } -/** +/** * The render resource factory. RenderResourceFactory is used to create resources that can be shared * across Scences that share a RenderContext - * + * * @interface RenderResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'20', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface RenderResourceFactory { /** @@ -163,18 +154,18 @@ export interface RenderResourceFactory { createShader(params: SceneResourceParameters): Promise; /** - * Create a image. - * - * @param { SceneResourceParameters } params - the param of creating a image - * @returns { Promise } promise a image - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Create a image. + * + * @param { SceneResourceParameters } params - the param of creating a image + * @returns { Promise } promise a image + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ createImage(params: SceneResourceParameters): Promise; /** * Create a Mesh from an array of vertices. - * + * * @param { SceneResourceParameters } params - the param of creating a Mesh object * @param { GeometryDefinition } geometry - what sort of a geometric shape to create * @returns { Promise } promise a Mesh @@ -185,7 +176,7 @@ export interface RenderResourceFactory { /** * create a Sampler - * + * * @param { SceneResourceParameters } params - the param of create a sampler * @returns { Promise } - promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -195,7 +186,7 @@ export interface RenderResourceFactory { /** * Create a new scene from a Resource. - * + * * @param { ResourceStr } uri - the resource of creating a scene * @returns { Promise } promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -210,8 +201,7 @@ export interface RenderResourceFactory { * @extends RenderResourceFactory * @interface SceneResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface SceneResourceFactory extends RenderResourceFactory { /** @@ -220,8 +210,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { SceneNodeParameters } params - the param of creating a camera * @returns { Promise } promise a camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ createCamera(params: SceneNodeParameters): Promise; @@ -232,8 +221,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { LightType } lightType - the type of the light * @returns { Promise } promise a light * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ createLight(params: SceneNodeParameters, lightType: LightType): Promise; @@ -270,7 +258,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Create a geometry node. - * + * * @param { SceneNodeParameters } params - the param of creating a geometry * @param { MeshResource } mesh resource - The mesh data for the geometry * @returns { Promise } promise a geometry @@ -282,7 +270,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Define underlying scene component - * + * * @interface SceneComponent * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -290,7 +278,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { export interface SceneComponent { /** * Scene component name - * + * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -299,7 +287,7 @@ export interface SceneComponent { /** * Component properties - * + * * @type { Record } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D @@ -308,10 +296,10 @@ export interface SceneComponent { readonly property: Record; } -/** +/** * Render context defines the context for all rendering resources. Resources within the same render context * may be shared between scenes created within the same render context. - * + * * @interface RenderContext * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -319,7 +307,7 @@ export interface SceneComponent { export interface RenderContext { /** * Get resource factory. - * + * * @returns { RenderResourceFactory } -- RenderResourceFactory instance * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -328,7 +316,7 @@ export interface RenderContext { /** * Load external plugin - * + * * @param {string} name - Name of the plugin * @returns { Promise } - Promise a boolean to show if the plugin load is successful * @syscap SystemCapability.ArkUi.Graphics3D @@ -342,8 +330,7 @@ export interface RenderContext { * * @interface RenderParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ export interface RenderParameters { /** @@ -352,8 +339,7 @@ export interface RenderParameters { * * @type { ?boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ alwaysRender?: boolean; } @@ -362,8 +348,7 @@ export interface RenderParameters { * Defines the 3d scene. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class Scene { /** @@ -383,52 +368,39 @@ export declare class Scene { * @returns { Promise } promise a scene * @static * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ static load(uri? : ResourceStr): Promise; - - /** - * The environment of the scene. - * - * @return { Environment } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - get environment(): Environment; - + /** * The environment of the scene. * - * @param { Environment } value + * @type { Environment } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - set environment(value: Environment); - + environment: Environment; + /** * The animations of the scene. * - * @return { Animation[] } + * @type { Animation[] } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - get animations(): Animation[]; - + readonly animations: Animation[]; + /** * The root node of the scene. * - * @return { Node | null } + * @type { Node | null } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D * @since 12 */ - get root(): Node | null; - + readonly root: Node | null; + /** * Get a node by path. * @@ -436,27 +408,24 @@ export declare class Scene { * @param { NodeType } type - verify the type of node, if it does not match, return null * @returns { Node | null } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getNodeByPath(path: string, type?: NodeType): Node | null; - + /** * Get resource factory. * * @returns { SceneResourceFactory } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getResourceFactory(): SceneResourceFactory; - + /** * Release all native scene resources. All TS references will be undefined. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ destroy(): void; @@ -482,7 +451,7 @@ export declare class Scene { * @param { Node | null } parent - The parent node or null for root * @returns { Node } The newly created node. * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since 18 */ importScene(name: string, scene: Scene, parent: Node | null): Node; @@ -492,14 +461,13 @@ export declare class Scene { * @param { RenderParameters } params - Rendering parameters * @returns { boolean } True if rendering was scheduled, false otherwise * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ renderFrame(params?: RenderParameters): boolean; /** * Create a new component. - * + * * @param { Node } node - The node the component is attached to * @param { string } name - The name of the component to load. Valid names are defined by each plugin. * @returns { Promise } - The newly added component. @@ -509,13 +477,13 @@ export declare class Scene { createComponent(node: Node, name: string): Promise; /** - * Get component by name. - * - * @param { Node } node - The node component is attached to. - * @param { string } name - name of the component - * @returns { SceneComponent | null } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Get component by name. + * + * @param { Node } node - The node component is attached to. + * @param { string } name - name of the component + * @returns { SceneComponent | null } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ getComponent(node: Node, name: string): SceneComponent | null; } diff --git a/api/graphics3d/SceneNodes.d.ts b/api/graphics3d/SceneNodes.d.ts index 53cbe005fd..eb068d90e6 100644 --- a/api/graphics3d/SceneNodes.d.ts +++ b/api/graphics3d/SceneNodes.d.ts @@ -16,17 +16,13 @@ /** * @file Defines 3D node related interfaces * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ -/*** if arkts 1.2 */ -import { SceneResource } from './SceneResources'; -/*** endif */ -/*** if arkts 1.1 */ import { SceneResource, Mesh, Morpher } from './SceneResources'; -import { RaycastParameters, RaycastResult } from './Scene'; -/*** endif */ import { Position3, Quaternion, Scale3, Color, Vec2, Vec3 } from './SceneTypes'; import { PostProcessSettings } from './ScenePostProcessSettings'; +import { RaycastParameters, RaycastResult } from './Scene'; /** * Defines the layer mask of the node. @@ -62,16 +58,14 @@ export interface LayerMask { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum NodeType { /** * The node is an empty node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NODE = 1, @@ -79,8 +73,7 @@ export enum NodeType { * The node is a geometry node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ GEOMETRY = 2, @@ -88,8 +81,7 @@ export enum NodeType { * The node is a camera node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CAMERA = 3, @@ -97,8 +89,7 @@ export enum NodeType { * The node is a light node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LIGHT = 4 } @@ -173,8 +164,7 @@ export interface Container { * @extends SceneResource * @interface Node * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Node extends SceneResource { /** @@ -182,8 +172,7 @@ export interface Node extends SceneResource { * * @type { Position3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position: Position3; @@ -192,8 +181,7 @@ export interface Node extends SceneResource { * * @type { Quaternion } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rotation: Quaternion; @@ -202,8 +190,7 @@ export interface Node extends SceneResource { * * @type { Scale3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scale: Scale3; @@ -212,8 +199,7 @@ export interface Node extends SceneResource { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ visible: boolean; @@ -223,8 +209,7 @@ export interface Node extends SceneResource { * @type { NodeType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ readonly nodeType: NodeType; @@ -264,8 +249,7 @@ export interface Node extends SceneResource { * @param { string } path - the path of the node queried * @returns { Node | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getNodeByPath(path: string): Node | null; @@ -315,16 +299,14 @@ export interface Geometry extends Node { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum LightType { /** * Directional light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DIRECTIONAL = 1, @@ -332,8 +314,7 @@ export enum LightType { * Spot light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SPOT = 2, } @@ -344,8 +325,7 @@ export enum LightType { * @extends Node * @interface Light * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Light extends Node { /** @@ -363,8 +343,7 @@ export interface Light extends Node { * * @type { Color } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color: Color; @@ -373,8 +352,7 @@ export interface Light extends Node { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ intensity: double; @@ -383,8 +361,7 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shadowEnabled: boolean; @@ -393,8 +370,7 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enabled: boolean; } @@ -416,8 +392,7 @@ export interface SpotLight extends Light { * @extends Light * @interface DirectionalLight * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface DirectionalLight extends Light { } @@ -428,8 +403,7 @@ export interface DirectionalLight extends Light { * @extends Node * @interface Camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Camera extends Node { /** @@ -464,8 +438,7 @@ export interface Camera extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enabled: boolean; @@ -474,8 +447,7 @@ export interface Camera extends Node { * * @type { PostProcessSettings | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ postProcess: PostProcessSettings | null; diff --git a/api/graphics3d/ScenePostProcessSettings.d.ts b/api/graphics3d/ScenePostProcessSettings.d.ts index 75530416bd..fc88f73eb9 100644 --- a/api/graphics3d/ScenePostProcessSettings.d.ts +++ b/api/graphics3d/ScenePostProcessSettings.d.ts @@ -16,6 +16,7 @@ /** * @file Defines 3D post process related interfaces * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ /** @@ -23,16 +24,14 @@ * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum ToneMappingType { /** * The tone mapping type is ACES. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ACES = 0, @@ -40,8 +39,7 @@ export enum ToneMappingType { * The tone mapping type is ACES_2020. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ACES_2020 = 1, @@ -49,8 +47,7 @@ export enum ToneMappingType { * The tone mapping type is FILMIC. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FILMIC = 2, } @@ -60,8 +57,7 @@ export enum ToneMappingType { * * @typedef ToneMappingSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface ToneMappingSettings { /** @@ -69,8 +65,7 @@ export interface ToneMappingSettings { * * @type { ?ToneMappingType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type?: ToneMappingType; @@ -79,8 +74,7 @@ export interface ToneMappingSettings { * * @type { ?double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ exposure?: double; } @@ -137,8 +131,7 @@ export interface BloomSettings { * * @typedef PostProcessSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface PostProcessSettings { /** @@ -146,8 +139,7 @@ export interface PostProcessSettings { * * @type { ?ToneMappingSettings } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ toneMapping?: ToneMappingSettings; diff --git a/api/graphics3d/SceneResources.d.ts b/api/graphics3d/SceneResources.d.ts index 83b8b53821..c26828aa13 100644 --- a/api/graphics3d/SceneResources.d.ts +++ b/api/graphics3d/SceneResources.d.ts @@ -16,15 +16,13 @@ /** * @file Defines 3D resource related interfaces * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; -import { Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ -/*** if arkts 1.1 */ import { Vec2, Vec3, Vec4, Aabb } from './SceneTypes'; -/*** endif */ import { Callback } from '../@ohos.base'; /** @@ -32,16 +30,14 @@ import { Callback } from '../@ohos.base'; * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum SceneResourceType { /** * The resource is an Unknown. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ UNKNOWN = 0, @@ -49,8 +45,7 @@ export enum SceneResourceType { * The resource is a Node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NODE = 1, @@ -58,8 +53,7 @@ export enum SceneResourceType { * The resource is an Environment. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ENVIRONMENT = 2, @@ -67,8 +61,7 @@ export enum SceneResourceType { * The resource is a Material. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ MATERIAL = 3, @@ -76,8 +69,7 @@ export enum SceneResourceType { * The resource is a Mesh. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ MESH = 4, @@ -85,8 +77,7 @@ export enum SceneResourceType { * The resource is an Animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ANIMATION = 5, @@ -94,8 +85,7 @@ export enum SceneResourceType { * The resource is a Shader. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SHADER = 6, @@ -103,8 +93,7 @@ export enum SceneResourceType { * The resource is an Image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ IMAGE = 7, @@ -112,8 +101,7 @@ export enum SceneResourceType { * The resource is a mesh resource * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ MESH_RESOURCE = 8, } @@ -123,8 +111,7 @@ export enum SceneResourceType { * * @interface SceneResource * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface SceneResource { /** @@ -161,8 +148,7 @@ export interface SceneResource { * Release scene resource. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ destroy(): void; } @@ -753,8 +739,7 @@ export interface MeshResource extends SceneResource { * @extends SceneResource * @interface Animation * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Animation extends SceneResource { /** @@ -792,8 +777,7 @@ export interface Animation extends SceneResource { * @type { boolean } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ readonly running: boolean; @@ -803,8 +787,7 @@ export interface Animation extends SceneResource { * @type { double } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ readonly progress: double; @@ -813,8 +796,7 @@ export interface Animation extends SceneResource { * * @param { Callback } callback - the callback invoked when animation finished * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onFinished(callback: Callback): void; @@ -839,8 +821,7 @@ export interface Animation extends SceneResource { * Restart the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ restart(): void; @@ -857,8 +838,7 @@ export interface Animation extends SceneResource { * Start the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start(): void; @@ -866,8 +846,7 @@ export interface Animation extends SceneResource { * Stop the animation and seek the position to the beginning. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stop(): void; @@ -884,16 +863,14 @@ export interface Animation extends SceneResource { * The enum of environment background type. * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum EnvironmentBackgroundType { /** * The background is none. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BACKGROUND_NONE = 0, @@ -901,8 +878,7 @@ export enum EnvironmentBackgroundType { * The background is image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BACKGROUND_IMAGE = 1, @@ -910,8 +886,7 @@ export enum EnvironmentBackgroundType { * The background is cubemap. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BACKGROUND_CUBEMAP = 2, @@ -919,8 +894,7 @@ export enum EnvironmentBackgroundType { * The background is equirectangular. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BACKGROUND_EQUIRECTANGULAR = 3, } @@ -931,8 +905,7 @@ export enum EnvironmentBackgroundType { * @extends SceneResource * @interface Environment * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Environment extends SceneResource { /** @@ -940,8 +913,7 @@ export interface Environment extends SceneResource { * * @type { EnvironmentBackgroundType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundType: EnvironmentBackgroundType; @@ -950,8 +922,7 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indirectDiffuseFactor: Vec4; @@ -960,8 +931,7 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indirectSpecularFactor: Vec4; diff --git a/api/graphics3d/SceneTypes.d.ts b/api/graphics3d/SceneTypes.d.ts index 114d27d876..81a38d97f6 100644 --- a/api/graphics3d/SceneTypes.d.ts +++ b/api/graphics3d/SceneTypes.d.ts @@ -16,6 +16,7 @@ /** * @file Defines 3D basic types * @kit ArkGraphics3D + * @arkts 1.1&1.2 */ /** @@ -23,8 +24,7 @@ * * @typedef Vec2 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Vec2 { /** @@ -32,8 +32,7 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: double; @@ -42,8 +41,7 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: double; } @@ -53,8 +51,7 @@ export interface Vec2 { * * @typedef Vec3 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Vec3 { /** @@ -62,8 +59,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: double; @@ -72,8 +68,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: double; @@ -82,8 +77,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: double; } @@ -93,8 +87,7 @@ export interface Vec3 { * * @typedef Vec4 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Vec4 { /** @@ -102,8 +95,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: double; @@ -112,8 +104,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: double; @@ -122,8 +113,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: double; @@ -132,8 +122,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ w: double; } @@ -143,8 +132,7 @@ export interface Vec4 { * * @typedef Quaternion * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Quaternion { /** @@ -152,8 +140,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: double; @@ -162,8 +149,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: double; @@ -172,8 +158,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: double; @@ -182,8 +167,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ w: double; } @@ -220,8 +204,7 @@ export interface Aabb { * * @typedef Color * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Color { /** @@ -229,8 +212,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ r: double; @@ -239,8 +221,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ g: double; @@ -249,8 +230,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ b: double; @@ -259,8 +239,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ a: double; } @@ -270,8 +249,7 @@ export interface Color { * * @typedef Rect * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Rect { /** @@ -279,8 +257,7 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: double; @@ -289,8 +266,7 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: double; @@ -315,7 +291,7 @@ export interface Rect { /** * Types of geometric shapes. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -323,7 +299,7 @@ export interface Rect { export enum GeometryType { /** * A custom geometric shape. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -331,7 +307,7 @@ export enum GeometryType { /** * A cube. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -339,7 +315,7 @@ export enum GeometryType { /** * A plane. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -356,14 +332,14 @@ export enum GeometryType { /** * Define a geometric shape for mesh creation. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ export declare abstract class GeometryDefinition { /** * Which geometry shape to interpret from this definition. - * + * * @type { GeometryType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D @@ -374,15 +350,15 @@ export declare abstract class GeometryDefinition { /** * How vertices in a sequence form triangles. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since 18 */ export enum PrimitiveTopology { /** * The vertices form a set of independent triangle. Vertices (0, 1, 2), (3, 4, 5), ... define separate triangles. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -390,7 +366,7 @@ export enum PrimitiveTopology { /** * The vertices form a triangle strip. Starting from the 3rd, each vertex defines a triangle with the previous two. - * + * * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ @@ -399,7 +375,7 @@ export enum PrimitiveTopology { /** * An array of vertices and their data defining a custom geometric shape. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -407,7 +383,7 @@ export enum PrimitiveTopology { export declare class CustomGeometry extends GeometryDefinition { /** * How to form mesh triangles from the indexed vertices. - * + * * @type { ?PrimitiveTopology } * @default PrimitiveTopology.TRIANGLE_LIST * @syscap SystemCapability.ArkUi.Graphics3D @@ -417,34 +393,25 @@ export declare class CustomGeometry extends GeometryDefinition { /** * An array of vertices. - * - * @return { Vec3[] } + * + * @type { Vec3[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - get vertices(): Vec3[]; - - /** - * An array of vertices. - * - * @param { Vec3[] } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 - */ - set vertices(value: Vec3[]); + vertices: Vec3[]; /** * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. - * + * * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: * topology = PrimitiveTopology.TRIANGLE_LIST - * indices = [0, 1, 2, 2, 1, 3] + * indices = [0, 1, 2, 2, 1, 3] * resulting triangles: abc, cbd - * + * * topology = PrimitiveTopology.TRIANGLE_STRIP * indices = [0, 1, 2, 3] * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) - * + * * @type { ?int[] } * @default indices: [0, 1 ,2,..., vertices.size() - 1] * @syscap SystemCapability.ArkUi.Graphics3D @@ -454,7 +421,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. - * + * * @type { ?Vec3[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -463,7 +430,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] - * + * * @type { ?Vec2[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -472,7 +439,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * + * * @type { ?Color[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -482,7 +449,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Define a rectangular cuboid. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -490,26 +457,17 @@ export declare class CustomGeometry extends GeometryDefinition { export declare class CubeGeometry extends GeometryDefinition { /** * The width, height and depth of the cube. - * - * @return { Vec3 } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 - */ - get size(): Vec3; - - /** - * The width, height and depth of the cube. - * - * @param { Vec3 } value + * + * @type { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - set size(value: Vec3); + size: Vec3; } /** * Define a plane. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -517,26 +475,17 @@ export declare class CubeGeometry extends GeometryDefinition { export declare class PlaneGeometry extends GeometryDefinition { /** * The width and length of the plane. - * - * @return { Vec2 } + * + * @type { Vec2 } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - get size(): Vec2; - - /** - * The width and length of the plane. - * - * @param { Vec2 } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 - */ - set size(value: Vec2); + size: Vec2; } /** * Define a sphere. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 @@ -544,47 +493,28 @@ export declare class PlaneGeometry extends GeometryDefinition { export declare class SphereGeometry extends GeometryDefinition { /** * The raduis of the sphere. - * - * @return { double } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 - */ - get radius(): double; - - /** - * The raduis of the sphere. - * - * @param { double } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 - */ - set radius(value: double); - - /** - * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. - * - * @return { int } + * + * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - get segmentCount(): int; + radius: double; /** * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. - * - * @param { int } value + * + * @type { int } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ - set segmentCount(value: int); + segmentCount: int; } /** * 3D position information. * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export type Position3 = Vec3; @@ -602,7 +532,6 @@ export type Rotation3 = Vec3; * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export type Scale3 = Vec3; -- Gitee From 868d1b7525d35ba10a76c1425db6181e49b083fd Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Aug 2025 10:20:51 +0800 Subject: [PATCH 5/7] =?UTF-8?q?[Graphics3D]=200702=E5=88=86=E6=94=AF?= =?UTF-8?q?=E9=9D=9E=E6=9C=AC=E9=98=B6=E6=AE=B5=E6=8E=A5=E5=8F=A3=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- api/@ohos.graphics.scene.d.ts | 37 ++- api/graphics3d/Scene.d.ts | 129 ++++---- api/graphics3d/SceneNodes.d.ts | 80 +++-- api/graphics3d/ScenePostProcessSettings.d.ts | 28 +- api/graphics3d/SceneResources.d.ts | 88 +++-- api/graphics3d/SceneTypes.d.ts | 328 +++++-------------- 6 files changed, 329 insertions(+), 361 deletions(-) diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index 46635a0c9e..7f164ea157 100644 --- a/api/@ohos.graphics.scene.d.ts +++ b/api/@ohos.graphics.scene.d.ts @@ -16,7 +16,6 @@ /** * @file Export 3D interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /** @@ -25,6 +24,13 @@ * @since 12 */ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings } from './graphics3d/ScenePostProcessSettings'; +/** + * Export post processing settings + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { ToneMappingType, ToneMappingSettings, PostProcessSettings } from './graphics3d/ScenePostProcessSettings'; /** * Export scene types @@ -33,6 +39,13 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting */ export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, Scale3, GeometryType, GeometryDefinition, PrimitiveTopology, CustomGeometry, CubeGeometry, PlaneGeometry, SphereGeometry } from './graphics3d/SceneTypes'; +/** + * Export scene types + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3 } from './graphics3d/SceneTypes'; /** * Export scene resources @@ -43,6 +56,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, MeshResource, Morpher, Sampler, SamplerFilter, SamplerAddressMode } from './graphics3d/SceneResources'; +/** + * Export scene resources + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResource, Animation, EnvironmentBackgroundType, Environment } from './graphics3d/SceneResources'; /** * Export scene nodes @@ -51,6 +71,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade */ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera } from './graphics3d/SceneNodes'; +/** + * Export scene nodes + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { NodeType, Node, LightType, Light, DirectionalLight, Camera } from './graphics3d/SceneNodes'; /** * Export scene @@ -59,3 +86,11 @@ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotL */ export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RaycastResult, RaycastParameters, RenderParameters, RenderResourceFactory, SceneComponent, RenderContext } from './graphics3d/Scene'; +/** + * Export scene + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, + RenderResourceFactory } from './graphics3d/Scene'; diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index 8b795356fb..2b5b598ff7 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -16,22 +16,27 @@ /** * @file Defines 3D scene related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; +import { Animation, Environment, SceneResource } from './SceneResources'; +import { Camera, LightType, Light, Node, NodeType } from './SceneNodes'; +import { Position3, Color, Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ +/*** if arkts 1.1 */ import { Shader, MaterialType, Material, Animation, Environment, Image, MeshResource, Sampler, SceneResource } from './SceneResources'; import { Camera, LightType, Light, Node, NodeType, Geometry } from './SceneNodes'; import { Position3, Color, GeometryDefinition, Vec2, Vec3, Vec4 } from './SceneTypes'; +/*** endif */ /** * The scene resource parameters type. * * @typedef SceneResourceParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResourceParameters { /** @@ -39,7 +44,8 @@ export interface SceneResourceParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -58,7 +64,8 @@ export interface SceneResourceParameters { * * @typedef SceneNodeParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneNodeParameters { /** @@ -66,7 +73,8 @@ export interface SceneNodeParameters { * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -134,13 +142,14 @@ export interface RaycastParameters { rootNode?: Node; } -/** +/** * The render resource factory. RenderResourceFactory is used to create resources that can be shared * across Scences that share a RenderContext - * + * * @interface RenderResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RenderResourceFactory { /** @@ -154,18 +163,18 @@ export interface RenderResourceFactory { createShader(params: SceneResourceParameters): Promise; /** - * Create a image. - * - * @param { SceneResourceParameters } params - the param of creating a image - * @returns { Promise } promise a image - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Create a image. + * + * @param { SceneResourceParameters } params - the param of creating a image + * @returns { Promise } promise a image + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ createImage(params: SceneResourceParameters): Promise; /** * Create a Mesh from an array of vertices. - * + * * @param { SceneResourceParameters } params - the param of creating a Mesh object * @param { GeometryDefinition } geometry - what sort of a geometric shape to create * @returns { Promise } promise a Mesh @@ -176,7 +185,7 @@ export interface RenderResourceFactory { /** * create a Sampler - * + * * @param { SceneResourceParameters } params - the param of create a sampler * @returns { Promise } - promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -186,7 +195,7 @@ export interface RenderResourceFactory { /** * Create a new scene from a Resource. - * + * * @param { ResourceStr } uri - the resource of creating a scene * @returns { Promise } promise a scene * @syscap SystemCapability.ArkUi.Graphics3D @@ -201,7 +210,8 @@ export interface RenderResourceFactory { * @extends RenderResourceFactory * @interface SceneResourceFactory * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResourceFactory extends RenderResourceFactory { /** @@ -210,7 +220,8 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { SceneNodeParameters } params - the param of creating a camera * @returns { Promise } promise a camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createCamera(params: SceneNodeParameters): Promise; @@ -221,7 +232,8 @@ export interface SceneResourceFactory extends RenderResourceFactory { * @param { LightType } lightType - the type of the light * @returns { Promise } promise a light * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createLight(params: SceneNodeParameters, lightType: LightType): Promise; @@ -258,7 +270,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Create a geometry node. - * + * * @param { SceneNodeParameters } params - the param of creating a geometry * @param { MeshResource } mesh resource - The mesh data for the geometry * @returns { Promise } promise a geometry @@ -270,7 +282,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { /** * Define underlying scene component - * + * * @interface SceneComponent * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -278,7 +290,7 @@ export interface SceneResourceFactory extends RenderResourceFactory { export interface SceneComponent { /** * Scene component name - * + * * @type { string } * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -287,7 +299,7 @@ export interface SceneComponent { /** * Component properties - * + * * @type { Record } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D @@ -296,10 +308,10 @@ export interface SceneComponent { readonly property: Record; } -/** +/** * Render context defines the context for all rendering resources. Resources within the same render context * may be shared between scenes created within the same render context. - * + * * @interface RenderContext * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -307,7 +319,7 @@ export interface SceneComponent { export interface RenderContext { /** * Get resource factory. - * + * * @returns { RenderResourceFactory } -- RenderResourceFactory instance * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -316,7 +328,7 @@ export interface RenderContext { /** * Load external plugin - * + * * @param {string} name - Name of the plugin * @returns { Promise } - Promise a boolean to show if the plugin load is successful * @syscap SystemCapability.ArkUi.Graphics3D @@ -330,7 +342,8 @@ export interface RenderContext { * * @interface RenderParameters * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RenderParameters { /** @@ -339,7 +352,8 @@ export interface RenderParameters { * * @type { ?boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ alwaysRender?: boolean; } @@ -348,7 +362,8 @@ export interface RenderParameters { * Defines the 3d scene. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare class Scene { /** @@ -368,10 +383,11 @@ export declare class Scene { * @returns { Promise } promise a scene * @static * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ static load(uri? : ResourceStr): Promise; - + /** * The environment of the scene. * @@ -391,7 +407,7 @@ export declare class Scene { * @arkts 1.1&1.2 */ set environment(value: Environment); - + /** * The animations of the scene. * @@ -402,18 +418,17 @@ export declare class Scene { * @arkts 1.1&1.2 */ get animations(): Animation[]; - + /** * The root node of the scene. * * @return { Node | null } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ get root(): Node | null; - + /** * Get a node by path. * @@ -421,24 +436,27 @@ export declare class Scene { * @param { NodeType } type - verify the type of node, if it does not match, return null * @returns { Node | null } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getNodeByPath(path: string, type?: NodeType): Node | null; - + /** * Get resource factory. * * @returns { SceneResourceFactory } if the node is found by it's path * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getResourceFactory(): SceneResourceFactory; - + /** * Release all native scene resources. All TS references will be undefined. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; @@ -464,7 +482,7 @@ export declare class Scene { * @param { Node | null } parent - The parent node or null for root * @returns { Node } The newly created node. * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since 18 */ importScene(name: string, scene: Scene, parent: Node | null): Node; @@ -474,13 +492,14 @@ export declare class Scene { * @param { RenderParameters } params - Rendering parameters * @returns { boolean } True if rendering was scheduled, false otherwise * @syscap SystemCapability.ArkUi.Graphics3D - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ renderFrame(params?: RenderParameters): boolean; /** * Create a new component. - * + * * @param { Node } node - The node the component is attached to * @param { string } name - The name of the component to load. Valid names are defined by each plugin. * @returns { Promise } - The newly added component. @@ -490,13 +509,13 @@ export declare class Scene { createComponent(node: Node, name: string): Promise; /** - * Get component by name. - * - * @param { Node } node - The node component is attached to. - * @param { string } name - name of the component - * @returns { SceneComponent | null } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - */ + * Get component by name. + * + * @param { Node } node - The node component is attached to. + * @param { string } name - name of the component + * @returns { SceneComponent | null } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + */ getComponent(node: Node, name: string): SceneComponent | null; } diff --git a/api/graphics3d/SceneNodes.d.ts b/api/graphics3d/SceneNodes.d.ts index eb068d90e6..53cbe005fd 100644 --- a/api/graphics3d/SceneNodes.d.ts +++ b/api/graphics3d/SceneNodes.d.ts @@ -16,13 +16,17 @@ /** * @file Defines 3D node related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ +/*** if arkts 1.2 */ +import { SceneResource } from './SceneResources'; +/*** endif */ +/*** if arkts 1.1 */ import { SceneResource, Mesh, Morpher } from './SceneResources'; +import { RaycastParameters, RaycastResult } from './Scene'; +/*** endif */ import { Position3, Quaternion, Scale3, Color, Vec2, Vec3 } from './SceneTypes'; import { PostProcessSettings } from './ScenePostProcessSettings'; -import { RaycastParameters, RaycastResult } from './Scene'; /** * Defines the layer mask of the node. @@ -58,14 +62,16 @@ export interface LayerMask { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum NodeType { /** * The node is an empty node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NODE = 1, @@ -73,7 +79,8 @@ export enum NodeType { * The node is a geometry node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ GEOMETRY = 2, @@ -81,7 +88,8 @@ export enum NodeType { * The node is a camera node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA = 3, @@ -89,7 +97,8 @@ export enum NodeType { * The node is a light node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT = 4 } @@ -164,7 +173,8 @@ export interface Container { * @extends SceneResource * @interface Node * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Node extends SceneResource { /** @@ -172,7 +182,8 @@ export interface Node extends SceneResource { * * @type { Position3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: Position3; @@ -181,7 +192,8 @@ export interface Node extends SceneResource { * * @type { Quaternion } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rotation: Quaternion; @@ -190,7 +202,8 @@ export interface Node extends SceneResource { * * @type { Scale3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: Scale3; @@ -199,7 +212,8 @@ export interface Node extends SceneResource { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ visible: boolean; @@ -209,7 +223,8 @@ export interface Node extends SceneResource { * @type { NodeType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly nodeType: NodeType; @@ -249,7 +264,8 @@ export interface Node extends SceneResource { * @param { string } path - the path of the node queried * @returns { Node | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getNodeByPath(path: string): Node | null; @@ -299,14 +315,16 @@ export interface Geometry extends Node { * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LightType { /** * Directional light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIRECTIONAL = 1, @@ -314,7 +332,8 @@ export enum LightType { * Spot light. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPOT = 2, } @@ -325,7 +344,8 @@ export enum LightType { * @extends Node * @interface Light * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Light extends Node { /** @@ -343,7 +363,8 @@ export interface Light extends Node { * * @type { Color } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color: Color; @@ -352,7 +373,8 @@ export interface Light extends Node { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ intensity: double; @@ -361,7 +383,8 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadowEnabled: boolean; @@ -370,7 +393,8 @@ export interface Light extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; } @@ -392,7 +416,8 @@ export interface SpotLight extends Light { * @extends Light * @interface DirectionalLight * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface DirectionalLight extends Light { } @@ -403,7 +428,8 @@ export interface DirectionalLight extends Light { * @extends Node * @interface Camera * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Camera extends Node { /** @@ -438,7 +464,8 @@ export interface Camera extends Node { * * @type { boolean } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; @@ -447,7 +474,8 @@ export interface Camera extends Node { * * @type { PostProcessSettings | null } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ postProcess: PostProcessSettings | null; diff --git a/api/graphics3d/ScenePostProcessSettings.d.ts b/api/graphics3d/ScenePostProcessSettings.d.ts index fc88f73eb9..75530416bd 100644 --- a/api/graphics3d/ScenePostProcessSettings.d.ts +++ b/api/graphics3d/ScenePostProcessSettings.d.ts @@ -16,7 +16,6 @@ /** * @file Defines 3D post process related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /** @@ -24,14 +23,16 @@ * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ToneMappingType { /** * The tone mapping type is ACES. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACES = 0, @@ -39,7 +40,8 @@ export enum ToneMappingType { * The tone mapping type is ACES_2020. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACES_2020 = 1, @@ -47,7 +49,8 @@ export enum ToneMappingType { * The tone mapping type is FILMIC. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FILMIC = 2, } @@ -57,7 +60,8 @@ export enum ToneMappingType { * * @typedef ToneMappingSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ToneMappingSettings { /** @@ -65,7 +69,8 @@ export interface ToneMappingSettings { * * @type { ?ToneMappingType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ToneMappingType; @@ -74,7 +79,8 @@ export interface ToneMappingSettings { * * @type { ?double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ exposure?: double; } @@ -131,7 +137,8 @@ export interface BloomSettings { * * @typedef PostProcessSettings * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface PostProcessSettings { /** @@ -139,7 +146,8 @@ export interface PostProcessSettings { * * @type { ?ToneMappingSettings } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ toneMapping?: ToneMappingSettings; diff --git a/api/graphics3d/SceneResources.d.ts b/api/graphics3d/SceneResources.d.ts index c26828aa13..83b8b53821 100644 --- a/api/graphics3d/SceneResources.d.ts +++ b/api/graphics3d/SceneResources.d.ts @@ -16,13 +16,15 @@ /** * @file Defines 3D resource related interfaces * @kit ArkGraphics3D - * @arkts 1.1&1.2 */ /*** if arkts 1.2 */ import { ResourceStr } from '../arkui/component/units'; +import { Vec2, Vec3, Vec4 } from './SceneTypes'; /*** endif */ +/*** if arkts 1.1 */ import { Vec2, Vec3, Vec4, Aabb } from './SceneTypes'; +/*** endif */ import { Callback } from '../@ohos.base'; /** @@ -30,14 +32,16 @@ import { Callback } from '../@ohos.base'; * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SceneResourceType { /** * The resource is an Unknown. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -45,7 +49,8 @@ export enum SceneResourceType { * The resource is a Node. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NODE = 1, @@ -53,7 +58,8 @@ export enum SceneResourceType { * The resource is an Environment. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ENVIRONMENT = 2, @@ -61,7 +67,8 @@ export enum SceneResourceType { * The resource is a Material. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MATERIAL = 3, @@ -69,7 +76,8 @@ export enum SceneResourceType { * The resource is a Mesh. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MESH = 4, @@ -77,7 +85,8 @@ export enum SceneResourceType { * The resource is an Animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ANIMATION = 5, @@ -85,7 +94,8 @@ export enum SceneResourceType { * The resource is a Shader. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHADER = 6, @@ -93,7 +103,8 @@ export enum SceneResourceType { * The resource is an Image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 7, @@ -101,7 +112,8 @@ export enum SceneResourceType { * The resource is a mesh resource * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MESH_RESOURCE = 8, } @@ -111,7 +123,8 @@ export enum SceneResourceType { * * @interface SceneResource * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface SceneResource { /** @@ -148,7 +161,8 @@ export interface SceneResource { * Release scene resource. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; } @@ -739,7 +753,8 @@ export interface MeshResource extends SceneResource { * @extends SceneResource * @interface Animation * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Animation extends SceneResource { /** @@ -777,7 +792,8 @@ export interface Animation extends SceneResource { * @type { boolean } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly running: boolean; @@ -787,7 +803,8 @@ export interface Animation extends SceneResource { * @type { double } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly progress: double; @@ -796,7 +813,8 @@ export interface Animation extends SceneResource { * * @param { Callback } callback - the callback invoked when animation finished * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinished(callback: Callback): void; @@ -821,7 +839,8 @@ export interface Animation extends SceneResource { * Restart the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restart(): void; @@ -838,7 +857,8 @@ export interface Animation extends SceneResource { * Start the animation. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): void; @@ -846,7 +866,8 @@ export interface Animation extends SceneResource { * Stop the animation and seek the position to the beginning. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): void; @@ -863,14 +884,16 @@ export interface Animation extends SceneResource { * The enum of environment background type. * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum EnvironmentBackgroundType { /** * The background is none. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_NONE = 0, @@ -878,7 +901,8 @@ export enum EnvironmentBackgroundType { * The background is image. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_IMAGE = 1, @@ -886,7 +910,8 @@ export enum EnvironmentBackgroundType { * The background is cubemap. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_CUBEMAP = 2, @@ -894,7 +919,8 @@ export enum EnvironmentBackgroundType { * The background is equirectangular. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_EQUIRECTANGULAR = 3, } @@ -905,7 +931,8 @@ export enum EnvironmentBackgroundType { * @extends SceneResource * @interface Environment * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Environment extends SceneResource { /** @@ -913,7 +940,8 @@ export interface Environment extends SceneResource { * * @type { EnvironmentBackgroundType } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundType: EnvironmentBackgroundType; @@ -922,7 +950,8 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indirectDiffuseFactor: Vec4; @@ -931,7 +960,8 @@ export interface Environment extends SceneResource { * * @type { Vec4 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indirectSpecularFactor: Vec4; diff --git a/api/graphics3d/SceneTypes.d.ts b/api/graphics3d/SceneTypes.d.ts index 59ead8111f..114d27d876 100644 --- a/api/graphics3d/SceneTypes.d.ts +++ b/api/graphics3d/SceneTypes.d.ts @@ -23,7 +23,7 @@ * * @typedef Vec2 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Vec2 { @@ -32,7 +32,7 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ x: double; @@ -42,7 +42,7 @@ export interface Vec2 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ y: double; @@ -53,7 +53,7 @@ export interface Vec2 { * * @typedef Vec3 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Vec3 { @@ -62,7 +62,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ x: double; @@ -72,7 +72,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ y: double; @@ -82,7 +82,7 @@ export interface Vec3 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ z: double; @@ -93,7 +93,7 @@ export interface Vec3 { * * @typedef Vec4 * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Vec4 { @@ -102,7 +102,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ x: double; @@ -112,7 +112,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ y: double; @@ -122,7 +122,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ z: double; @@ -132,7 +132,7 @@ export interface Vec4 { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ w: double; @@ -143,7 +143,7 @@ export interface Vec4 { * * @typedef Quaternion * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Quaternion { @@ -152,7 +152,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ x: double; @@ -162,7 +162,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ y: double; @@ -172,7 +172,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ z: double; @@ -182,7 +182,7 @@ export interface Quaternion { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ w: double; @@ -193,8 +193,7 @@ export interface Quaternion { * * @typedef Aabb * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export interface Aabb { /** @@ -202,8 +201,7 @@ export interface Aabb { * * @type { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ aabbMin: Vec3; @@ -212,8 +210,7 @@ export interface Aabb { * * @type { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ aabbMax: Vec3; } @@ -223,7 +220,7 @@ export interface Aabb { * * @typedef Color * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Color { @@ -232,7 +229,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ r: double; @@ -242,7 +239,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ g: double; @@ -252,7 +249,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ b: double; @@ -262,7 +259,7 @@ export interface Color { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ a: double; @@ -273,7 +270,7 @@ export interface Color { * * @typedef Rect * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export interface Rect { @@ -282,7 +279,7 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ x: double; @@ -292,7 +289,7 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ y: double; @@ -302,8 +299,7 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ width: double; @@ -312,45 +308,40 @@ export interface Rect { * * @type { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ height: double; } /** * Types of geometric shapes. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export enum GeometryType { /** * A custom geometric shape. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ CUSTOM = 0, /** * A cube. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ CUBE = 1, /** * A plane. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ PLANE = 2, @@ -358,72 +349,65 @@ export enum GeometryType { * A sphere. * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ SPHERE = 3 } /** * Define a geometric shape for mesh creation. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare abstract class GeometryDefinition { /** * Which geometry shape to interpret from this definition. - * + * * @type { GeometryType } * @readonly * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ readonly geometryType: GeometryType; } /** * How vertices in a sequence form triangles. - * + * * @enum { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export enum PrimitiveTopology { /** * The vertices form a set of independent triangle. Vertices (0, 1, 2), (3, 4, 5), ... define separate triangles. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ TRIANGLE_LIST = 0, /** * The vertices form a triangle strip. Starting from the 3rd, each vertex defines a triangle with the previous two. - * + * * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ TRIANGLE_STRIP = 1 } /** * An array of vertices and their data defining a custom geometric shape. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare class CustomGeometry extends GeometryDefinition { /** * How to form mesh triangles from the indexed vertices. - * + * * @type { ?PrimitiveTopology } * @default PrimitiveTopology.TRIANGLE_LIST * @syscap SystemCapability.ArkUi.Graphics3D @@ -431,60 +415,36 @@ export declare class CustomGeometry extends GeometryDefinition { */ topology?: PrimitiveTopology; - /** - * How to form mesh triangles from the indexed vertices. - * - * @return { PrimitiveTopology | undefined } - * @default PrimitiveTopology.TRIANGLE_LIST - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - get topology(): PrimitiveTopology | undefined; - - /** - * How to form mesh triangles from the indexed vertices. - * - * @param { PrimitiveTopology | undefined } value - * @default PrimitiveTopology.TRIANGLE_LIST - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - set topology(value: PrimitiveTopology | undefined); - /** * An array of vertices. - * + * * @return { Vec3[] } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ get vertices(): Vec3[]; /** * An array of vertices. - * + * * @param { Vec3[] } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ set vertices(value: Vec3[]); /** * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. - * + * * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: * topology = PrimitiveTopology.TRIANGLE_LIST - * indices = [0, 1, 2, 2, 1, 3] + * indices = [0, 1, 2, 2, 1, 3] * resulting triangles: abc, cbd - * + * * topology = PrimitiveTopology.TRIANGLE_STRIP * indices = [0, 1, 2, 3] * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) - * + * * @type { ?int[] } * @default indices: [0, 1 ,2,..., vertices.size() - 1] * @syscap SystemCapability.ArkUi.Graphics3D @@ -492,240 +452,129 @@ export declare class CustomGeometry extends GeometryDefinition { */ indices?: int[]; - /** - * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. - * - * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: - * topology = PrimitiveTopology.TRIANGLE_LIST - * indices = [0, 1, 2, 2, 1, 3] - * resulting triangles: abc, cbd - * - * topology = PrimitiveTopology.TRIANGLE_STRIP - * indices = [0, 1, 2, 3] - * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) - * - * @return { int[] | undefined } - * @default indices: [0, 1 ,2,..., vertices.size() - 1] - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - get indices(): int[] | undefined; - - /** - * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. - * - * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: - * topology = PrimitiveTopology.TRIANGLE_LIST - * indices = [0, 1, 2, 2, 1, 3] - * resulting triangles: abc, cbd - * - * topology = PrimitiveTopology.TRIANGLE_STRIP - * indices = [0, 1, 2, 3] - * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) - * - * @param { int[] | undefined } value - * @default indices: [0, 1 ,2,..., vertices.size() - 1] - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - set indices(value: int[] | undefined); - /** * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. - * + * * @type { ?Vec3[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ normals?: Vec3[]; - /** - * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. - * - * @return { Vec3[] | undefined } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - get normals(): Vec3[] | undefined; - - /** - * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. - * - * @param { Vec3[] | undefined } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - set normals(value: Vec3[] | undefined); - /** * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] - * + * * @type { ?Vec2[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ uvs?: Vec2[]; - /** - * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] - * - * @return { Vec2[] | undefined } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - get uvs(): Vec2[] | undefined; - - /** - * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] - * - * @param { Vec2[] | undefined } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - set uvs(value: Vec2[] | undefined); - /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * + * * @type { ?Color[] } * @syscap SystemCapability.ArkUi.Graphics3D * @since 18 */ colors?: Color[]; - - /** - * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * - * @return { Color[] | undefined } - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - get colors(): Color[] | undefined; - - /** - * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * - * @param { Color[] | undefined } value - * @syscap SystemCapability.ArkUi.Graphics3D - * @since 20 - * @arkts 1.2 - */ - set colors(value: Color[] | undefined); } /** * Define a rectangular cuboid. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare class CubeGeometry extends GeometryDefinition { /** * The width, height and depth of the cube. - * + * * @return { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ get size(): Vec3; /** * The width, height and depth of the cube. - * + * * @param { Vec3 } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ set size(value: Vec3); } /** * Define a plane. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare class PlaneGeometry extends GeometryDefinition { /** * The width and length of the plane. - * + * * @return { Vec2 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ get size(): Vec2; /** * The width and length of the plane. - * + * * @param { Vec2 } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ set size(value: Vec2); } /** * Define a sphere. - * + * * @extends GeometryDefinition * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'18', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare class SphereGeometry extends GeometryDefinition { /** * The raduis of the sphere. - * + * * @return { double } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ get radius(): double; /** * The raduis of the sphere. - * + * * @param { double } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ set radius(value: double); /** * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. - * + * * @return { int } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ get segmentCount(): int; /** * Divide the sphere latitudinally into this many circles and each circle longitudinally into this mant segments. - * + * * @param { int } value * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ set segmentCount(value: int); } @@ -734,7 +583,7 @@ export declare class SphereGeometry extends GeometryDefinition { * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export type Position3 = Vec3; @@ -744,8 +593,7 @@ export type Position3 = Vec3; * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export type Rotation3 = Vec3; @@ -754,7 +602,7 @@ export type Rotation3 = Vec3; * * @typedef { Vec3 } * @syscap SystemCapability.ArkUi.Graphics3D - * @since arkts { '1.1':'12', '1.2':'20' } + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export type Scale3 = Vec3; -- Gitee From cbc747993cc50224bad46242c2654c01d38c902b Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Aug 2025 10:38:14 +0800 Subject: [PATCH 6/7] =?UTF-8?q?@kit.ArkGraphics3D.d.ts=E4=B8=80=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenshiyi2 --- kits/@kit.ArkGraphics3D.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/kits/@kit.ArkGraphics3D.d.ts b/kits/@kit.ArkGraphics3D.d.ts index 5d9966069e..6947ac2f9d 100644 --- a/kits/@kit.ArkGraphics3D.d.ts +++ b/kits/@kit.ArkGraphics3D.d.ts @@ -18,6 +18,7 @@ * @kit ArkGraphics3D */ +/*** if arkts 1.1 */ import { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings, Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, Scale3, GeometryType, GeometryDefinition, PrimitiveTopology, CustomGeometry, CubeGeometry, PlaneGeometry, SphereGeometry, @@ -37,3 +38,17 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, RaycastResult, RaycastParameters, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, Morpher, Sampler, SamplerFilter, SamplerAddressMode, RenderResourceFactory, SceneComponent, RenderContext }; +/*** endif */ + +/*** if arkts 1.2 */ +import { ToneMappingType, ToneMappingSettings, PostProcessSettings, + Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3, + SceneResource, Animation, EnvironmentBackgroundType, Environment, + NodeType, Node, LightType, Light, DirectionalLight, Camera, + SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, RenderResourceFactory } from '@ohos.graphics.scene'; +export { ToneMappingType, ToneMappingSettings, PostProcessSettings, + Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3, + SceneResource, Animation, EnvironmentBackgroundType, Environment, + NodeType, Node, LightType, Light, DirectionalLight, Camera, + SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, RenderResourceFactory }; +/*** endif */ -- Gitee From 61362a5fd4a0d292e1c715aa8bf5f8aebc69349a Mon Sep 17 00:00:00 2001 From: shenshiyi2 Date: Mon, 18 Aug 2025 17:08:25 +0800 Subject: [PATCH 7/7] =?UTF-8?q?class=20CustomGeometry=20=E9=80=82=E9=85=8D?= =?UTF-8?q?get/set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. topology 2. indices 3. normals 4. uvs 5. colors Signed-off-by: shenshiyi2 --- api/graphics3d/SceneTypes.d.ts | 122 +++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/api/graphics3d/SceneTypes.d.ts b/api/graphics3d/SceneTypes.d.ts index 114d27d876..b4cb57d659 100644 --- a/api/graphics3d/SceneTypes.d.ts +++ b/api/graphics3d/SceneTypes.d.ts @@ -415,6 +415,28 @@ export declare class CustomGeometry extends GeometryDefinition { */ topology?: PrimitiveTopology; + /** + * How to form mesh triangles from the indexed vertices. + * + * @return { PrimitiveTopology | undefined } + * @default PrimitiveTopology.TRIANGLE_LIST + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + get topology(): PrimitiveTopology | undefined; + + /** + * How to form mesh triangles from the indexed vertices. + * + * @param { PrimitiveTopology | undefined } value + * @default PrimitiveTopology.TRIANGLE_LIST + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + set topology(value: PrimitiveTopology | undefined); + /** * An array of vertices. * @@ -452,6 +474,46 @@ export declare class CustomGeometry extends GeometryDefinition { */ indices?: int[]; + /** + * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. + * + * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: + * topology = PrimitiveTopology.TRIANGLE_LIST + * indices = [0, 1, 2, 2, 1, 3] + * resulting triangles: abc, cbd + * + * topology = PrimitiveTopology.TRIANGLE_STRIP + * indices = [0, 1, 2, 3] + * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) + * + * @return { int[] | undefined } + * @default indices: [0, 1 ,2,..., vertices.size() - 1] + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + get indices(): int[] | undefined; + + /** + * Indices of those vertices that form triangles. PrimitiveTopology is applied to the sequence defined by indices. + * + * An example of creating an identical pair of triangles, given vertices = [a, b, c, d]: + * topology = PrimitiveTopology.TRIANGLE_LIST + * indices = [0, 1, 2, 2, 1, 3] + * resulting triangles: abc, cbd + * + * topology = PrimitiveTopology.TRIANGLE_STRIP + * indices = [0, 1, 2, 3] + * resulting triangles: abc, cbd (b and c are reversed in cbd, to match the face direction of the first triangle) + * + * @param { int[] | undefined } value + * @default indices: [0, 1 ,2,..., vertices.size() - 1] + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + set indices(value: int[] | undefined); + /** * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. * @@ -461,6 +523,26 @@ export declare class CustomGeometry extends GeometryDefinition { */ normals?: Vec3[]; + /** + * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. + * + * @return { Vec3[] | undefined } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + get normals(): Vec3[] | undefined; + + /** + * Vertex normal. If normals is not null. normals[N] is for vertices[N] and generateNormals is ignored. + * + * @param { Vec3[] | undefined } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + set normals(value: Vec3[] | undefined); + /** * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] * @@ -470,6 +552,26 @@ export declare class CustomGeometry extends GeometryDefinition { */ uvs?: Vec2[]; + /** + * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] + * + * @return { Vec2[] | undefined } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + get uvs(): Vec2[] | undefined; + + /** + * Vertex texture mapping UV coordinate. If uvs is not null, uvs[N] is for vertices[N] + * + * @param { Vec2[] | undefined } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + set uvs(value: Vec2[] | undefined); + /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. * @@ -478,6 +580,26 @@ export declare class CustomGeometry extends GeometryDefinition { * @since 18 */ colors?: Color[]; + + /** + * Vertex color. If colors is not null, colors[N] is for vertices[N]. + * + * @return { Color[] | undefined } + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + get colors(): Color[] | undefined; + + /** + * Vertex color. If colors is not null, colors[N] is for vertices[N]. + * + * @param { Color[] | undefined } value + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ + set colors(value: Color[] | undefined); } /** -- Gitee