bugfix
This commit is contained in:
@@ -11,9 +11,9 @@ class VideoPlayer extends EventManager {
|
||||
let vi, plane, finished = false;
|
||||
return new Promise((resolve, reject)=>{
|
||||
vi = document.createElement('video');
|
||||
vi.src = engine.assetPath + data.$go.asset.name;
|
||||
vi.addEventListener('loadedmetadata', async ()=>{
|
||||
this.aspect = vi.videoWidth / vi.videoHeight;
|
||||
if (isNaN(this.aspect)) this.aspect = 16/9;
|
||||
let geometry = new PlaneGeometry( this.aspect * 0.88, 0.88 );
|
||||
let map = new VideoTexture( vi );
|
||||
map.colorSpace = SRGBColorSpace;
|
||||
@@ -78,6 +78,7 @@ class VideoPlayer extends EventManager {
|
||||
|
||||
resolve(this);
|
||||
})
|
||||
vi.src = engine.assetPath + data.$go.asset.name;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -55,8 +55,8 @@ class Hero{
|
||||
|
||||
// console.log('hero', size, center, size.y - 2*this.characterGapOffset)
|
||||
|
||||
this.runVelocity = this.size.y * 5
|
||||
this.walkVelocity = this.size.y * 3
|
||||
this.runVelocity = this.size.y * 4
|
||||
this.walkVelocity = this.size.y * 1
|
||||
|
||||
this.po = engine.physics.add(this.model, 'kinematicPositionBased', false, undefined, 'capsule', { radius: this.size.y/4, halfHeight: this.size.y/4})
|
||||
this.po.collider.setTranslationWrtParent({x: 0, y: this.size.y/2, z: 0});
|
||||
@@ -136,11 +136,12 @@ class Hero{
|
||||
this.fadeDuration = 0.2;
|
||||
if (input[1] && pc.running) {
|
||||
play = 'run';
|
||||
velocity = this.runVelocity;
|
||||
} else if (input[1] > 0) {
|
||||
play = 'walk'
|
||||
} else if (input[1] < 0) {
|
||||
play = 'backward'
|
||||
velocity = this.walkVelocity / 3
|
||||
velocity = this.walkVelocity * 0.9
|
||||
} else if (input[0] < 0) {
|
||||
play = 'right'
|
||||
} else if (input[0] > 0) {
|
||||
|
||||
@@ -168,6 +168,7 @@ export default {
|
||||
if (this.scene.data.items){
|
||||
let loaded = 0;
|
||||
for (let i of this.scene.data.items) {
|
||||
this.debug('Loading', i);
|
||||
if (this.env != 'GameDesigner'){
|
||||
if (i.data.activationTriggers?.length || i.data.activationScore){
|
||||
i.data.shouldBeLocked = true;
|
||||
|
||||
Reference in New Issue
Block a user