@galacean/engine-core 1.1.0-beta.32 → 1.1.0-beta.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +314 -0
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +314 -0
- package/dist/module.js +314 -0
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/mesh/PrimitiveMesh.d.ts +22 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.33",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.1.0-beta.
|
|
18
|
+
"@galacean/engine-math": "1.1.0-beta.33"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.1.0-beta.33"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -6,6 +6,10 @@ import { ModelMesh } from "./ModelMesh";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class PrimitiveMesh {
|
|
8
8
|
private static _tempVec30;
|
|
9
|
+
private static readonly _sphereSeedPositions;
|
|
10
|
+
private static readonly _sphereSeedCells;
|
|
11
|
+
private static _sphereEdgeIdx;
|
|
12
|
+
private static _spherePoleIdx;
|
|
9
13
|
/**
|
|
10
14
|
* Create a sphere mesh.
|
|
11
15
|
* @param engine - Engine
|
|
@@ -15,6 +19,16 @@ export declare class PrimitiveMesh {
|
|
|
15
19
|
* @returns Sphere model mesh
|
|
16
20
|
*/
|
|
17
21
|
static createSphere(engine: Engine, radius?: number, segments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
22
|
+
/**
|
|
23
|
+
* Create a sphere mesh by implementing Catmull-Clark Surface Subdivision Algorithm.
|
|
24
|
+
* Max step is limited to 6.
|
|
25
|
+
* @param engine - Engine
|
|
26
|
+
* @param radius - Sphere radius
|
|
27
|
+
* @param step - Number of subdiv steps
|
|
28
|
+
* @param noLongerAccessible - No longer access the vertices of the mesh after creation
|
|
29
|
+
* @returns Sphere model mesh
|
|
30
|
+
*/
|
|
31
|
+
static createSubdivisionSurfaceSphere(engine: Engine, radius?: number, step?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
18
32
|
/**
|
|
19
33
|
* Create a cuboid mesh.
|
|
20
34
|
* @param engine - Engine
|
|
@@ -82,6 +96,14 @@ export declare class PrimitiveMesh {
|
|
|
82
96
|
* @returns Capsule model mesh
|
|
83
97
|
*/
|
|
84
98
|
static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
99
|
+
/**
|
|
100
|
+
* Duplicate vertices at the poles and adjust their UV coordinates.
|
|
101
|
+
*/
|
|
102
|
+
private static _generateAndReplacePoleUV;
|
|
103
|
+
/**
|
|
104
|
+
* Get edge point index for subdivision surface sphere.
|
|
105
|
+
*/
|
|
106
|
+
private static _calculateEdgeIndex;
|
|
85
107
|
static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
86
108
|
static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
87
109
|
private static _initialize;
|