@akashic/akashic-engine
Advanced tools
Comparing version 3.0.4 to 3.1.0
@@ -106,3 +106,3 @@ "use strict"; | ||
} | ||
renderer.translate(offsetX, 0); | ||
renderer.translate(Math.round(offsetX), 0); | ||
if (scale !== 1) { | ||
@@ -113,2 +113,3 @@ renderer.transform([scale, 0, 0, 1, 0, 0]); | ||
var glyphScale = this.fontSize / this.font.size; | ||
var cumulativeOffset = 0; | ||
for (var i = 0; i < this.glyphs.length; ++i) { | ||
@@ -128,2 +129,3 @@ var glyph = this.glyphs[i]; | ||
renderer.save(); | ||
renderer.translate(Math.round(cumulativeOffset), 0); | ||
renderer.transform([glyphScale, 0, 0, glyphScale, 0, 0]); | ||
@@ -133,3 +135,3 @@ renderer.drawImage(glyph.surface, glyph.x, glyph.y, glyph.width, glyph.height, glyph.offsetX, glyph.offsetY); | ||
} | ||
renderer.translate(glyphWidth, 0); | ||
cumulativeOffset += glyphWidth; | ||
} | ||
@@ -136,0 +138,0 @@ renderer.restore(); |
@@ -33,2 +33,7 @@ import { Asset, CommonOffset, CommonSize, Renderer, ResourceFactory, ScriptAssetRuntimeValueBase, PlatformPointEvent, OperationPluginViewInfo } from "@akashic/pdi-types"; | ||
/** | ||
* `Game#_idx` に設定する値。 | ||
* 省略された場合、元の値が維持される。 | ||
*/ | ||
nextEntityId?: number; | ||
/** | ||
* `Game#random` に設定するシード値。 | ||
@@ -35,0 +40,0 @@ * 省略された場合、元の値が維持される。 |
@@ -503,3 +503,3 @@ "use strict"; | ||
Game.prototype.saveSnapshot = function (snapshot, timestamp) { | ||
this.handlerSet.saveSnapshot(this.age, snapshot, this.random.serialize(), timestamp); | ||
this.handlerSet.saveSnapshot(this.age, snapshot, this.random.serialize(), this._idx, timestamp); | ||
}; | ||
@@ -595,2 +595,4 @@ /** | ||
this.age = param.age; | ||
if (param.nextEntityId !== undefined) | ||
this._idx = param.nextEntityId; | ||
if (param.randGenSer !== undefined) { | ||
@@ -597,0 +599,0 @@ this.random = XorshiftRandomGenerator_1.XorshiftRandomGenerator.deserialize(param.randGenSer); |
@@ -55,5 +55,6 @@ import * as pl from "@akashic/playlog"; | ||
* @param randGenSer 乱数生成器のシリアリゼーション。 | ||
* @param nextEntityId 次のエンティティID | ||
* @param timestamp 保存時の時刻。 `g.TimestampEvent` を利用するゲームの場合、それらと同じ基準の時間情報を与えなければならない。 | ||
*/ | ||
saveSnapshot(frame: number, snapshot: any, randGenSer: any, timestamp?: number): void; | ||
saveSnapshot(frame: number, snapshot: any, randGenSer: any, nextEntityId: number, timestamp?: number): void; | ||
/** | ||
@@ -60,0 +61,0 @@ * このインスタンスの種別を取得する |
{ | ||
"name": "@akashic/akashic-engine", | ||
"version": "3.0.4", | ||
"version": "3.1.0", | ||
"description": "The core library of Akashic Engine", | ||
@@ -36,4 +36,3 @@ "main": "index.js", | ||
"scripts": { | ||
"prepublish": "npm run build && npm run doc", | ||
"prepare": "npm run prepublish", | ||
"prepare": "npm run build && npm run doc", | ||
"build": "npm run clean && tsc -p ./ && npm run bundle && npm run format", | ||
@@ -50,3 +49,3 @@ "bundle": "rollup -c rollup.config.js", | ||
"format:eslint": "eslint -c .eslintrc \"src/**/*.ts\" --fix", | ||
"doc": "typedoc --out doc/html/ --mode file --gaID UA-162208211-1 --includeDeclarations --exclude **/lib.es5.d.ts --exclude typings/**/* --exclude **/amflow/**/* --name 'Akashic Engine'" | ||
"doc": "typedoc --out doc/html/ --mode file --includeDeclarations --exclude **/lib.es5.d.ts --exclude typings/**/* --exclude **/amflow/**/* --name 'Akashic Engine'" | ||
}, | ||
@@ -53,0 +52,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
25077
1200187
161