-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#43 Add cancel button to main product screen #42 Font / lettering changes for Product Screen // USD font change, Products remaining font change, Extra space for variant text, View full description, Left align “By proceeding to commit” #41 Increase visibility for links //added blue font as suggested in round 1 of changes #40 Integrate animation for transaction in process screen #34 Do not reload images that have already been loaded (reuse the same Texture instance) //images only load once #32 Revisit the Copy on the more info panel #26 Add a loading message to display when images are not loaded on kiosk #22 Non Token Gating Rendering // Kiosk Popup complete, still need to do product screen
- Loading branch information
Showing
34 changed files
with
582 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@bosonprotocol/boson-dcl](./boson-dcl.md) > [Kiosk](./boson-dcl.kiosk.md) > [waveAnimationSystem](./boson-dcl.kiosk.waveanimationsystem.md) | ||
|
||
## Kiosk.waveAnimationSystem property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
static waveAnimationSystem: WaveAnimationSystem | undefined; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
library/src/scene/kiosk/animation/waveAnimationSystem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
export class Wave extends Entity { | ||
|
||
material:Material | ||
texture:Texture | ||
scrollX:number = 0 | ||
speed: number = 0 | ||
|
||
constructor(_texturePath:string,_parent:Entity,_speed:number, _startOffset:number){ | ||
super() | ||
this.scrollX = _startOffset | ||
this.texture = new Texture(_texturePath,{hasAlpha: true, wrap:1}) | ||
this.material = new Material() | ||
this.material.albedoTexture = this.texture | ||
this.material.emissiveColor = Color3.White() | ||
this.material.emissiveTexture = this.texture | ||
this.material.emissiveIntensity = 0.3 | ||
this.material.roughness = 1 | ||
this.material.transparencyMode = 2 | ||
|
||
this.setParent(_parent) | ||
this.addComponent(new PlaneShape()) | ||
this.addComponent(this.material) | ||
|
||
this.speed = _speed | ||
} | ||
|
||
update(_dt:number){ | ||
this.scrollX+=_dt*this.speed | ||
if(this.scrollX>1){ | ||
this.scrollX -=1 | ||
} | ||
this.getComponent(PlaneShape).uvs = this.setUVs(this.scrollX,0) | ||
} | ||
|
||
setUVs(scrollX : number, scrollY : number) { | ||
return [ | ||
// North side of unrortated plane | ||
0 + scrollX, //lower-left corner | ||
0 + scrollY, | ||
|
||
1 + scrollX, //lower-right corner | ||
0 + scrollY, | ||
|
||
1 + scrollX, //upper-right corner | ||
1 + scrollY, | ||
|
||
0 + scrollX, //upper left-corner | ||
1 + scrollY, | ||
|
||
// South side of unrortated plane | ||
1 + scrollX, // lower-right corner | ||
0 + scrollY, | ||
|
||
0 + scrollX, // lower-left corner | ||
0+ scrollY, | ||
|
||
0 + scrollX, // upper-left corner | ||
1 + scrollY, | ||
|
||
1 + scrollX, // upper-right corner | ||
1 + scrollY, | ||
] | ||
} | ||
} | ||
|
||
export class WaveAnimationSystem implements ISystem{ | ||
waves:Wave[] = [] | ||
|
||
// wave parent | ||
waveParent:Entity = new Entity() | ||
|
||
constructor(){ | ||
this.waveParent.addComponent(new Transform({ | ||
position: new Vector3(0,-0.2,-0.05), | ||
rotation: Quaternion.Euler(0,0,0), | ||
scale: new Vector3(2,1,1) | ||
})) | ||
|
||
this.waves.push(new Wave("images/kiosk/ui/line1.png", this.waveParent, 0.8,1.5)) | ||
this.waves.push(new Wave("images/kiosk/ui/line2.png", this.waveParent, 0.6,1.1)) | ||
this.waves.push(new Wave("images/kiosk/ui/line3.png", this.waveParent, 0.5,1.3)) | ||
this.waves.push(new Wave("images/kiosk/ui/line4.png", this.waveParent, 0.5,0.9)) | ||
|
||
} | ||
|
||
setNewParent(_parent:Entity){ | ||
this.waveParent.setParent(_parent) | ||
if(!this.waveParent.isAddedToEngine()){ | ||
engine.addEntity(this.waveParent) | ||
} | ||
} | ||
|
||
hide(){ | ||
if(this.waveParent.isAddedToEngine()){ | ||
engine.removeEntity(this.waveParent) | ||
} | ||
} | ||
|
||
update(dt: number): void { | ||
this.waves.forEach(wave => { | ||
wave.update(dt) | ||
}); | ||
} | ||
} |
Oops, something went wrong.