mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Updates
This commit is contained in:
parent
175bca56ea
commit
30d56bf180
@ -13,6 +13,7 @@ export class CommunityGoalHallOfFameData implements IDisposable
|
|||||||
this._goalCode = wrapper.readString();
|
this._goalCode = wrapper.readString();
|
||||||
|
|
||||||
const count = wrapper.readInt();
|
const count = wrapper.readInt();
|
||||||
|
|
||||||
for(let i = 0; i < count; i++)
|
for(let i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
this._hof.push(new HallOfFameEntryData(wrapper));
|
this._hof.push(new HallOfFameEntryData(wrapper));
|
||||||
|
@ -882,7 +882,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||||||
const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType);
|
const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType);
|
||||||
const selectedData = this.getSelectedRoomObjectData(roomId);
|
const selectedData = this.getSelectedRoomObjectData(roomId);
|
||||||
|
|
||||||
if(!selectedData)
|
if(selectedData)
|
||||||
{
|
{
|
||||||
if((selectedData.category === objectCategory) && (selectedData.id === event.objectId))
|
if((selectedData.category === objectCategory) && (selectedData.id === event.objectId))
|
||||||
{
|
{
|
||||||
|
@ -9,14 +9,13 @@ import { FurnitureVisualization } from './FurnitureVisualization';
|
|||||||
|
|
||||||
export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||||
{
|
{
|
||||||
private static FRAME_INCREASE_AMOUNT: number = 1;
|
|
||||||
|
|
||||||
public static TYPE: string = RoomObjectVisualizationType.FURNITURE_ANIMATED;
|
public static TYPE: string = RoomObjectVisualizationType.FURNITURE_ANIMATED;
|
||||||
public static DEFAULT_ANIMATION_ID: number = 0;
|
public static DEFAULT_ANIMATION_ID: number = 0;
|
||||||
|
|
||||||
protected _data: FurnitureAnimatedVisualizationData;
|
protected _data: FurnitureAnimatedVisualizationData;
|
||||||
|
|
||||||
protected _state: number;
|
protected _state: number;
|
||||||
|
protected _frameIncrease: number;
|
||||||
private _animationData: AnimationStateData;
|
private _animationData: AnimationStateData;
|
||||||
private _animationScale: number;
|
private _animationScale: number;
|
||||||
private _animationChangeTime: number;
|
private _animationChangeTime: number;
|
||||||
@ -28,6 +27,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
|||||||
super();
|
super();
|
||||||
|
|
||||||
this._state = -1;
|
this._state = -1;
|
||||||
|
this._frameIncrease = 1;
|
||||||
this._animationData = new AnimationStateData();
|
this._animationData = new AnimationStateData();
|
||||||
this._animationScale = 0;
|
this._animationScale = 0;
|
||||||
this._animationChangeTime = 0;
|
this._animationChangeTime = 0;
|
||||||
@ -290,7 +290,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
|||||||
|
|
||||||
if(!frameCount) frameCount = this._data.getStartFrame(scale, animationId, this._direction);
|
if(!frameCount) frameCount = this._data.getStartFrame(scale, animationId, this._direction);
|
||||||
|
|
||||||
frameCount += FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT;
|
frameCount += this.frameIncrease;
|
||||||
animationData.frameCounter = frameCount;
|
animationData.frameCounter = frameCount;
|
||||||
animationData.animationOver = true;
|
animationData.animationOver = true;
|
||||||
|
|
||||||
@ -312,13 +312,13 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
|||||||
|
|
||||||
if(frame)
|
if(frame)
|
||||||
{
|
{
|
||||||
if(frame.isLastFrame && (frame.remainingFrameRepeats <= FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT))
|
if(frame.isLastFrame && (frame.remainingFrameRepeats <= this.frameIncrease))
|
||||||
{
|
{
|
||||||
lastFramePlayed = true;
|
lastFramePlayed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((this._directionChanged || !frame) || ((frame.remainingFrameRepeats >= 0) && ((frame.remainingFrameRepeats = (frame.remainingFrameRepeats - FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT)) <= 0)))
|
if((this._directionChanged || !frame) || ((frame.remainingFrameRepeats >= 0) && ((frame.remainingFrameRepeats = (frame.remainingFrameRepeats - this.frameIncrease)) <= 0)))
|
||||||
{
|
{
|
||||||
sequenceId = AnimationFrame.SEQUENCE_NOT_DEFINED;
|
sequenceId = AnimationFrame.SEQUENCE_NOT_DEFINED;
|
||||||
|
|
||||||
@ -404,4 +404,9 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
|||||||
|
|
||||||
this._directionChanged = true;
|
this._directionChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected get frameIncrease(): number
|
||||||
|
{
|
||||||
|
return this._frameIncrease;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
|
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||||
|
|
||||||
export class FurnitureSoundBlockVisualization extends FurnitureAnimatedVisualization
|
export class FurnitureSoundBlockVisualization extends FurnitureAnimatedVisualization
|
||||||
{
|
{
|
||||||
|
private _internalFrameIncreaseCounter: number = 0;
|
||||||
|
|
||||||
|
protected updateAnimations(scale: number): number
|
||||||
|
{
|
||||||
|
this._internalFrameIncreaseCounter = (this._internalFrameIncreaseCounter + this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED));
|
||||||
|
this._frameIncrease = this._internalFrameIncreaseCounter;
|
||||||
|
this._internalFrameIncreaseCounter = (this._internalFrameIncreaseCounter - this._frameIncrease);
|
||||||
|
|
||||||
|
return super.updateAnimations(scale);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||||
import { FurnitureDynamicThumbnailVisualization } from './FurnitureDynamicThumbnailVisualization';
|
import { FurnitureDynamicThumbnailVisualization } from './FurnitureDynamicThumbnailVisualization';
|
||||||
|
|
||||||
export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisualization
|
export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisualization
|
||||||
@ -8,13 +9,8 @@ export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisu
|
|||||||
{
|
{
|
||||||
if(!this.object) return null;
|
if(!this.object) return null;
|
||||||
|
|
||||||
return null;
|
const url = this.object.model.getValue<string>(RoomObjectVariable.SESSION_URL_PREFIX);
|
||||||
|
|
||||||
// const data = this.object.model.getValue<any>(RoomObjectVariable.FURNITURE_DATA);
|
return (url + FurnitureYoutubeVisualization.THUMBNAIL);
|
||||||
// const url = this.object.model.getValue<string>(RoomObjectVariable.SESSION_URL_PREFIX);
|
|
||||||
|
|
||||||
// if(!data || !url) return null;
|
|
||||||
|
|
||||||
// return (url + FurnitureYoutubeVisualization.THUMBNAIL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user