@shapediver/viewer.shared.types
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -1,8 +0,23 @@ | ||
import { vec2 } from "gl-matrix"; | ||
import { AbstractTreeNodeData } from "@shapediver/viewer.shared.node-tree"; | ||
import { IMapData, TEXTURE_FILTERING, TEXTURE_WRAPPING } from "../../interfaces/data/material/IMapData"; | ||
import { Color } from "../../types"; | ||
import { vec2 } from 'gl-matrix'; | ||
import { AbstractTreeNodeData } from '@shapediver/viewer.shared.node-tree'; | ||
import { IMapData, TEXTURE_FILTERING, TEXTURE_WRAPPING } from '../../interfaces/data/material/IMapData'; | ||
import { Color } from '../../types'; | ||
export declare class MapData extends AbstractTreeNodeData implements IMapData { | ||
#private; | ||
constructor(image: HTMLImageElement, wrapS?: TEXTURE_WRAPPING, wrapT?: TEXTURE_WRAPPING, minFilter?: TEXTURE_FILTERING, magFilter?: TEXTURE_FILTERING, center?: vec2, color?: Color, offset?: vec2, repeat?: vec2, rotation?: number, texCoord?: number, flipY?: boolean, id?: string, version?: string); | ||
constructor(image: HTMLImageElement, properties?: { | ||
blob?: Blob; | ||
wrapS?: TEXTURE_WRAPPING; | ||
wrapT?: TEXTURE_WRAPPING; | ||
minFilter?: TEXTURE_FILTERING; | ||
magFilter?: TEXTURE_FILTERING; | ||
center?: vec2; | ||
color?: Color; | ||
offset?: vec2; | ||
repeat?: vec2; | ||
rotation?: number; | ||
texCoord?: number; | ||
flipY?: boolean; | ||
}, id?: string, version?: string); | ||
get blob(): Blob | undefined; | ||
set blob(value: Blob | undefined); | ||
get center(): vec2; | ||
@@ -9,0 +24,0 @@ set center(value: vec2); |
@@ -13,3 +13,3 @@ "use strict"; | ||
}; | ||
var _MapData_center, _MapData_color, _MapData_flipY, _MapData_image, _MapData_magFilter, _MapData_minFilter, _MapData_offset, _MapData_repeat, _MapData_rotation, _MapData_texCoord, _MapData_wrapS, _MapData_wrapT; | ||
var _MapData_blob, _MapData_center, _MapData_color, _MapData_flipY, _MapData_image, _MapData_magFilter, _MapData_minFilter, _MapData_offset, _MapData_repeat, _MapData_rotation, _MapData_texCoord, _MapData_wrapS, _MapData_wrapT; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -23,5 +23,6 @@ exports.MapData = void 0; | ||
// #region Constructors (1) | ||
constructor(image, wrapS = IMapData_1.TEXTURE_WRAPPING.REPEAT, wrapT = IMapData_1.TEXTURE_WRAPPING.REPEAT, minFilter = IMapData_1.TEXTURE_FILTERING.NONE, magFilter = IMapData_1.TEXTURE_FILTERING.NONE, center = gl_matrix_1.vec2.fromValues(0, 0), color, offset = gl_matrix_1.vec2.fromValues(0, 0), repeat = gl_matrix_1.vec2.fromValues(1, 1), rotation = 0, texCoord, flipY = true, id, version) { | ||
constructor(image, properties, id, version) { | ||
super(id, version); | ||
// #region Properties (11) | ||
_MapData_blob.set(this, void 0); | ||
_MapData_center.set(this, gl_matrix_1.vec2.fromValues(0, 0)); | ||
@@ -40,16 +41,23 @@ _MapData_color.set(this, void 0); | ||
__classPrivateFieldSet(this, _MapData_image, image, "f"); | ||
__classPrivateFieldSet(this, _MapData_wrapS, wrapS, "f"); | ||
__classPrivateFieldSet(this, _MapData_wrapT, wrapT, "f"); | ||
__classPrivateFieldSet(this, _MapData_minFilter, minFilter, "f"); | ||
__classPrivateFieldSet(this, _MapData_magFilter, magFilter, "f"); | ||
__classPrivateFieldSet(this, _MapData_center, center, "f"); | ||
__classPrivateFieldSet(this, _MapData_color, color, "f"); | ||
__classPrivateFieldSet(this, _MapData_offset, offset, "f"); | ||
__classPrivateFieldSet(this, _MapData_repeat, repeat, "f"); | ||
__classPrivateFieldSet(this, _MapData_rotation, rotation, "f"); | ||
__classPrivateFieldSet(this, _MapData_texCoord, texCoord, "f"); | ||
__classPrivateFieldSet(this, _MapData_flipY, flipY, "f"); | ||
__classPrivateFieldSet(this, _MapData_blob, properties ? properties.blob : undefined, "f"); | ||
__classPrivateFieldSet(this, _MapData_wrapS, properties && properties.wrapS !== undefined ? properties.wrapS : IMapData_1.TEXTURE_WRAPPING.REPEAT, "f"); | ||
__classPrivateFieldSet(this, _MapData_wrapT, properties && properties.wrapT !== undefined ? properties.wrapT : IMapData_1.TEXTURE_WRAPPING.REPEAT, "f"); | ||
__classPrivateFieldSet(this, _MapData_minFilter, properties && properties.minFilter !== undefined ? properties.minFilter : IMapData_1.TEXTURE_FILTERING.NONE, "f"); | ||
__classPrivateFieldSet(this, _MapData_magFilter, properties && properties.magFilter !== undefined ? properties.magFilter : IMapData_1.TEXTURE_FILTERING.NONE, "f"); | ||
__classPrivateFieldSet(this, _MapData_center, properties && properties.center !== undefined ? properties.center : gl_matrix_1.vec2.fromValues(0, 0), "f"); | ||
__classPrivateFieldSet(this, _MapData_color, properties ? properties.color : undefined, "f"); | ||
__classPrivateFieldSet(this, _MapData_offset, properties && properties.offset !== undefined ? properties.offset : gl_matrix_1.vec2.fromValues(0, 0), "f"); | ||
__classPrivateFieldSet(this, _MapData_repeat, properties && properties.repeat !== undefined ? properties.repeat : gl_matrix_1.vec2.fromValues(1, 1), "f"); | ||
__classPrivateFieldSet(this, _MapData_rotation, properties && properties.rotation !== undefined ? properties.rotation : 0, "f"); | ||
__classPrivateFieldSet(this, _MapData_texCoord, properties ? properties.texCoord : undefined, "f"); | ||
__classPrivateFieldSet(this, _MapData_flipY, properties && properties.flipY !== undefined ? properties.flipY : true, "f"); | ||
} | ||
// #endregion Constructors (1) | ||
// #region Public Accessors (11) | ||
get blob() { | ||
return __classPrivateFieldGet(this, _MapData_blob, "f"); | ||
} | ||
set blob(value) { | ||
__classPrivateFieldSet(this, _MapData_blob, value, "f"); | ||
} | ||
get center() { | ||
@@ -130,7 +138,20 @@ return __classPrivateFieldGet(this, _MapData_center, "f"); | ||
clone() { | ||
return new MapData(this.image, this.wrapS, this.wrapT, this.minFilter, this.magFilter, this.center, this.color, this.offset, this.repeat, this.rotation, this.texCoord, this.flipY, this.id, this.version); | ||
return new MapData(this.image, { | ||
blob: this.blob, | ||
wrapS: this.wrapS, | ||
wrapT: this.wrapT, | ||
minFilter: this.minFilter, | ||
magFilter: this.magFilter, | ||
center: this.center, | ||
color: this.color, | ||
offset: this.offset, | ||
repeat: this.repeat, | ||
rotation: this.rotation, | ||
texCoord: this.texCoord, | ||
flipY: this.flipY | ||
}, this.id, this.version); | ||
} | ||
} | ||
exports.MapData = MapData; | ||
_MapData_center = new WeakMap(), _MapData_color = new WeakMap(), _MapData_flipY = new WeakMap(), _MapData_image = new WeakMap(), _MapData_magFilter = new WeakMap(), _MapData_minFilter = new WeakMap(), _MapData_offset = new WeakMap(), _MapData_repeat = new WeakMap(), _MapData_rotation = new WeakMap(), _MapData_texCoord = new WeakMap(), _MapData_wrapS = new WeakMap(), _MapData_wrapT = new WeakMap(); | ||
_MapData_blob = new WeakMap(), _MapData_center = new WeakMap(), _MapData_color = new WeakMap(), _MapData_flipY = new WeakMap(), _MapData_image = new WeakMap(), _MapData_magFilter = new WeakMap(), _MapData_minFilter = new WeakMap(), _MapData_offset = new WeakMap(), _MapData_repeat = new WeakMap(), _MapData_rotation = new WeakMap(), _MapData_texCoord = new WeakMap(), _MapData_wrapS = new WeakMap(), _MapData_wrapT = new WeakMap(); | ||
//# sourceMappingURL=MapData.js.map |
@@ -43,2 +43,3 @@ import { CustomData } from './implementation/data/CustomData'; | ||
import { Color } from './types'; | ||
import { IOutputEvent } from './interfaces/events/IOutputEvent'; | ||
export { IMaterialStandardData, MaterialStandardData, IMaterialStandardDataProperties, IMaterialAbstractData, IMaterialAbstractDataProperties, AbstractMaterialData, IMaterialUnlitData, MaterialUnlitData, IMaterialUnlitDataProperties, IMaterialShadowData, MaterialShadowData, IMaterialShadowDataProperties, IMaterialSpecularGlossinessData, MaterialSpecularGlossinessData, IMaterialSpecularGlossinessDataProperties, IMaterialGemData, MaterialGemData, IMaterialGemDataProperties, IMapData, MapData, MATERIAL_SIDE, MATERIAL_ALPHA, MATERIAL_SHADING, TEXTURE_WRAPPING, TEXTURE_FILTERING }; | ||
@@ -48,5 +49,5 @@ export { IAnimationData, AnimationData, IAnimationTrack, IGeometryData, IAttributeData, IPrimitiveData, IMaterialVariantsData, GeometryData, AttributeData, PrimitiveData, MaterialVariantsData, PRIMITIVE_MODE }; | ||
export { ICustomData, CustomData, IBoneData, BoneData }; | ||
export { EventResponseMapping, IViewportEvent, ISessionEvent, ICameraEvent, ISceneEvent, ITaskEvent, TASK_TYPE }; | ||
export { EventResponseMapping, IViewportEvent, ISessionEvent, IOutputEvent, ICameraEvent, ISceneEvent, ITaskEvent, TASK_TYPE }; | ||
export { ISDTFOverviewData, SDTFOverviewData, ISDTFOverview, SDTFAttributesData, ISDTFAttributesData, ISDTFAttributeData, SDTFAttributeData, SDTFItemData, ISDTFItemData, ISDTFAttributeVisualizationData, SdtfTypeHintName as SDTF_TYPEHINT, SdtfPrimitiveTypeGuard }; | ||
export { Color }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree"; | ||
import { vec2 } from "gl-matrix"; | ||
import { Color } from "../../../types"; | ||
import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree'; | ||
import { vec2 } from 'gl-matrix'; | ||
import { Color } from '../../../types'; | ||
export declare enum TEXTURE_WRAPPING { | ||
@@ -19,2 +19,3 @@ REPEAT = 10497, | ||
export interface IMapData extends ITreeNodeData { | ||
blob?: Blob; | ||
center: vec2; | ||
@@ -21,0 +22,0 @@ color?: Color; |
@@ -1,2 +0,2 @@ | ||
import { EVENTTYPE_CAMERA, EVENTTYPE_RENDERING, EVENTTYPE_SCENE, EVENTTYPE_SESSION, EVENTTYPE_TASK, EVENTTYPE_VIEWPORT } from "@shapediver/viewer.shared.services"; | ||
import { EVENTTYPE_CAMERA, EVENTTYPE_OUTPUT, EVENTTYPE_RENDERING, EVENTTYPE_SCENE, EVENTTYPE_SESSION, EVENTTYPE_TASK, EVENTTYPE_VIEWPORT } from "@shapediver/viewer.shared.services"; | ||
import { ICameraEvent } from "./ICameraEvent"; | ||
@@ -7,2 +7,3 @@ import { ISceneEvent } from "./ISceneEvent"; | ||
import { IViewportEvent } from "./IViewportEvent"; | ||
import { IOutputEvent } from "./IOutputEvent"; | ||
export declare type EventResponseMapping = { | ||
@@ -12,4 +13,6 @@ [EVENTTYPE_CAMERA.CAMERA_START]: ICameraEvent; | ||
[EVENTTYPE_CAMERA.CAMERA_END]: ICameraEvent; | ||
[EVENTTYPE_OUTPUT.OUTPUT_UPDATED]: IOutputEvent; | ||
[EVENTTYPE_RENDERING.BEAUTY_RENDERING_FINISHED]: IViewportEvent; | ||
[EVENTTYPE_SCENE.SCENE_BOUNDING_BOX_CHANGE]: ISceneEvent; | ||
[EVENTTYPE_SCENE.SCENE_BOUNDING_BOX_EMPTY]: ISceneEvent; | ||
[EVENTTYPE_VIEWPORT.BUSY_MODE_ON]: IViewportEvent; | ||
@@ -16,0 +19,0 @@ [EVENTTYPE_VIEWPORT.BUSY_MODE_OFF]: IViewportEvent; |
{ | ||
"name": "@shapediver/viewer.shared.types", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "", | ||
@@ -43,8 +43,8 @@ "keywords": [], | ||
"@shapediver/sdk.sdtf-v1": "1.4.0", | ||
"@shapediver/viewer.shared.math": "2.11.0", | ||
"@shapediver/viewer.shared.node-tree": "2.11.0", | ||
"@shapediver/viewer.shared.services": "2.11.0", | ||
"@shapediver/viewer.shared.math": "2.12.0", | ||
"@shapediver/viewer.shared.node-tree": "2.12.0", | ||
"@shapediver/viewer.shared.services": "2.12.0", | ||
"gl-matrix": "3.3.0" | ||
}, | ||
"gitHead": "abc828ee5f772bc79b737c994716b8ec372503ef" | ||
"gitHead": "4453bb1d704facd5722ffd81518e54b5453d991f" | ||
} |
@@ -1,5 +0,5 @@ | ||
import { vec2 } from "gl-matrix"; | ||
import { AbstractTreeNodeData } from "@shapediver/viewer.shared.node-tree"; | ||
import { IMapData, TEXTURE_FILTERING, TEXTURE_WRAPPING } from "../../interfaces/data/material/IMapData"; | ||
import { Color } from "../../types"; | ||
import { vec2 } from 'gl-matrix'; | ||
import { AbstractTreeNodeData } from '@shapediver/viewer.shared.node-tree'; | ||
import { IMapData, TEXTURE_FILTERING, TEXTURE_WRAPPING } from '../../interfaces/data/material/IMapData'; | ||
import { Color } from '../../types'; | ||
@@ -9,2 +9,3 @@ export class MapData extends AbstractTreeNodeData implements IMapData { | ||
#blob?: Blob; | ||
#center: vec2 = vec2.fromValues(0, 0); | ||
@@ -29,13 +30,16 @@ #color?: Color; | ||
image: HTMLImageElement, | ||
wrapS: TEXTURE_WRAPPING = TEXTURE_WRAPPING.REPEAT, | ||
wrapT: TEXTURE_WRAPPING = TEXTURE_WRAPPING.REPEAT, | ||
minFilter: TEXTURE_FILTERING = TEXTURE_FILTERING.NONE, | ||
magFilter: TEXTURE_FILTERING = TEXTURE_FILTERING.NONE, | ||
center: vec2 = vec2.fromValues(0, 0), | ||
color?: Color, | ||
offset: vec2 = vec2.fromValues(0, 0), | ||
repeat: vec2 = vec2.fromValues(1, 1), | ||
rotation: number = 0, | ||
texCoord?: number, | ||
flipY: boolean = true, | ||
properties?: { | ||
blob?: Blob, | ||
wrapS?: TEXTURE_WRAPPING, | ||
wrapT?: TEXTURE_WRAPPING, | ||
minFilter?: TEXTURE_FILTERING, | ||
magFilter?: TEXTURE_FILTERING, | ||
center?: vec2, | ||
color?: Color, | ||
offset?: vec2, | ||
repeat?: vec2, | ||
rotation?: number, | ||
texCoord?: number, | ||
flipY?: boolean, | ||
}, | ||
id?: string, | ||
@@ -46,13 +50,14 @@ version?: string | ||
this.#image = image; | ||
this.#wrapS = wrapS; | ||
this.#wrapT = wrapT; | ||
this.#minFilter = minFilter; | ||
this.#magFilter = magFilter; | ||
this.#center = center; | ||
this.#color = color; | ||
this.#offset = offset; | ||
this.#repeat = repeat; | ||
this.#rotation = rotation; | ||
this.#texCoord = texCoord; | ||
this.#flipY = flipY; | ||
this.#blob = properties ? properties.blob : undefined; | ||
this.#wrapS = properties && properties.wrapS !== undefined ? properties.wrapS : TEXTURE_WRAPPING.REPEAT; | ||
this.#wrapT = properties && properties.wrapT !== undefined ? properties.wrapT : TEXTURE_WRAPPING.REPEAT; | ||
this.#minFilter = properties && properties.minFilter !== undefined ? properties.minFilter : TEXTURE_FILTERING.NONE; | ||
this.#magFilter = properties && properties.magFilter !== undefined ? properties.magFilter : TEXTURE_FILTERING.NONE; | ||
this.#center = properties && properties.center !== undefined ? properties.center : vec2.fromValues(0, 0); | ||
this.#color = properties ? properties.color : undefined; | ||
this.#offset = properties && properties.offset !== undefined ? properties.offset : vec2.fromValues(0, 0); | ||
this.#repeat = properties && properties.repeat !== undefined ? properties.repeat : vec2.fromValues(1, 1); | ||
this.#rotation = properties && properties.rotation !== undefined ? properties.rotation : 0; | ||
this.#texCoord = properties ? properties.texCoord : undefined; | ||
this.#flipY = properties && properties.flipY !== undefined ? properties.flipY : true; | ||
} | ||
@@ -64,2 +69,10 @@ | ||
public get blob(): Blob | undefined { | ||
return this.#blob; | ||
} | ||
public set blob(value: Blob | undefined) { | ||
this.#blob = value; | ||
} | ||
public get center(): vec2 { | ||
@@ -166,3 +179,18 @@ return this.#center; | ||
public clone(): IMapData { | ||
return new MapData(<HTMLImageElement>this.image, this.wrapS, this.wrapT, this.minFilter, this.magFilter, this.center, this.color, this.offset, this.repeat, this.rotation, this.texCoord, this.flipY, this.id, this.version); | ||
return new MapData( | ||
<HTMLImageElement>this.image, | ||
{ | ||
blob: this.blob, | ||
wrapS: this.wrapS, | ||
wrapT: this.wrapT, | ||
minFilter: this.minFilter, | ||
magFilter: this.magFilter, | ||
center: this.center, | ||
color: this.color, | ||
offset: this.offset, | ||
repeat: this.repeat, | ||
rotation: this.rotation, | ||
texCoord: this.texCoord, | ||
flipY: this.flipY | ||
}, this.id, this.version); | ||
} | ||
@@ -169,0 +197,0 @@ |
@@ -45,2 +45,3 @@ import { CustomData } from './implementation/data/CustomData' | ||
import { Color } from './types' | ||
import { IOutputEvent } from './interfaces/events/IOutputEvent' | ||
@@ -70,3 +71,3 @@ export { | ||
export { | ||
EventResponseMapping, IViewportEvent, ISessionEvent, ICameraEvent, ISceneEvent, ITaskEvent, TASK_TYPE | ||
EventResponseMapping, IViewportEvent, ISessionEvent, IOutputEvent, ICameraEvent, ISceneEvent, ITaskEvent, TASK_TYPE | ||
} | ||
@@ -73,0 +74,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree"; | ||
import { vec2 } from "gl-matrix"; | ||
import { Color } from "../../../types"; | ||
import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree'; | ||
import { vec2 } from 'gl-matrix'; | ||
import { Color } from '../../../types'; | ||
@@ -24,2 +24,3 @@ export enum TEXTURE_WRAPPING { | ||
blob?: Blob; | ||
center: vec2; | ||
@@ -26,0 +27,0 @@ color?: Color; |
@@ -1,2 +0,2 @@ | ||
import { EVENTTYPE_CAMERA, EVENTTYPE_INTERACTION, EVENTTYPE_RENDERING, EVENTTYPE_SCENE, EVENTTYPE_SESSION, EVENTTYPE_TASK, EVENTTYPE_VIEWPORT } from "@shapediver/viewer.shared.services"; | ||
import { EVENTTYPE_CAMERA, EVENTTYPE_INTERACTION, EVENTTYPE_OUTPUT, EVENTTYPE_RENDERING, EVENTTYPE_SCENE, EVENTTYPE_SESSION, EVENTTYPE_TASK, EVENTTYPE_VIEWPORT } from "@shapediver/viewer.shared.services"; | ||
import { ICameraEvent } from "./ICameraEvent"; | ||
@@ -7,2 +7,3 @@ import { ISceneEvent } from "./ISceneEvent"; | ||
import { IViewportEvent } from "./IViewportEvent"; | ||
import { IOutputEvent } from "./IOutputEvent"; | ||
@@ -13,4 +14,6 @@ export type EventResponseMapping = { | ||
[EVENTTYPE_CAMERA.CAMERA_END]: ICameraEvent, | ||
[EVENTTYPE_OUTPUT.OUTPUT_UPDATED]: IOutputEvent, | ||
[EVENTTYPE_RENDERING.BEAUTY_RENDERING_FINISHED]: IViewportEvent, | ||
[EVENTTYPE_SCENE.SCENE_BOUNDING_BOX_CHANGE]: ISceneEvent, | ||
[EVENTTYPE_SCENE.SCENE_BOUNDING_BOX_EMPTY]: ISceneEvent, | ||
[EVENTTYPE_VIEWPORT.BUSY_MODE_ON]: IViewportEvent, | ||
@@ -17,0 +20,0 @@ [EVENTTYPE_VIEWPORT.BUSY_MODE_OFF]: IViewportEvent, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
465387
214
7325
+ Added@shapediver/viewer.shared.build-data@2.12.0(transitive)
+ Added@shapediver/viewer.shared.math@2.12.0(transitive)
+ Added@shapediver/viewer.shared.node-tree@2.12.0(transitive)
+ Added@shapediver/viewer.shared.services@2.12.0(transitive)
- Removed@shapediver/viewer.shared.build-data@2.11.0(transitive)
- Removed@shapediver/viewer.shared.math@2.11.0(transitive)
- Removed@shapediver/viewer.shared.node-tree@2.11.0(transitive)
- Removed@shapediver/viewer.shared.services@2.11.0(transitive)