diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index 46635a0c9e14bd9721efd48c5a0d6d74a3a64873..7f164ea157c1a4d391180d1c6ad51816159ade4a 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 8b795356fb5fcec29449789ea2cb5b2a6005d391..2b5b598ff70af6be709f6fcaec0458c0c3548285 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 eb068d90e61dfbf1ee29064e765cb364a3d85983..53cbe005fdc9fd0bce359b33c01b10e428d5e04e 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 fc88f73eb9c9978c8f83d5e1c12b18810820a415..75530416bd5eec211c797d164e5a93a86dccbbdb 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 c26828aa130a9a3958264eb45af4b929a78f5137..83b8b53821ccbf0819b1b32bf0a177ba213d92c4 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 59ead8111f6dc86085940cf65f087625f2f7209e..b4cb57d6593465aa786e769f4be28f342fd35f0a 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 @@ -433,7 +417,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * How to form mesh triangles from the indexed vertices. - * + * * @return { PrimitiveTopology | undefined } * @default PrimitiveTopology.TRIANGLE_LIST * @syscap SystemCapability.ArkUi.Graphics3D @@ -444,7 +428,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * How to form mesh triangles from the indexed vertices. - * + * * @param { PrimitiveTopology | undefined } value * @default PrimitiveTopology.TRIANGLE_LIST * @syscap SystemCapability.ArkUi.Graphics3D @@ -455,36 +439,34 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 @@ -494,16 +476,16 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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) - * + * * @return { int[] | undefined } * @default indices: [0, 1 ,2,..., vertices.size() - 1] * @syscap SystemCapability.ArkUi.Graphics3D @@ -514,16 +496,16 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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) - * + * * @param { int[] | undefined } value * @default indices: [0, 1 ,2,..., vertices.size() - 1] * @syscap SystemCapability.ArkUi.Graphics3D @@ -534,7 +516,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 @@ -543,7 +525,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 @@ -553,7 +535,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 @@ -563,7 +545,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 @@ -572,7 +554,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 @@ -582,7 +564,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 @@ -592,7 +574,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 @@ -601,7 +583,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * + * * @return { Color[] | undefined } * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -611,7 +593,7 @@ export declare class CustomGeometry extends GeometryDefinition { /** * Vertex color. If colors is not null, colors[N] is for vertices[N]. - * + * * @param { Color[] | undefined } value * @syscap SystemCapability.ArkUi.Graphics3D * @since 20 @@ -622,110 +604,99 @@ export declare class CustomGeometry extends GeometryDefinition { /** * 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 +705,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 +715,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 +724,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; diff --git a/kits/@kit.ArkGraphics3D.d.ts b/kits/@kit.ArkGraphics3D.d.ts index 5d9966069ecf2f110c3502d47fa88f0effa42446..6947ac2f9d7b54ad126ff248ad490a4bec18a347 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 */