-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from rdkcentral/release-creation
Release of v2.8.0
- Loading branch information
Showing
18 changed files
with
451 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<!-- | ||
If not stated otherwise in this file or this component's LICENSE file the | ||
following copyright and licenses apply: | ||
Copyright 2020 Metrological | ||
Licensed under the Apache License, Version 2.0 (the License); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<script src="../../../devtools/lightning-inspect.js"></script> | ||
</head> | ||
|
||
<body style="margin: 0; padding: 0"> | ||
<script type="module"> | ||
import lng from '../../../src/lightning.mjs'; | ||
attachInspector(lng) | ||
|
||
window.onload = function () { | ||
const images = [ | ||
{ compression: 'etc1', container: 'pvr', src: 'lightning-etc1.pvr' }, | ||
{ compression: 's3tc', container: 'ktx', src: 'sampleImage-s3tc.ktx' }, | ||
{ compression: 'pvrtc', container: 'ktx', src: 'sampleImage-pvrtc.ktx' }, | ||
{ compression: 'etc1', container: 'ktx', src: 'sampleImage-etc1.ktx' }, | ||
{ compression: 'astc_4x4', container: 'ktx', src: 'sampleImage-astc_4x4.ktx' }, | ||
]; | ||
class BasicUsageExample extends lng.Application { | ||
static _template() { | ||
return { | ||
Header: { | ||
rect: true, w: 1920, h: 150, color: 0xff7f8088, | ||
Tx: { | ||
x: 100, y: 50, | ||
text: { | ||
text: '' | ||
} | ||
} | ||
}, | ||
Images: { | ||
x: 50, y: 200, children: [] | ||
} | ||
} | ||
} | ||
|
||
_init() { | ||
const ext = this.stage.renderer.getCompressedTextureExtensions(); | ||
const support = Object.keys(ext).reduce((arr, type) => { | ||
if (!!ext[type]) { | ||
arr.push(type); | ||
} | ||
return arr; | ||
}, []) | ||
this.tag("Tx").text = `supported compression: ${support.join(' | ')}`; | ||
|
||
this.tag("Images").children = images.map((image, index) => { | ||
return { | ||
type: CompressedImage, | ||
imageSource: image.src, | ||
metadata: image, | ||
x: index % 4 * 370, | ||
y: Math.floor(index / 4) * 370 | ||
} | ||
}) | ||
|
||
} | ||
} | ||
|
||
class CompressedImage extends lng.Component { | ||
static _template() { | ||
return { | ||
scale: 0.6, | ||
Holder: { | ||
rect: true, color: 0xff9496a1, | ||
w: 526, h: 580, | ||
Image: { | ||
w: 512, h: 512, | ||
x: 6, y: 56, | ||
}, | ||
Metadata: { | ||
x: 10, y: 3, color: 0xff000000, | ||
text: { | ||
text: '' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
set imageSource(v) { | ||
this.tag('Image').src = v; | ||
} | ||
|
||
set metadata(v) { | ||
this.tag('Metadata').text = `${v.compression} | ${v.container}`; | ||
} | ||
} | ||
|
||
const options = { stage: { w: 1920, h: 1080, precision: 2 / 3, clearColor: 0xFF000000, canvas2d: false, useImageWorker: false }, debug: true } | ||
|
||
const app = new BasicUsageExample(options); | ||
|
||
document.body.appendChild(app.stage.getCanvas()); | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"author": "Metrological, Bas van Meurs <[email protected]>", | ||
"name": "@lightningjs/core", | ||
"version": "2.7.1", | ||
"version": "2.8.0", | ||
"license": "Apache-2.0", | ||
"main": "dist/lightning.js", | ||
"module": "index.js", | ||
|
Oops, something went wrong.