shute-technologies.octopus-web-framework 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/font-loader/data/ofBitmapFontCharset.js +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/font-loader/data/ofBitmapFontCharset.js.map +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/font-loader/ofBitmapFontLoader.js +2 -2
- package/lib/src/shute-technologies/modules/cross-cutting/font-loader/ofBitmapFontLoader.js.map +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/data/ofIShaderCodeInfoInputData.d.ts +2 -0
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderDataTypes.d.ts +4 -1
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderDataTypes.js +3 -0
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderDataTypes.js.map +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderLiterals.d.ts +4 -1
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderLiterals.js +3 -0
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofEnumShaderLiterals.js.map +1 -1
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofShaderAnalizer.js +14 -2
- package/lib/src/shute-technologies/modules/cross-cutting/shader-analizer/ofShaderAnalizer.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofContentManager.js +7 -7
- package/lib/src/shute-technologies/modules/framework/core/content/ofContentManager.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofImageContent.d.ts +22 -0
- package/lib/src/shute-technologies/modules/framework/core/content/ofImageContent.js +69 -40
- package/lib/src/shute-technologies/modules/framework/core/content/ofImageContent.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofMaterialContent.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofMaterialContent.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofSoundContent.js +2 -1
- package/lib/src/shute-technologies/modules/framework/core/content/ofSoundContent.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/ofAudioDevice.d.ts +17 -0
- package/lib/src/shute-technologies/modules/framework/core/device/ofAudioDevice.js +70 -37
- package/lib/src/shute-technologies/modules/framework/core/device/ofAudioDevice.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDevice.d.ts +33 -0
- package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDevice.js +79 -2
- package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDevice.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDeviceManager.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDeviceManager.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodeObject.d.ts +7 -0
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodeObject.js +24 -4
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodeObject.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodePooler.js +3 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodePooler.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOObject.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOObject.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOPooler.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOPooler.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/ofCanvasContextManager.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/ofCanvasContextManager.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/camera/ofRenderCamera.js +2 -2
- package/lib/src/shute-technologies/modules/framework/core/render/camera/ofRenderCamera.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveCircle.js +17 -2
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveCircle.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveGrid.js +24 -2
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveGrid.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveQuad.js +16 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofPrimitiveQuad.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofSprite.d.ts +2 -0
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofSprite.js +4 -0
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/ofSprite.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/optimization/ofPolygonBatcher.d.ts +2 -0
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/optimization/ofPolygonBatcher.js +12 -4
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/optimization/ofPolygonBatcher.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/optimization/ofSpriteBatcher.js +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/graphics/d2d/optimization/ofSpriteBatcher.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofBaseShader.d.ts +2 -0
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofBaseShader.js +7 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofBaseShader.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofEnumBlendMode.d.ts +6 -0
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofEnumBlendMode.js +11 -0
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofEnumBlendMode.js.map +1 -0
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderAbstract.d.ts +6 -0
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderAbstract.js +76 -30
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderAbstract.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderFactory.js +2 -2
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderFactory.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderPrimitive.js +3 -3
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderPrimitive.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderTexture.js +4 -8
- package/lib/src/shute-technologies/modules/framework/core/render/shader/ofShaderTexture.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/default-assets/ofDefaultShaderSources.js +1 -1
- package/lib/src/shute-technologies/modules/framework/default-assets/ofDefaultShaderSources.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/helpers/ofConsole.d.ts +16 -5
- package/lib/src/shute-technologies/modules/framework/helpers/ofConsole.js +24 -5
- package/lib/src/shute-technologies/modules/framework/helpers/ofConsole.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/helpers/ofGLHelper.js +2 -2
- package/lib/src/shute-technologies/modules/framework/helpers/ofGLHelper.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/math/ofVector2.js +2 -2
- package/lib/src/shute-technologies/modules/framework/math/ofVector2.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/math/ofVector3.js +2 -2
- package/lib/src/shute-technologies/modules/framework/math/ofVector3.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/ofFramework.js +5 -3
- package/lib/src/shute-technologies/modules/framework/ofFramework.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/ofFrameworkFactory.js +2 -2
- package/lib/src/shute-technologies/modules/framework/ofFrameworkFactory.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/scene/ofSceneManager.js +4 -4
- package/lib/src/shute-technologies/modules/framework/scene/ofSceneManager.js.map +1 -1
- package/lib/src/shute-technologies/modules/framework/settings/ofTranslations.js +1 -19
- package/lib/src/shute-technologies/modules/framework/settings/ofTranslations.js.map +1 -1
- package/package.json +5 -3
|
@@ -7,11 +7,16 @@ export declare class OFAudioDevice {
|
|
|
7
7
|
private _audioContext;
|
|
8
8
|
private _initialTime;
|
|
9
9
|
private _masterVolume;
|
|
10
|
+
private _masterGainNode;
|
|
10
11
|
private _isAudioSupported;
|
|
11
12
|
private _audioDeviceOptimizationManager;
|
|
12
13
|
private _audioNodePooler;
|
|
13
14
|
get initialTime(): number;
|
|
14
15
|
get masterVolume(): number;
|
|
16
|
+
/** Gain applied to everything connectNodes() routes to the speakers. Defaults to 0.1. */
|
|
17
|
+
set masterVolume(value: number);
|
|
18
|
+
/** The single master gain every connectNodes() chain ends in; connected to the destination once. */
|
|
19
|
+
get masterGainNode(): GainNode;
|
|
15
20
|
get isAudioSupported(): boolean;
|
|
16
21
|
get audioContext(): AudioContext;
|
|
17
22
|
get audioDeviceOptimizationManager(): OFAudioDeviceOptimizationManager;
|
|
@@ -19,8 +24,20 @@ export declare class OFAudioDevice {
|
|
|
19
24
|
initialize(): void;
|
|
20
25
|
requestGainNode(): OFAudioNodeObject<GainNode>;
|
|
21
26
|
requestStereoPannerNode(): OFAudioNodeObject<StereoPannerNode>;
|
|
27
|
+
/** Returns a node to the pool. It is disconnected first (OFAudioNodeObject.deactivate). */
|
|
22
28
|
releaseNode(node: OFAudioNodeObject<AudioNode>): void;
|
|
29
|
+
/** Ages idle pooled nodes out. OFFramework.update calls it every frame. */
|
|
23
30
|
update(args: IOFRenderArgs): void;
|
|
31
|
+
/** source -> args[0] -> ... -> args[n - 1] -> master gain -> destination. */
|
|
24
32
|
static connectNodes(audioDevice: OFAudioDevice, source: AudioNode, ...args: Array<OFAudioNodeObject<AudioNode>>): void;
|
|
33
|
+
/** source -> args[0] -> ... -> args[n - 1] -> destination, bypassing the master gain. */
|
|
25
34
|
static connectNodesNoMaster(audioDevice: OFAudioDevice, source: AudioNode, ...args: Array<OFAudioNodeObject<AudioNode>>): void;
|
|
35
|
+
/**
|
|
36
|
+
* Stand-in for StereoPannerNode where createStereoPanner is missing (Safari before 14.1): an
|
|
37
|
+
* equal-power PannerNode, with a `pan` whose `value` moves the source the way a stereo panner
|
|
38
|
+
* would. Callers can keep writing `node.pan.value = x`.
|
|
39
|
+
*/
|
|
40
|
+
static createStereoPannerFallback(audioContext: AudioContext): StereoPannerNode;
|
|
41
|
+
/** Connects source through every node in order and returns the last AudioNode of the chain. */
|
|
42
|
+
private static connectChain;
|
|
26
43
|
}
|
|
@@ -12,6 +12,17 @@ class OFAudioDevice {
|
|
|
12
12
|
get masterVolume() {
|
|
13
13
|
return this._masterVolume;
|
|
14
14
|
}
|
|
15
|
+
/** Gain applied to everything connectNodes() routes to the speakers. Defaults to 0.1. */
|
|
16
|
+
set masterVolume(value) {
|
|
17
|
+
this._masterVolume = value;
|
|
18
|
+
if (this._masterGainNode) {
|
|
19
|
+
this._masterGainNode.gain.value = value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** The single master gain every connectNodes() chain ends in; connected to the destination once. */
|
|
23
|
+
get masterGainNode() {
|
|
24
|
+
return this._masterGainNode;
|
|
25
|
+
}
|
|
15
26
|
get isAudioSupported() {
|
|
16
27
|
return this._isAudioSupported;
|
|
17
28
|
}
|
|
@@ -32,15 +43,20 @@ class OFAudioDevice {
|
|
|
32
43
|
window.AudioContext = window.AudioContext || window['webAudioContext'] || window['webkitAudioContext'];
|
|
33
44
|
this._audioContext = new AudioContext();
|
|
34
45
|
this._initialTime = this._audioContext.currentTime;
|
|
46
|
+
// One master gain for the whole device. connectNodes() used to request a new pooled gain
|
|
47
|
+
// node per call and never release it, so every sound played leaked a node.
|
|
48
|
+
this._masterGainNode = this._audioContext.createGain();
|
|
49
|
+
this._masterGainNode.gain.value = this._masterVolume;
|
|
50
|
+
this._masterGainNode.connect(this._audioContext.destination);
|
|
35
51
|
// Create device optimization managment
|
|
36
52
|
this._audioDeviceOptimizationManager = new ofAudioDeviceOptimizationManager_1.OFAudioDeviceOptimizationManager(this);
|
|
37
53
|
this._audioNodePooler = this._audioDeviceOptimizationManager.audioNodePooler;
|
|
38
54
|
this._isAudioSupported = true;
|
|
39
|
-
ofConsole_1.OFConsole.log(ofTranslations_1.OFTranslations.Framework.AudioDevice.initialize, this._framework.frameworkIdentifier.toString());
|
|
55
|
+
ofConsole_1.OFConsole.log(this, ofTranslations_1.OFTranslations.Framework.AudioDevice.initialize, this._framework.frameworkIdentifier.toString());
|
|
40
56
|
}
|
|
41
57
|
catch (e) {
|
|
42
58
|
this._isAudioSupported = false;
|
|
43
|
-
ofConsole_1.OFConsole.error(ofTranslations_1.OFTranslations.Framework.AudioDevice.notSupported, this._framework.frameworkIdentifier.toString());
|
|
59
|
+
ofConsole_1.OFConsole.error(this, ofTranslations_1.OFTranslations.Framework.AudioDevice.notSupported, this._framework.frameworkIdentifier.toString());
|
|
44
60
|
}
|
|
45
61
|
}
|
|
46
62
|
requestGainNode() {
|
|
@@ -54,55 +70,72 @@ class OFAudioDevice {
|
|
|
54
70
|
requestStereoPannerNode() {
|
|
55
71
|
const audioNodeObj = this._audioNodePooler.getAvailableAudioNode(ofEnumAudioNodeType_1.OFEnumAudioNodeType.StereoPannerNode);
|
|
56
72
|
if (audioNodeObj.bufferType === ofEnumAudioNodeType_1.OFEnumAudioNodeType.Unsigned) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
// Without createStereoPanner the node used to stay undefined and the first
|
|
74
|
+
// `node.webAudioNode.pan` / connect threw.
|
|
75
|
+
const stereoPannerNode = this._audioContext.createStereoPanner
|
|
76
|
+
? this._audioContext.createStereoPanner()
|
|
77
|
+
: OFAudioDevice.createStereoPannerFallback(this._audioContext);
|
|
78
|
+
audioNodeObj.setWebAudioNode(stereoPannerNode, ofEnumAudioNodeType_1.OFEnumAudioNodeType.StereoPannerNode);
|
|
61
79
|
}
|
|
62
80
|
return audioNodeObj;
|
|
63
81
|
}
|
|
82
|
+
/** Returns a node to the pool. It is disconnected first (OFAudioNodeObject.deactivate). */
|
|
64
83
|
releaseNode(node) {
|
|
65
84
|
if (node) {
|
|
66
|
-
node.webAudioNode.disconnect();
|
|
67
85
|
node.deactivate();
|
|
68
86
|
}
|
|
69
87
|
}
|
|
88
|
+
/** Ages idle pooled nodes out. OFFramework.update calls it every frame. */
|
|
70
89
|
update(args) {
|
|
71
|
-
this._audioDeviceOptimizationManager
|
|
90
|
+
if (this._audioDeviceOptimizationManager) {
|
|
91
|
+
this._audioDeviceOptimizationManager.update(args);
|
|
92
|
+
}
|
|
72
93
|
}
|
|
94
|
+
/** source -> args[0] -> ... -> args[n - 1] -> master gain -> destination. */
|
|
73
95
|
static connectNodes(audioDevice, source, ...args) {
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
// Connect the Nodes
|
|
80
|
-
for (let i = 0; i + 1 < argCount; i++) {
|
|
81
|
-
args[i].webAudioNode.connect(args[i + 1].webAudioNode);
|
|
82
|
-
}
|
|
83
|
-
// Connect last node with the AudioContext Destination
|
|
84
|
-
if (argCount > 2) {
|
|
85
|
-
const gainNode = audioDevice.requestGainNode();
|
|
86
|
-
gainNode.activate();
|
|
87
|
-
gainNode.webAudioNode.gain.value = audioDevice.masterVolume;
|
|
88
|
-
args[argCount - 1].webAudioNode.connect(gainNode.webAudioNode);
|
|
89
|
-
gainNode.webAudioNode.connect(audioDevice.audioContext.destination);
|
|
90
|
-
}
|
|
96
|
+
// The guards used to be `> 1` (source -> first node) and `> 2` (last node -> master), so a chain
|
|
97
|
+
// of one or two nodes - the usual gain + panner - never reached the speakers.
|
|
98
|
+
const lastNode = OFAudioDevice.connectChain(source, args);
|
|
99
|
+
lastNode.connect(audioDevice.masterGainNode || audioDevice.audioContext.destination);
|
|
91
100
|
}
|
|
101
|
+
/** source -> args[0] -> ... -> args[n - 1] -> destination, bypassing the master gain. */
|
|
92
102
|
static connectNodesNoMaster(audioDevice, source, ...args) {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
const lastNode = OFAudioDevice.connectChain(source, args);
|
|
104
|
+
lastNode.connect(audioDevice.audioContext.destination);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Stand-in for StereoPannerNode where createStereoPanner is missing (Safari before 14.1): an
|
|
108
|
+
* equal-power PannerNode, with a `pan` whose `value` moves the source the way a stereo panner
|
|
109
|
+
* would. Callers can keep writing `node.pan.value = x`.
|
|
110
|
+
*/
|
|
111
|
+
static createStereoPannerFallback(audioContext) {
|
|
112
|
+
const panner = audioContext.createPanner();
|
|
113
|
+
let pan = 0;
|
|
114
|
+
const applyPan = () => panner.setPosition(pan, 0, 1 - Math.abs(pan));
|
|
115
|
+
panner.panningModel = 'equalpower';
|
|
116
|
+
applyPan();
|
|
117
|
+
Object.defineProperty(panner, 'pan', {
|
|
118
|
+
value: {
|
|
119
|
+
defaultValue: 0,
|
|
120
|
+
minValue: -1,
|
|
121
|
+
maxValue: 1,
|
|
122
|
+
get value() { return pan; },
|
|
123
|
+
set value(val) {
|
|
124
|
+
pan = Math.max(-1, Math.min(1, Number(val) || 0));
|
|
125
|
+
applyPan();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return panner;
|
|
130
|
+
}
|
|
131
|
+
/** Connects source through every node in order and returns the last AudioNode of the chain. */
|
|
132
|
+
static connectChain(source, nodes) {
|
|
133
|
+
let previous = source;
|
|
134
|
+
for (const node of nodes) {
|
|
135
|
+
previous.connect(node.webAudioNode);
|
|
136
|
+
previous = node.webAudioNode;
|
|
105
137
|
}
|
|
138
|
+
return previous;
|
|
106
139
|
}
|
|
107
140
|
}
|
|
108
141
|
exports.OFAudioDevice = OFAudioDevice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofAudioDevice.js","sourceRoot":"","sources":["../../../../../../../src/shute-technologies/modules/framework/core/device/ofAudioDevice.ts"],"names":[],"mappings":";;;AAEA,4GAAyG;AAEzG,uDAAoD;AACpD,kEAA+D;AAE/D,kFAA+E;AAE/E,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"ofAudioDevice.js","sourceRoot":"","sources":["../../../../../../../src/shute-technologies/modules/framework/core/device/ofAudioDevice.ts"],"names":[],"mappings":";;;AAEA,4GAAyG;AAEzG,uDAAoD;AACpD,kEAA+D;AAE/D,kFAA+E;AAE/E,MAAa,aAAa;IAUxB,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IACD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IACD,yFAAyF;IACzF,IAAI,YAAY,CAAC,KAAa;QAC5B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACzC;IACH,CAAC;IACD,oGAAoG;IACpG,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAC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BACnB,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBAClD,QAAQ,EAAE,CAAC;gBACb,CAAC;aACF;SACF,CAAC,CAAC;QAEH,OAAO,MAAqC,CAAC;IAC/C,CAAC;IAED,+FAA+F;IACvF,MAAM,CAAC,YAAY,CAAC,MAAiB,EAAE,KAA0C;QACvF,IAAI,QAAQ,GAAG,MAAM,CAAC;QAEtB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACpC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;SAC9B;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AApKD,sCAoKC"}
|
|
@@ -5,6 +5,7 @@ import { OFShaderFactory } from '../render/shader/ofShaderFactory';
|
|
|
5
5
|
import { OFDeviceOptimizationManager } from './optimization/gpu/ofDeviceOptimizationManager';
|
|
6
6
|
import { IOFRenderArgs } from '../../interfaces/iofRenderArgs';
|
|
7
7
|
import { IOFCanvasElement } from '../ofCanvasContextManager';
|
|
8
|
+
import { OFEnumBlendMode } from '../render/shader/ofEnumBlendMode';
|
|
8
9
|
export declare class OFGraphicDevice {
|
|
9
10
|
readonly framework: OFFramework;
|
|
10
11
|
private _canvasObject;
|
|
@@ -14,7 +15,20 @@ export declare class OFGraphicDevice {
|
|
|
14
15
|
private _deviceOptimizationManager;
|
|
15
16
|
private _hasCustomCamera;
|
|
16
17
|
private _currentShaderProgram;
|
|
18
|
+
private readonly _enabledVertexAttributes;
|
|
19
|
+
private _currentBlendMode;
|
|
17
20
|
clearColor: OFColor;
|
|
21
|
+
/** Seconds since the framework started, summed from the frames' `dt`. Fills a `: Time` input. */
|
|
22
|
+
elapsedSeconds: number;
|
|
23
|
+
/** The viewport last set through setViewport(), in drawing-buffer pixels. Fills a `: Viewport` input. */
|
|
24
|
+
readonly currentViewport: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
/** Values by uniform name that fill a `: Shared` input of any shader. A texture takes a unit. */
|
|
31
|
+
readonly sharedUniforms: Map<string, number | ArrayLike<number> | WebGLTexture>;
|
|
18
32
|
get currentShaderProgram(): WebGLProgram;
|
|
19
33
|
get hasCustomCamera(): boolean;
|
|
20
34
|
get graphicContext(): WebGLRenderingContext;
|
|
@@ -28,6 +42,25 @@ export declare class OFGraphicDevice {
|
|
|
28
42
|
resize(width: number, height: number, oldWidth: number, oldHeight: number): void;
|
|
29
43
|
useCustomRenderCamera(hasCustomCamera: boolean): void;
|
|
30
44
|
useShaderProgram(shaderProgram: WebGLProgram): void;
|
|
45
|
+
/**
|
|
46
|
+
* Enables blending and sets the blend function for `mode`. Skips every GL call when the mode is
|
|
47
|
+
* the one set last. A host that changes GL blend state itself calls resetStateCache() afterwards.
|
|
48
|
+
*/
|
|
49
|
+
useBlendMode(mode: OFEnumBlendMode): void;
|
|
50
|
+
/** Records the viewport and sets it on the context. */
|
|
51
|
+
setViewport(x: number, y: number, width: number, height: number): void;
|
|
52
|
+
/** Forgets the cached blend mode, so the next useBlendMode() sets it on the context. */
|
|
53
|
+
resetStateCache(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Enables the vertex attribute arrays a draw reads, and disables every one an earlier draw
|
|
56
|
+
* enabled that this draw does not read. Every shader's draw goes through here.
|
|
57
|
+
*
|
|
58
|
+
* Enabled arrays belong to the context, not to the program: a textured draw leaves its texture
|
|
59
|
+
* coordinates enabled, pointing at its own vertex buffer. Once the VBO pool deletes that buffer,
|
|
60
|
+
* every later draw that leaves the array enabled fails with INVALID_OPERATION ("no buffer is bound
|
|
61
|
+
* to enabled attribute") and draws nothing. Inactive locations (-1) are skipped.
|
|
62
|
+
*/
|
|
63
|
+
useVertexAttributes(locations: ReadonlyArray<number>): void;
|
|
31
64
|
clear(): void;
|
|
32
65
|
update(args: IOFRenderArgs): void;
|
|
33
66
|
}
|
|
@@ -4,6 +4,7 @@ exports.OFGraphicDevice = void 0;
|
|
|
4
4
|
const ofRenderCamera_1 = require("../render/camera/ofRenderCamera");
|
|
5
5
|
const ofShaderFactory_1 = require("../render/shader/ofShaderFactory");
|
|
6
6
|
const ofDeviceOptimizationManager_1 = require("./optimization/gpu/ofDeviceOptimizationManager");
|
|
7
|
+
const ofEnumBlendMode_1 = require("../render/shader/ofEnumBlendMode");
|
|
7
8
|
class OFGraphicDevice {
|
|
8
9
|
get currentShaderProgram() { return this._currentShaderProgram; }
|
|
9
10
|
get hasCustomCamera() { return this._hasCustomCamera; }
|
|
@@ -14,6 +15,14 @@ class OFGraphicDevice {
|
|
|
14
15
|
get deviceOptimizationManager() { return this._deviceOptimizationManager; }
|
|
15
16
|
constructor(framework) {
|
|
16
17
|
this.framework = framework;
|
|
18
|
+
// Vertex attribute arrays are context state, not program state; see useVertexAttributes().
|
|
19
|
+
this._enabledVertexAttributes = new Set();
|
|
20
|
+
/** Seconds since the framework started, summed from the frames' `dt`. Fills a `: Time` input. */
|
|
21
|
+
this.elapsedSeconds = 0;
|
|
22
|
+
/** The viewport last set through setViewport(), in drawing-buffer pixels. Fills a `: Viewport` input. */
|
|
23
|
+
this.currentViewport = { x: 0, y: 0, width: 0, height: 0 };
|
|
24
|
+
/** Values by uniform name that fill a `: Shared` input of any shader. A texture takes a unit. */
|
|
25
|
+
this.sharedUniforms = new Map();
|
|
17
26
|
this._hasCustomCamera = false;
|
|
18
27
|
this.clearColor = this.framework.settings.renderClearColor;
|
|
19
28
|
}
|
|
@@ -39,8 +48,11 @@ class OFGraphicDevice {
|
|
|
39
48
|
const canvasElement = this._canvasObject.canvasElement;
|
|
40
49
|
canvasElement.setAttribute('width', width.toString());
|
|
41
50
|
canvasElement.setAttribute('height', height.toString());
|
|
42
|
-
//
|
|
43
|
-
|
|
51
|
+
// Resize the device camera even with a custom camera: it still draws everything the host does
|
|
52
|
+
// not give a camera of its own (no `cameraMVP`), and used to keep its boot-time projection, so
|
|
53
|
+
// that content stretched with the canvas. Skip a zero size (a hidden container), which would
|
|
54
|
+
// make the projection singular.
|
|
55
|
+
if (width > 0 && height > 0) {
|
|
44
56
|
this._renderCamera.resize(width, height, oldWidth, oldHeight);
|
|
45
57
|
}
|
|
46
58
|
}
|
|
@@ -54,6 +66,70 @@ class OFGraphicDevice {
|
|
|
54
66
|
_GL.useProgram(shaderProgram);
|
|
55
67
|
// }
|
|
56
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Enables blending and sets the blend function for `mode`. Skips every GL call when the mode is
|
|
71
|
+
* the one set last. A host that changes GL blend state itself calls resetStateCache() afterwards.
|
|
72
|
+
*/
|
|
73
|
+
useBlendMode(mode) {
|
|
74
|
+
if (this._currentBlendMode === mode) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const _GL = this._graphicContext;
|
|
78
|
+
_GL.enable(_GL.BLEND);
|
|
79
|
+
switch (mode) {
|
|
80
|
+
case ofEnumBlendMode_1.OFEnumBlendMode.Additive:
|
|
81
|
+
_GL.blendFuncSeparate(_GL.SRC_ALPHA, _GL.ONE, _GL.ONE, _GL.ONE_MINUS_SRC_ALPHA);
|
|
82
|
+
break;
|
|
83
|
+
case ofEnumBlendMode_1.OFEnumBlendMode.Multiply:
|
|
84
|
+
_GL.blendFuncSeparate(_GL.DST_COLOR, _GL.ONE_MINUS_SRC_ALPHA, _GL.ONE, _GL.ONE_MINUS_SRC_ALPHA);
|
|
85
|
+
break;
|
|
86
|
+
case ofEnumBlendMode_1.OFEnumBlendMode.Screen:
|
|
87
|
+
_GL.blendFuncSeparate(_GL.ONE, _GL.ONE_MINUS_SRC_COLOR, _GL.ONE, _GL.ONE_MINUS_SRC_ALPHA);
|
|
88
|
+
break;
|
|
89
|
+
default:
|
|
90
|
+
_GL.blendFunc(_GL.SRC_ALPHA, _GL.ONE_MINUS_SRC_ALPHA);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
this._currentBlendMode = mode;
|
|
94
|
+
}
|
|
95
|
+
/** Records the viewport and sets it on the context. */
|
|
96
|
+
setViewport(x, y, width, height) {
|
|
97
|
+
const viewport = this.currentViewport;
|
|
98
|
+
viewport.x = x;
|
|
99
|
+
viewport.y = y;
|
|
100
|
+
viewport.width = width;
|
|
101
|
+
viewport.height = height;
|
|
102
|
+
this._graphicContext.viewport(x, y, width, height);
|
|
103
|
+
}
|
|
104
|
+
/** Forgets the cached blend mode, so the next useBlendMode() sets it on the context. */
|
|
105
|
+
resetStateCache() {
|
|
106
|
+
this._currentBlendMode = undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Enables the vertex attribute arrays a draw reads, and disables every one an earlier draw
|
|
110
|
+
* enabled that this draw does not read. Every shader's draw goes through here.
|
|
111
|
+
*
|
|
112
|
+
* Enabled arrays belong to the context, not to the program: a textured draw leaves its texture
|
|
113
|
+
* coordinates enabled, pointing at its own vertex buffer. Once the VBO pool deletes that buffer,
|
|
114
|
+
* every later draw that leaves the array enabled fails with INVALID_OPERATION ("no buffer is bound
|
|
115
|
+
* to enabled attribute") and draws nothing. Inactive locations (-1) are skipped.
|
|
116
|
+
*/
|
|
117
|
+
useVertexAttributes(locations) {
|
|
118
|
+
const _GL = this._graphicContext;
|
|
119
|
+
this._enabledVertexAttributes.forEach((location) => {
|
|
120
|
+
if (locations.indexOf(location) < 0) {
|
|
121
|
+
_GL.disableVertexAttribArray(location);
|
|
122
|
+
this._enabledVertexAttributes.delete(location);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
// Enabled on every draw, not only when new: cheap, and right even if a host changed the state.
|
|
126
|
+
for (const location of locations) {
|
|
127
|
+
if (location >= 0) {
|
|
128
|
+
_GL.enableVertexAttribArray(location);
|
|
129
|
+
this._enabledVertexAttributes.add(location);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
57
133
|
clear() {
|
|
58
134
|
const _GL = this._graphicContext;
|
|
59
135
|
const color = this.clearColor;
|
|
@@ -63,6 +139,7 @@ class OFGraphicDevice {
|
|
|
63
139
|
// _GL.depthFunc(_GL.LEQUAL);
|
|
64
140
|
}
|
|
65
141
|
update(args) {
|
|
142
|
+
this.elapsedSeconds += args.dt;
|
|
66
143
|
this.clear();
|
|
67
144
|
this._renderCamera.update(args);
|
|
68
145
|
this._deviceOptimizationManager.update(args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofGraphicDevice.js","sourceRoot":"","sources":["../../../../../../../src/shute-technologies/modules/framework/core/device/ofGraphicDevice.ts"],"names":[],"mappings":";;;AACA,oEAAiE;AAEjE,sEAAmE;AACnE,gGAA6F;
|
|
1
|
+
{"version":3,"file":"ofGraphicDevice.js","sourceRoot":"","sources":["../../../../../../../src/shute-technologies/modules/framework/core/device/ofGraphicDevice.ts"],"names":[],"mappings":";;;AACA,oEAAiE;AAEjE,sEAAmE;AACnE,gGAA6F;AAG7F,sEAAmE;AAEnE,MAAa,eAAe;IAuB1B,IAAI,oBAAoB,KAAmB,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC/E,IAAI,eAAe,KAAc,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChE,IAAI,cAAc,KAA4B,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC5E,IAAI,aAAa,KAAwB,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;IACnF,IAAI,YAAY,KAAqB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACjE,IAAI,aAAa,KAAsB,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IACpE,IAAI,yBAAyB,KAAkC,OAAO,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAExG,YAAqB,SAAsB;QAAt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AAQ,CAAC,CAAC;aAChD;QACH,CAAC,CAAC,CAAC;QAEH,+FAA+F;QAC/F,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;YAChC,IAAI,QAAQ,IAAI,CAAC,EAAE;gBACjB,GAAG,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;gBACtC,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;aAC7C;SACF;IACH,CAAC;IAED,KAAK;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;QAE9B,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACnD,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAEhC,8BAA8B;QAC9B,6BAA6B;IAC/B,CAAC;IAED,MAAM,CAAE,IAAmB;QACzB,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF;AAjLD,0CAiLC"}
|
|
@@ -24,7 +24,7 @@ class OFGraphicDeviceManager {
|
|
|
24
24
|
const graphicDevice = new ofGraphicDevice_1.OFGraphicDevice(this._framework);
|
|
25
25
|
graphicDevice.initialize(canvasObject);
|
|
26
26
|
this._graphicDevices[id] = graphicDevice;
|
|
27
|
-
ofConsole_1.OFConsole.log(ofTranslations_1.OFTranslations.Framework.GraphicDeviceManager.createGraphicDevice, this._framework.frameworkIdentifier.toString(), id);
|
|
27
|
+
ofConsole_1.OFConsole.log(this, ofTranslations_1.OFTranslations.Framework.GraphicDeviceManager.createGraphicDevice, this._framework.frameworkIdentifier.toString(), id);
|
|
28
28
|
return graphicDevice;
|
|
29
29
|
}
|
|
30
30
|
loadDefault() {
|
package/lib/src/shute-technologies/modules/framework/core/device/ofGraphicDeviceManager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofGraphicDeviceManager.js","sourceRoot":"","sources":["../../../../../../../src/shute-technologies/modules/framework/core/device/ofGraphicDeviceManager.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AACpD,uDAAoD;AACpD,kEAA+D;AAM/D,MAAc,sBAAsB;IAIlC,IAAI,eAAe;QACjB,MAAM,MAAM,GAA2B,EAAE,CAAC;QAE1C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YACnD,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;YAE9D,IAAI,aAAa,EAAE;gBACjB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aAC5B;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAClD,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,UAAU,KAAyB,CAAC;IAEpC,mBAAmB,CAAE,EAAU,EAAE,YAA8B;QAC7D,MAAM,aAAa,GAAG,IAAI,iCAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3D,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QAEvC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC;QAEzC,qBAAS,CAAC,GAAG,CAAC,+BAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ofGraphicDeviceManager.js","sourceRoot":"","sources":["../../../../../../../src/sh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,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;aACvD;SACF;IACH,CAAC;IAED,MAAM,CAAE,KAAa,EAAE,MAAc,EAAE,QAAgB,EAAE,SAAiB;QACxE,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YACnD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;SACtE;IACH,CAAC;IAED,MAAM,CAAE,IAAmB;QACzB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YACnD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACxC;IACH,CAAC;CACF;AAvDD,wDAuDC"}
|
|
@@ -17,6 +17,13 @@ export declare class OFAudioNodeObject<T extends AudioNode> {
|
|
|
17
17
|
setWebAudioNode(webAudioNode: T, bufferType: OFEnumAudioNodeType): void;
|
|
18
18
|
activate(): void;
|
|
19
19
|
deactivate(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Restarts the idle countdown and clears `isWaitingForDelete`. The pool calls it when it hands a
|
|
22
|
+
* node out again: a node that had aged out and was reused before the next sweep used to be
|
|
23
|
+
* destroyed (disconnected) while playing.
|
|
24
|
+
*/
|
|
25
|
+
renewLifeTime(): void;
|
|
20
26
|
update(args: IOFRenderArgs): void;
|
|
21
27
|
destroy(): void;
|
|
28
|
+
private disconnectWebAudioNode;
|
|
22
29
|
}
|
|
@@ -23,11 +23,23 @@ class OFAudioNodeObject {
|
|
|
23
23
|
}
|
|
24
24
|
activate() {
|
|
25
25
|
this._isAvailable = false;
|
|
26
|
+
this.renewLifeTime();
|
|
26
27
|
}
|
|
27
28
|
deactivate() {
|
|
29
|
+
// Back to the pool: cut the node out of the graph it was playing in, or the next user of
|
|
30
|
+
// this node would inherit its old connections.
|
|
31
|
+
this.disconnectWebAudioNode();
|
|
28
32
|
this._isAvailable = true;
|
|
29
|
-
|
|
33
|
+
this.renewLifeTime();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Restarts the idle countdown and clears `isWaitingForDelete`. The pool calls it when it hands a
|
|
37
|
+
* node out again: a node that had aged out and was reused before the next sweep used to be
|
|
38
|
+
* destroyed (disconnected) while playing.
|
|
39
|
+
*/
|
|
40
|
+
renewLifeTime() {
|
|
30
41
|
this._lifeTime = OFAudioNodeObject.defaultNodeLifeTime;
|
|
42
|
+
this.isWaitingForDelete = false;
|
|
31
43
|
}
|
|
32
44
|
update(args) {
|
|
33
45
|
if (this._isAvailable) {
|
|
@@ -38,12 +50,20 @@ class OFAudioNodeObject {
|
|
|
38
50
|
}
|
|
39
51
|
}
|
|
40
52
|
destroy() {
|
|
53
|
+
this.disconnectWebAudioNode();
|
|
54
|
+
this.webAudioNode = null;
|
|
55
|
+
}
|
|
56
|
+
disconnectWebAudioNode() {
|
|
41
57
|
if (this.webAudioNode) {
|
|
42
|
-
|
|
58
|
+
try {
|
|
59
|
+
this.webAudioNode.disconnect();
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
// Older WebKit throws when the node has no connections; nothing to undo then.
|
|
63
|
+
}
|
|
43
64
|
}
|
|
44
|
-
this.webAudioNode = null;
|
|
45
65
|
}
|
|
46
66
|
}
|
|
47
|
-
OFAudioNodeObject.defaultNodeLifeTime = 10000 / 1000.0;
|
|
48
67
|
exports.OFAudioNodeObject = OFAudioNodeObject;
|
|
68
|
+
OFAudioNodeObject.defaultNodeLifeTime = 10000 / 1000.0;
|
|
49
69
|
//# sourceMappingURL=ofAudioNodeObject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofAudioNodeObject.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodeObject.ts"],"names":[],"mappings":";;;AACA,+DAA4D;AAG5D,MAAa,iBAAiB;IAW5B,IAAI,EAAE,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3C,IAAI,WAAW,KAAc,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAExD,YAA8B,gBAAmC;QAAnC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAC/D,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,yCAAmB,CAAC,QAAQ,CAAC;QAC/C,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,eAAe,CAAE,YAAe,EAAE,UAA+B;QAC/D,IAAI,IAAI,CAAC,UAAU,KAAK,yCAAmB,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACxE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;SAClC;IACH,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ofAudioNodeObject.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodeObject.ts"],"names":[],"mappings":";;;AACA,+DAA4D;AAG5D,MAAa,iBAAiB;IAW5B,IAAI,EAAE,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3C,IAAI,WAAW,KAAc,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAExD,YAA8B,gBAAmC;QAAnC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAC/D,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC,mBAAmB,C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sB;QAC5B,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI;gBACF,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;aAChC;YAAC,OAAO,CAAC,EAAE;gBACV,8EAA8E;aAC/E;SACF;IACH,CAAC;;AA9EH,8CA+EC;AA9EiB,qCAAmB,GAAG,KAAK,GAAG,MAAM,CAAC"}
|
|
@@ -43,6 +43,8 @@ class OFAudioNodePooler {
|
|
|
43
43
|
// Now call recursively the function until found an available AudioNode
|
|
44
44
|
resultObject = this.getAvailableAudioNode(desiredNodeType);
|
|
45
45
|
}
|
|
46
|
+
// Handed out again: it must not be swept as idle (isWaitingForDelete) before it is activated.
|
|
47
|
+
resultObject.renewLifeTime();
|
|
46
48
|
return resultObject;
|
|
47
49
|
}
|
|
48
50
|
update(args) {
|
|
@@ -64,9 +66,9 @@ class OFAudioNodePooler {
|
|
|
64
66
|
destroy() {
|
|
65
67
|
}
|
|
66
68
|
}
|
|
69
|
+
exports.OFAudioNodePooler = OFAudioNodePooler;
|
|
67
70
|
OFAudioNodePooler.OFEnumsInternal = {
|
|
68
71
|
initialAudioNodeCount: 16,
|
|
69
72
|
resizeAddAudioNodeCount: 8
|
|
70
73
|
};
|
|
71
|
-
exports.OFAudioNodePooler = OFAudioNodePooler;
|
|
72
74
|
//# sourceMappingURL=ofAudioNodePooler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofAudioNodePooler.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodePooler.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AACxD,+DAA4D;AAG5D,MAAa,iBAAiB;IAU5B,YAAqB,uBAAyD;QAAzD,4BAAuB,GAAvB,uBAAuB,CAAkC;QAC5E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,UAAU;QACR,IAAI,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AAY,CAAC;IACtB,CAAC;IAED,MAAM,CAAE,IAAmB;QACzB,IAAI,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;QAE7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;YAErD,IAAI,eAAe,CAAC,kBAAkB,EAAE;gBACtC,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC1B,2BAA2B;gBAC3B,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACvC,CAAC,EAAE,CAAC;gBACJ,KAAK,EAAE,CAAC;aACT;iBACI;gBACH,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAC9B;SACF;IACH,CAAC;IAED,OAAO;IAEP,CAAC;;
|
|
1
|
+
{"version":3,"file":"ofAudioNodePooler.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/audio/ofAudioNodePooler.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AACxD,+DAA4D;AAG5D,MAAa,iBAAiB;IAU5B,YAAqB,uBAAyD;QAAzD,4BAAuB,GAAvB,uBAAuB,CAAkC;QAC5E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,UAAU;QACR,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IACjF,CAAC;IAED,gBAAgB,CAAC,KAAa;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,eAAe,GAAG,IAAI,qCAAiB,CAAC,IAAI,CAAC,CAAC;YACpD,eAAe,CAAC,U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IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;YAErD,IAAI,eAAe,CAAC,kBAAkB,EAAE;gBACtC,eAAe,CAAC,OAAO,EAAE,CAAC;gBAC1B,2BAA2B;gBAC3B,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACvC,CAAC,EAAE,CAAC;gBACJ,KAAK,EAAE,CAAC;aACT;iBACI;gBACH,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAC9B;SACF;IACH,CAAC;IAED,OAAO;IAEP,CAAC;;AArFH,8CAsFC;AApFiB,iCAAe,GAAG;IAChC,qBAAqB,EAAE,EAAE;IACzB,uBAAuB,EAAE,CAAC;CAC3B,CAAC"}
|
package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOObject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofVBOObject.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOObject.ts"],"names":[],"mappings":";;;AACA,+DAA4D;AAG5D,MAAa,WAAW;IAatB,IAAI,EAAE,KAAc,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5C,IAAI,WAAW,KAAe,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEzD,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAClD,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,mBAAmB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,yCAAmB,CAAC,QAAQ,CAAC;QAC/C,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,cAAc,CAAC;IAC7E,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,QAAQ,CAAE,UAA+B;QACvC,IAAI,IAAI,CAAC,UAAU,KAAK,yCAAmB,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACxE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAC9B;QAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,iBAAiB;QACjB,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACnD,CAAC;IAED,MAAM,CAAE,IAAmB;QACzB,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC;YAE1B,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,EAAE;gBACvB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;aAChC;SACF;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;;
|
|
1
|
+
{"version":3,"file":"ofVBOObject.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOObject.ts"],"names":[],"mappings":";;;AACA,+DAA4D;AAG5D,MAAa,WAAW;IAatB,IAAI,EAAE,KAAc,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5C,IAAI,WAAW,KAAe,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEzD,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAClD,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,mBAAmB,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,yCAAmB,CAAC,QAAQ,CAAC;QAC/C,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,cAAc,CAAC;IAC7E,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,QAAQ,CAAE,UAA+B;QACvC,IAAI,IAAI,CAAC,UAAU,KAAK,yCAAmB,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACxE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAC9B;QAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,iBAAiB;QACjB,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,mBAAmB,CAAC;IACnD,CAAC;IAED,MAAM,CAAE,IAAmB;QACzB,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC;YAE1B,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,EAAE;gBACvB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;aAChC;SACF;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;;AAtDH,kCAuDC;AArDiB,+BAAmB,GAAG,MAAM,GAAG,MAAM,CAAC"}
|
package/lib/src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOPooler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofVBOPooler.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOPooler.ts"],"names":[],"mappings":";;;AAEA,+C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AAI,OAAO,KAAK,yCAAmB,CAAC,YAAY;wBAC9C,iBAAiB,KAAK,yCAAmB,CAAC,YAAY,EAAE;wBAExD,YAAY,GAAG,SAAS,CAAC;qBAC1B;yBACI,IAAI,OAAO,KAAK,yCAAmB,CAAC,WAAW;wBAClD,iBAAiB,KAAK,yCAAmB,CAAC,WAAW,EAAE;wBAEvD,YAAY,GAAG,SAAS,CAAC;qBAC1B;iBACF;gBAED,IAAI,YAAY;oBAAE,MAAM;aACzB;SACF;QAED,mDAAmD;QACnD,IAAI,CAAC,YAAY,EAAE;YACjB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;YAC/D,iEAAiE;YACjE,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;SACxD;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,CAAC,IAAmB;QACxB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,uBAAuB,EAAE;YACpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACnD,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBAEzC,IAAI,SAAS,CAAC,kBAAkB,EAAE;oBAChC,SAAS,CAAC,OAAO,EAAE,CAAC;oBACpB,2BAA2B;oBAC3B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACjC,CAAC,EAAE,CAAC;iBACL;qBACI;oBACH,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACxB;aACF;SACF;IACH,CAAC;IAED,OAAO;IAEP,CAAC;;
|
|
1
|
+
{"version":3,"file":"ofVBOPooler.js","sourceRoot":"","sources":["../../../../../../../../../src/shute-technologies/modules/framework/core/device/optimization/gpu/ofVBOPooler.ts"],"names":[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"}
|
|
@@ -42,7 +42,7 @@ class OFCanvasContextManager {
|
|
|
42
42
|
canvas.getContext('experimental-webgl', contextPreferences));
|
|
43
43
|
}
|
|
44
44
|
catch (e) {
|
|
45
|
-
ofConsole_1.OFConsole.error(ofTranslations_1.OFTranslations.Framework.CanvasContextManager.issueRenderingContext, e);
|
|
45
|
+
ofConsole_1.OFConsole.error(this, ofTranslations_1.OFTranslations.Framework.CanvasContextManager.issueRenderingContext, e);
|
|
46
46
|
}
|
|
47
47
|
return graphicContext;
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofCanvasContextManager.js","sourceRoot":"","sources":["../../../../../../src/shute-technologies/modules/framework/core/ofCanvasContextManager.ts"],"names":[],"mappings":";;;AACA,oDAAiD;AACjD,+DAA4D;AAC5D,4DAAyD;AAQzD,MAAa,sBAAsB;IAIjC,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAClD,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAE,EAAU;QAC1B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,mBAAmB,CAAE,EAAU,EAAE,WAAoB;QACnD,MAAM,OAAO,GAAG,6BAAa,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,0BAA0B,EAC5F,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAEjC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;QAEpE,MAAM,MAAM,GAAG,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAsB,CAAC;QACjF,IAAI,CAAC,eAAe,CAAC,IA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vasContextManager.js","sourceRoot":"","sources":["../../../../../../src/shute-technologies/modules/framework/core/ofCanvasContextManager.ts"],"names":[],"mappings":";;;AACA,oDAAiD;AACjD,+DAA4D;AAC5D,4DAAyD;AAQzD,MAAa,sBAAsB;IAIjC,YAA6B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAClD,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAE,EAAU;QAC1B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,mBAAmB,CAAE,EAAU,EAAE,WAAoB;QACnD,MAAM,OAAO,GAAG,6BAAa,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,0BAA0B,EAC5F,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAEjC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;QAEpE,MAAM,MAAM,GAAG,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAsB,CAAC;QACjF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6BAA6B,CAAE,EAAU,EAAE,WAAoB;QAC7D,MAAM,OAAO,GAAG,6BAAa,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,0BAA0B,EAC5F,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACjC,OAAO,CAAC,SAAS,GAAG,qBAAqB,CAAC;QAC1C,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;QAEpE,MAAM,cAAc,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAEzD,MAAM,MAAM,GAAG,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAsB,CAAC;QAC3F,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,mBAAmB,CAAE,MAAyB,EAAE,QAAQ,GAAG,KAAK;QAC9D,IAAI,cAAqC,CAAC;QAC1C,MAAM,kBAAkB,GAAG;YACzB,KAAK,EAAE,QAAQ;YACf,qBAAqB,EAAE,IAAI;YAC3B,cAAc,EAAE,IAAI;YACpB,eAAe,EAAE,SAAS;SACD,CAAC;QAE5B,IAAI;YACF,cAAc,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC;gBAC9D,MAAM,CAAC,UAAU,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAA0B,CAAC;SACzF;QAAC,OAAO,CAAC,EAAE;YACV,qBAAS,CAAC,KAAK,CAAC,IAAI,EAAE,+BAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;SAC/F;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,eAAe,CAAE,MAAyB;QACxC,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACvE,CAAC;CACF;AA7DD,wDA6DC"}
|
|
@@ -58,7 +58,7 @@ class OFRenderCamera {
|
|
|
58
58
|
this._viewport.y = y;
|
|
59
59
|
this._viewport.width = width;
|
|
60
60
|
this._viewport.height = height;
|
|
61
|
-
this.
|
|
61
|
+
this._graphicDevice.setViewport(x, y, width, height);
|
|
62
62
|
}
|
|
63
63
|
createPerspective(fov, width, height, zNear, zFar) {
|
|
64
64
|
this._width = width;
|
|
@@ -103,9 +103,9 @@ class OFRenderCamera {
|
|
|
103
103
|
gl_matrix_1.mat4.multiply(this._transformedMatrix, this._projectionMatrix, this._transformedMatrix);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
exports.OFRenderCamera = OFRenderCamera;
|
|
106
107
|
OFRenderCamera.defaultDepth = 10;
|
|
107
108
|
OFRenderCamera.defaultZNear = 0.01;
|
|
108
109
|
OFRenderCamera.defaultZFar = 100;
|
|
109
110
|
OFRenderCamera.defaultFov = 45;
|
|
110
|
-
exports.OFRenderCamera = OFRenderCamera;
|
|
111
111
|
//# sourceMappingURL=ofRenderCamera.js.map
|