Skip to content

Commit

Permalink
alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
tyzoo committed Mar 26, 2023
1 parent 1649dee commit 09fe6d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/entities/Booth/Booth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface IBoothProps {
wrapTexturePath: string,
dispenserModelPath: string,
buttonModelPath: string,
alphaSrcTxtPath: string,
useHostedAssets?: boolean,
disableCylinder?: boolean,
disablePreview?: boolean,
Expand All @@ -33,12 +34,13 @@ export class Booth extends Entity {
public props: IBoothProps
) {
super()
if (props.useHostedAssets === undefined) props.useHostedAssets = true;
if (props.useHostedAssets === undefined) props.useHostedAssets = false;
if (props.disableCylinder === undefined) props.disableCylinder = false;
if (props.useBoothAsButton === undefined) props.useBoothAsButton = false;
if (props.disablePreview === undefined) props.disablePreview = false;
if (props.boothRotationDir === undefined) props.boothRotationDir = 'right';
if (props.itemRotationDir === undefined) props.itemRotationDir = 'left';
if (props.alphaSrcTxtPath === undefined) props.alphaSrcTxtPath = 'images/alpha-circle.png';
this.cdn = props.useHostedAssets ? `https://tyzoo.github.io/assets/` : ``;
this.wrapTexture = new Texture(`${this.cdn}${props.wrapTexturePath}`)
this.addComponent(new Transform(props.transformArgs));
Expand Down Expand Up @@ -101,7 +103,7 @@ export class Booth extends Entity {
if (!path) return;
if (this.props.disablePreview) return;
const texture = new Texture(path)
const circle = new Texture(`${this.cdn}images/alpha-circle.png`);
const circle = new Texture(`${this.cdn}${this.props.alphaSrcTxtPath}`);
if (!this.image) {
this.image = new Entity(`image-${this.name}`);
this.image.addComponent(new PlaneShape());
Expand Down

0 comments on commit 09fe6d7

Please sign in to comment.