Skip to content

Commit

Permalink
Replace depdecated PlaneBufferGeometry
Browse files Browse the repository at this point in the history
  • Loading branch information
Elettrotecnica committed Apr 22, 2024
1 parent 9430db2 commit 94cb865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/three-particle-emitter/lib/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const fragmentShader = `
`;
class ParticleEmitter extends three_1.Mesh {
constructor(texture) {
const planeGeometry = new three_1.PlaneBufferGeometry(1, 1, 1, 1);
const planeGeometry = new three_1.PlaneGeometry(1, 1, 1, 1);
if (texture && !texture.flipY) {
flipV(planeGeometry);
}
Expand Down Expand Up @@ -154,7 +154,7 @@ class ParticleEmitter extends three_1.Mesh {
}
updateParticles() {
const texture = this.material.uniforms.map.value;
const planeGeometry = new three_1.PlaneBufferGeometry(1, 1, 1, 1);
const planeGeometry = new three_1.PlaneGeometry(1, 1, 1, 1);
if (texture && !texture.flipY) {
flipV(planeGeometry);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/three-particle-emitter/lib/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Mesh, InstancedBufferGeometry, PlaneBufferGeometry, ShaderMaterial, Vector3, Color, InstancedBufferAttribute, MathUtils, AddEquation, Matrix4, UniformsUtils, UniformsLib, DynamicDrawUsage } from "three";
import { Mesh, InstancedBufferGeometry, PlaneGeometry, ShaderMaterial, Vector3, Color, InstancedBufferAttribute, MathUtils, AddEquation, Matrix4, UniformsUtils, UniformsLib, DynamicDrawUsage } from "three";
import * as EasingFunctions from "@mozillareality/easing-functions";
export function lerp(start, end, value) {
return (end - start) * value + start;
Expand Down Expand Up @@ -71,7 +71,7 @@ const fragmentShader = `
`;
export class ParticleEmitter extends Mesh {
constructor(texture) {
const planeGeometry = new PlaneBufferGeometry(1, 1, 1, 1);
const planeGeometry = new PlaneGeometry(1, 1, 1, 1);
if (texture && !texture.flipY) {
flipV(planeGeometry);
}
Expand Down Expand Up @@ -126,7 +126,7 @@ export class ParticleEmitter extends Mesh {
}
updateParticles() {
const texture = this.material.uniforms.map.value;
const planeGeometry = new PlaneBufferGeometry(1, 1, 1, 1);
const planeGeometry = new PlaneGeometry(1, 1, 1, 1);
if (texture && !texture.flipY) {
flipV(planeGeometry);
}
Expand Down

0 comments on commit 94cb865

Please sign in to comment.