@galacean/effects-threejs 2.9.0-alpha.1 → 2.9.0

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.
@@ -1,5 +1,5 @@
1
1
  import type { MaterialProps, Texture, UniformValue, UndefinedAble, Engine, GlobalUniforms, Renderer } from '@galacean/effects-core';
2
- import { math, Material } from '@galacean/effects-core';
2
+ import { math, Material, spec } from '@galacean/effects-core';
3
3
  import * as THREE from 'three';
4
4
  type Matrix4 = math.Matrix4;
5
5
  type Vector2 = math.Vector2;
@@ -23,7 +23,7 @@ export declare class ThreeMaterial extends Material {
23
23
  /**
24
24
  * 储存 uniform 变量名及对应的 THREE uniform 对象
25
25
  */
26
- uniforms: Record<string, THREE.Uniform>;
26
+ threeUniforms: Record<string, THREE.Uniform>;
27
27
  macrosDirty: boolean;
28
28
  /**
29
29
  * 构造函数
@@ -173,7 +173,7 @@ export declare class ThreeMaterial extends Material {
173
173
  isMacroEnabled(keyword: string): boolean;
174
174
  clone(props?: MaterialProps): Material;
175
175
  cloneUniforms(sourceMaterial: Material): void;
176
- fromData(data: unknown): void;
176
+ fromData(data: spec.MaterialData): void;
177
177
  dispose(): void;
178
178
  }
179
179
  export {};
@@ -1,4 +1,4 @@
1
- import type { Scene, ShaderLibrary, Transform, EventSystem, CompositionProps } from '@galacean/effects-core';
1
+ import type { Scene, ShaderLibrary, Transform, EventSystem, CompositionProps, Engine } from '@galacean/effects-core';
2
2
  import { Composition } from '@galacean/effects-core';
3
3
  import type THREE from 'three';
4
4
  /**
@@ -47,6 +47,6 @@ export declare class ThreeComposition extends Composition {
47
47
  * 发射器形状缓存 map
48
48
  */
49
49
  static shape: Record<string, number>;
50
- constructor(props: ThreeCompositionProps, scene: Scene);
50
+ constructor(engine: Engine, props: ThreeCompositionProps, scene: Scene);
51
51
  prepareRender(): void;
52
52
  }
@@ -2,4 +2,6 @@ import type { Engine } from '@galacean/effects-core';
2
2
  import { Renderer } from '@galacean/effects-core';
3
3
  export declare class ThreeRenderer extends Renderer {
4
4
  constructor(engine: Engine);
5
+ getWidth(): number;
6
+ getHeight(): number;
5
7
  }
@@ -1,4 +1,4 @@
1
- import type { Engine, TextureDataType, TextureSourceOptions } from '@galacean/effects-core';
1
+ import type { Engine, TextureDataType, TextureSourceOptions, spec } from '@galacean/effects-core';
2
2
  import { Texture } from '@galacean/effects-core';
3
3
  import * as THREE from 'three';
4
4
  /**
@@ -46,6 +46,6 @@ export declare class ThreeTexture extends Texture {
46
46
  * 通过图层设置创建贴图
47
47
  * @param data - 图层设置
48
48
  */
49
- fromData(data: any): void;
49
+ fromData(data: spec.EffectsObjectData): void;
50
50
  private createTextureByType;
51
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-threejs",
3
- "version": "2.9.0-alpha.1",
3
+ "version": "2.9.0",
4
4
  "description": "Galacean Effects runtime threejs plugin for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "registry": "https://registry.npmjs.org"
44
44
  },
45
45
  "dependencies": {
46
- "@galacean/effects-core": "2.9.0-alpha.1"
46
+ "@galacean/effects-core": "2.9.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "three": "^0.149.0",